| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 var __create = Object.create; 2 var __defProp = Object.defineProperty; 3 var __getOwnPropDesc = Object.getOwnPropertyDescriptor; 4 var __getOwnPropNames = Object.getOwnPropertyNames; 5 var __getProtoOf = Object.getPrototypeOf; 6 var __hasOwnProp = Object.prototype.hasOwnProperty; 7 var __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() { 14 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; 15 }; 16 var __export = (target, all) => { 17 for (var name2 in all) 18 __defProp(target, name2, { get: all[name2], enumerable: true }); 19 }; 20 var __copyProps = (to, from, except, desc) => { 21 if (from && typeof from === "object" || typeof from === "function") { 22 for (let key of __getOwnPropNames(from)) 23 if (!__hasOwnProp.call(to, key) && key !== except) 24 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); 25 } 26 return to; 27 }; 28 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( 29 // If the importer is in node compatibility mode or this is not an ESM 30 // file that has been converted to a CommonJS file using a Babel- 31 // compatible transform (i.e. "__esModule" has not been set), then set 32 // "default" to the CommonJS "module.exports" for node compatibility. 33 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, 34 mod 35 )); 36 37 // package-external:@wordpress/i18n 38 var require_i18n = __commonJS({ 39 "package-external:@wordpress/i18n"(exports, module) { 40 module.exports = window.wp.i18n; 41 } 42 }); 43 44 // vendor-external:react 45 var require_react = __commonJS({ 46 "vendor-external:react"(exports, module) { 47 module.exports = window.React; 48 } 49 }); 50 51 // vendor-external:react/jsx-runtime 52 var require_jsx_runtime = __commonJS({ 53 "vendor-external:react/jsx-runtime"(exports, module) { 54 module.exports = window.ReactJSXRuntime; 55 } 56 }); 57 58 // vendor-external:react-dom 59 var require_react_dom = __commonJS({ 60 "vendor-external:react-dom"(exports, module) { 61 module.exports = window.ReactDOM; 62 } 63 }); 64 65 // package-external:@wordpress/element 66 var require_element = __commonJS({ 67 "package-external:@wordpress/element"(exports, module) { 68 module.exports = window.wp.element; 69 } 70 }); 71 72 // package-external:@wordpress/primitives 73 var require_primitives = __commonJS({ 74 "package-external:@wordpress/primitives"(exports, module) { 75 module.exports = window.wp.primitives; 76 } 77 }); 78 79 // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js 80 var require_use_sync_external_store_shim_development = __commonJS({ 81 "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) { 82 "use strict"; 83 (function() { 84 function is(x2, y2) { 85 return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2; 86 } 87 function useSyncExternalStore$2(subscribe, getSnapshot) { 88 didWarnOld18Alpha || void 0 === React169.startTransition || (didWarnOld18Alpha = true, console.error( 89 "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." 90 )); 91 var value = getSnapshot(); 92 if (!didWarnUncachedGetSnapshot) { 93 var cachedValue = getSnapshot(); 94 objectIs(value, cachedValue) || (console.error( 95 "The result of getSnapshot should be cached to avoid an infinite loop" 96 ), didWarnUncachedGetSnapshot = true); 97 } 98 cachedValue = useState49({ 99 inst: { value, getSnapshot } 100 }); 101 var inst = cachedValue[0].inst, forceUpdate = cachedValue[1]; 102 useLayoutEffect5( 103 function() { 104 inst.value = value; 105 inst.getSnapshot = getSnapshot; 106 checkIfSnapshotChanged(inst) && forceUpdate({ inst }); 107 }, 108 [subscribe, value, getSnapshot] 109 ); 110 useEffect32( 111 function() { 112 checkIfSnapshotChanged(inst) && forceUpdate({ inst }); 113 return subscribe(function() { 114 checkIfSnapshotChanged(inst) && forceUpdate({ inst }); 115 }); 116 }, 117 [subscribe] 118 ); 119 useDebugValue2(value); 120 return value; 121 } 122 function checkIfSnapshotChanged(inst) { 123 var latestGetSnapshot = inst.getSnapshot; 124 inst = inst.value; 125 try { 126 var nextValue = latestGetSnapshot(); 127 return !objectIs(inst, nextValue); 128 } catch (error2) { 129 return true; 130 } 131 } 132 function useSyncExternalStore$1(subscribe, getSnapshot) { 133 return getSnapshot(); 134 } 135 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); 136 var React169 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState49 = React169.useState, useEffect32 = React169.useEffect, useLayoutEffect5 = React169.useLayoutEffect, useDebugValue2 = React169.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2; 137 exports.useSyncExternalStore = void 0 !== React169.useSyncExternalStore ? React169.useSyncExternalStore : shim; 138 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); 139 })(); 140 } 141 }); 142 143 // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/index.js 144 var require_shim = __commonJS({ 145 "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/index.js"(exports, module) { 146 "use strict"; 147 if (false) { 148 module.exports = null; 149 } else { 150 module.exports = require_use_sync_external_store_shim_development(); 151 } 152 } 153 }); 154 155 // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js 156 var require_with_selector_development = __commonJS({ 157 "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) { 158 "use strict"; 159 (function() { 160 function is(x2, y2) { 161 return x2 === y2 && (0 !== x2 || 1 / x2 === 1 / y2) || x2 !== x2 && y2 !== y2; 162 } 163 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); 164 var React169 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef65 = React169.useRef, useEffect32 = React169.useEffect, useMemo62 = React169.useMemo, useDebugValue2 = React169.useDebugValue; 165 exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) { 166 var instRef = useRef65(null); 167 if (null === instRef.current) { 168 var inst = { hasValue: false, value: null }; 169 instRef.current = inst; 170 } else inst = instRef.current; 171 instRef = useMemo62( 172 function() { 173 function memoizedSelector(nextSnapshot) { 174 if (!hasMemo) { 175 hasMemo = true; 176 memoizedSnapshot = nextSnapshot; 177 nextSnapshot = selector(nextSnapshot); 178 if (void 0 !== isEqual && inst.hasValue) { 179 var currentSelection = inst.value; 180 if (isEqual(currentSelection, nextSnapshot)) 181 return memoizedSelection = currentSelection; 182 } 183 return memoizedSelection = nextSnapshot; 184 } 185 currentSelection = memoizedSelection; 186 if (objectIs(memoizedSnapshot, nextSnapshot)) 187 return currentSelection; 188 var nextSelection = selector(nextSnapshot); 189 if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) 190 return memoizedSnapshot = nextSnapshot, currentSelection; 191 memoizedSnapshot = nextSnapshot; 192 return memoizedSelection = nextSelection; 193 } 194 var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot; 195 return [ 196 function() { 197 return memoizedSelector(getSnapshot()); 198 }, 199 null === maybeGetServerSnapshot ? void 0 : function() { 200 return memoizedSelector(maybeGetServerSnapshot()); 201 } 202 ]; 203 }, 204 [getSnapshot, getServerSnapshot, selector, isEqual] 205 ); 206 var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]); 207 useEffect32( 208 function() { 209 inst.hasValue = true; 210 inst.value = value; 211 }, 212 [value] 213 ); 214 useDebugValue2(value); 215 return value; 216 }; 217 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); 218 })(); 219 } 220 }); 221 222 // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/with-selector.js 223 var require_with_selector = __commonJS({ 224 "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) { 225 "use strict"; 226 if (false) { 227 module.exports = null; 228 } else { 229 module.exports = require_with_selector_development(); 230 } 231 } 232 }); 233 234 // package-external:@wordpress/compose 235 var require_compose = __commonJS({ 236 "package-external:@wordpress/compose"(exports, module) { 237 module.exports = window.wp.compose; 238 } 239 }); 240 241 // package-external:@wordpress/theme 242 var require_theme = __commonJS({ 243 "package-external:@wordpress/theme"(exports, module) { 244 module.exports = window.wp.theme; 245 } 246 }); 247 248 // package-external:@wordpress/private-apis 249 var require_private_apis = __commonJS({ 250 "package-external:@wordpress/private-apis"(exports, module) { 251 module.exports = window.wp.privateApis; 252 } 253 }); 254 255 // package-external:@wordpress/components 256 var require_components = __commonJS({ 257 "package-external:@wordpress/components"(exports, module) { 258 module.exports = window.wp.components; 259 } 260 }); 261 262 // package-external:@wordpress/editor 263 var require_editor = __commonJS({ 264 "package-external:@wordpress/editor"(exports, module) { 265 module.exports = window.wp.editor; 266 } 267 }); 268 269 // package-external:@wordpress/core-data 270 var require_core_data = __commonJS({ 271 "package-external:@wordpress/core-data"(exports, module) { 272 module.exports = window.wp.coreData; 273 } 274 }); 275 276 // package-external:@wordpress/data 277 var require_data = __commonJS({ 278 "package-external:@wordpress/data"(exports, module) { 279 module.exports = window.wp.data; 280 } 281 }); 282 283 // package-external:@wordpress/blocks 284 var require_blocks = __commonJS({ 285 "package-external:@wordpress/blocks"(exports, module) { 286 module.exports = window.wp.blocks; 287 } 288 }); 289 290 // package-external:@wordpress/block-editor 291 var require_block_editor = __commonJS({ 292 "package-external:@wordpress/block-editor"(exports, module) { 293 module.exports = window.wp.blockEditor; 294 } 295 }); 296 297 // package-external:@wordpress/style-engine 298 var require_style_engine = __commonJS({ 299 "package-external:@wordpress/style-engine"(exports, module) { 300 module.exports = window.wp.styleEngine; 301 } 302 }); 303 304 // node_modules/.store/fast-deep-equal@3.1.3-Dk0kpzcWCOUHE1bkOO2LLA/node_modules/fast-deep-equal/es6/index.js 305 var require_es6 = __commonJS({ 306 "node_modules/.store/fast-deep-equal@3.1.3-Dk0kpzcWCOUHE1bkOO2LLA/node_modules/fast-deep-equal/es6/index.js"(exports, module) { 307 "use strict"; 308 module.exports = function equal(a, b) { 309 if (a === b) return true; 310 if (a && b && typeof a == "object" && typeof b == "object") { 311 if (a.constructor !== b.constructor) return false; 312 var length, i, keys; 313 if (Array.isArray(a)) { 314 length = a.length; 315 if (length != b.length) return false; 316 for (i = length; i-- !== 0; ) 317 if (!equal(a[i], b[i])) return false; 318 return true; 319 } 320 if (a instanceof Map && b instanceof Map) { 321 if (a.size !== b.size) return false; 322 for (i of a.entries()) 323 if (!b.has(i[0])) return false; 324 for (i of a.entries()) 325 if (!equal(i[1], b.get(i[0]))) return false; 326 return true; 327 } 328 if (a instanceof Set && b instanceof Set) { 329 if (a.size !== b.size) return false; 330 for (i of a.entries()) 331 if (!b.has(i[0])) return false; 332 return true; 333 } 334 if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { 335 length = a.length; 336 if (length != b.length) return false; 337 for (i = length; i-- !== 0; ) 338 if (a[i] !== b[i]) return false; 339 return true; 340 } 341 if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; 342 if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); 343 if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); 344 keys = Object.keys(a); 345 length = keys.length; 346 if (length !== Object.keys(b).length) return false; 347 for (i = length; i-- !== 0; ) 348 if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; 349 for (i = length; i-- !== 0; ) { 350 var key = keys[i]; 351 if (!equal(a[key], b[key])) return false; 352 } 353 return true; 354 } 355 return a !== a && b !== b; 356 }; 357 } 358 }); 359 360 // node_modules/.store/deepmerge@4.3.1-130J0Lhhc9LM1JWY-5q3ww/node_modules/deepmerge/dist/cjs.js 361 var require_cjs = __commonJS({ 362 "node_modules/.store/deepmerge@4.3.1-130J0Lhhc9LM1JWY-5q3ww/node_modules/deepmerge/dist/cjs.js"(exports, module) { 363 "use strict"; 364 var isMergeableObject = function isMergeableObject2(value) { 365 return isNonNullObject(value) && !isSpecial(value); 366 }; 367 function isNonNullObject(value) { 368 return !!value && typeof value === "object"; 369 } 370 function isSpecial(value) { 371 var stringValue = Object.prototype.toString.call(value); 372 return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value); 373 } 374 var canUseSymbol = typeof Symbol === "function" && Symbol.for; 375 var REACT_ELEMENT_TYPE = canUseSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103; 376 function isReactElement(value) { 377 return value.$$typeof === REACT_ELEMENT_TYPE; 378 } 379 function emptyTarget(val) { 380 return Array.isArray(val) ? [] : {}; 381 } 382 function cloneUnlessOtherwiseSpecified(value, options) { 383 return options.clone !== false && options.isMergeableObject(value) ? deepmerge2(emptyTarget(value), value, options) : value; 384 } 385 function defaultArrayMerge(target, source, options) { 386 return target.concat(source).map(function(element) { 387 return cloneUnlessOtherwiseSpecified(element, options); 388 }); 389 } 390 function getMergeFunction(key, options) { 391 if (!options.customMerge) { 392 return deepmerge2; 393 } 394 var customMerge = options.customMerge(key); 395 return typeof customMerge === "function" ? customMerge : deepmerge2; 396 } 397 function getEnumerableOwnPropertySymbols(target) { 398 return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) { 399 return Object.propertyIsEnumerable.call(target, symbol); 400 }) : []; 401 } 402 function getKeys(target) { 403 return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)); 404 } 405 function propertyIsOnObject(object, property) { 406 try { 407 return property in object; 408 } catch (_) { 409 return false; 410 } 411 } 412 function propertyIsUnsafe(target, key) { 413 return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key)); 414 } 415 function mergeObject(target, source, options) { 416 var destination = {}; 417 if (options.isMergeableObject(target)) { 418 getKeys(target).forEach(function(key) { 419 destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); 420 }); 421 } 422 getKeys(source).forEach(function(key) { 423 if (propertyIsUnsafe(target, key)) { 424 return; 425 } 426 if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) { 427 destination[key] = getMergeFunction(key, options)(target[key], source[key], options); 428 } else { 429 destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); 430 } 431 }); 432 return destination; 433 } 434 function deepmerge2(target, source, options) { 435 options = options || {}; 436 options.arrayMerge = options.arrayMerge || defaultArrayMerge; 437 options.isMergeableObject = options.isMergeableObject || isMergeableObject; 438 options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; 439 var sourceIsArray = Array.isArray(source); 440 var targetIsArray = Array.isArray(target); 441 var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; 442 if (!sourceAndTargetTypesMatch) { 443 return cloneUnlessOtherwiseSpecified(source, options); 444 } else if (sourceIsArray) { 445 return options.arrayMerge(target, source, options); 446 } else { 447 return mergeObject(target, source, options); 448 } 449 } 450 deepmerge2.all = function deepmergeAll(array, options) { 451 if (!Array.isArray(array)) { 452 throw new Error("first argument should be an array"); 453 } 454 return array.reduce(function(prev, next) { 455 return deepmerge2(prev, next, options); 456 }, {}); 457 }; 458 var deepmerge_1 = deepmerge2; 459 module.exports = deepmerge_1; 460 } 461 }); 462 463 // package-external:@wordpress/keycodes 464 var require_keycodes = __commonJS({ 465 "package-external:@wordpress/keycodes"(exports, module) { 466 module.exports = window.wp.keycodes; 467 } 468 }); 469 470 // package-external:@wordpress/api-fetch 471 var require_api_fetch = __commonJS({ 472 "package-external:@wordpress/api-fetch"(exports, module) { 473 module.exports = window.wp.apiFetch; 474 } 475 }); 476 477 // package-external:@wordpress/date 478 var require_date = __commonJS({ 479 "package-external:@wordpress/date"(exports, module) { 480 module.exports = window.wp.date; 481 } 482 }); 483 484 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useRenderElement.mjs 485 var React4 = __toESM(require_react(), 1); 486 487 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useRefWithInit.mjs 488 var React = __toESM(require_react(), 1); 489 var UNINITIALIZED = {}; 490 function useRefWithInit(init, initArg) { 491 const ref = React.useRef(UNINITIALIZED); 492 if (ref.current === UNINITIALIZED) { 493 ref.current = init(initArg); 494 } 495 return ref; 496 } 497 498 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useMergedRefs.mjs 499 function useMergedRefs(a, b, c2, d) { 500 const forkRef = useRefWithInit(createForkRef).current; 501 if (didChange(forkRef, a, b, c2, d)) { 502 update(forkRef, [a, b, c2, d]); 503 } 504 return forkRef.callback; 505 } 506 function useMergedRefsN(refs) { 507 const forkRef = useRefWithInit(createForkRef).current; 508 if (didChangeN(forkRef, refs)) { 509 update(forkRef, refs); 510 } 511 return forkRef.callback; 512 } 513 function createForkRef() { 514 return { 515 callback: null, 516 cleanup: null, 517 refs: [] 518 }; 519 } 520 function didChange(forkRef, a, b, c2, d) { 521 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c2 || forkRef.refs[3] !== d; 522 } 523 function didChangeN(forkRef, newRefs) { 524 return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]); 525 } 526 function update(forkRef, refs) { 527 forkRef.refs = refs; 528 if (refs.every((ref) => ref == null)) { 529 forkRef.callback = null; 530 return; 531 } 532 forkRef.callback = (instance) => { 533 if (forkRef.cleanup) { 534 forkRef.cleanup(); 535 forkRef.cleanup = null; 536 } 537 if (instance != null) { 538 const cleanupCallbacks = Array(refs.length).fill(null); 539 for (let i = 0; i < refs.length; i += 1) { 540 const ref = refs[i]; 541 if (ref == null) { 542 continue; 543 } 544 switch (typeof ref) { 545 case "function": { 546 const refCleanup = ref(instance); 547 if (typeof refCleanup === "function") { 548 cleanupCallbacks[i] = refCleanup; 549 } 550 break; 551 } 552 case "object": { 553 ref.current = instance; 554 break; 555 } 556 default: 557 } 558 } 559 forkRef.cleanup = () => { 560 for (let i = 0; i < refs.length; i += 1) { 561 const ref = refs[i]; 562 if (ref == null) { 563 continue; 564 } 565 switch (typeof ref) { 566 case "function": { 567 const cleanupCallback = cleanupCallbacks[i]; 568 if (typeof cleanupCallback === "function") { 569 cleanupCallback(); 570 } else { 571 void ref(null); 572 } 573 break; 574 } 575 case "object": { 576 ref.current = null; 577 break; 578 } 579 default: 580 } 581 } 582 }; 583 } 584 }; 585 } 586 587 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/getReactElementRef.mjs 588 var React3 = __toESM(require_react(), 1); 589 590 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/reactVersion.mjs 591 var React2 = __toESM(require_react(), 1); 592 var majorVersion = parseInt(React2.version, 10); 593 function isReactVersionAtLeast(reactVersionToCheck) { 594 return majorVersion >= reactVersionToCheck; 595 } 596 597 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/getReactElementRef.mjs 598 function getReactElementRef(element) { 599 if (!/* @__PURE__ */ React3.isValidElement(element)) { 600 return null; 601 } 602 const reactElement = element; 603 const propsWithRef = reactElement.props; 604 return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null; 605 } 606 607 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/mergeObjects.mjs 608 function mergeObjects(a, b) { 609 if (a && !b) { 610 return a; 611 } 612 if (!a && b) { 613 return b; 614 } 615 if (a || b) { 616 return { 617 ...a, 618 ...b 619 }; 620 } 621 return void 0; 622 } 623 624 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/createLogOnce.mjs 625 var loggedMessages; 626 if (true) { 627 loggedMessages = /* @__PURE__ */ new Set(); 628 } 629 function createLogOnce(severity, prefix) { 630 return function logOnce(...messages) { 631 if (true) { 632 const message = messages.join(" "); 633 const output = prefix ? `$prefix}: $message}` : message; 634 const key = `$severity}:$output}`; 635 if (!loggedMessages.has(key)) { 636 loggedMessages.add(key); 637 if (severity === "warn") { 638 console.warn(output); 639 } else { 640 console.error(output); 641 } 642 } 643 } 644 }; 645 } 646 647 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/warn.mjs 648 var warn = createLogOnce("warn", "Base UI"); 649 650 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/empty.mjs 651 function NOOP() { 652 } 653 var EMPTY_ARRAY = Object.freeze([]); 654 var EMPTY_OBJECT = Object.freeze({}); 655 656 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/getStateAttributesProps.mjs 657 function getStateAttributesProps(state, customMapping) { 658 const props = {}; 659 for (const key in state) { 660 const value = state[key]; 661 if (customMapping?.hasOwnProperty(key)) { 662 const customProps = customMapping[key](value); 663 if (customProps != null) { 664 Object.assign(props, customProps); 665 } 666 continue; 667 } 668 if (value === true) { 669 props[`data-$key.toLowerCase()}`] = ""; 670 } else if (value) { 671 props[`data-$key.toLowerCase()}`] = value.toString(); 672 } 673 } 674 return props; 675 } 676 677 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveClassName.mjs 678 function resolveClassName(className, state) { 679 return typeof className === "function" ? className(state) : className; 680 } 681 682 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveStyle.mjs 683 function resolveStyle(style, state) { 684 return typeof style === "function" ? style(state) : style; 685 } 686 687 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/merge-props/mergeProps.mjs 688 var EMPTY_PROPS = {}; 689 function mergeProps(a, b, c2, d, e) { 690 if (!c2 && !d && !e && !a) { 691 return createInitialMergedProps(b); 692 } 693 let merged = createInitialMergedProps(a); 694 if (b) { 695 merged = mergeInto(merged, b); 696 } 697 if (c2) { 698 merged = mergeInto(merged, c2); 699 } 700 if (d) { 701 merged = mergeInto(merged, d); 702 } 703 if (e) { 704 merged = mergeInto(merged, e); 705 } 706 return merged; 707 } 708 function mergePropsN(props) { 709 if (props.length === 0) { 710 return EMPTY_PROPS; 711 } 712 if (props.length === 1) { 713 return createInitialMergedProps(props[0]); 714 } 715 let merged = createInitialMergedProps(props[0]); 716 for (let i = 1; i < props.length; i += 1) { 717 merged = mergeInto(merged, props[i]); 718 } 719 return merged; 720 } 721 function createInitialMergedProps(inputProps) { 722 if (isPropsGetter(inputProps)) { 723 return { 724 ...inputProps(EMPTY_PROPS) 725 }; 726 } 727 return copyInitialProps(inputProps); 728 } 729 function mergeInto(merged, inputProps) { 730 if (isPropsGetter(inputProps)) { 731 return inputProps(merged); 732 } 733 return mutablyMergeInto(merged, inputProps); 734 } 735 function copyInitialProps(inputProps) { 736 const copiedProps = { 737 ...inputProps 738 }; 739 for (const propName in copiedProps) { 740 const propValue = copiedProps[propName]; 741 if (isEventHandler(propName, propValue)) { 742 copiedProps[propName] = wrapEventHandler(propValue); 743 } 744 } 745 return copiedProps; 746 } 747 function mutablyMergeInto(mergedProps, externalProps) { 748 if (!externalProps) { 749 return mergedProps; 750 } 751 for (const propName in externalProps) { 752 const externalPropValue = externalProps[propName]; 753 switch (propName) { 754 case "style": { 755 mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue); 756 break; 757 } 758 case "className": { 759 mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue); 760 break; 761 } 762 default: { 763 if (isEventHandler(propName, externalPropValue)) { 764 mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue); 765 } else { 766 mergedProps[propName] = externalPropValue; 767 } 768 } 769 } 770 } 771 return mergedProps; 772 } 773 function isEventHandler(key, value) { 774 const code0 = key.charCodeAt(0); 775 const code1 = key.charCodeAt(1); 776 const code2 = key.charCodeAt(2); 777 return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined"); 778 } 779 function isPropsGetter(inputProps) { 780 return typeof inputProps === "function"; 781 } 782 function mergeEventHandlers(ourHandler, theirHandler) { 783 if (!theirHandler) { 784 return ourHandler; 785 } 786 if (!ourHandler) { 787 return wrapEventHandler(theirHandler); 788 } 789 return (...args) => { 790 const event = args[0]; 791 if (isSyntheticEvent(event)) { 792 const baseUIEvent = event; 793 makeEventPreventable(baseUIEvent); 794 const result2 = theirHandler(...args); 795 if (!baseUIEvent.baseUIHandlerPrevented) { 796 ourHandler?.(...args); 797 } 798 return result2; 799 } 800 const result = theirHandler(...args); 801 ourHandler?.(...args); 802 return result; 803 }; 804 } 805 function wrapEventHandler(handler) { 806 if (!handler) { 807 return handler; 808 } 809 return (...args) => { 810 const event = args[0]; 811 if (isSyntheticEvent(event)) { 812 makeEventPreventable(event); 813 } 814 return handler(...args); 815 }; 816 } 817 function makeEventPreventable(event) { 818 event.preventBaseUIHandler = () => { 819 event.baseUIHandlerPrevented = true; 820 }; 821 return event; 822 } 823 function mergeClassNames(ourClassName, theirClassName) { 824 if (theirClassName) { 825 if (ourClassName) { 826 return theirClassName + " " + ourClassName; 827 } 828 return theirClassName; 829 } 830 return ourClassName; 831 } 832 function isSyntheticEvent(event) { 833 return event != null && typeof event === "object" && "nativeEvent" in event; 834 } 835 836 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useRenderElement.mjs 837 var import_react = __toESM(require_react(), 1); 838 function useRenderElement(element, componentProps, params = {}) { 839 let renderProp = componentProps.render; 840 if (params.enabled !== false) { 841 renderProp = unwrapLazyRenderProp(renderProp); 842 } 843 const outProps = useRenderElementProps(componentProps, params, renderProp); 844 if (params.enabled === false) { 845 return null; 846 } 847 const state = params.state ?? EMPTY_OBJECT; 848 return evaluateRenderProp(element, renderProp, outProps, state); 849 } 850 function useRenderElementProps(componentProps, params, renderProp) { 851 const { 852 className: classNameProp, 853 style: styleProp 854 } = componentProps; 855 const { 856 state = EMPTY_OBJECT, 857 ref, 858 props, 859 stateAttributesMapping: stateAttributesMapping5, 860 enabled = true 861 } = params; 862 const className = enabled ? resolveClassName(classNameProp, state) : void 0; 863 const style = enabled ? resolveStyle(styleProp, state) : void 0; 864 const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping5) : EMPTY_OBJECT; 865 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0; 866 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT; 867 if (typeof document !== "undefined") { 868 if (!enabled) { 869 void useMergedRefs(null, null); 870 } else if (Array.isArray(ref)) { 871 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]); 872 } else { 873 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref); 874 } 875 } 876 if (!enabled) { 877 return EMPTY_OBJECT; 878 } 879 if (className !== void 0) { 880 outProps.className = mergeClassNames(outProps.className, className); 881 } 882 if (style !== void 0) { 883 outProps.style = mergeObjects(outProps.style, style); 884 } 885 return outProps; 886 } 887 function resolveRenderFunctionProps(props) { 888 if (Array.isArray(props)) { 889 return mergePropsN(props); 890 } 891 return mergeProps(void 0, props); 892 } 893 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"); 894 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/; 895 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/; 896 function unwrapLazyRenderProp(render) { 897 if (render?.$$typeof !== REACT_LAZY_TYPE) { 898 return render; 899 } 900 const unwrapped = React4.Children.toArray(render)[0]; 901 return /* @__PURE__ */ React4.isValidElement(unwrapped) ? unwrapped : render; 902 } 903 function evaluateRenderProp(element, render, props, state) { 904 if (render) { 905 if (typeof render === "function") { 906 if (true) { 907 warnIfRenderPropLooksLikeComponent(render); 908 } 909 return render(props, state); 910 } 911 const mergedProps = mergeProps(props, render.props); 912 mergedProps.ref = props.ref; 913 if (true) { 914 if (!/* @__PURE__ */ React4.isValidElement(render)) { 915 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")); 916 } 917 } 918 return /* @__PURE__ */ React4.cloneElement(render, mergedProps); 919 } 920 return renderTag(element, props); 921 } 922 function warnIfRenderPropLooksLikeComponent(renderFn) { 923 const functionName = renderFn.name; 924 if (functionName.length === 0) { 925 return; 926 } 927 if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) { 928 return; 929 } 930 if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) { 931 return; 932 } 933 warn(`The \`render\` prop received a function named \`$functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop"); 934 } 935 function renderTag(Tag, props) { 936 if (Tag === "button") { 937 return /* @__PURE__ */ (0, import_react.createElement)("button", { 938 type: "button", 939 ...props, 940 key: props.key 941 }); 942 } 943 if (Tag === "img") { 944 return /* @__PURE__ */ (0, import_react.createElement)("img", { 945 alt: "", 946 ...props, 947 key: props.key 948 }); 949 } 950 return /* @__PURE__ */ React4.createElement(Tag, props); 951 } 952 953 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/safeReact.mjs 954 var React5 = __toESM(require_react(), 1); 955 var SafeReact = { 956 ...React5 957 }; 958 959 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useStableCallback.mjs 960 var useInsertionEffect = SafeReact.useInsertionEffect; 961 var useSafeInsertionEffect = ( 962 // React 17 doesn't have useInsertionEffect. 963 useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late. 964 useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn() 965 ); 966 function useStableCallback(callback) { 967 const stable = useRefWithInit(createStableCallback).current; 968 stable.next = callback; 969 useSafeInsertionEffect(stable.effect); 970 return stable.trampoline; 971 } 972 function createStableCallback() { 973 const stable = { 974 next: void 0, 975 callback: assertNotCalled, 976 trampoline: (...args) => stable.callback?.(...args), 977 effect: () => { 978 stable.callback = stable.next; 979 } 980 }; 981 return stable; 982 } 983 function assertNotCalled() { 984 if (true) { 985 throw ( 986 /* minify-error-disabled */ 987 new Error("Base UI: Cannot call an event handler while rendering.") 988 ); 989 } 990 } 991 992 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useIsoLayoutEffect.mjs 993 var React6 = __toESM(require_react(), 1); 994 var noop = () => { 995 }; 996 var useIsoLayoutEffect = typeof document !== "undefined" ? React6.useLayoutEffect : noop; 997 998 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs 999 var React8 = __toESM(require_react(), 1); 1000 1001 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnimationsFinished.mjs 1002 var ReactDOM = __toESM(require_react_dom(), 1); 1003 1004 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useOnMount.mjs 1005 var React7 = __toESM(require_react(), 1); 1006 function useOnMount(fn) { 1007 React7.useEffect(fn, EMPTY_ARRAY); 1008 } 1009 1010 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useAnimationFrame.mjs 1011 var EMPTY = null; 1012 var LAST_RAF = globalThis.requestAnimationFrame; 1013 var Scheduler = class { 1014 /* This implementation uses an array as a backing data-structure for frame callbacks. 1015 * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it 1016 * never calls the native `cancelAnimationFrame` if there are no frames left. This can 1017 * be much more efficient if there is a call pattern that alterns as 1018 * "request-cancel-request-cancel-…". 1019 * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation 1020 * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */ 1021 callbacks = []; 1022 callbacksCount = 0; 1023 nextId = 1; 1024 startId = 1; 1025 isScheduled = false; 1026 tick = (timestamp) => { 1027 this.isScheduled = false; 1028 const currentCallbacks = this.callbacks; 1029 const currentCallbacksCount = this.callbacksCount; 1030 this.callbacks = []; 1031 this.callbacksCount = 0; 1032 this.startId = this.nextId; 1033 if (currentCallbacksCount > 0) { 1034 for (let i = 0; i < currentCallbacks.length; i += 1) { 1035 currentCallbacks[i]?.(timestamp); 1036 } 1037 } 1038 }; 1039 request(fn) { 1040 const id = this.nextId; 1041 this.nextId += 1; 1042 this.callbacks.push(fn); 1043 this.callbacksCount += 1; 1044 const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true); 1045 if (!this.isScheduled || didRAFChange) { 1046 requestAnimationFrame(this.tick); 1047 this.isScheduled = true; 1048 } 1049 return id; 1050 } 1051 cancel(id) { 1052 const index2 = id - this.startId; 1053 if (index2 < 0 || index2 >= this.callbacks.length) { 1054 return; 1055 } 1056 if (this.callbacks[index2] === null) { 1057 return; 1058 } 1059 this.callbacks[index2] = null; 1060 this.callbacksCount -= 1; 1061 } 1062 }; 1063 var scheduler = new Scheduler(); 1064 var AnimationFrame = class _AnimationFrame { 1065 static create() { 1066 return new _AnimationFrame(); 1067 } 1068 static request(fn) { 1069 return scheduler.request(fn); 1070 } 1071 static cancel(id) { 1072 return scheduler.cancel(id); 1073 } 1074 currentId = EMPTY; 1075 /** 1076 * Executes `fn` after `delay`, clearing any previously scheduled call. 1077 */ 1078 request(fn) { 1079 this.cancel(); 1080 this.currentId = scheduler.request(() => { 1081 this.currentId = EMPTY; 1082 fn(); 1083 }); 1084 } 1085 cancel = () => { 1086 if (this.currentId !== EMPTY) { 1087 scheduler.cancel(this.currentId); 1088 this.currentId = EMPTY; 1089 } 1090 }; 1091 disposeEffect = () => { 1092 return this.cancel; 1093 }; 1094 }; 1095 function useAnimationFrame() { 1096 const timeout = useRefWithInit(AnimationFrame.create).current; 1097 useOnMount(timeout.disposeEffect); 1098 return timeout; 1099 } 1100 1101 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveRef.mjs 1102 function resolveRef(maybeRef) { 1103 if (maybeRef == null) { 1104 return maybeRef; 1105 } 1106 return "current" in maybeRef ? maybeRef.current : maybeRef; 1107 } 1108 1109 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/getFiniteAnimations.mjs 1110 function getFiniteAnimations(element, options) { 1111 return element.getAnimations(options).filter((animation) => { 1112 const timing = animation.effect?.getTiming(); 1113 return timing?.duration !== Infinity && timing?.iterations !== Infinity; 1114 }); 1115 } 1116 1117 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs 1118 var startingStyle = "data-starting-style"; 1119 var endingStyle = "data-ending-style"; 1120 1121 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnimationsFinished.mjs 1122 var pendingCallbacks = null; 1123 function flushBeforePaint(fn) { 1124 if (!pendingCallbacks) { 1125 const callbacks = []; 1126 pendingCallbacks = callbacks; 1127 queueMicrotask(() => { 1128 pendingCallbacks = null; 1129 ReactDOM.flushSync(() => { 1130 for (const callback of callbacks) { 1131 callback(); 1132 } 1133 }); 1134 }); 1135 } 1136 pendingCallbacks.push(fn); 1137 } 1138 function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) { 1139 const frame = useAnimationFrame(); 1140 return useStableCallback((fnToExecute, signal = null) => { 1141 frame.cancel(); 1142 const element = resolveRef(elementOrRef); 1143 if (element == null) { 1144 return; 1145 } 1146 const resolvedElement = element; 1147 const done = () => { 1148 if (!batch) { 1149 ReactDOM.flushSync(fnToExecute); 1150 return; 1151 } 1152 flushBeforePaint(() => { 1153 if (!signal?.aborted) { 1154 fnToExecute(); 1155 } 1156 }); 1157 }; 1158 if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) { 1159 fnToExecute(); 1160 return; 1161 } 1162 function exec() { 1163 Promise.all(getFiniteAnimations(resolvedElement).map((animation) => animation.finished.then(NOOP))).then(() => { 1164 if (!signal?.aborted) { 1165 done(); 1166 } 1167 }, () => { 1168 if (signal?.aborted) { 1169 return; 1170 } 1171 const currentAnimations = getFiniteAnimations(resolvedElement); 1172 if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) { 1173 exec(); 1174 return; 1175 } 1176 done(); 1177 }); 1178 } 1179 if (waitForStartingStyleRemoved) { 1180 const startingStyleAttribute = startingStyle; 1181 if (!resolvedElement.hasAttribute(startingStyleAttribute)) { 1182 frame.request(exec); 1183 return; 1184 } 1185 const attributeObserver = new MutationObserver(() => { 1186 if (!resolvedElement.hasAttribute(startingStyleAttribute)) { 1187 attributeObserver.disconnect(); 1188 exec(); 1189 } 1190 }); 1191 attributeObserver.observe(resolvedElement, { 1192 attributes: true, 1193 attributeFilter: [startingStyleAttribute] 1194 }); 1195 signal?.addEventListener("abort", () => attributeObserver.disconnect(), { 1196 once: true 1197 }); 1198 return; 1199 } 1200 frame.request(exec); 1201 }); 1202 } 1203 1204 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs 1205 function useOpenChangeComplete(parameters) { 1206 const { 1207 enabled = true, 1208 open: open2, 1209 ref, 1210 batch = false, 1211 onComplete: onCompleteParam 1212 } = parameters; 1213 const onComplete = useStableCallback(onCompleteParam); 1214 const runOnceAnimationsFinish = useAnimationsFinished(ref, open2, batch); 1215 React8.useEffect(() => { 1216 if (!enabled) { 1217 return void 0; 1218 } 1219 const abortController = new AbortController(); 1220 runOnceAnimationsFinish(onComplete, abortController.signal); 1221 return () => { 1222 abortController.abort(); 1223 }; 1224 }, [enabled, open2, onComplete, runOnceAnimationsFinish]); 1225 } 1226 1227 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/stateAttributesMapping.mjs 1228 var STARTING_HOOK = { 1229 [startingStyle]: "" 1230 }; 1231 var ENDING_HOOK = { 1232 [endingStyle]: "" 1233 }; 1234 var transitionStatusMapping = { 1235 transitionStatus(value) { 1236 if (value === "starting") { 1237 return STARTING_HOOK; 1238 } 1239 if (value === "ending") { 1240 return ENDING_HOOK; 1241 } 1242 return null; 1243 } 1244 }; 1245 1246 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useTransitionStatus.mjs 1247 var React9 = __toESM(require_react(), 1); 1248 function useTransitionStatus(open2, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) { 1249 const [transitionStatus, setTransitionStatus] = React9.useState(open2 && enableIdleState ? "idle" : void 0); 1250 const [mounted, setMounted] = React9.useState(open2 && !animateInitialOpen); 1251 if (open2 && !mounted) { 1252 setMounted(true); 1253 setTransitionStatus("starting"); 1254 } 1255 if (!open2 && mounted && transitionStatus !== "ending" && !deferEndingState) { 1256 setTransitionStatus("ending"); 1257 } 1258 if (!open2 && !mounted && transitionStatus === "ending") { 1259 setTransitionStatus(void 0); 1260 } 1261 useIsoLayoutEffect(() => { 1262 if (!open2 && mounted && transitionStatus !== "ending" && deferEndingState) { 1263 const frame = AnimationFrame.request(() => { 1264 setTransitionStatus("ending"); 1265 }); 1266 return () => { 1267 AnimationFrame.cancel(frame); 1268 }; 1269 } 1270 return void 0; 1271 }, [open2, mounted, transitionStatus, deferEndingState]); 1272 useIsoLayoutEffect(() => { 1273 if (!open2 || enableIdleState || transitionStatus === void 0) { 1274 return void 0; 1275 } 1276 const frame = AnimationFrame.request(() => { 1277 setTransitionStatus(void 0); 1278 }); 1279 return () => { 1280 AnimationFrame.cancel(frame); 1281 }; 1282 }, [enableIdleState, open2, transitionStatus]); 1283 useIsoLayoutEffect(() => { 1284 if (!open2 || !enableIdleState) { 1285 return void 0; 1286 } 1287 if (open2 && mounted && transitionStatus !== "idle") { 1288 setTransitionStatus("starting"); 1289 } 1290 const frame = AnimationFrame.request(() => { 1291 setTransitionStatus("idle"); 1292 }); 1293 return () => { 1294 AnimationFrame.cancel(frame); 1295 }; 1296 }, [enableIdleState, open2, mounted, transitionStatus]); 1297 return { 1298 mounted, 1299 setMounted, 1300 transitionStatus 1301 }; 1302 } 1303 1304 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useTimeout.mjs 1305 var EMPTY2 = 0; 1306 var Timeout = class _Timeout { 1307 static create() { 1308 return new _Timeout(); 1309 } 1310 currentId = EMPTY2; 1311 /** 1312 * Executes `fn` after `delay`, clearing any previously scheduled call. 1313 */ 1314 start(delay, fn) { 1315 this.clear(); 1316 this.currentId = setTimeout(() => { 1317 this.currentId = EMPTY2; 1318 fn(); 1319 }, delay); 1320 } 1321 isStarted() { 1322 return this.currentId !== EMPTY2; 1323 } 1324 clear = () => { 1325 if (this.currentId !== EMPTY2) { 1326 clearTimeout(this.currentId); 1327 this.currentId = EMPTY2; 1328 } 1329 }; 1330 disposeEffect = () => { 1331 return this.clear; 1332 }; 1333 }; 1334 function useTimeout() { 1335 const timeout = useRefWithInit(Timeout.create).current; 1336 useOnMount(timeout.disposeEffect); 1337 return timeout; 1338 } 1339 1340 // node_modules/.store/clsx@2.1.1-XOLP1vUL9vEGfpiXm37fAw/node_modules/clsx/dist/clsx.mjs 1341 function r(e) { 1342 var t, f, n = ""; 1343 if ("string" == typeof e || "number" == typeof e) n += e; 1344 else if ("object" == typeof e) if (Array.isArray(e)) { 1345 var o = e.length; 1346 for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); 1347 } else for (f in e) e[f] && (n && (n += " "), n += f); 1348 return n; 1349 } 1350 function clsx() { 1351 for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); 1352 return n; 1353 } 1354 var clsx_default = clsx; 1355 1356 // packages/ui/build-module/icon/icon.mjs 1357 var import_element = __toESM(require_element(), 1); 1358 var import_primitives = __toESM(require_primitives(), 1); 1359 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); 1360 var Icon = (0, import_element.forwardRef)( 1361 function UnforwardedIcon({ icon, size: size4 = 24, style, ...restProps }, ref) { 1362 const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0; 1363 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( 1364 import_primitives.SVG, 1365 { 1366 ref, 1367 ...icon.props, 1368 ...restProps, 1369 ...mergedStyle ? { style: mergedStyle } : {}, 1370 width: size4, 1371 height: size4 1372 } 1373 ); 1374 } 1375 ); 1376 1377 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useControlled.mjs 1378 var React10 = __toESM(require_react(), 1); 1379 1380 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/error.mjs 1381 var error = createLogOnce("error", "Base UI"); 1382 1383 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useControlled.mjs 1384 function useControlled({ 1385 controlled, 1386 default: defaultProp, 1387 name: name2, 1388 state = "value" 1389 }) { 1390 const { 1391 current: isControlled 1392 } = React10.useRef(controlled !== void 0); 1393 const [valueState, setValue] = React10.useState(() => defaultProp); 1394 const value = isControlled && controlled !== void 0 ? controlled : valueState; 1395 if (true) { 1396 React10.useEffect(() => { 1397 if (isControlled !== (controlled !== void 0)) { 1398 error([`A component is changing the $isControlled ? "" : "un"}controlled $state} state of $name2} to be $isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled $name2} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join("\n")); 1399 } 1400 }, [state, name2, controlled]); 1401 const { 1402 current: defaultValue 1403 } = React10.useRef(defaultProp); 1404 React10.useEffect(() => { 1405 if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) { 1406 error([`A component is changing the default $state} state of an uncontrolled $name2} after being initialized. To suppress this warning opt to use a controlled $name2}.`].join("\n")); 1407 } 1408 }, [defaultProp]); 1409 } 1410 const setValueIfUncontrolled = React10.useCallback((newValue) => { 1411 if (!isControlled) { 1412 setValue(newValue); 1413 } 1414 }, []); 1415 return [value, setValueIfUncontrolled]; 1416 } 1417 function serializeToDevModeString(input) { 1418 let nextId = 0; 1419 const seen = /* @__PURE__ */ new WeakMap(); 1420 try { 1421 const result = JSON.stringify(input, function replacer(key, value) { 1422 if (key === "_owner" && this != null && typeof this === "object" && "$$typeof" in this) { 1423 return void 0; 1424 } 1425 if (typeof value === "bigint") { 1426 return `__bigint__:$value}`; 1427 } 1428 if (value !== null && typeof value === "object") { 1429 const id = seen.get(value); 1430 if (id !== void 0) { 1431 return `__object__:$id}`; 1432 } 1433 seen.set(value, nextId); 1434 nextId += 1; 1435 } 1436 return value; 1437 }); 1438 return result ?? `__top__:$typeof input}`; 1439 } catch { 1440 return "__unserializable__"; 1441 } 1442 } 1443 1444 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs 1445 var React12 = __toESM(require_react(), 1); 1446 1447 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/composite/list/CompositeListContext.mjs 1448 var React11 = __toESM(require_react(), 1); 1449 var CompositeListContext = /* @__PURE__ */ React11.createContext({ 1450 register: () => { 1451 }, 1452 unregister: () => { 1453 }, 1454 subscribeMapChange: () => () => { 1455 }, 1456 nextIndexRef: { 1457 current: 0 1458 } 1459 }); 1460 if (true) CompositeListContext.displayName = "CompositeListContext"; 1461 function useCompositeListContext() { 1462 return React11.useContext(CompositeListContext); 1463 } 1464 1465 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs 1466 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); 1467 function CompositeList(props) { 1468 const { 1469 children, 1470 elementsRef, 1471 labelsRef, 1472 onMapChange: onMapChangeProp 1473 } = props; 1474 const onMapChange = useStableCallback(onMapChangeProp); 1475 const [, setMapTick] = React12.useState(0); 1476 const listeners = useRefWithInit(createListeners).current; 1477 const map = useRefWithInit(createMap).current; 1478 const nextIndexRef = React12.useRef(0); 1479 const isDirtyRef = React12.useRef(true); 1480 const itemsRef = React12.useRef(null); 1481 const mutationObserverRef = React12.useRef(null); 1482 const scheduleMapUpdate = useStableCallback(() => { 1483 if (isDirtyRef.current) { 1484 return; 1485 } 1486 isDirtyRef.current = true; 1487 setMapTick((tick) => tick + 1); 1488 }); 1489 const register2 = useStableCallback((node, registration) => { 1490 map.set(node, registration); 1491 scheduleMapUpdate(); 1492 }); 1493 const unregister = useStableCallback((node) => { 1494 map.delete(node); 1495 scheduleMapUpdate(); 1496 }); 1497 const syncRefs = useStableCallback((items) => { 1498 const nextMap = /* @__PURE__ */ new Map(); 1499 elementsRef.current.length = 0; 1500 if (labelsRef) { 1501 labelsRef.current.length = 0; 1502 } 1503 items.forEach((item) => { 1504 nextMap.set(item.element, { 1505 ...item.registration.metadata ?? {}, 1506 index: item.index 1507 }); 1508 elementsRef.current[item.index] = item.element; 1509 if (labelsRef) { 1510 labelsRef.current[item.index] = item.registration.label !== void 0 ? item.registration.label : item.registration.textRef?.current?.textContent ?? item.element.textContent; 1511 } 1512 }); 1513 nextIndexRef.current = elementsRef.current.length; 1514 return nextMap; 1515 }); 1516 function observe(sortedNodes) { 1517 mutationObserverRef.current?.disconnect(); 1518 mutationObserverRef.current = null; 1519 if (typeof MutationObserver !== "function" || sortedNodes.length < 2) { 1520 return; 1521 } 1522 const mutationObserver = new MutationObserver((entries) => { 1523 if (!hasMovedNode(entries)) { 1524 return; 1525 } 1526 let previousConnectedNode = null; 1527 for (const node of sortedNodes) { 1528 if (!node.isConnected) { 1529 continue; 1530 } 1531 if (previousConnectedNode && sortByDocumentPosition(previousConnectedNode, node) > 0) { 1532 mutationObserver.disconnect(); 1533 scheduleMapUpdate(); 1534 return; 1535 } 1536 previousConnectedNode = node; 1537 } 1538 }); 1539 mutationObserverRef.current = mutationObserver; 1540 const roots = /* @__PURE__ */ new Set(); 1541 for (let i = 1; i < sortedNodes.length; i += 1) { 1542 const root = getCommonAncestor(sortedNodes[i - 1], sortedNodes[i]); 1543 if (root) { 1544 roots.add(root); 1545 } 1546 } 1547 roots.forEach((root) => mutationObserver.observe(root, { 1548 childList: true 1549 })); 1550 } 1551 const flush = useStableCallback(() => { 1552 const [items, automaticNodes] = getCompositeListSnapshot(map); 1553 const nextMap = syncRefs(items); 1554 const previousItems = itemsRef.current; 1555 const changed = !previousItems || previousItems.length !== items.length || items.some((item, index2) => { 1556 const previousItem = previousItems[index2]; 1557 return item.index !== previousItem.index || item.element !== previousItem.element || item.registration.index !== previousItem.registration.index || item.registration.metadata !== previousItem.registration.metadata; 1558 }); 1559 observe(automaticNodes); 1560 itemsRef.current = items; 1561 isDirtyRef.current = false; 1562 if (!changed) { 1563 return; 1564 } 1565 listeners.forEach((listener) => listener(nextMap)); 1566 onMapChange(nextMap); 1567 }); 1568 useIsoLayoutEffect(() => { 1569 if (!isDirtyRef.current && itemsRef.current) { 1570 syncRefs(itemsRef.current); 1571 } 1572 return () => { 1573 elementsRef.current = []; 1574 if (labelsRef) { 1575 labelsRef.current = []; 1576 } 1577 }; 1578 }, [elementsRef, labelsRef, syncRefs]); 1579 useIsoLayoutEffect(() => { 1580 if (isDirtyRef.current) { 1581 flush(); 1582 } 1583 }); 1584 useIsoLayoutEffect(() => { 1585 return () => { 1586 mutationObserverRef.current?.disconnect(); 1587 isDirtyRef.current = true; 1588 }; 1589 }, []); 1590 const subscribeMapChange = useStableCallback((fn) => { 1591 listeners.add(fn); 1592 return () => { 1593 listeners.delete(fn); 1594 }; 1595 }); 1596 const contextValue = React12.useMemo(() => ({ 1597 register: register2, 1598 unregister, 1599 subscribeMapChange, 1600 nextIndexRef 1601 }), [register2, unregister, subscribeMapChange, nextIndexRef]); 1602 return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CompositeListContext.Provider, { 1603 value: contextValue, 1604 children 1605 }); 1606 } 1607 function createMap() { 1608 return /* @__PURE__ */ new Map(); 1609 } 1610 function createListeners() { 1611 return /* @__PURE__ */ new Set(); 1612 } 1613 function getCompositeListSnapshot(map) { 1614 const reservedIndices = /* @__PURE__ */ new Set(); 1615 const items = []; 1616 const automaticItems = []; 1617 map.forEach((registration, node) => { 1618 if (!node.isConnected) { 1619 return; 1620 } 1621 const index2 = registration.index; 1622 const item = { 1623 index: index2 ?? -1, 1624 element: node, 1625 registration 1626 }; 1627 if (index2 === null) { 1628 automaticItems.push(item); 1629 } else if (index2 >= 0) { 1630 reservedIndices.add(index2); 1631 items.push(item); 1632 } 1633 }); 1634 let nextAutomaticIndex = 0; 1635 automaticItems.sort((a, b) => sortByDocumentPosition(a.element, b.element)); 1636 automaticItems.forEach((item) => { 1637 while (reservedIndices.has(nextAutomaticIndex)) { 1638 nextAutomaticIndex += 1; 1639 } 1640 item.index = nextAutomaticIndex; 1641 items.push(item); 1642 nextAutomaticIndex += 1; 1643 }); 1644 if (reservedIndices.size > 0) { 1645 items.sort((a, b) => a.index - b.index); 1646 } 1647 return [items, automaticItems.map((item) => item.element)]; 1648 } 1649 function getCommonAncestor(firstNode, lastNode) { 1650 let ancestor = firstNode.parentElement; 1651 while (ancestor && !ancestor.contains(lastNode)) { 1652 ancestor = ancestor.parentElement; 1653 } 1654 return ancestor; 1655 } 1656 function hasMovedNode(entries) { 1657 for (const entry of entries) { 1658 for (let i = 0; i < entry.removedNodes.length; i += 1) { 1659 if (entry.removedNodes[i].isConnected) { 1660 return true; 1661 } 1662 } 1663 } 1664 return false; 1665 } 1666 function sortByDocumentPosition(a, b) { 1667 if (a.nextElementSibling === b) { 1668 return -1; 1669 } 1670 if (b.nextElementSibling === a) { 1671 return 1; 1672 } 1673 return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1; 1674 } 1675 1676 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useId.mjs 1677 var React14 = __toESM(require_react(), 1); 1678 1679 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useForcedRerendering.mjs 1680 var React13 = __toESM(require_react(), 1); 1681 function useForcedRerendering() { 1682 const [, setState] = React13.useState({}); 1683 return React13.useCallback(() => { 1684 setState({}); 1685 }, []); 1686 } 1687 1688 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useId.mjs 1689 var globalId = 0; 1690 function useGlobalId(idOverride, prefix = "mui") { 1691 const defaultId = React14.useRef(void 0); 1692 const forceRerender = useForcedRerendering(); 1693 const id = idOverride ?? defaultId.current; 1694 React14.useEffect(() => { 1695 if (defaultId.current == null) { 1696 globalId += 1; 1697 defaultId.current = `$prefix}-$globalId}`; 1698 if (idOverride == null) { 1699 forceRerender(); 1700 } 1701 } 1702 }, [idOverride, prefix, forceRerender]); 1703 return id; 1704 } 1705 var maybeReactUseId = SafeReact.useId; 1706 function useId(idOverride, prefix) { 1707 if (maybeReactUseId !== void 0) { 1708 const reactId = maybeReactUseId(); 1709 return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId); 1710 } 1711 return useGlobalId(idOverride, prefix); 1712 } 1713 1714 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useBaseUiId.mjs 1715 function useBaseUiId(idOverride) { 1716 return useId(idOverride, "base-ui"); 1717 } 1718 1719 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs 1720 function createChangeEventDetails(reason, event, trigger, customProperties) { 1721 let canceled = false; 1722 let allowPropagation = false; 1723 const custom = customProperties ?? EMPTY_OBJECT; 1724 const details = { 1725 reason, 1726 event: event ?? new Event("base-ui"), 1727 cancel() { 1728 canceled = true; 1729 }, 1730 allowPropagation() { 1731 allowPropagation = true; 1732 }, 1733 get isCanceled() { 1734 return canceled; 1735 }, 1736 get isPropagationAllowed() { 1737 return allowPropagation; 1738 }, 1739 trigger, 1740 ...custom 1741 }; 1742 return details; 1743 } 1744 function createGenericEventDetails(reason, event, customProperties) { 1745 const custom = customProperties ?? EMPTY_OBJECT; 1746 const details = { 1747 reason, 1748 event: event ?? new Event("base-ui"), 1749 ...custom 1750 }; 1751 return details; 1752 } 1753 1754 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/reason-parts.mjs 1755 var reason_parts_exports = {}; 1756 __export(reason_parts_exports, { 1757 cancelOpen: () => cancelOpen, 1758 chipRemovePress: () => chipRemovePress, 1759 clearPress: () => clearPress, 1760 closePress: () => closePress, 1761 closeWatcher: () => closeWatcher, 1762 decrementPress: () => decrementPress, 1763 disabled: () => disabled, 1764 drag: () => drag, 1765 escapeKey: () => escapeKey, 1766 focusOut: () => focusOut, 1767 imperativeAction: () => imperativeAction, 1768 incrementPress: () => incrementPress, 1769 initial: () => initial, 1770 inputBlur: () => inputBlur, 1771 inputChange: () => inputChange, 1772 inputClear: () => inputClear, 1773 inputPaste: () => inputPaste, 1774 inputPress: () => inputPress, 1775 itemPress: () => itemPress, 1776 keyboard: () => keyboard, 1777 linkPress: () => linkPress, 1778 listNavigation: () => listNavigation, 1779 missing: () => missing, 1780 none: () => none, 1781 outsidePress: () => outsidePress, 1782 pointer: () => pointer, 1783 popupClose: () => popupClose, 1784 scrub: () => scrub, 1785 siblingOpen: () => siblingOpen, 1786 swipe: () => swipe, 1787 trackPress: () => trackPress, 1788 triggerFocus: () => triggerFocus, 1789 triggerHover: () => triggerHover, 1790 triggerPress: () => triggerPress, 1791 wheel: () => wheel, 1792 windowResize: () => windowResize 1793 }); 1794 var none = "none"; 1795 var triggerPress = "trigger-press"; 1796 var triggerHover = "trigger-hover"; 1797 var triggerFocus = "trigger-focus"; 1798 var outsidePress = "outside-press"; 1799 var itemPress = "item-press"; 1800 var closePress = "close-press"; 1801 var linkPress = "link-press"; 1802 var clearPress = "clear-press"; 1803 var chipRemovePress = "chip-remove-press"; 1804 var trackPress = "track-press"; 1805 var incrementPress = "increment-press"; 1806 var decrementPress = "decrement-press"; 1807 var inputChange = "input-change"; 1808 var inputClear = "input-clear"; 1809 var inputBlur = "input-blur"; 1810 var inputPaste = "input-paste"; 1811 var inputPress = "input-press"; 1812 var focusOut = "focus-out"; 1813 var escapeKey = "escape-key"; 1814 var closeWatcher = "close-watcher"; 1815 var listNavigation = "list-navigation"; 1816 var keyboard = "keyboard"; 1817 var pointer = "pointer"; 1818 var drag = "drag"; 1819 var wheel = "wheel"; 1820 var scrub = "scrub"; 1821 var popupClose = "popup-close"; 1822 var cancelOpen = "cancel-open"; 1823 var siblingOpen = "sibling-open"; 1824 var disabled = "disabled"; 1825 var missing = "missing"; 1826 var initial = "initial"; 1827 var imperativeAction = "imperative-action"; 1828 var swipe = "swipe"; 1829 var windowResize = "window-resize"; 1830 1831 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/composite/list/useCompositeListItem.mjs 1832 var React15 = __toESM(require_react(), 1); 1833 function useCompositeListItem(params = {}) { 1834 const { 1835 guess, 1836 label, 1837 metadata, 1838 textRef, 1839 index: externalIndex 1840 } = params; 1841 const { 1842 register: register2, 1843 unregister, 1844 subscribeMapChange, 1845 nextIndexRef 1846 } = useCompositeListContext(); 1847 const indexRef = React15.useRef(-1); 1848 const [internalIndex, setInternalIndex] = React15.useState(externalIndex == null && guess ? () => { 1849 if (indexRef.current === -1) { 1850 const newIndex = nextIndexRef.current; 1851 nextIndexRef.current += 1; 1852 indexRef.current = newIndex; 1853 } 1854 return indexRef.current; 1855 } : -1); 1856 const index2 = externalIndex ?? internalIndex; 1857 const componentRef = React15.useRef(null); 1858 const ref = React15.useCallback((node) => { 1859 const previousNode = componentRef.current; 1860 if (previousNode) { 1861 unregister(previousNode); 1862 } 1863 componentRef.current = node; 1864 if (node) { 1865 register2(node, { 1866 metadata: metadata ?? null, 1867 index: externalIndex ?? null, 1868 label, 1869 textRef 1870 }); 1871 } 1872 }, [externalIndex, register2, unregister, metadata, label, textRef]); 1873 useIsoLayoutEffect(() => { 1874 if (externalIndex != null) { 1875 return void 0; 1876 } 1877 return subscribeMapChange((map) => { 1878 const i = componentRef.current ? map.get(componentRef.current)?.index : null; 1879 if (i != null) { 1880 setInternalIndex(i); 1881 } 1882 }); 1883 }, [externalIndex, subscribeMapChange]); 1884 return { 1885 ref, 1886 index: index2 1887 }; 1888 } 1889 1890 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/use-button/useButton.mjs 1891 var React18 = __toESM(require_react(), 1); 1892 1893 // node_modules/.store/@floating-ui/utils@0.2.12-gOxTzMf36nCrbeHpEew-rw/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs 1894 function hasWindow() { 1895 return typeof window !== "undefined"; 1896 } 1897 function getNodeName(node) { 1898 if (isNode(node)) { 1899 return (node.nodeName || "").toLowerCase(); 1900 } 1901 return "#document"; 1902 } 1903 function getWindow(node) { 1904 var _node$ownerDocument; 1905 return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; 1906 } 1907 function getDocumentElement(node) { 1908 var _ref; 1909 return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; 1910 } 1911 function isNode(value) { 1912 if (!hasWindow()) { 1913 return false; 1914 } 1915 return value instanceof Node || value instanceof getWindow(value).Node; 1916 } 1917 function isElement(value) { 1918 if (!hasWindow()) { 1919 return false; 1920 } 1921 return value instanceof Element || value instanceof getWindow(value).Element; 1922 } 1923 function isHTMLElement(value) { 1924 if (!hasWindow()) { 1925 return false; 1926 } 1927 return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; 1928 } 1929 function isShadowRoot(value) { 1930 if (!hasWindow() || typeof ShadowRoot === "undefined") { 1931 return false; 1932 } 1933 return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot; 1934 } 1935 function isOverflowElement(element) { 1936 const { 1937 overflow, 1938 overflowX, 1939 overflowY, 1940 display 1941 } = getComputedStyle2(element); 1942 return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents"; 1943 } 1944 function isTableElement(element) { 1945 return /^(table|td|th)$/.test(getNodeName(element)); 1946 } 1947 function isTopLayer(element) { 1948 try { 1949 if (element.matches(":popover-open")) { 1950 return true; 1951 } 1952 } catch (_e) { 1953 } 1954 try { 1955 return element.matches(":modal"); 1956 } catch (_e) { 1957 return false; 1958 } 1959 } 1960 var willChangeRe = /transform|translate|scale|rotate|perspective|filter/; 1961 var containRe = /paint|layout|strict|content/; 1962 var isNotNone = (value) => !!value && value !== "none"; 1963 var isWebKitValue; 1964 function isContainingBlock(elementOrCss) { 1965 const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss; 1966 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 || ""); 1967 } 1968 function getContainingBlock(element) { 1969 let currentNode = getParentNode(element); 1970 while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { 1971 if (isContainingBlock(currentNode)) { 1972 return currentNode; 1973 } else if (isTopLayer(currentNode)) { 1974 return null; 1975 } 1976 currentNode = getParentNode(currentNode); 1977 } 1978 return null; 1979 } 1980 function isWebKit() { 1981 if (isWebKitValue == null) { 1982 isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"); 1983 } 1984 return isWebKitValue; 1985 } 1986 function isLastTraversableNode(node) { 1987 return /^(html|body|#document)$/.test(getNodeName(node)); 1988 } 1989 function getComputedStyle2(element) { 1990 return getWindow(element).getComputedStyle(element); 1991 } 1992 function getNodeScroll(element) { 1993 if (isElement(element)) { 1994 return { 1995 scrollLeft: element.scrollLeft, 1996 scrollTop: element.scrollTop 1997 }; 1998 } 1999 return { 2000 scrollLeft: element.scrollX, 2001 scrollTop: element.scrollY 2002 }; 2003 } 2004 function getParentNode(node) { 2005 if (getNodeName(node) === "html") { 2006 return node; 2007 } 2008 const result = ( 2009 // Step into the shadow DOM of the parent of a slotted node. 2010 node.assignedSlot || // DOM Element detected. 2011 node.parentNode || // ShadowRoot detected. 2012 isShadowRoot(node) && node.host || // Fallback. 2013 getDocumentElement(node) 2014 ); 2015 return isShadowRoot(result) ? result.host : result; 2016 } 2017 function getNearestOverflowAncestor(node) { 2018 const parentNode = getParentNode(node); 2019 if (isLastTraversableNode(parentNode)) { 2020 return (node.ownerDocument || node).body; 2021 } 2022 if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { 2023 return parentNode; 2024 } 2025 return getNearestOverflowAncestor(parentNode); 2026 } 2027 function getOverflowAncestors(node, list, traverseIframes) { 2028 var _node$ownerDocument2; 2029 if (list === void 0) { 2030 list = []; 2031 } 2032 if (traverseIframes === void 0) { 2033 traverseIframes = true; 2034 } 2035 const scrollableAncestor = getNearestOverflowAncestor(node); 2036 const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); 2037 const win = getWindow(scrollableAncestor); 2038 if (isBody) { 2039 const frameElement = getFrameElement(win); 2040 return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []); 2041 } else { 2042 return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); 2043 } 2044 } 2045 function getFrameElement(win) { 2046 return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null; 2047 } 2048 2049 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs 2050 var React16 = __toESM(require_react(), 1); 2051 var CompositeRootContext = /* @__PURE__ */ React16.createContext(void 0); 2052 if (true) CompositeRootContext.displayName = "CompositeRootContext"; 2053 function useCompositeRootContext(optional = false) { 2054 const context = React16.useContext(CompositeRootContext); 2055 if (context === void 0 && !optional) { 2056 throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16)); 2057 } 2058 return context; 2059 } 2060 2061 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs 2062 var React17 = __toESM(require_react(), 1); 2063 function useFocusableWhenDisabled(parameters) { 2064 const { 2065 focusableWhenDisabled, 2066 disabled: disabled2, 2067 composite = false, 2068 tabIndex: tabIndexProp = 0, 2069 isNativeButton 2070 } = parameters; 2071 const isFocusableComposite = composite && focusableWhenDisabled !== false; 2072 const isNonFocusableComposite = composite && focusableWhenDisabled === false; 2073 const props = React17.useMemo(() => { 2074 const additionalProps = { 2075 // allow Tabbing away from focusableWhenDisabled elements 2076 onKeyDown(event) { 2077 if (disabled2 && focusableWhenDisabled && event.key !== "Tab") { 2078 event.preventDefault(); 2079 } 2080 } 2081 }; 2082 if (!composite) { 2083 additionalProps.tabIndex = tabIndexProp; 2084 if (!isNativeButton && disabled2) { 2085 additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1; 2086 } 2087 } 2088 if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled2) { 2089 additionalProps["aria-disabled"] = disabled2; 2090 } 2091 if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) { 2092 additionalProps.disabled = disabled2; 2093 } 2094 return additionalProps; 2095 }, [composite, disabled2, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]); 2096 return { 2097 props 2098 }; 2099 } 2100 2101 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/owner.mjs 2102 function ownerDocument(node) { 2103 return node?.ownerDocument || document; 2104 } 2105 2106 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs 2107 function dispatchClickWithModifiers(target, sourceEvent, { 2108 detail = 0, 2109 pointerType = "" 2110 } = {}) { 2111 target.dispatchEvent(new (getWindow(target)).PointerEvent("click", { 2112 bubbles: true, 2113 cancelable: true, 2114 composed: true, 2115 detail, 2116 pointerType, 2117 shiftKey: sourceEvent.shiftKey, 2118 ctrlKey: sourceEvent.ctrlKey, 2119 altKey: sourceEvent.altKey, 2120 metaKey: sourceEvent.metaKey 2121 })); 2122 } 2123 2124 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/use-button/useButton.mjs 2125 function useButton(parameters = {}) { 2126 const { 2127 disabled: disabled2 = false, 2128 focusableWhenDisabled, 2129 tabIndex = 0, 2130 native: isNativeButton = true, 2131 composite: compositeProp 2132 } = parameters; 2133 const elementRef = React18.useRef(null); 2134 const compositeRootContext = useCompositeRootContext(true); 2135 const isCompositeItem = compositeProp ?? compositeRootContext !== void 0; 2136 const { 2137 props: focusableWhenDisabledProps 2138 } = useFocusableWhenDisabled({ 2139 focusableWhenDisabled, 2140 disabled: disabled2, 2141 composite: isCompositeItem, 2142 tabIndex, 2143 isNativeButton 2144 }); 2145 if (true) { 2146 React18.useEffect(() => { 2147 if (!elementRef.current) { 2148 return; 2149 } 2150 const isButtonTag = isButtonElement(elementRef.current); 2151 if (isNativeButton) { 2152 if (!isButtonTag) { 2153 const ownerStackMessage = SafeReact.captureOwnerStack?.() || ""; 2154 const message = "A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`."; 2155 error(`$message}$ownerStackMessage}`); 2156 } 2157 } else if (isButtonTag) { 2158 const ownerStackMessage = SafeReact.captureOwnerStack?.() || ""; 2159 const message = "A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`."; 2160 error(`$message}$ownerStackMessage}`); 2161 } 2162 }, [isNativeButton]); 2163 } 2164 const updateDisabled = React18.useCallback(() => { 2165 const element = elementRef.current; 2166 if (!isButtonElement(element)) { 2167 return; 2168 } 2169 if (isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled) { 2170 element.disabled = false; 2171 } 2172 }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]); 2173 useIsoLayoutEffect(updateDisabled, [updateDisabled]); 2174 const getButtonProps = React18.useCallback((externalProps = {}) => { 2175 const { 2176 onClick: externalOnClick, 2177 onMouseDown: externalOnMouseDown, 2178 onKeyUp: externalOnKeyUp, 2179 onKeyDown: externalOnKeyDown, 2180 onPointerDown: externalOnPointerDown, 2181 ...otherExternalProps 2182 } = externalProps; 2183 return mergeProps({ 2184 onClick(event) { 2185 if (disabled2) { 2186 event.preventDefault(); 2187 return; 2188 } 2189 externalOnClick?.(event); 2190 }, 2191 onMouseDown(event) { 2192 if (!disabled2) { 2193 externalOnMouseDown?.(event); 2194 } 2195 }, 2196 onKeyDown(event) { 2197 if (disabled2) { 2198 return; 2199 } 2200 makeEventPreventable(event); 2201 externalOnKeyDown?.(event); 2202 if (event.baseUIHandlerPrevented) { 2203 return; 2204 } 2205 const isCurrentTarget = event.target === event.currentTarget; 2206 const currentTarget = event.currentTarget; 2207 const isButton = isButtonElement(currentTarget); 2208 const isLink = !isNativeButton && isValidLinkElement(currentTarget); 2209 const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink); 2210 const isEnterKey = event.key === "Enter"; 2211 const isSpaceKey = event.key === " "; 2212 const role = currentTarget.getAttribute("role"); 2213 const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell"; 2214 if (isCurrentTarget && isCompositeItem && isSpaceKey) { 2215 if (event.defaultPrevented && isTextNavigationRole) { 2216 return; 2217 } 2218 event.preventDefault(); 2219 if (!isNativeButton || isButton) { 2220 event.preventBaseUIHandler(); 2221 dispatchClickWithModifiers(currentTarget, event); 2222 } 2223 return; 2224 } 2225 if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) { 2226 if (isCurrentTarget && isLink && isSpaceKey) { 2227 event.preventDefault(); 2228 } 2229 return; 2230 } 2231 if (event.defaultPrevented) { 2232 return; 2233 } 2234 event.preventDefault(); 2235 if (isEnterKey) { 2236 event.preventBaseUIHandler(); 2237 dispatchClickWithModifiers(currentTarget, event); 2238 } 2239 }, 2240 onKeyUp(event) { 2241 if (disabled2) { 2242 return; 2243 } 2244 makeEventPreventable(event); 2245 externalOnKeyUp?.(event); 2246 if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") { 2247 event.preventDefault(); 2248 return; 2249 } 2250 if (event.baseUIHandlerPrevented) { 2251 return; 2252 } 2253 if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === " ") { 2254 event.preventBaseUIHandler(); 2255 dispatchClickWithModifiers(event.currentTarget, event); 2256 } 2257 }, 2258 onPointerDown(event) { 2259 if (disabled2) { 2260 event.preventDefault(); 2261 return; 2262 } 2263 externalOnPointerDown?.(event); 2264 } 2265 }, isNativeButton ? { 2266 type: "button" 2267 } : { 2268 role: "button" 2269 }, focusableWhenDisabledProps, otherExternalProps); 2270 }, [disabled2, focusableWhenDisabledProps, isCompositeItem, isNativeButton]); 2271 const buttonRef = useStableCallback((element) => { 2272 elementRef.current = element; 2273 updateDisabled(); 2274 }); 2275 return { 2276 getButtonProps, 2277 buttonRef 2278 }; 2279 } 2280 function isButtonElement(elem) { 2281 return isHTMLElement(elem) && elem.tagName === "BUTTON"; 2282 } 2283 function isValidLinkElement(elem) { 2284 return isHTMLElement(elem) && elem.tagName === "A" && Boolean(elem.href); 2285 } 2286 2287 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/addEventListener.mjs 2288 function addEventListener(target, type, listener, options) { 2289 target.addEventListener(type, listener, options); 2290 return () => { 2291 target.removeEventListener(type, listener, options); 2292 }; 2293 } 2294 2295 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useValueAsRef.mjs 2296 function useValueAsRef(value) { 2297 const latest = useRefWithInit(createLatestRef, value).current; 2298 latest.next = value; 2299 useIsoLayoutEffect(latest.effect); 2300 return latest; 2301 } 2302 function createLatestRef(value) { 2303 const latest = { 2304 current: value, 2305 next: value, 2306 effect: () => { 2307 latest.current = latest.next; 2308 } 2309 }; 2310 return latest; 2311 } 2312 2313 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/parts.mjs 2314 var parts_exports = {}; 2315 __export(parts_exports, { 2316 engine: () => engine_exports, 2317 env: () => env_exports, 2318 mediaQuery: () => media_query_exports, 2319 os: () => os_exports, 2320 screenReader: () => screen_reader_exports 2321 }); 2322 2323 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/os.mjs 2324 var os_exports = {}; 2325 __export(os_exports, { 2326 android: () => android, 2327 apple: () => apple, 2328 ios: () => ios, 2329 linux: () => linux, 2330 mac: () => mac, 2331 windows: () => windows 2332 }); 2333 2334 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/shared.mjs 2335 function readRawData() { 2336 if (typeof navigator === "undefined") { 2337 return { 2338 userAgent: "", 2339 platform: "", 2340 maxTouchPoints: 0 2341 }; 2342 } 2343 if (true) { 2344 const uaData = navigator.userAgentData; 2345 if (uaData && Array.isArray(uaData.brands)) { 2346 return { 2347 userAgent: uaData.brands.map(({ 2348 brand, 2349 version: version2 2350 }) => `$brand}/$version2}`).join(" "), 2351 platform: uaData.platform ?? navigator.platform ?? "", 2352 maxTouchPoints: navigator.maxTouchPoints ?? 0 2353 }; 2354 } 2355 } 2356 return { 2357 userAgent: navigator.userAgent, 2358 platform: navigator.platform ?? "", 2359 maxTouchPoints: navigator.maxTouchPoints ?? 0 2360 }; 2361 } 2362 var { 2363 userAgent, 2364 platform, 2365 maxTouchPoints 2366 } = readRawData(); 2367 var lowerUserAgent = userAgent.toLowerCase(); 2368 var lowerPlatform = platform.toLowerCase(); 2369 2370 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/os.mjs 2371 var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1; 2372 var ANDROID_STRING = "android"; 2373 var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING); 2374 var mac = !ios && lowerPlatform.startsWith("mac"); 2375 var windows = lowerPlatform.startsWith("win"); 2376 var linux = !android && /^(linux|chrome os)/.test(lowerPlatform); 2377 var apple = mac || ios; 2378 2379 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/engine.mjs 2380 var engine_exports = {}; 2381 __export(engine_exports, { 2382 blink: () => blink, 2383 gecko: () => gecko, 2384 webkit: () => webkit 2385 }); 2386 var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none"); 2387 var gecko = !webkit && lowerUserAgent.includes("firefox"); 2388 var blink = !webkit && lowerUserAgent.includes("chrom"); 2389 2390 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/screen-reader.mjs 2391 var screen_reader_exports = {}; 2392 __export(screen_reader_exports, { 2393 voiceOver: () => voiceOver 2394 }); 2395 var voiceOver = apple; 2396 2397 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/env.mjs 2398 var env_exports = {}; 2399 __export(env_exports, { 2400 jsdom: () => jsdom 2401 }); 2402 var jsdom = /jsdom|happydom/.test(lowerUserAgent); 2403 2404 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/media-query.mjs 2405 var media_query_exports = {}; 2406 __export(media_query_exports, { 2407 iOS: () => iOS 2408 }); 2409 var iOS = "@supports (-webkit-touch-callout: none)"; 2410 2411 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useScrollLock.mjs 2412 var originalHtmlStyles = {}; 2413 var originalBodyStyles = {}; 2414 var originalHtmlScrollBehavior = ""; 2415 function getViewportScroller(html, body) { 2416 return isOverflowElement(html) ? html : body; 2417 } 2418 function isPageScrollLocked(win, html, body) { 2419 return /hidden|clip/.test(win.getComputedStyle(getViewportScroller(html, body)).overflowY); 2420 } 2421 function hasInsetScrollbars(referenceElement) { 2422 if (typeof document === "undefined") { 2423 return false; 2424 } 2425 const doc = ownerDocument(referenceElement); 2426 const win = getWindow(doc); 2427 return win.innerWidth - doc.documentElement.clientWidth > 0; 2428 } 2429 function supportsStableScrollbarGutter(referenceElement) { 2430 const supported = typeof CSS !== "undefined" && CSS.supports && CSS.supports("scrollbar-gutter", "stable"); 2431 if (!supported || typeof document === "undefined") { 2432 return false; 2433 } 2434 const doc = ownerDocument(referenceElement); 2435 const html = doc.documentElement; 2436 const body = doc.body; 2437 const scrollContainer = getViewportScroller(html, body); 2438 const originalScrollContainerOverflowY = scrollContainer.style.overflowY; 2439 const originalHtmlStyleGutter = html.style.scrollbarGutter; 2440 html.style.scrollbarGutter = "stable"; 2441 scrollContainer.style.overflowY = "scroll"; 2442 const before = scrollContainer.offsetWidth; 2443 scrollContainer.style.overflowY = "hidden"; 2444 const after = scrollContainer.offsetWidth; 2445 scrollContainer.style.overflowY = originalScrollContainerOverflowY; 2446 html.style.scrollbarGutter = originalHtmlStyleGutter; 2447 return before === after; 2448 } 2449 function preventScrollOverlayScrollbars(referenceElement) { 2450 const doc = ownerDocument(referenceElement); 2451 const html = doc.documentElement; 2452 const body = doc.body; 2453 const elementToLock = getViewportScroller(html, body); 2454 const originalElementToLockStyles = { 2455 overflowY: elementToLock.style.overflowY, 2456 overflowX: elementToLock.style.overflowX 2457 }; 2458 Object.assign(elementToLock.style, { 2459 overflowY: "hidden", 2460 overflowX: "hidden" 2461 }); 2462 return () => { 2463 Object.assign(elementToLock.style, originalElementToLockStyles); 2464 }; 2465 } 2466 function preventScrollInsetScrollbars(referenceElement) { 2467 const doc = ownerDocument(referenceElement); 2468 const html = doc.documentElement; 2469 const body = doc.body; 2470 const win = getWindow(html); 2471 let scrollTop = 0; 2472 let scrollLeft = 0; 2473 let updateGutterOnly = false; 2474 const resizeFrame = AnimationFrame.create(); 2475 if (parts_exports.engine.webkit && (win.visualViewport?.scale ?? 1) !== 1) { 2476 return () => { 2477 }; 2478 } 2479 function lockScroll() { 2480 const htmlStyles = win.getComputedStyle(html); 2481 const bodyStyles = win.getComputedStyle(body); 2482 const htmlScrollbarGutterValue = htmlStyles.scrollbarGutter || ""; 2483 const hasBothEdges = htmlScrollbarGutterValue.includes("both-edges"); 2484 const scrollbarGutterValue = hasBothEdges ? "stable both-edges" : "stable"; 2485 scrollTop = html.scrollTop; 2486 scrollLeft = html.scrollLeft; 2487 originalHtmlStyles = { 2488 scrollbarGutter: html.style.scrollbarGutter, 2489 overflowY: html.style.overflowY, 2490 overflowX: html.style.overflowX 2491 }; 2492 originalHtmlScrollBehavior = html.style.scrollBehavior; 2493 originalBodyStyles = { 2494 position: body.style.position, 2495 height: body.style.height, 2496 width: body.style.width, 2497 boxSizing: body.style.boxSizing, 2498 overflowY: body.style.overflowY, 2499 overflowX: body.style.overflowX, 2500 scrollBehavior: body.style.scrollBehavior 2501 }; 2502 const isScrollableY = html.scrollHeight > html.clientHeight; 2503 const isScrollableX = html.scrollWidth > html.clientWidth; 2504 const hasConstantOverflowY = htmlStyles.overflowY === "scroll" || bodyStyles.overflowY === "scroll"; 2505 const hasConstantOverflowX = htmlStyles.overflowX === "scroll" || bodyStyles.overflowX === "scroll"; 2506 const scrollbarWidth = Math.max(0, win.innerWidth - body.clientWidth); 2507 const scrollbarHeight = Math.max(0, win.innerHeight - body.clientHeight); 2508 const marginY = parseFloat(bodyStyles.marginTop) + parseFloat(bodyStyles.marginBottom); 2509 const marginX = parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight); 2510 const elementToLock = getViewportScroller(html, body); 2511 updateGutterOnly = supportsStableScrollbarGutter(referenceElement); 2512 if (updateGutterOnly) { 2513 html.style.scrollbarGutter = scrollbarGutterValue; 2514 elementToLock.style.overflowY = "hidden"; 2515 elementToLock.style.overflowX = "hidden"; 2516 return; 2517 } 2518 Object.assign(html.style, { 2519 scrollbarGutter: scrollbarGutterValue, 2520 overflowY: "hidden", 2521 overflowX: "hidden" 2522 }); 2523 if (isScrollableY || hasConstantOverflowY) { 2524 html.style.overflowY = "scroll"; 2525 } 2526 if (isScrollableX || hasConstantOverflowX) { 2527 html.style.overflowX = "scroll"; 2528 } 2529 Object.assign(body.style, { 2530 position: "relative", 2531 height: marginY || scrollbarHeight ? `calc(100dvh - $marginY + scrollbarHeight}px)` : "100dvh", 2532 width: marginX || scrollbarWidth ? `calc(100vw - $marginX + scrollbarWidth}px)` : "100vw", 2533 boxSizing: "border-box", 2534 // Assign the longhands that `cleanup` restores, so nothing is left behind. 2535 overflowY: "hidden", 2536 overflowX: "hidden", 2537 scrollBehavior: "unset" 2538 }); 2539 body.scrollTop = scrollTop; 2540 body.scrollLeft = scrollLeft; 2541 html.setAttribute("data-base-ui-scroll-locked", ""); 2542 html.style.scrollBehavior = "unset"; 2543 } 2544 function cleanup() { 2545 Object.assign(html.style, originalHtmlStyles); 2546 Object.assign(body.style, originalBodyStyles); 2547 if (!updateGutterOnly) { 2548 html.scrollTop = scrollTop; 2549 html.scrollLeft = scrollLeft; 2550 html.removeAttribute("data-base-ui-scroll-locked"); 2551 html.style.scrollBehavior = originalHtmlScrollBehavior; 2552 } 2553 } 2554 function handleResize() { 2555 cleanup(); 2556 resizeFrame.request(lockScroll); 2557 } 2558 lockScroll(); 2559 const unsubscribeResize = addEventListener(win, "resize", handleResize); 2560 return () => { 2561 resizeFrame.cancel(); 2562 cleanup(); 2563 if (typeof win.removeEventListener === "function") { 2564 unsubscribeResize(); 2565 } 2566 }; 2567 } 2568 var ScrollLocker = class { 2569 lockCount = 0; 2570 restore = null; 2571 timeoutLock = Timeout.create(); 2572 timeoutUnlock = Timeout.create(); 2573 acquire(referenceElement) { 2574 this.lockCount += 1; 2575 if (this.lockCount === 1 && this.restore === null) { 2576 this.timeoutLock.start(0, () => this.lock(referenceElement)); 2577 } 2578 return this.release; 2579 } 2580 release = () => { 2581 this.lockCount -= 1; 2582 if (this.lockCount === 0 && this.restore) { 2583 this.timeoutUnlock.start(0, this.unlock); 2584 } 2585 }; 2586 unlock = () => { 2587 if (this.lockCount === 0 && this.restore) { 2588 this.restore?.(); 2589 this.restore = null; 2590 } 2591 }; 2592 lock(referenceElement) { 2593 if (this.lockCount === 0 || this.restore !== null) { 2594 return; 2595 } 2596 const doc = ownerDocument(referenceElement); 2597 const html = doc.documentElement; 2598 const body = doc.body; 2599 const win = getWindow(html); 2600 if (isPageScrollLocked(win, html, body)) { 2601 const observer = new win.MutationObserver(() => { 2602 if (isPageScrollLocked(win, html, body)) { 2603 return; 2604 } 2605 observer.disconnect(); 2606 this.restore = null; 2607 this.lock(referenceElement); 2608 }); 2609 const options = { 2610 attributes: true 2611 }; 2612 observer.observe(html, options); 2613 observer.observe(body, options); 2614 this.restore = () => observer.disconnect(); 2615 return; 2616 } 2617 const hasOverlayScrollbars = parts_exports.os.ios || !hasInsetScrollbars(referenceElement); 2618 this.restore = hasOverlayScrollbars ? preventScrollOverlayScrollbars(referenceElement) : preventScrollInsetScrollbars(referenceElement); 2619 } 2620 }; 2621 var SCROLL_LOCKER = new ScrollLocker(); 2622 function useScrollLock(enabled = true, referenceElement = null) { 2623 useIsoLayoutEffect(() => { 2624 if (!enabled) { 2625 return void 0; 2626 } 2627 return SCROLL_LOCKER.acquire(referenceElement); 2628 }, [enabled, referenceElement]); 2629 } 2630 2631 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs 2632 var React19 = __toESM(require_react(), 1); 2633 2634 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/event.mjs 2635 function stopEvent(event) { 2636 event.preventDefault(); 2637 event.stopPropagation(); 2638 } 2639 function isReactEvent(event) { 2640 return "nativeEvent" in event; 2641 } 2642 function isVirtualClick(event) { 2643 if (event.pointerType === "" && event.isTrusted) { 2644 return true; 2645 } 2646 if (parts_exports.os.android && event.pointerType) { 2647 return event.type === "click" && event.buttons === 1; 2648 } 2649 return event.detail === 0 && !event.pointerType; 2650 } 2651 function isVirtualPointerEvent(event) { 2652 if (parts_exports.env.jsdom) { 2653 return false; 2654 } 2655 return !parts_exports.os.android && event.width === 0 && event.height === 0 || // Chrome synthesizes a screen reader press (TalkBack, VoiceOver, NVDA) as a 1x1 mouse 2656 // `pointerdown` with no pressure. TalkBack can report a pressed button, while desktop 2657 // mouse presses can report no pressure, so only require no pressed button off Android. 2658 event.type === "pointerdown" && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse" && (parts_exports.os.android || event.buttons === 0) || // iOS VoiceOver returns 0.333• for width/height. 2659 event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "touch"; 2660 } 2661 function isMouseLikePointerType(pointerType, strict) { 2662 const values = ["mouse", "pen"]; 2663 if (!strict) { 2664 values.push("", void 0); 2665 } 2666 return values.includes(pointerType); 2667 } 2668 function isClickLikeEvent(event) { 2669 const type = event.type; 2670 return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup"; 2671 } 2672 2673 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/shadowDom.mjs 2674 function activeElement(doc) { 2675 let element = doc.activeElement; 2676 while (element?.shadowRoot?.activeElement != null) { 2677 element = element.shadowRoot.activeElement; 2678 } 2679 return element; 2680 } 2681 function contains(parent, child) { 2682 if (!parent || !child) { 2683 return false; 2684 } 2685 const rootNode = child.getRootNode?.(); 2686 if (parent.contains(child)) { 2687 return true; 2688 } 2689 if (rootNode && isShadowRoot(rootNode)) { 2690 let next = child; 2691 while (next) { 2692 if (parent === next) { 2693 return true; 2694 } 2695 next = next.parentNode || next.host; 2696 } 2697 } 2698 return false; 2699 } 2700 function closest(node, selector) { 2701 let current = node; 2702 while (current) { 2703 if (isElement(current) && current.matches(selector)) { 2704 return current; 2705 } 2706 current = current.assignedSlot ?? current.parentNode ?? (isShadowRoot(current) ? current.host : null); 2707 } 2708 return null; 2709 } 2710 function getTarget(event) { 2711 if ("composedPath" in event) { 2712 return event.composedPath()[0] ?? event.target; 2713 } 2714 return event.target; 2715 } 2716 2717 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs 2718 var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable"; 2719 var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"; 2720 var ARROW_LEFT = "ArrowLeft"; 2721 var ARROW_RIGHT = "ArrowRight"; 2722 var ARROW_UP = "ArrowUp"; 2723 var ARROW_DOWN = "ArrowDown"; 2724 2725 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs 2726 var open = "data-open"; 2727 var closed = "data-closed"; 2728 var anchorHidden = "data-anchor-hidden"; 2729 2730 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs 2731 var CommonTriggerDataAttributes_exports = {}; 2732 __export(CommonTriggerDataAttributes_exports, { 2733 popupOpen: () => popupOpen, 2734 pressed: () => pressed 2735 }); 2736 var popupOpen = "data-popup-open"; 2737 var pressed = "data-pressed"; 2738 2739 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popupStateMapping.mjs 2740 var TRIGGER_HOOK = { 2741 [popupOpen]: "" 2742 }; 2743 var PRESSABLE_TRIGGER_HOOK = { 2744 [popupOpen]: "", 2745 [pressed]: "" 2746 }; 2747 var POPUP_OPEN_HOOK = { 2748 [open]: "" 2749 }; 2750 var POPUP_CLOSED_HOOK = { 2751 [closed]: "" 2752 }; 2753 var ANCHOR_HIDDEN_HOOK = { 2754 [anchorHidden]: "" 2755 }; 2756 var triggerOpenStateMapping = { 2757 open(value) { 2758 if (value) { 2759 return TRIGGER_HOOK; 2760 } 2761 return null; 2762 } 2763 }; 2764 var pressableTriggerOpenStateMapping = { 2765 open(value) { 2766 if (value) { 2767 return PRESSABLE_TRIGGER_HOOK; 2768 } 2769 return null; 2770 } 2771 }; 2772 var popupStateMapping = { 2773 open(value) { 2774 if (value) { 2775 return POPUP_OPEN_HOOK; 2776 } 2777 return POPUP_CLOSED_HOOK; 2778 }, 2779 anchorHidden(value) { 2780 if (value) { 2781 return ANCHOR_HIDDEN_HOOK; 2782 } 2783 return null; 2784 } 2785 }; 2786 var popupTransitionStateMapping = { 2787 ...popupStateMapping, 2788 ...transitionStatusMapping 2789 }; 2790 2791 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs 2792 var popupOpen2 = CommonTriggerDataAttributes_exports.popupOpen; 2793 var triggerDisabled = "data-trigger-disabled"; 2794 2795 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/element.mjs 2796 function isTargetInsideEnabledTrigger(target, triggerElements) { 2797 if (!isElement(target)) { 2798 return false; 2799 } 2800 const targetElement = target; 2801 if (triggerElements.hasElement(targetElement)) { 2802 return !targetElement.hasAttribute(triggerDisabled); 2803 } 2804 for (const [, trigger] of triggerElements.entries()) { 2805 if (contains(trigger, targetElement)) { 2806 return !trigger.hasAttribute(triggerDisabled); 2807 } 2808 } 2809 return false; 2810 } 2811 function isEventTargetWithin(event, node) { 2812 if (node == null) { 2813 return false; 2814 } 2815 if ("composedPath" in event) { 2816 return event.composedPath().includes(node); 2817 } 2818 const eventAgain = event; 2819 return eventAgain.target != null && node.contains(eventAgain.target); 2820 } 2821 function isRootElement(element) { 2822 return element.matches("html,body"); 2823 } 2824 function isTypeableElement(element) { 2825 return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR); 2826 } 2827 function isInteractiveElement(element) { 2828 return closest(element, `button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null; 2829 } 2830 function isTypeableCombobox(element) { 2831 if (!element) { 2832 return false; 2833 } 2834 return element.getAttribute("role") === "combobox" && isTypeableElement(element); 2835 } 2836 function matchesFocusVisible(element) { 2837 if (!element || parts_exports.env.jsdom) { 2838 return true; 2839 } 2840 try { 2841 return element.matches(":focus-visible"); 2842 } catch (_e) { 2843 return true; 2844 } 2845 } 2846 function getFloatingFocusElement(floatingElement) { 2847 if (!floatingElement) { 2848 return null; 2849 } 2850 return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(`[$FOCUSABLE_ATTRIBUTE}]`) || floatingElement; 2851 } 2852 2853 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs 2854 function resolveValue(value, pointerType) { 2855 if (pointerType != null && !isMouseLikePointerType(pointerType)) { 2856 return 0; 2857 } 2858 if (typeof value === "function") { 2859 return value(); 2860 } 2861 return value; 2862 } 2863 function getDelay(value, prop, pointerType) { 2864 const result = resolveValue(value, pointerType); 2865 if (typeof result === "number") { 2866 return result; 2867 } 2868 return result?.[prop]; 2869 } 2870 function getRestMs(value) { 2871 if (typeof value === "function") { 2872 return value(); 2873 } 2874 return value; 2875 } 2876 function isClickLikeOpenEvent(openEventType, interactedInside) { 2877 return interactedInside || openEventType === "click" || openEventType === "mousedown"; 2878 } 2879 function isHoverOpenEvent(openEventType) { 2880 return openEventType?.includes("mouse") && openEventType !== "mousedown"; 2881 } 2882 2883 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs 2884 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); 2885 var FloatingDelayGroupContext = /* @__PURE__ */ React19.createContext({ 2886 hasProvider: false, 2887 timeoutMs: 0, 2888 delayRef: { 2889 current: 0 2890 }, 2891 initialDelayRef: { 2892 current: 0 2893 }, 2894 timeout: new Timeout(), 2895 currentIdRef: { 2896 current: null 2897 }, 2898 currentContextRef: { 2899 current: null 2900 } 2901 }); 2902 if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext"; 2903 function resetDelayRef(delayRef, initialDelayRef) { 2904 delayRef.current = initialDelayRef.current; 2905 } 2906 function FloatingDelayGroup(props) { 2907 const { 2908 children, 2909 delay, 2910 timeoutMs = 0 2911 } = props; 2912 const delayRef = React19.useRef(delay); 2913 const initialDelayRef = React19.useRef(delay); 2914 const currentIdRef = React19.useRef(null); 2915 const currentContextRef = React19.useRef(null); 2916 const timeout = useTimeout(); 2917 useIsoLayoutEffect(() => { 2918 initialDelayRef.current = delay; 2919 if (!currentIdRef.current) { 2920 delayRef.current = delay; 2921 return; 2922 } 2923 delayRef.current = { 2924 open: getDelay(delayRef.current, "open"), 2925 close: getDelay(delay, "close") 2926 }; 2927 }, [delay, currentIdRef, delayRef, initialDelayRef]); 2928 return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FloatingDelayGroupContext.Provider, { 2929 value: React19.useMemo(() => ({ 2930 hasProvider: true, 2931 delayRef, 2932 initialDelayRef, 2933 currentIdRef, 2934 timeoutMs, 2935 currentContextRef, 2936 timeout 2937 }), [timeoutMs, timeout]), 2938 children 2939 }); 2940 } 2941 function useDelayGroup(store, options = { 2942 open: false 2943 }) { 2944 const { 2945 open: open2 2946 } = options; 2947 const floatingId = store.useState("floatingId"); 2948 const groupContext = React19.useContext(FloatingDelayGroupContext); 2949 const { 2950 currentIdRef, 2951 delayRef, 2952 timeoutMs, 2953 initialDelayRef, 2954 currentContextRef, 2955 hasProvider, 2956 timeout 2957 } = groupContext; 2958 const [isInstantPhase, setIsInstantPhase] = React19.useState(false); 2959 const openRef = React19.useRef(open2); 2960 useIsoLayoutEffect(() => { 2961 openRef.current = open2; 2962 }, [open2]); 2963 useIsoLayoutEffect(() => { 2964 function unset() { 2965 currentContextRef.current?.setIsInstantPhase(false); 2966 currentIdRef.current = null; 2967 currentContextRef.current = null; 2968 delayRef.current = initialDelayRef.current; 2969 timeout.clear(); 2970 } 2971 if (!currentIdRef.current) { 2972 return void 0; 2973 } 2974 if (!open2 && currentIdRef.current === floatingId) { 2975 setIsInstantPhase(false); 2976 if (timeoutMs) { 2977 const closingId = floatingId; 2978 timeout.start(timeoutMs, () => { 2979 if (store.select("open") || currentIdRef.current && currentIdRef.current !== closingId) { 2980 return; 2981 } 2982 unset(); 2983 }); 2984 return () => { 2985 if (openRef.current || currentIdRef.current !== closingId) { 2986 timeout.clear(); 2987 } 2988 }; 2989 } 2990 unset(); 2991 } 2992 return void 0; 2993 }, [open2, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store]); 2994 useIsoLayoutEffect(() => { 2995 if (!open2) { 2996 return; 2997 } 2998 const prevContext = currentContextRef.current; 2999 const prevId = currentIdRef.current; 3000 timeout.clear(); 3001 currentContextRef.current = { 3002 onOpenChange: store.setOpen, 3003 setIsInstantPhase 3004 }; 3005 currentIdRef.current = floatingId; 3006 delayRef.current = { 3007 open: 0, 3008 close: getDelay(initialDelayRef.current, "close") 3009 }; 3010 if (prevId !== null && prevId !== floatingId) { 3011 setIsInstantPhase(true); 3012 prevContext?.setIsInstantPhase(true); 3013 prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none)); 3014 } else { 3015 setIsInstantPhase(false); 3016 prevContext?.setIsInstantPhase(false); 3017 } 3018 }, [open2, floatingId, store, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]); 3019 useIsoLayoutEffect(() => { 3020 return () => { 3021 if (currentIdRef.current === floatingId) { 3022 currentContextRef.current = null; 3023 if (!openRef.current) { 3024 return; 3025 } 3026 currentIdRef.current = null; 3027 resetDelayRef(delayRef, initialDelayRef); 3028 timeout.clear(); 3029 } 3030 }; 3031 }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]); 3032 return React19.useMemo(() => ({ 3033 activeIdRef: currentIdRef, 3034 hasProvider, 3035 delayRef, 3036 isInstantPhase 3037 }), [currentIdRef, hasProvider, delayRef, isInstantPhase]); 3038 } 3039 3040 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingFocusManager.mjs 3041 var React23 = __toESM(require_react(), 1); 3042 3043 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/mergeCleanups.mjs 3044 function mergeCleanups(...cleanups) { 3045 return () => { 3046 for (let i = 0; i < cleanups.length; i += 1) { 3047 const cleanup = cleanups[i]; 3048 if (cleanup) { 3049 cleanup(); 3050 } 3051 } 3052 }; 3053 } 3054 3055 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/FocusGuard.mjs 3056 var React20 = __toESM(require_react(), 1); 3057 3058 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/visuallyHidden.mjs 3059 var visuallyHiddenBase = { 3060 clipPath: "inset(50%)", 3061 overflow: "hidden", 3062 whiteSpace: "nowrap", 3063 border: 0, 3064 padding: 0, 3065 width: 1, 3066 height: 1, 3067 margin: -1 3068 }; 3069 var visuallyHidden = { 3070 ...visuallyHiddenBase, 3071 position: "fixed", 3072 margin: 0, 3073 top: 0, 3074 left: 0 3075 }; 3076 var visuallyHiddenInput = { 3077 ...visuallyHiddenBase, 3078 position: "absolute" 3079 }; 3080 3081 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/FocusGuard.mjs 3082 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1); 3083 var FocusGuard = /* @__PURE__ */ React20.forwardRef(function FocusGuard2(props, ref) { 3084 const [role, setRole] = React20.useState(); 3085 useIsoLayoutEffect(() => { 3086 if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) { 3087 setRole("button"); 3088 } 3089 }, []); 3090 const restProps = { 3091 tabIndex: 0, 3092 // Role is only for VoiceOver 3093 role 3094 }; 3095 return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { 3096 ...props, 3097 ref, 3098 style: visuallyHidden, 3099 "aria-hidden": role ? void 0 : true, 3100 ...restProps, 3101 "data-base-ui-focus-guard": "" 3102 }); 3103 }); 3104 if (true) FocusGuard.displayName = "FocusGuard"; 3105 3106 // node_modules/.store/@floating-ui/utils@0.2.12-gOxTzMf36nCrbeHpEew-rw/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs 3107 var min = Math.min; 3108 var max = Math.max; 3109 var round = Math.round; 3110 var floor = Math.floor; 3111 var createCoords = (v2) => ({ 3112 x: v2, 3113 y: v2 3114 }); 3115 var oppositeSideMap = { 3116 left: "right", 3117 right: "left", 3118 bottom: "top", 3119 top: "bottom" 3120 }; 3121 function clamp(start, value, end) { 3122 return max(start, min(value, end)); 3123 } 3124 function evaluate(value, param) { 3125 return typeof value === "function" ? value(param) : value; 3126 } 3127 function getSide(placement) { 3128 return placement.split("-")[0]; 3129 } 3130 function getAlignment(placement) { 3131 return placement.split("-")[1]; 3132 } 3133 function getOppositeAxis(axis) { 3134 return axis === "x" ? "y" : "x"; 3135 } 3136 function getAxisLength(axis) { 3137 return axis === "y" ? "height" : "width"; 3138 } 3139 function getSideAxis(placement) { 3140 const firstChar = placement[0]; 3141 return firstChar === "t" || firstChar === "b" ? "y" : "x"; 3142 } 3143 function getAlignmentAxis(placement) { 3144 return getOppositeAxis(getSideAxis(placement)); 3145 } 3146 function getAlignmentSides(placement, rects, rtl) { 3147 if (rtl === void 0) { 3148 rtl = false; 3149 } 3150 const alignment = getAlignment(placement); 3151 const alignmentAxis = getAlignmentAxis(placement); 3152 const length = getAxisLength(alignmentAxis); 3153 let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top"; 3154 if (rects.reference[length] > rects.floating[length]) { 3155 mainAlignmentSide = getOppositePlacement(mainAlignmentSide); 3156 } 3157 return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; 3158 } 3159 function getExpandedPlacements(placement) { 3160 const oppositePlacement = getOppositePlacement(placement); 3161 return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)]; 3162 } 3163 function getOppositeAlignmentPlacement(placement) { 3164 return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start"); 3165 } 3166 var lrPlacement = ["left", "right"]; 3167 var rlPlacement = ["right", "left"]; 3168 var tbPlacement = ["top", "bottom"]; 3169 var btPlacement = ["bottom", "top"]; 3170 function getSideList(side, isStart, rtl) { 3171 switch (side) { 3172 case "top": 3173 case "bottom": 3174 if (rtl) return isStart ? rlPlacement : lrPlacement; 3175 return isStart ? lrPlacement : rlPlacement; 3176 case "left": 3177 case "right": 3178 return isStart ? tbPlacement : btPlacement; 3179 default: 3180 return []; 3181 } 3182 } 3183 function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { 3184 const alignment = getAlignment(placement); 3185 let list = getSideList(getSide(placement), direction === "start", rtl); 3186 if (alignment) { 3187 list = list.map((side) => side + "-" + alignment); 3188 if (flipAlignment) { 3189 list = list.concat(list.map(getOppositeAlignmentPlacement)); 3190 } 3191 } 3192 return list; 3193 } 3194 function getOppositePlacement(placement) { 3195 const side = getSide(placement); 3196 return oppositeSideMap[side] + placement.slice(side.length); 3197 } 3198 function expandPaddingObject(padding) { 3199 var _padding$top, _padding$right, _padding$bottom, _padding$left; 3200 return { 3201 top: (_padding$top = padding.top) != null ? _padding$top : 0, 3202 right: (_padding$right = padding.right) != null ? _padding$right : 0, 3203 bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0, 3204 left: (_padding$left = padding.left) != null ? _padding$left : 0 3205 }; 3206 } 3207 function getPaddingObject(padding) { 3208 return typeof padding !== "number" ? expandPaddingObject(padding) : { 3209 top: padding, 3210 right: padding, 3211 bottom: padding, 3212 left: padding 3213 }; 3214 } 3215 function rectToClientRect(rect) { 3216 const { 3217 x: x2, 3218 y: y2, 3219 width, 3220 height 3221 } = rect; 3222 return { 3223 width, 3224 height, 3225 top: y2, 3226 left: x2, 3227 right: x2 + width, 3228 bottom: y2 + height, 3229 x: x2, 3230 y: y2 3231 }; 3232 } 3233 3234 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs 3235 function isIndexOutOfListBounds(list, index2) { 3236 return index2 < 0 || index2 >= list.length; 3237 } 3238 function getMinListIndex(listRef, disabledIndices) { 3239 return findNonDisabledListIndex(listRef.current, { 3240 disabledIndices 3241 }); 3242 } 3243 function getMaxListIndex(listRef, disabledIndices) { 3244 return findNonDisabledListIndex(listRef.current, { 3245 decrement: true, 3246 startingIndex: listRef.current.length, 3247 disabledIndices 3248 }); 3249 } 3250 function getNextListIndex(list, currentIndex, options) { 3251 const { 3252 decrement, 3253 loopFocus, 3254 allowEscape, 3255 disabledIndices, 3256 minIndex, 3257 maxIndex 3258 } = options; 3259 const step = () => findNonDisabledListIndex(list, { 3260 startingIndex: currentIndex, 3261 decrement, 3262 disabledIndices 3263 }); 3264 let index2; 3265 let wrapped = false; 3266 if (!loopFocus) { 3267 index2 = decrement ? Math.max(minIndex, step()) : Math.min(maxIndex, step()); 3268 } else if (decrement ? currentIndex <= minIndex : currentIndex >= maxIndex) { 3269 const outside = decrement ? -1 : list.length; 3270 if (allowEscape && currentIndex !== outside) { 3271 index2 = -1; 3272 } else { 3273 index2 = decrement ? maxIndex : minIndex; 3274 wrapped = true; 3275 } 3276 } else { 3277 index2 = step(); 3278 } 3279 return { 3280 index: isIndexOutOfListBounds(list, index2) ? -1 : index2, 3281 wrapped 3282 }; 3283 } 3284 function findNonDisabledListIndex(list, { 3285 startingIndex = -1, 3286 decrement = false, 3287 disabledIndices, 3288 amount = 1 3289 } = {}) { 3290 let index2 = startingIndex; 3291 do { 3292 index2 += decrement ? -amount : amount; 3293 } while (index2 >= 0 && index2 <= list.length - 1 && isListIndexDisabled(list, index2, disabledIndices)); 3294 return index2; 3295 } 3296 function isListIndexDisabled(list, index2, disabledIndices) { 3297 const isExplicitlyDisabled = typeof disabledIndices === "function" ? disabledIndices(index2) : disabledIndices?.includes(index2) ?? false; 3298 if (isExplicitlyDisabled) { 3299 return true; 3300 } 3301 const element = list[index2]; 3302 if (!element) { 3303 return false; 3304 } 3305 if (!isElementVisible(element)) { 3306 return true; 3307 } 3308 if (element.matches(":disabled")) { 3309 return true; 3310 } 3311 return !disabledIndices && (element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true"); 3312 } 3313 function isHiddenByStyles(styles) { 3314 return styles.visibility === "hidden" || styles.visibility === "collapse"; 3315 } 3316 function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) { 3317 if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) { 3318 return false; 3319 } 3320 if (typeof element.checkVisibility === "function") { 3321 return element.checkVisibility(); 3322 } 3323 return styles.display !== "none" && styles.display !== "contents"; 3324 } 3325 3326 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs 3327 var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]'; 3328 function getParentElement(element) { 3329 const assignedSlot = element.assignedSlot; 3330 if (assignedSlot) { 3331 return assignedSlot; 3332 } 3333 if (element.parentElement) { 3334 return element.parentElement; 3335 } 3336 const rootNode = element.getRootNode(); 3337 return isShadowRoot(rootNode) ? rootNode.host : null; 3338 } 3339 function getDetailsSummary(details) { 3340 for (const child of Array.from(details.children)) { 3341 if (getNodeName(child) === "summary") { 3342 return child; 3343 } 3344 } 3345 return null; 3346 } 3347 function isWithinOpenDetailsSummary(element, details) { 3348 const summary = getDetailsSummary(details); 3349 return !!summary && (element === summary || contains(summary, element)); 3350 } 3351 function isFocusableCandidate(element) { 3352 const nodeName = element ? getNodeName(element) : ""; 3353 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"); 3354 } 3355 function isFocusableElement(element) { 3356 if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) { 3357 return false; 3358 } 3359 for (let current = element; current; current = getParentElement(current)) { 3360 const isAncestor = current !== element; 3361 const isSlot = getNodeName(current) === "slot"; 3362 if (current.hasAttribute("inert")) { 3363 return false; 3364 } 3365 if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) { 3366 return false; 3367 } 3368 } 3369 return true; 3370 } 3371 function isVisibleInTabbableTree(element, isAncestor) { 3372 const styles = getComputedStyle2(element); 3373 if (!isAncestor) { 3374 return isElementVisible(element, styles); 3375 } 3376 return styles.display !== "none"; 3377 } 3378 function getTabIndex(element) { 3379 const tabIndex = element.tabIndex; 3380 if (tabIndex < 0) { 3381 const nodeName = getNodeName(element); 3382 if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) { 3383 return 0; 3384 } 3385 } 3386 return tabIndex; 3387 } 3388 function getNamedRadioInput(element) { 3389 if (getNodeName(element) !== "input") { 3390 return null; 3391 } 3392 const input = element; 3393 return input.type === "radio" && input.name !== "" ? input : null; 3394 } 3395 function isTabbableRadio(element, candidates) { 3396 const input = getNamedRadioInput(element); 3397 if (!input) { 3398 return true; 3399 } 3400 const checkedRadio = candidates.find((candidate) => { 3401 const radio = getNamedRadioInput(candidate); 3402 return radio?.name === input.name && radio.form === input.form && radio.checked; 3403 }); 3404 if (checkedRadio) { 3405 return checkedRadio === input; 3406 } 3407 return candidates.find((candidate) => { 3408 const radio = getNamedRadioInput(candidate); 3409 return radio?.name === input.name && radio.form === input.form; 3410 }) === input; 3411 } 3412 function getComposedChildren(container) { 3413 if (isHTMLElement(container) && getNodeName(container) === "slot") { 3414 const assignedElements = container.assignedElements({ 3415 flatten: true 3416 }); 3417 if (assignedElements.length > 0) { 3418 return assignedElements; 3419 } 3420 } 3421 if (isHTMLElement(container) && container.shadowRoot) { 3422 return Array.from(container.shadowRoot.children); 3423 } 3424 return Array.from(container.children); 3425 } 3426 function appendCandidates(container, list) { 3427 getComposedChildren(container).forEach((child) => { 3428 if (isFocusableCandidate(child)) { 3429 list.push(child); 3430 } 3431 appendCandidates(child, list); 3432 }); 3433 } 3434 function appendMatchingElements(container, selector, list) { 3435 getComposedChildren(container).forEach((child) => { 3436 if (isHTMLElement(child) && child.matches(selector)) { 3437 list.push(child); 3438 } 3439 appendMatchingElements(child, selector, list); 3440 }); 3441 } 3442 function isTabbable(element) { 3443 return isFocusableElement(element) && getTabIndex(element) >= 0; 3444 } 3445 function focusable(container) { 3446 const candidates = []; 3447 appendCandidates(container, candidates); 3448 return candidates.filter(isFocusableElement); 3449 } 3450 function tabbable(container) { 3451 const candidates = focusable(container); 3452 return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates)); 3453 } 3454 function getTabbableIn(container, dir) { 3455 const list = tabbable(container); 3456 const len = list.length; 3457 if (len === 0) { 3458 return void 0; 3459 } 3460 const active = activeElement(ownerDocument(container)); 3461 const index2 = list.indexOf(active); 3462 const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir; 3463 return list[nextIndex]; 3464 } 3465 function getNextTabbable(referenceElement) { 3466 return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement; 3467 } 3468 function getPreviousTabbable(referenceElement) { 3469 return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement; 3470 } 3471 function getTabbableNearElement(referenceElement, direction, exclude) { 3472 if (!referenceElement) { 3473 return null; 3474 } 3475 const list = []; 3476 appendCandidates(ownerDocument(referenceElement).body, list); 3477 const index2 = list.indexOf(referenceElement); 3478 if (index2 === -1) { 3479 return null; 3480 } 3481 const candidates = list.filter(isFocusableElement); 3482 for (let offset4 = 1; offset4 < list.length; offset4 += 1) { 3483 const element = list[(index2 + direction * offset4 + list.length) % list.length]; 3484 if (!contains(exclude, element) && isTabbable(element) && isTabbableRadio(element, candidates)) { 3485 return element; 3486 } 3487 } 3488 return list[index2]; 3489 } 3490 function isOutsideEvent(event, container) { 3491 const containerElement = container || event.currentTarget; 3492 const relatedTarget = event.relatedTarget; 3493 return !relatedTarget || !contains(containerElement, relatedTarget); 3494 } 3495 function disableFocusInside(container) { 3496 const tabbableElements = tabbable(container); 3497 tabbableElements.forEach((element) => { 3498 element.dataset.tabindex = element.getAttribute("tabindex") || ""; 3499 element.setAttribute("tabindex", "-1"); 3500 }); 3501 } 3502 function enableFocusInside(container) { 3503 const elements = []; 3504 appendMatchingElements(container, "[data-tabindex]", elements); 3505 elements.forEach((element) => { 3506 const tabindex = element.dataset.tabindex; 3507 delete element.dataset.tabindex; 3508 if (tabindex) { 3509 element.setAttribute("tabindex", tabindex); 3510 } else { 3511 element.removeAttribute("tabindex"); 3512 } 3513 }); 3514 } 3515 3516 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs 3517 function getNodeChildren(nodes, id, onlyOpenChildren = true) { 3518 const directChildren = nodes.filter((node) => node.parentId === id); 3519 return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]); 3520 } 3521 function getNodeAncestors(nodes, id) { 3522 let allAncestors = []; 3523 let currentParentId = nodes.find((node) => node.id === id)?.parentId; 3524 while (currentParentId) { 3525 const currentNode = nodes.find((node) => node.id === currentParentId); 3526 currentParentId = currentNode?.parentId; 3527 if (currentNode) { 3528 allAncestors = allAncestors.concat(currentNode); 3529 } 3530 } 3531 return allAncestors; 3532 } 3533 3534 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs 3535 function createAttribute(name2) { 3536 return `data-base-ui-$name2}`; 3537 } 3538 3539 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/enqueueFocus.mjs 3540 var rafId = 0; 3541 function enqueueFocus(el, options = {}) { 3542 const { 3543 preventScroll = false, 3544 sync = false, 3545 shouldFocus 3546 } = options; 3547 cancelAnimationFrame(rafId); 3548 function exec() { 3549 if (shouldFocus && !shouldFocus()) { 3550 return; 3551 } 3552 el?.focus({ 3553 preventScroll 3554 }); 3555 } 3556 if (sync) { 3557 exec(); 3558 return NOOP; 3559 } 3560 const currentRafId = requestAnimationFrame(exec); 3561 rafId = currentRafId; 3562 return () => { 3563 if (rafId === currentRafId) { 3564 cancelAnimationFrame(currentRafId); 3565 rafId = 0; 3566 } 3567 }; 3568 } 3569 3570 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/markOthers.mjs 3571 var markerName = "data-base-ui-inert"; 3572 var ariaHiddenCounterMap = /* @__PURE__ */ new WeakMap(); 3573 var uncontrolledElementsSet = /* @__PURE__ */ new WeakSet(); 3574 var markerCounterMap = /* @__PURE__ */ new WeakMap(); 3575 var lockCount = 0; 3576 function unwrapHost(node) { 3577 if (!node) { 3578 return null; 3579 } 3580 return isShadowRoot(node) ? node.host : unwrapHost(node.parentNode); 3581 } 3582 var correctElements = (parent, targets) => targets.map((target) => { 3583 if (parent.contains(target)) { 3584 return target; 3585 } 3586 const correctedTarget = unwrapHost(target); 3587 if (parent.contains(correctedTarget)) { 3588 return correctedTarget; 3589 } 3590 return null; 3591 }).filter((x2) => x2 != null); 3592 var buildKeepSet = (targets) => { 3593 const keep = /* @__PURE__ */ new Set(); 3594 targets.forEach((target) => { 3595 let node = target; 3596 while (node && !keep.has(node)) { 3597 keep.add(node); 3598 node = node.parentNode; 3599 } 3600 }); 3601 return keep; 3602 }; 3603 var collectOutsideElements = (root, keepElements, stopElements) => { 3604 const outside = []; 3605 const walk = (parent) => { 3606 if (!parent || stopElements.has(parent)) { 3607 return; 3608 } 3609 Array.from(parent.children).forEach((node) => { 3610 if (getNodeName(node) === "script") { 3611 return; 3612 } 3613 if (keepElements.has(node)) { 3614 walk(node); 3615 } else { 3616 outside.push(node); 3617 } 3618 }); 3619 }; 3620 walk(root); 3621 return outside; 3622 }; 3623 function applyAttributeToOthers(uncorrectedAvoidElements, body, ariaHidden, { 3624 mark = true 3625 }) { 3626 const avoidElements = correctElements(body, uncorrectedAvoidElements); 3627 const markerTargets = mark ? collectOutsideElements(body, buildKeepSet(avoidElements), new Set(avoidElements)) : []; 3628 const hiddenElements = []; 3629 const markedElements = []; 3630 if (ariaHidden) { 3631 const ariaLiveElements = correctElements(body, Array.from(body.querySelectorAll("[aria-live]"))); 3632 const controlElements = avoidElements.concat(ariaLiveElements); 3633 const controlTargets = collectOutsideElements(body, buildKeepSet(controlElements), new Set(controlElements)); 3634 controlTargets.forEach((node) => { 3635 const attr2 = node.getAttribute("aria-hidden"); 3636 const alreadyHidden = attr2 !== null && attr2 !== "false"; 3637 const counterValue = (ariaHiddenCounterMap.get(node) || 0) + 1; 3638 ariaHiddenCounterMap.set(node, counterValue); 3639 hiddenElements.push(node); 3640 if (counterValue === 1 && alreadyHidden) { 3641 uncontrolledElementsSet.add(node); 3642 } 3643 if (!alreadyHidden) { 3644 node.setAttribute("aria-hidden", "true"); 3645 } 3646 }); 3647 } 3648 if (mark) { 3649 markerTargets.forEach((node) => { 3650 const markerValue = (markerCounterMap.get(node) || 0) + 1; 3651 markerCounterMap.set(node, markerValue); 3652 markedElements.push(node); 3653 if (markerValue === 1) { 3654 node.setAttribute(markerName, ""); 3655 } 3656 }); 3657 } 3658 lockCount += 1; 3659 return () => { 3660 hiddenElements.forEach((element) => { 3661 const counterValue = (ariaHiddenCounterMap.get(element) || 0) - 1; 3662 ariaHiddenCounterMap.set(element, counterValue); 3663 if (!counterValue) { 3664 if (!uncontrolledElementsSet.has(element)) { 3665 element.removeAttribute("aria-hidden"); 3666 } 3667 uncontrolledElementsSet.delete(element); 3668 } 3669 }); 3670 if (mark) { 3671 markedElements.forEach((element) => { 3672 const markerValue = (markerCounterMap.get(element) || 0) - 1; 3673 markerCounterMap.set(element, markerValue); 3674 if (!markerValue) { 3675 element.removeAttribute(markerName); 3676 } 3677 }); 3678 } 3679 lockCount -= 1; 3680 if (!lockCount) { 3681 ariaHiddenCounterMap = /* @__PURE__ */ new WeakMap(); 3682 uncontrolledElementsSet = /* @__PURE__ */ new WeakSet(); 3683 markerCounterMap = /* @__PURE__ */ new WeakMap(); 3684 } 3685 }; 3686 } 3687 function markOthers(avoidElements, options = {}) { 3688 const { 3689 ariaHidden = false, 3690 mark = true 3691 } = options; 3692 const body = ownerDocument(avoidElements[0]).body; 3693 return applyAttributeToOthers(avoidElements, body, ariaHidden, { 3694 mark 3695 }); 3696 } 3697 3698 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs 3699 var React21 = __toESM(require_react(), 1); 3700 var ReactDOM2 = __toESM(require_react_dom(), 1); 3701 3702 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/constants.mjs 3703 var TYPEAHEAD_RESET_MS = 500; 3704 var PATIENT_CLICK_THRESHOLD = 500; 3705 var DISABLED_TRANSITIONS_STYLE = { 3706 style: { 3707 transition: "none" 3708 } 3709 }; 3710 var CLICK_TRIGGER_IDENTIFIER = "data-base-ui-click-trigger"; 3711 var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore"; 3712 var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore"; 3713 var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`; 3714 var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`; 3715 var DROPDOWN_COLLISION_AVOIDANCE = { 3716 fallbackAxisSide: "none" 3717 }; 3718 var POPUP_COLLISION_AVOIDANCE = { 3719 fallbackAxisSide: "end" 3720 }; 3721 var ownerVisuallyHidden = { 3722 clipPath: "inset(50%)", 3723 position: "fixed", 3724 top: 0, 3725 left: 0 3726 }; 3727 3728 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs 3729 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1); 3730 var PortalContext = /* @__PURE__ */ React21.createContext(null); 3731 if (true) PortalContext.displayName = "PortalContext"; 3732 var usePortalContext = () => React21.useContext(PortalContext); 3733 var attr = createAttribute("portal"); 3734 function useFloatingPortalNode(props = {}) { 3735 const { 3736 ref, 3737 container: containerProp, 3738 componentProps = EMPTY_OBJECT, 3739 elementProps 3740 } = props; 3741 const uniqueId = useId(); 3742 const portalContext = usePortalContext(); 3743 const parentPortalNode = portalContext?.portalNode; 3744 const [containerElement, setContainerElement] = React21.useState(null); 3745 const [portalNode, setPortalNode] = React21.useState(null); 3746 const setPortalNodeRef = useStableCallback((node) => { 3747 if (node !== null) { 3748 setPortalNode(node); 3749 } 3750 }); 3751 const containerRef = React21.useRef(null); 3752 useIsoLayoutEffect(() => { 3753 if (containerProp === null) { 3754 if (containerRef.current) { 3755 containerRef.current = null; 3756 setPortalNode(null); 3757 setContainerElement(null); 3758 } 3759 return; 3760 } 3761 const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body; 3762 if (resolvedContainer == null) { 3763 if (containerRef.current) { 3764 containerRef.current = null; 3765 setPortalNode(null); 3766 setContainerElement(null); 3767 } 3768 return; 3769 } 3770 if (containerRef.current !== resolvedContainer) { 3771 containerRef.current = resolvedContainer; 3772 setPortalNode(null); 3773 setContainerElement(resolvedContainer); 3774 } 3775 }, [containerProp, parentPortalNode]); 3776 const portalElement = useRenderElement("div", componentProps, { 3777 ref: [ref, setPortalNodeRef], 3778 props: [{ 3779 id: uniqueId, 3780 [attr]: "" 3781 }, elementProps] 3782 }); 3783 const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null; 3784 return { 3785 node: portalNode, 3786 // `id` and `render` props can override or remove the generated ID. Use the exact 3787 // rendered value so `aria-owns` never points at an ID absent from the DOM. 3788 nodeId: /* @__PURE__ */ React21.isValidElement(portalElement) ? portalElement.props.id : void 0, 3789 subtree: portalSubtree 3790 }; 3791 } 3792 var FloatingPortal = /* @__PURE__ */ React21.forwardRef(function FloatingPortal2(componentProps, forwardedRef) { 3793 const { 3794 render, 3795 className, 3796 style, 3797 children, 3798 container, 3799 portalOwnerRole, 3800 ...elementProps 3801 } = componentProps; 3802 const { 3803 node: portalNode, 3804 nodeId: portalNodeId, 3805 subtree: portalSubtree 3806 } = useFloatingPortalNode({ 3807 container, 3808 ref: forwardedRef, 3809 componentProps, 3810 elementProps 3811 }); 3812 const beforeOutsideRef = React21.useRef(null); 3813 const afterOutsideRef = React21.useRef(null); 3814 const beforeInsideRef = React21.useRef(null); 3815 const afterInsideRef = React21.useRef(null); 3816 const [focusManagerState, setFocusManagerState] = React21.useState(null); 3817 const focusInsideDisabledRef = React21.useRef(false); 3818 const modal = focusManagerState?.modal; 3819 const open2 = focusManagerState?.open; 3820 const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode; 3821 React21.useEffect(() => { 3822 if (!portalNode || modal) { 3823 return void 0; 3824 } 3825 function onFocus(event) { 3826 if (portalNode && event.relatedTarget && isOutsideEvent(event)) { 3827 if (event.type === "focusin") { 3828 if (focusInsideDisabledRef.current) { 3829 enableFocusInside(portalNode); 3830 focusInsideDisabledRef.current = false; 3831 } 3832 } else { 3833 disableFocusInside(portalNode); 3834 focusInsideDisabledRef.current = true; 3835 } 3836 } 3837 } 3838 return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true)); 3839 }, [portalNode, modal]); 3840 useIsoLayoutEffect(() => { 3841 if (!portalNode || open2 !== true || !focusInsideDisabledRef.current) { 3842 return; 3843 } 3844 enableFocusInside(portalNode); 3845 focusInsideDisabledRef.current = false; 3846 }, [open2, portalNode]); 3847 const portalContextValue = React21.useMemo(() => ({ 3848 beforeOutsideRef, 3849 afterOutsideRef, 3850 beforeInsideRef, 3851 afterInsideRef, 3852 portalNode, 3853 setFocusManagerState 3854 }), [portalNode]); 3855 return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(React21.Fragment, { 3856 children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(PortalContext.Provider, { 3857 value: portalContextValue, 3858 children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FocusGuard, { 3859 "data-type": "outside", 3860 ref: beforeOutsideRef, 3861 onFocus: (event) => { 3862 if (isOutsideEvent(event, portalNode)) { 3863 beforeInsideRef.current?.focus(); 3864 } else { 3865 const domReference = focusManagerState ? focusManagerState.domReference : null; 3866 const prevTabbable = getPreviousTabbable(domReference); 3867 prevTabbable?.focus(); 3868 } 3869 } 3870 }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { 3871 role: portalOwnerRole, 3872 "aria-owns": portalNodeId, 3873 style: ownerVisuallyHidden 3874 }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FocusGuard, { 3875 "data-type": "outside", 3876 ref: afterOutsideRef, 3877 onFocus: (event) => { 3878 if (isOutsideEvent(event, portalNode)) { 3879 afterInsideRef.current?.focus(); 3880 } else { 3881 const domReference = focusManagerState ? focusManagerState.domReference : null; 3882 const nextTabbable = getNextTabbable(domReference); 3883 nextTabbable?.focus(); 3884 if (focusManagerState?.closeOnFocusOut) { 3885 focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent)); 3886 } 3887 } 3888 } 3889 })] 3890 })] 3891 }); 3892 }); 3893 if (true) FloatingPortal.displayName = "FloatingPortal"; 3894 3895 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs 3896 var React22 = __toESM(require_react(), 1); 3897 3898 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs 3899 function createEventEmitter() { 3900 const map = /* @__PURE__ */ new Map(); 3901 return { 3902 emit(event, data) { 3903 map.get(event)?.forEach((listener) => listener(data)); 3904 }, 3905 on(event, listener) { 3906 if (!map.has(event)) { 3907 map.set(event, /* @__PURE__ */ new Set()); 3908 } 3909 map.get(event).add(listener); 3910 }, 3911 off(event, listener) { 3912 map.get(event)?.delete(listener); 3913 } 3914 }; 3915 } 3916 3917 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingTreeStore.mjs 3918 var FloatingTreeStore = class { 3919 nodesRef = { 3920 current: [] 3921 }; 3922 events = createEventEmitter(); 3923 addNode(node) { 3924 this.nodesRef.current.push(node); 3925 } 3926 removeNode(node) { 3927 const index2 = this.nodesRef.current.findIndex((n) => n === node); 3928 if (index2 !== -1) { 3929 this.nodesRef.current.splice(index2, 1); 3930 } 3931 } 3932 }; 3933 3934 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs 3935 var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1); 3936 var FloatingNodeContext = /* @__PURE__ */ React22.createContext(null); 3937 if (true) FloatingNodeContext.displayName = "FloatingNodeContext"; 3938 var FloatingTreeContext = /* @__PURE__ */ React22.createContext(null); 3939 if (true) FloatingTreeContext.displayName = "FloatingTreeContext"; 3940 var useFloatingParentNodeId = () => React22.useContext(FloatingNodeContext)?.id || null; 3941 var useFloatingTree = (externalTree) => { 3942 const contextTree = React22.useContext(FloatingTreeContext); 3943 return externalTree ?? contextTree; 3944 }; 3945 function useFloatingNodeId(externalTree) { 3946 const id = useId(); 3947 const tree = useFloatingTree(externalTree); 3948 const parentId = useFloatingParentNodeId(); 3949 useIsoLayoutEffect(() => { 3950 if (!id) { 3951 return void 0; 3952 } 3953 const node = { 3954 id, 3955 parentId 3956 }; 3957 tree?.addNode(node); 3958 return () => { 3959 tree?.removeNode(node); 3960 }; 3961 }, [tree, id, parentId]); 3962 return id; 3963 } 3964 function FloatingNode(props) { 3965 const { 3966 children, 3967 id 3968 } = props; 3969 const parentId = useFloatingParentNodeId(); 3970 return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FloatingNodeContext.Provider, { 3971 value: React22.useMemo(() => ({ 3972 id, 3973 parentId 3974 }), [id, parentId]), 3975 children 3976 }); 3977 } 3978 function FloatingTree(props) { 3979 const { 3980 children, 3981 externalTree 3982 } = props; 3983 const tree = useRefWithInit(() => externalTree ?? new FloatingTreeStore()).current; 3984 return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FloatingTreeContext.Provider, { 3985 value: tree, 3986 children 3987 }); 3988 } 3989 3990 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingFocusManager.mjs 3991 var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1); 3992 function getEventType(event, lastInteractionType) { 3993 const win = getWindow(getTarget(event)); 3994 if (event instanceof win.KeyboardEvent) { 3995 return "keyboard"; 3996 } 3997 if (event instanceof win.FocusEvent) { 3998 return lastInteractionType || "keyboard"; 3999 } 4000 if ("pointerType" in event) { 4001 return event.pointerType || (isVirtualClick(event) ? "keyboard" : lastInteractionType || "mouse"); 4002 } 4003 if ("touches" in event) { 4004 return "touch"; 4005 } 4006 if (event instanceof win.MouseEvent) { 4007 return lastInteractionType || (event.detail === 0 ? "keyboard" : "mouse"); 4008 } 4009 return ""; 4010 } 4011 var LIST_LIMIT = 20; 4012 var previouslyFocusedElements = []; 4013 function clearDisconnectedPreviouslyFocusedElements() { 4014 previouslyFocusedElements = previouslyFocusedElements.filter((entry) => { 4015 return entry.deref()?.isConnected; 4016 }); 4017 } 4018 function addPreviouslyFocusedElement(element) { 4019 clearDisconnectedPreviouslyFocusedElements(); 4020 if (element && getNodeName(element) !== "body") { 4021 previouslyFocusedElements.push(new WeakRef(element)); 4022 if (previouslyFocusedElements.length > LIST_LIMIT) { 4023 previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT); 4024 } 4025 } 4026 } 4027 function getPreviouslyFocusedElement() { 4028 clearDisconnectedPreviouslyFocusedElements(); 4029 return previouslyFocusedElements[previouslyFocusedElements.length - 1]?.deref(); 4030 } 4031 function getFirstTabbableElement(container) { 4032 if (!container) { 4033 return null; 4034 } 4035 if (isTabbable(container)) { 4036 return container; 4037 } 4038 return tabbable(container)[0] || container; 4039 } 4040 function handleTabIndex(floatingFocusElement) { 4041 if (floatingFocusElement.hasAttribute("tabindex") && !floatingFocusElement.hasAttribute("data-tabindex")) { 4042 return; 4043 } 4044 if (!floatingFocusElement.getAttribute("role")?.includes("dialog")) { 4045 return; 4046 } 4047 const focusableElements = focusable(floatingFocusElement); 4048 const tabbableContent = focusableElements.filter((element) => { 4049 const dataTabIndex = element.getAttribute("data-tabindex") || ""; 4050 return isTabbable(element) || element.hasAttribute("data-tabindex") && !dataTabIndex.startsWith("-"); 4051 }); 4052 const tabIndex = floatingFocusElement.getAttribute("tabindex"); 4053 if (tabbableContent.length === 0) { 4054 if (tabIndex !== "0") { 4055 floatingFocusElement.setAttribute("tabindex", "0"); 4056 floatingFocusElement.setAttribute("data-tabindex", "0"); 4057 } 4058 } else if (tabIndex !== "-1" || floatingFocusElement.hasAttribute("data-tabindex") && floatingFocusElement.getAttribute("data-tabindex") !== "-1") { 4059 floatingFocusElement.setAttribute("tabindex", "-1"); 4060 floatingFocusElement.setAttribute("data-tabindex", "-1"); 4061 } 4062 } 4063 function FloatingFocusManager(props) { 4064 const { 4065 context: store, 4066 children, 4067 disabled: disabled2 = false, 4068 initialFocus = true, 4069 returnFocus = true, 4070 explicitReturnFocus, 4071 restoreFocus = false, 4072 modal = true, 4073 closeOnFocusOut = true, 4074 openInteractionType = "", 4075 nextFocusableElement, 4076 previousFocusableElement, 4077 beforeContentFocusGuardRef, 4078 externalTree, 4079 getInsideElements 4080 } = props; 4081 const open2 = store.useState("open"); 4082 const domReference = store.useState("domReferenceElement"); 4083 const floating = store.useState("floatingElement"); 4084 const { 4085 events, 4086 dataRef 4087 } = store.context; 4088 const getNodeId = useStableCallback(() => dataRef.current.floatingContext?.nodeId); 4089 const ignoreInitialFocus = initialFocus === false; 4090 const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus; 4091 const initialFocusRef = useValueAsRef(initialFocus); 4092 const returnFocusRef = useValueAsRef(returnFocus); 4093 const explicitReturnFocusRef = useValueAsRef(explicitReturnFocus); 4094 const openInteractionTypeRef = useValueAsRef(openInteractionType); 4095 const openRef = useValueAsRef(open2); 4096 const tree = useFloatingTree(externalTree); 4097 const portalContext = usePortalContext(); 4098 const preventReturnFocusRef = React23.useRef(false); 4099 const isPointerDownRef = React23.useRef(false); 4100 const pointerDownOutsideRef = React23.useRef(false); 4101 const lastFocusedTabbableRef = React23.useRef(null); 4102 const closeTypeRef = React23.useRef(""); 4103 const lastInteractionTypeRef = React23.useRef(""); 4104 const beforeGuardRef = React23.useRef(null); 4105 const afterGuardRef = React23.useRef(null); 4106 const mergedBeforeGuardRef = useMergedRefs(beforeGuardRef, beforeContentFocusGuardRef, portalContext?.beforeInsideRef); 4107 const mergedAfterGuardRef = useMergedRefs(afterGuardRef, portalContext?.afterInsideRef); 4108 const blurTimeout = useTimeout(); 4109 const pointerDownTimeout = useTimeout(); 4110 const restoreFocusFrame = useAnimationFrame(); 4111 const isInsidePortal = portalContext != null; 4112 const floatingFocusElement = getFloatingFocusElement(floating); 4113 const getTabbableContent = useStableCallback((container = floatingFocusElement) => { 4114 return container ? tabbable(container) : []; 4115 }); 4116 const getResolvedInsideElements = useStableCallback(() => getInsideElements?.().filter((element) => element != null) ?? []); 4117 React23.useEffect(() => { 4118 if (disabled2 || !modal) { 4119 return void 0; 4120 } 4121 function onKeyDown(event) { 4122 if (event.key === "Tab") { 4123 if (contains(floatingFocusElement, activeElement(ownerDocument(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) { 4124 stopEvent(event); 4125 } 4126 } 4127 } 4128 const doc = ownerDocument(floatingFocusElement); 4129 return addEventListener(doc, "keydown", onKeyDown); 4130 }, [disabled2, floatingFocusElement, modal, isUntrappedTypeableCombobox, getTabbableContent]); 4131 React23.useEffect(() => { 4132 if (disabled2 || !open2) { 4133 return void 0; 4134 } 4135 const doc = ownerDocument(floatingFocusElement); 4136 function clearPointerDownOutside() { 4137 pointerDownOutsideRef.current = false; 4138 } 4139 function onPointerDown(event) { 4140 const target = getTarget(event); 4141 const insideElements = getResolvedInsideElements(); 4142 const pointerTargetInside = contains(floating, target) || contains(domReference, target) || contains(portalContext?.portalNode, target) || insideElements.some((element) => element === target || contains(element, target)); 4143 pointerDownOutsideRef.current = !pointerTargetInside; 4144 lastInteractionTypeRef.current = event.pointerType || "keyboard"; 4145 if (closest(target, `[$CLICK_TRIGGER_IDENTIFIER}]`)) { 4146 isPointerDownRef.current = true; 4147 pointerDownTimeout.start(0, () => { 4148 isPointerDownRef.current = false; 4149 }); 4150 } 4151 } 4152 function onKeyDown() { 4153 lastInteractionTypeRef.current = "keyboard"; 4154 } 4155 return mergeCleanups( 4156 addEventListener(doc, "pointerdown", onPointerDown, true), 4157 addEventListener(doc, "pointerup", clearPointerDownOutside, true), 4158 addEventListener(doc, "pointercancel", clearPointerDownOutside, true), 4159 addEventListener(doc, "keydown", onKeyDown, true), 4160 // Avoid a stale `true` leaking into the next open (e.g. keep-mounted popups) 4161 // if the popup dismissed between pointerdown and pointerup. 4162 clearPointerDownOutside 4163 ); 4164 }, [disabled2, floating, domReference, floatingFocusElement, open2, portalContext, pointerDownTimeout, getResolvedInsideElements]); 4165 React23.useEffect(() => { 4166 if (disabled2 || !closeOnFocusOut) { 4167 return void 0; 4168 } 4169 const doc = ownerDocument(floatingFocusElement); 4170 function handlePointerDown() { 4171 isPointerDownRef.current = true; 4172 pointerDownTimeout.start(0, () => { 4173 isPointerDownRef.current = false; 4174 }); 4175 } 4176 function handleFocusIn(event) { 4177 const target = getTarget(event); 4178 if (isTabbable(target)) { 4179 lastFocusedTabbableRef.current = target; 4180 } 4181 } 4182 function handleFocusOutside(event) { 4183 const relatedTarget = event.relatedTarget; 4184 const currentTarget = event.currentTarget; 4185 const target = getTarget(event); 4186 if (modal && relatedTarget == null && target != null && contains(floating, target)) { 4187 addPreviouslyFocusedElement(target); 4188 } 4189 queueMicrotask(() => { 4190 const nodeId = getNodeId(); 4191 const triggers = store.context.triggerElements; 4192 const insideElements = getResolvedInsideElements(); 4193 const isRelatedFocusGuard = relatedTarget?.hasAttribute(createAttribute("focus-guard")) && [beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeInsideRef.current, portalContext?.afterInsideRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement)].includes(relatedTarget); 4194 const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext?.portalNode, relatedTarget) || insideElements.some((element) => element === relatedTarget || contains(element, relatedTarget)) || triggers.hasMatchingElement((trigger) => contains(trigger, relatedTarget)) || isRelatedFocusGuard || tree && (getNodeChildren(tree.nodesRef.current, nodeId).find((node) => contains(node.context?.elements.floating, relatedTarget) || contains(node.context?.elements.domReference, relatedTarget)) || getNodeAncestors(tree.nodesRef.current, nodeId).find((node) => [node.context?.elements.floating, getFloatingFocusElement(node.context?.elements.floating)].includes(relatedTarget) || node.context?.elements.domReference === relatedTarget))); 4195 if (currentTarget === domReference && floatingFocusElement) { 4196 handleTabIndex(floatingFocusElement); 4197 } 4198 if (restoreFocus && currentTarget !== domReference && !isElementVisible(target) && activeElement(doc) === doc.body) { 4199 if (isHTMLElement(floatingFocusElement)) { 4200 floatingFocusElement.focus(); 4201 if (restoreFocus === "popup") { 4202 restoreFocusFrame.request(() => { 4203 floatingFocusElement.focus(); 4204 }); 4205 return; 4206 } 4207 } 4208 const tabbableContent = getTabbableContent(); 4209 const prevTabbable = lastFocusedTabbableRef.current; 4210 const nodeToFocus = (prevTabbable && tabbableContent.includes(prevTabbable) ? prevTabbable : null) || tabbableContent[tabbableContent.length - 1] || floatingFocusElement; 4211 if (isHTMLElement(nodeToFocus)) { 4212 nodeToFocus.focus(); 4213 } 4214 } 4215 if (dataRef.current.insideReactTree) { 4216 dataRef.current.insideReactTree = false; 4217 return; 4218 } 4219 if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current && // Fix React 18 Strict Mode returnFocus due to double rendering. 4220 // For an "untrapped" typeable combobox (input role=combobox with 4221 // initialFocus=false), re-opening the popup and tabbing out should still close it even 4222 // when the previously focused element (e.g. the next tabbable outside the popup) is 4223 // focused again. Otherwise, the popup remains open on the second Tab sequence: 4224 // click input -> Tab (closes) -> click input -> Tab. 4225 // Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element. 4226 (isUntrappedTypeableCombobox || relatedTarget !== getPreviouslyFocusedElement())) { 4227 preventReturnFocusRef.current = true; 4228 store.setOpen(false, createChangeEventDetails(reason_parts_exports.focusOut, event)); 4229 } 4230 }); 4231 } 4232 function markInsideReactTree() { 4233 if (pointerDownOutsideRef.current) { 4234 return; 4235 } 4236 dataRef.current.insideReactTree = true; 4237 blurTimeout.start(0, () => { 4238 dataRef.current.insideReactTree = false; 4239 }); 4240 } 4241 const domReferenceElement = isHTMLElement(domReference) ? domReference : null; 4242 if (!floating && !domReferenceElement) { 4243 return void 0; 4244 } 4245 return mergeCleanups(domReferenceElement && addEventListener(domReferenceElement, "focusout", handleFocusOutside), domReferenceElement && addEventListener(domReferenceElement, "pointerdown", handlePointerDown), floating && addEventListener(floating, "focusin", handleFocusIn), floating && addEventListener(floating, "focusout", handleFocusOutside), floating && portalContext && addEventListener(floating, "focusout", markInsideReactTree, true)); 4246 }, [disabled2, domReference, floating, floatingFocusElement, modal, tree, portalContext, store, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, dataRef, blurTimeout, pointerDownTimeout, restoreFocusFrame, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]); 4247 React23.useEffect(() => { 4248 if (disabled2 || !floating || !open2) { 4249 return void 0; 4250 } 4251 const portalNodes = Array.from(portalContext?.portalNode?.querySelectorAll(`[$createAttribute("portal")}]`) || []); 4252 const ancestors = tree ? getNodeAncestors(tree.nodesRef.current, getNodeId()) : []; 4253 const rootAncestorComboboxDomReference = ancestors.find((node) => isTypeableCombobox(node.context?.elements.domReference || null))?.context?.elements.domReference; 4254 const controlInsideElements = [floating, ...portalNodes, beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, ...getResolvedInsideElements()]; 4255 const insideElements = [...controlInsideElements, rootAncestorComboboxDomReference, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement), isUntrappedTypeableCombobox ? domReference : null].filter((x2) => x2 != null); 4256 const ariaHiddenCleanup = markOthers(insideElements, { 4257 ariaHidden: modal || isUntrappedTypeableCombobox, 4258 mark: false 4259 }); 4260 const markerInsideElements = [floating, ...portalNodes].filter((x2) => x2 != null); 4261 const markerCleanup = markOthers(markerInsideElements); 4262 return () => { 4263 markerCleanup(); 4264 ariaHiddenCleanup(); 4265 }; 4266 }, [open2, disabled2, domReference, floating, modal, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, nextFocusableElement, previousFocusableElement, getResolvedInsideElements]); 4267 useIsoLayoutEffect(() => { 4268 if (!open2 || disabled2 || !isHTMLElement(floatingFocusElement)) { 4269 return; 4270 } 4271 closeTypeRef.current = ""; 4272 lastInteractionTypeRef.current = ""; 4273 const doc = ownerDocument(floatingFocusElement); 4274 const previouslyFocusedElement = activeElement(doc); 4275 queueMicrotask(() => { 4276 const initialFocusValueOrFn = initialFocusRef.current; 4277 const resolvedInitialFocus = typeof initialFocusValueOrFn === "function" ? initialFocusValueOrFn(openInteractionTypeRef.current || "") : initialFocusValueOrFn; 4278 if (resolvedInitialFocus === void 0 || resolvedInitialFocus === false) { 4279 return; 4280 } 4281 const focusAlreadyInsideFloatingEl = contains(floatingFocusElement, previouslyFocusedElement); 4282 if (focusAlreadyInsideFloatingEl) { 4283 return; 4284 } 4285 let focusableElements = null; 4286 const getDefaultFocusElement = () => { 4287 if (focusableElements == null) { 4288 focusableElements = getTabbableContent(floatingFocusElement); 4289 } 4290 return focusableElements[0] || floatingFocusElement; 4291 }; 4292 let elToFocus; 4293 if (resolvedInitialFocus === true || resolvedInitialFocus === null) { 4294 elToFocus = getDefaultFocusElement(); 4295 } else { 4296 elToFocus = resolveRef(resolvedInitialFocus); 4297 } 4298 elToFocus = elToFocus || getDefaultFocusElement(); 4299 const hadFocusInside = contains(floatingFocusElement, activeElement(doc)); 4300 const openEvent = dataRef.current.openEvent; 4301 const openedByVirtualPress = openEvent?.type === "mousedown" && isVirtualClick(openEvent); 4302 void enqueueFocus(elToFocus, { 4303 sync: openedByVirtualPress, 4304 preventScroll: elToFocus === floatingFocusElement, 4305 shouldFocus() { 4306 if (!openRef.current) { 4307 return false; 4308 } 4309 if (hadFocusInside) { 4310 return true; 4311 } 4312 const currentActiveElement = activeElement(doc); 4313 const focusMovedInside = currentActiveElement !== elToFocus && contains(floatingFocusElement, currentActiveElement); 4314 return !focusMovedInside; 4315 } 4316 }); 4317 }); 4318 }, [disabled2, open2, floatingFocusElement, getTabbableContent, initialFocusRef, openInteractionTypeRef, openRef, dataRef]); 4319 const pendingReturnFocusRef = React23.useRef(null); 4320 useIsoLayoutEffect(() => { 4321 if (disabled2 || !floatingFocusElement) { 4322 pendingReturnFocusRef.current = null; 4323 return void 0; 4324 } 4325 if (pendingReturnFocusRef.current) { 4326 pendingReturnFocusRef.current.cancelled = true; 4327 pendingReturnFocusRef.current = null; 4328 } 4329 const doc = ownerDocument(floatingFocusElement); 4330 const elementFocusedBeforeOpen = activeElement(doc); 4331 const preferPreviousFocus = openInteractionTypeRef.current == null; 4332 addPreviouslyFocusedElement(elementFocusedBeforeOpen); 4333 function onOpenChangeLocal(details) { 4334 if (!details.open) { 4335 closeTypeRef.current = getEventType(details.nativeEvent, lastInteractionTypeRef.current); 4336 } 4337 if (details.reason === reason_parts_exports.focusOut && details.triggerElement?.hasAttribute(createAttribute("focus-guard")) || details.reason === reason_parts_exports.triggerHover && details.nativeEvent.type === "mouseleave") { 4338 preventReturnFocusRef.current = true; 4339 } 4340 if (details.reason !== reason_parts_exports.outsidePress) { 4341 return; 4342 } 4343 if (details.nested) { 4344 preventReturnFocusRef.current = false; 4345 } else if (isVirtualClick(details.nativeEvent) || isVirtualPointerEvent(details.nativeEvent)) { 4346 preventReturnFocusRef.current = false; 4347 } else { 4348 let isPreventScrollSupported = false; 4349 ownerDocument(floatingFocusElement).createElement("div").focus({ 4350 get preventScroll() { 4351 isPreventScrollSupported = true; 4352 return false; 4353 } 4354 }); 4355 if (isPreventScrollSupported) { 4356 preventReturnFocusRef.current = false; 4357 } else { 4358 preventReturnFocusRef.current = true; 4359 } 4360 } 4361 } 4362 events.on("openchange", onOpenChangeLocal); 4363 function getReturnElement(closeType) { 4364 const returnFocusValueOrFn = returnFocusRef.current; 4365 let resolvedReturnFocusValue = typeof returnFocusValueOrFn === "function" ? returnFocusValueOrFn(closeType) : returnFocusValueOrFn; 4366 if (resolvedReturnFocusValue === void 0 || resolvedReturnFocusValue === false) { 4367 return null; 4368 } 4369 if (resolvedReturnFocusValue === null) { 4370 resolvedReturnFocusValue = true; 4371 } 4372 const referenceReturnElement = domReference?.isConnected ? domReference : null; 4373 const previousReturnElement = elementFocusedBeforeOpen?.isConnected && getNodeName(elementFocusedBeforeOpen) !== "body" ? elementFocusedBeforeOpen : null; 4374 let defaultReturnElement = preferPreviousFocus ? previousReturnElement || referenceReturnElement : referenceReturnElement || previousReturnElement; 4375 if (!defaultReturnElement) { 4376 defaultReturnElement = getPreviouslyFocusedElement() || null; 4377 } 4378 if (typeof resolvedReturnFocusValue === "boolean") { 4379 return defaultReturnElement; 4380 } 4381 return resolveRef(resolvedReturnFocusValue) || defaultReturnElement || null; 4382 } 4383 return () => { 4384 events.off("openchange", onOpenChangeLocal); 4385 const activeEl = activeElement(doc); 4386 const insideElements = getResolvedInsideElements(); 4387 const isFocusInsideFloatingTree = contains(floating, activeEl) || insideElements.some((element) => element === activeEl || contains(element, activeEl)) || tree && getNodeChildren(tree.nodesRef.current, getNodeId(), false).some((node) => contains(node.context?.elements.floating, activeEl)); 4388 const returnFocusValueOrFn = returnFocusRef.current; 4389 const closeType = closeTypeRef.current; 4390 const returnElement = getReturnElement(closeType); 4391 const job = { 4392 cancelled: false 4393 }; 4394 pendingReturnFocusRef.current = job; 4395 queueMicrotask(() => { 4396 if (pendingReturnFocusRef.current === job) { 4397 pendingReturnFocusRef.current = null; 4398 } 4399 const tabbableReturnElement = getFirstTabbableElement(returnElement); 4400 const hasExplicitReturnFocus = ( 4401 // eslint-disable-next-line react-hooks/exhaustive-deps 4402 explicitReturnFocusRef.current ?? typeof returnFocusValueOrFn !== "boolean" 4403 ); 4404 if (!job.cancelled && returnFocusValueOrFn && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && // If the focus moved somewhere else after mount, avoid returning focus 4405 // since it likely entered a different element which should be 4406 // respected: https://github.com/floating-ui/floating-ui/issues/2607 4407 (!hasExplicitReturnFocus && tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) { 4408 const focusOptions = { 4409 preventScroll: true 4410 }; 4411 if (closeType === "keyboard") { 4412 focusOptions.focusVisible = true; 4413 } 4414 tabbableReturnElement.focus(focusOptions); 4415 } 4416 preventReturnFocusRef.current = false; 4417 }); 4418 }; 4419 }, [disabled2, floating, floatingFocusElement, returnFocusRef, explicitReturnFocusRef, openInteractionTypeRef, events, tree, domReference, getNodeId, getResolvedInsideElements]); 4420 useIsoLayoutEffect(() => { 4421 if (!parts_exports.engine.webkit || open2 || !floating) { 4422 return; 4423 } 4424 const activeEl = activeElement(ownerDocument(floating)); 4425 if (!isHTMLElement(activeEl) || !isTypeableElement(activeEl)) { 4426 return; 4427 } 4428 if (contains(floating, activeEl)) { 4429 activeEl.blur(); 4430 } 4431 }, [open2, floating]); 4432 useIsoLayoutEffect(() => { 4433 if (disabled2 || !portalContext) { 4434 return void 0; 4435 } 4436 portalContext.setFocusManagerState({ 4437 modal, 4438 closeOnFocusOut, 4439 open: open2, 4440 onOpenChange: store.setOpen, 4441 domReference 4442 }); 4443 return () => { 4444 portalContext.setFocusManagerState(null); 4445 }; 4446 }, [disabled2, portalContext, modal, open2, store, closeOnFocusOut, domReference]); 4447 useIsoLayoutEffect(() => { 4448 if (disabled2 || !floatingFocusElement) { 4449 return void 0; 4450 } 4451 handleTabIndex(floatingFocusElement); 4452 return () => { 4453 queueMicrotask(clearDisconnectedPreviouslyFocusedElements); 4454 }; 4455 }, [disabled2, floatingFocusElement]); 4456 const shouldRenderGuards = !disabled2 && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal); 4457 return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(React23.Fragment, { 4458 children: [shouldRenderGuards && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FocusGuard, { 4459 "data-type": "inside", 4460 ref: mergedBeforeGuardRef, 4461 onFocus: (event) => { 4462 if (modal) { 4463 const els = getTabbableContent(); 4464 void enqueueFocus(els[els.length - 1]); 4465 } else if (portalContext?.portalNode) { 4466 preventReturnFocusRef.current = false; 4467 if (isOutsideEvent(event, portalContext.portalNode)) { 4468 const nextTabbable = getNextTabbable(domReference); 4469 nextTabbable?.focus(); 4470 } else { 4471 resolveRef(previousFocusableElement ?? portalContext.beforeOutsideRef)?.focus(); 4472 } 4473 } 4474 } 4475 }), children, shouldRenderGuards && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FocusGuard, { 4476 "data-type": "inside", 4477 ref: mergedAfterGuardRef, 4478 onFocus: (event) => { 4479 if (modal) { 4480 void enqueueFocus(getTabbableContent()[0]); 4481 } else if (portalContext?.portalNode) { 4482 if (closeOnFocusOut) { 4483 preventReturnFocusRef.current = true; 4484 } 4485 if (isOutsideEvent(event, portalContext.portalNode)) { 4486 const prevTabbable = getPreviousTabbable(domReference); 4487 prevTabbable?.focus(); 4488 } else { 4489 resolveRef(nextFocusableElement ?? portalContext.afterOutsideRef)?.focus(); 4490 } 4491 } 4492 } 4493 })] 4494 }); 4495 } 4496 4497 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useClick.mjs 4498 var React24 = __toESM(require_react(), 1); 4499 function useClick(store, props = {}) { 4500 const { 4501 enabled = true, 4502 event: eventOption = "click", 4503 toggle = true, 4504 ignoreMouse = false, 4505 stickIfOpen = true, 4506 touchOpenDelay = 0, 4507 reason = reason_parts_exports.triggerPress 4508 } = props; 4509 const dataRef = store.context.dataRef; 4510 const pointerTypeRef = React24.useRef(void 0); 4511 const frame = useAnimationFrame(); 4512 const touchOpenTimeout = useTimeout(); 4513 const reference = React24.useMemo(() => { 4514 function setOpenWithTouchDelay(nextOpen, nativeEvent, target, pointerType) { 4515 const details = createChangeEventDetails(reason, nativeEvent, target); 4516 if (nextOpen && pointerType === "touch" && touchOpenDelay > 0) { 4517 touchOpenTimeout.start(touchOpenDelay, () => { 4518 store.setOpen(true, details); 4519 }); 4520 } else { 4521 store.setOpen(nextOpen, details); 4522 } 4523 } 4524 function getNextOpen(open2, currentTarget, isClickLikeOpenEvent2) { 4525 const openEvent = dataRef.current.openEvent; 4526 const hasClickedOnInactiveTrigger = store.select("domReferenceElement") !== currentTarget; 4527 if (open2 && hasClickedOnInactiveTrigger) { 4528 return true; 4529 } 4530 if (!open2) { 4531 return true; 4532 } 4533 if (!toggle) { 4534 return true; 4535 } 4536 if (openEvent && (typeof stickIfOpen === "function" ? stickIfOpen() : stickIfOpen)) { 4537 return !isClickLikeOpenEvent2(openEvent.type); 4538 } 4539 return false; 4540 } 4541 return { 4542 onPointerDown(event) { 4543 pointerTypeRef.current = isMouseLikePointerType(event.pointerType, true) && isVirtualPointerEvent(event.nativeEvent) ? "virtual" : event.pointerType; 4544 }, 4545 onMouseDown(event) { 4546 const pointerType = pointerTypeRef.current; 4547 const nativeEvent = event.nativeEvent; 4548 const open2 = store.select("open"); 4549 if (event.button !== 0 || eventOption === "click" || isMouseLikePointerType(pointerType, true) && ignoreMouse) { 4550 return; 4551 } 4552 const nextOpen = getNextOpen(open2, event.currentTarget, (openEventType) => openEventType === "click" || openEventType === "mousedown"); 4553 const target = getTarget(nativeEvent); 4554 const isTypeable = isTypeableElement(target); 4555 if (isTypeable || pointerType === "virtual") { 4556 setOpenWithTouchDelay(nextOpen, nativeEvent, isTypeable ? target : event.currentTarget, pointerType); 4557 return; 4558 } 4559 const eventCurrentTarget = event.currentTarget; 4560 frame.request(() => { 4561 setOpenWithTouchDelay(nextOpen, nativeEvent, eventCurrentTarget, pointerType); 4562 }); 4563 }, 4564 onClick(event) { 4565 if (eventOption === "mousedown-only") { 4566 return; 4567 } 4568 const pointerType = pointerTypeRef.current; 4569 if (eventOption === "mousedown" && pointerType) { 4570 pointerTypeRef.current = void 0; 4571 return; 4572 } 4573 if (isMouseLikePointerType(pointerType, true) && ignoreMouse) { 4574 return; 4575 } 4576 const open2 = store.select("open"); 4577 const nextOpen = getNextOpen(open2, event.currentTarget, (openEventType) => openEventType === "click" || openEventType === "mousedown" || openEventType === "keydown" || openEventType === "keyup"); 4578 setOpenWithTouchDelay(nextOpen, event.nativeEvent, event.currentTarget, pointerType); 4579 }, 4580 onKeyDown() { 4581 pointerTypeRef.current = void 0; 4582 } 4583 }; 4584 }, [dataRef, eventOption, ignoreMouse, reason, store, stickIfOpen, toggle, frame, touchOpenTimeout, touchOpenDelay]); 4585 return React24.useMemo(() => enabled ? { 4586 reference 4587 } : EMPTY_OBJECT, [enabled, reference]); 4588 } 4589 4590 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs 4591 var React25 = __toESM(require_react(), 1); 4592 function createVirtualElement(domElement, data) { 4593 let offsetX = null; 4594 let offsetY = null; 4595 let isAutoUpdateEvent = false; 4596 return { 4597 contextElement: domElement || void 0, 4598 getBoundingClientRect() { 4599 const domRect = domElement?.getBoundingClientRect() || { 4600 width: 0, 4601 height: 0, 4602 x: 0, 4603 y: 0 4604 }; 4605 const isXAxis = data.axis === "x" || data.axis === "both"; 4606 const isYAxis = data.axis === "y" || data.axis === "both"; 4607 const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch"; 4608 const width = data.axis === "y" ? domRect.width : 0; 4609 const height = data.axis === "x" ? domRect.height : 0; 4610 let x2 = domRect.x; 4611 let y2 = domRect.y; 4612 if (offsetX == null && data.x && isXAxis) { 4613 offsetX = domRect.x - data.x; 4614 } 4615 if (offsetY == null && data.y && isYAxis) { 4616 offsetY = domRect.y - data.y; 4617 } 4618 x2 -= offsetX || 0; 4619 y2 -= offsetY || 0; 4620 if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) { 4621 x2 = isXAxis && data.x != null ? data.x : x2; 4622 y2 = isYAxis && data.y != null ? data.y : y2; 4623 } 4624 isAutoUpdateEvent = true; 4625 return { 4626 width, 4627 height, 4628 x: x2, 4629 y: y2, 4630 top: y2, 4631 right: x2 + width, 4632 bottom: y2 + height, 4633 left: x2 4634 }; 4635 } 4636 }; 4637 } 4638 function isMouseBasedEvent(event) { 4639 return event != null && event.clientX != null; 4640 } 4641 function useClientPoint(store, props = {}) { 4642 const { 4643 enabled = true, 4644 axis = "both" 4645 } = props; 4646 const open2 = store.useState("open"); 4647 const floating = store.useState("floatingElement"); 4648 const domReference = store.useState("domReferenceElement"); 4649 const dataRef = store.context.dataRef; 4650 const initialRef = React25.useRef(false); 4651 const cleanupListenerRef = React25.useRef(null); 4652 const [pointerType, setPointerType] = React25.useState(); 4653 const [reactive, setReactive] = React25.useState([]); 4654 const resetReference = useStableCallback((reference2) => { 4655 store.set("positionReference", reference2); 4656 }); 4657 const setReference = useStableCallback((newX, newY, referenceElement) => { 4658 if (initialRef.current) { 4659 return; 4660 } 4661 if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) { 4662 return; 4663 } 4664 store.set("positionReference", createVirtualElement(referenceElement ?? domReference, { 4665 x: newX, 4666 y: newY, 4667 axis, 4668 dataRef, 4669 pointerType 4670 })); 4671 }); 4672 const handleReferenceEnterOrMove = useStableCallback((event) => { 4673 if (!open2) { 4674 setReference(event.clientX, event.clientY, event.currentTarget); 4675 } else if (!cleanupListenerRef.current) { 4676 setReference(event.clientX, event.clientY, event.currentTarget); 4677 setReactive([]); 4678 } 4679 }); 4680 const openCheck = isMouseLikePointerType(pointerType) ? floating : open2; 4681 React25.useEffect(() => { 4682 if (!enabled) { 4683 resetReference(domReference); 4684 return void 0; 4685 } 4686 if (!openCheck) { 4687 return void 0; 4688 } 4689 function cleanupListener() { 4690 cleanupListenerRef.current?.(); 4691 cleanupListenerRef.current = null; 4692 } 4693 const win = getWindow(floating); 4694 function handleMouseMove(event) { 4695 const target = getTarget(event); 4696 if (!contains(floating, target)) { 4697 setReference(event.clientX, event.clientY); 4698 } else { 4699 cleanupListener(); 4700 } 4701 } 4702 if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) { 4703 cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove); 4704 } else { 4705 resetReference(domReference); 4706 } 4707 return cleanupListener; 4708 }, [openCheck, enabled, floating, dataRef, domReference, store, setReference, resetReference, reactive]); 4709 React25.useEffect(() => () => { 4710 store.set("positionReference", null); 4711 }, [store]); 4712 React25.useEffect(() => { 4713 if (enabled && !floating) { 4714 initialRef.current = false; 4715 } 4716 }, [enabled, floating]); 4717 React25.useEffect(() => { 4718 if (!enabled && open2) { 4719 initialRef.current = true; 4720 } 4721 }, [enabled, open2]); 4722 const reference = React25.useMemo(() => { 4723 function setPointerTypeRef(event) { 4724 setPointerType(event.pointerType); 4725 } 4726 return { 4727 onPointerDown: setPointerTypeRef, 4728 onPointerEnter: setPointerTypeRef, 4729 onMouseMove: handleReferenceEnterOrMove, 4730 onMouseEnter: handleReferenceEnterOrMove 4731 }; 4732 }, [handleReferenceEnterOrMove]); 4733 return React25.useMemo(() => enabled ? { 4734 reference, 4735 trigger: reference 4736 } : {}, [enabled, reference]); 4737 } 4738 4739 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs 4740 var React26 = __toESM(require_react(), 1); 4741 function alwaysFalse() { 4742 return false; 4743 } 4744 function normalizeProp(normalizable) { 4745 return { 4746 escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false, 4747 outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true 4748 }; 4749 } 4750 function useDismiss(store, props = {}) { 4751 const { 4752 enabled = true, 4753 escapeKey: escapeKey2 = true, 4754 outsidePress: outsidePressProp = true, 4755 outsidePressEvent = "sloppy", 4756 referencePress = alwaysFalse, 4757 bubbles, 4758 externalTree 4759 } = props; 4760 const open2 = store.useState("open"); 4761 const floatingElement = store.useState("floatingElement"); 4762 const { 4763 dataRef, 4764 events 4765 } = store.context; 4766 const tree = useFloatingTree(externalTree); 4767 const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false); 4768 const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp; 4769 const outsidePressEnabled = outsidePress2 !== false; 4770 const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent); 4771 const { 4772 escapeKey: escapeKeyBubbles, 4773 outsidePress: outsidePressBubbles 4774 } = normalizeProp(bubbles); 4775 const pressStartedInsideRef = React26.useRef(false); 4776 const pressStartPreventedRef = React26.useRef(false); 4777 const suppressNextOutsideClickRef = React26.useRef(false); 4778 const sawPressWhileOpenRef = React26.useRef(false); 4779 const isComposingRef = React26.useRef(false); 4780 const currentPointerTypeRef = React26.useRef(""); 4781 const touchStateRef = React26.useRef(null); 4782 const cancelDismissOnEndTimeout = useTimeout(); 4783 const clearInsideReactTreeTimeout = useTimeout(); 4784 const compositionTimeout = useTimeout(); 4785 const clearInsideReactTree = useStableCallback(() => { 4786 clearInsideReactTreeTimeout.clear(); 4787 dataRef.current.insideReactTree = false; 4788 }); 4789 const hasBlockingChild = useStableCallback((bubbleKey) => { 4790 const nodeId = dataRef.current.floatingContext?.nodeId; 4791 const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : []; 4792 return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]); 4793 }); 4794 const isEventWithinOwnElements = useStableCallback((event) => { 4795 return isEventTargetWithin(event, store.select("floatingElement")) || isEventTargetWithin(event, store.select("domReferenceElement")); 4796 }); 4797 const closeOnReferencePress = useStableCallback((event) => { 4798 if (!referencePress()) { 4799 return; 4800 } 4801 store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent)); 4802 }); 4803 const closeOnEscapeKeyDown = useStableCallback((event) => { 4804 if (!open2 || !enabled || !escapeKey2 || event.key !== "Escape") { 4805 return; 4806 } 4807 const native = isReactEvent(event) ? event.nativeEvent : event; 4808 if (isComposingRef.current || native.isComposing) { 4809 return; 4810 } 4811 if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) { 4812 return; 4813 } 4814 const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native); 4815 store.setOpen(false, eventDetails); 4816 if (!eventDetails.isCanceled) { 4817 event.preventDefault(); 4818 } 4819 if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) { 4820 event.stopPropagation(); 4821 } 4822 }); 4823 const markInsideReactTree = useStableCallback(() => { 4824 dataRef.current.insideReactTree = true; 4825 clearInsideReactTreeTimeout.start(0, clearInsideReactTree); 4826 }); 4827 const markPressStartedInsideReactTree = useStableCallback((event) => { 4828 if (!open2 || !enabled || event.button !== 0) { 4829 return; 4830 } 4831 const target = getTarget(event.nativeEvent); 4832 if (!contains(store.select("floatingElement"), target)) { 4833 return; 4834 } 4835 if (!pressStartedInsideRef.current) { 4836 pressStartedInsideRef.current = true; 4837 pressStartPreventedRef.current = false; 4838 } 4839 }); 4840 const markInsidePressStartPrevented = useStableCallback((event) => { 4841 if (!open2 || !enabled) { 4842 return; 4843 } 4844 if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) { 4845 return; 4846 } 4847 if (pressStartedInsideRef.current) { 4848 pressStartPreventedRef.current = true; 4849 } 4850 }); 4851 React26.useEffect(() => { 4852 function handleOpenChange(details) { 4853 if (!details.open) { 4854 sawPressWhileOpenRef.current = false; 4855 } 4856 } 4857 events.on("openchange", handleOpenChange); 4858 return () => { 4859 events.off("openchange", handleOpenChange); 4860 }; 4861 }, [events]); 4862 React26.useEffect(() => clearInsideReactTree, [clearInsideReactTree]); 4863 React26.useEffect(() => { 4864 if (!open2 || !enabled) { 4865 if (!open2) { 4866 sawPressWhileOpenRef.current = false; 4867 isComposingRef.current = false; 4868 currentPointerTypeRef.current = ""; 4869 touchStateRef.current = null; 4870 } 4871 return clearInsideReactTree; 4872 } 4873 dataRef.current.__escapeKeyBubbles = escapeKeyBubbles; 4874 dataRef.current.__outsidePressBubbles = outsidePressBubbles; 4875 const preventedPressSuppressionTimeout = new Timeout(); 4876 const doc = ownerDocument(floatingElement); 4877 function handleCompositionStart() { 4878 compositionTimeout.clear(); 4879 isComposingRef.current = true; 4880 } 4881 function handleCompositionEnd() { 4882 isComposingRef.current = true; 4883 compositionTimeout.start( 4884 // 0ms or 1ms don't work in Safari. 5ms appears to consistently work. 4885 // Only apply to WebKit for the test to remain 0ms. 4886 parts_exports.engine.webkit ? 5 : 0, 4887 () => { 4888 isComposingRef.current = false; 4889 } 4890 ); 4891 } 4892 function suppressImmediateOutsideClickAfterPreventedStart() { 4893 suppressNextOutsideClickRef.current = true; 4894 preventedPressSuppressionTimeout.start(0, () => { 4895 suppressNextOutsideClickRef.current = false; 4896 }); 4897 } 4898 function resetPressStartState() { 4899 pressStartedInsideRef.current = false; 4900 pressStartPreventedRef.current = false; 4901 } 4902 function getOutsidePressEvent() { 4903 const type = currentPointerTypeRef.current; 4904 const computedType = type === "pen" || !type ? "mouse" : type; 4905 const outsidePressEventValue = getOutsidePressEventProp(); 4906 const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue; 4907 if (typeof resolved === "string") { 4908 return resolved; 4909 } 4910 return resolved[computedType]; 4911 } 4912 function shouldIgnoreEvent(event) { 4913 const computedOutsidePressEvent = getOutsidePressEvent(); 4914 return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click"; 4915 } 4916 function isEventWithinFloatingTree(event) { 4917 const nodeId = dataRef.current.floatingContext?.nodeId; 4918 const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating)); 4919 return isEventWithinOwnElements(event) || targetIsInsideChildren; 4920 } 4921 function closeOnPressOutside(event) { 4922 if (shouldIgnoreEvent(event)) { 4923 if (event.type !== "click" && !isEventWithinOwnElements(event)) { 4924 preventedPressSuppressionTimeout.clear(); 4925 suppressNextOutsideClickRef.current = false; 4926 } 4927 clearInsideReactTree(); 4928 return; 4929 } 4930 if (dataRef.current.insideReactTree) { 4931 clearInsideReactTree(); 4932 return; 4933 } 4934 const target = getTarget(event); 4935 const inertSelector = `[$createAttribute("inert")}]`; 4936 const targetRoot = isElement(target) ? target.getRootNode() : null; 4937 const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store.select("floatingElement"))).querySelectorAll(inertSelector)); 4938 const triggers = store.context.triggerElements; 4939 if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) { 4940 return; 4941 } 4942 let targetRootAncestor = isElement(target) ? target : null; 4943 while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) { 4944 const nextParent = getParentNode(targetRootAncestor); 4945 if (isLastTraversableNode(nextParent) || !isElement(nextParent)) { 4946 break; 4947 } 4948 targetRootAncestor = nextParent; 4949 } 4950 if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay). 4951 !contains(target, store.select("floatingElement")) && // If the target root element contains none of the markers, then the 4952 // element was injected after the floating element rendered. 4953 markers.every((marker) => !contains(targetRootAncestor, marker))) { 4954 return; 4955 } 4956 if (isHTMLElement(target) && !("touches" in event)) { 4957 const lastTraversableNode = isLastTraversableNode(target); 4958 const style = getComputedStyle2(target); 4959 const scrollRe = /auto|scroll/; 4960 const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX); 4961 const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY); 4962 const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth; 4963 const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight; 4964 const isRTL12 = style.direction === "rtl"; 4965 const pressedVerticalScrollbar = canScrollY && (isRTL12 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth); 4966 const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight; 4967 if (pressedVerticalScrollbar || pressedHorizontalScrollbar) { 4968 return; 4969 } 4970 } 4971 if (isEventWithinFloatingTree(event)) { 4972 return; 4973 } 4974 if (getOutsidePressEvent() === "intentional") { 4975 if (event.detail !== 0 && !isVirtualClick(event) && !sawPressWhileOpenRef.current) { 4976 return; 4977 } 4978 if (suppressNextOutsideClickRef.current) { 4979 preventedPressSuppressionTimeout.clear(); 4980 suppressNextOutsideClickRef.current = false; 4981 return; 4982 } 4983 } 4984 if (typeof outsidePress2 === "function" && !outsidePress2(event)) { 4985 return; 4986 } 4987 if (hasBlockingChild("__outsidePressBubbles")) { 4988 return; 4989 } 4990 store.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event)); 4991 clearInsideReactTree(); 4992 } 4993 function handlePointerDown(event) { 4994 if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store.select("open") || !enabled || isEventWithinOwnElements(event)) { 4995 return; 4996 } 4997 closeOnPressOutside(event); 4998 } 4999 function handleTouchStart(event) { 5000 if (getOutsidePressEvent() !== "sloppy" || !store.select("open") || !enabled || isEventWithinOwnElements(event)) { 5001 return; 5002 } 5003 const touch = event.touches[0]; 5004 if (touch) { 5005 touchStateRef.current = { 5006 startTime: Date.now(), 5007 startX: touch.clientX, 5008 startY: touch.clientY, 5009 dismissOnTouchEnd: false, 5010 dismissOnMouseDown: true 5011 }; 5012 cancelDismissOnEndTimeout.start(1e3, () => { 5013 if (touchStateRef.current) { 5014 touchStateRef.current.dismissOnTouchEnd = false; 5015 touchStateRef.current.dismissOnMouseDown = false; 5016 } 5017 }); 5018 } 5019 } 5020 function addTargetEventListenerOnce(event, listener) { 5021 const target = getTarget(event); 5022 if (!target) { 5023 return; 5024 } 5025 const unsubscribe2 = addEventListener(target, event.type, () => { 5026 listener(event); 5027 unsubscribe2(); 5028 }); 5029 } 5030 function handleTouchStartCapture(event) { 5031 currentPointerTypeRef.current = "touch"; 5032 addTargetEventListenerOnce(event, handleTouchStart); 5033 } 5034 function closeOnPressOutsideCapture(event) { 5035 cancelDismissOnEndTimeout.clear(); 5036 if (event.type === "pointerdown") { 5037 if (event.button === 0) { 5038 sawPressWhileOpenRef.current = true; 5039 } 5040 currentPointerTypeRef.current = event.pointerType; 5041 } 5042 if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) { 5043 return; 5044 } 5045 addTargetEventListenerOnce(event, (targetEvent) => { 5046 if (targetEvent.type === "pointerdown") { 5047 handlePointerDown(targetEvent); 5048 } else { 5049 closeOnPressOutside(targetEvent); 5050 } 5051 }); 5052 } 5053 function handlePressEndCapture(event) { 5054 if (event.type === "pointercancel") { 5055 sawPressWhileOpenRef.current = false; 5056 } 5057 if (!pressStartedInsideRef.current) { 5058 return; 5059 } 5060 const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current; 5061 resetPressStartState(); 5062 if (getOutsidePressEvent() !== "intentional") { 5063 return; 5064 } 5065 if (event.type === "pointercancel") { 5066 if (pressStartedInsideDefaultPrevented) { 5067 suppressImmediateOutsideClickAfterPreventedStart(); 5068 } 5069 return; 5070 } 5071 if (isEventWithinFloatingTree(event)) { 5072 return; 5073 } 5074 if (pressStartedInsideDefaultPrevented) { 5075 suppressImmediateOutsideClickAfterPreventedStart(); 5076 return; 5077 } 5078 if (typeof outsidePress2 === "function" && !outsidePress2(event)) { 5079 return; 5080 } 5081 preventedPressSuppressionTimeout.clear(); 5082 suppressNextOutsideClickRef.current = true; 5083 clearInsideReactTree(); 5084 } 5085 function handleTouchMove(event) { 5086 if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) { 5087 return; 5088 } 5089 const touch = event.touches[0]; 5090 if (!touch) { 5091 return; 5092 } 5093 const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX); 5094 const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY); 5095 const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); 5096 if (distance > 5) { 5097 touchStateRef.current.dismissOnTouchEnd = true; 5098 } 5099 if (distance > 10) { 5100 closeOnPressOutside(event); 5101 cancelDismissOnEndTimeout.clear(); 5102 touchStateRef.current = null; 5103 } 5104 } 5105 function handleTouchMoveCapture(event) { 5106 addTargetEventListenerOnce(event, handleTouchMove); 5107 } 5108 function handleTouchEnd(event) { 5109 if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) { 5110 return; 5111 } 5112 if (touchStateRef.current.dismissOnTouchEnd) { 5113 closeOnPressOutside(event); 5114 } 5115 cancelDismissOnEndTimeout.clear(); 5116 touchStateRef.current = null; 5117 } 5118 function handleTouchEndCapture(event) { 5119 addTargetEventListenerOnce(event, handleTouchEnd); 5120 } 5121 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, { 5122 capture: true, 5123 passive: true 5124 }), addEventListener(doc, "touchmove", handleTouchMoveCapture, { 5125 capture: true, 5126 passive: true 5127 }), addEventListener(doc, "touchend", handleTouchEndCapture, { 5128 capture: true, 5129 passive: true 5130 }))); 5131 return () => { 5132 unsubscribe(); 5133 preventedPressSuppressionTimeout.clear(); 5134 resetPressStartState(); 5135 suppressNextOutsideClickRef.current = false; 5136 }; 5137 }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open2, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store, cancelDismissOnEndTimeout, compositionTimeout]); 5138 const reference = React26.useMemo(() => ({ 5139 onKeyDown: closeOnEscapeKeyDown, 5140 onPointerDown: closeOnReferencePress, 5141 onClick: closeOnReferencePress 5142 }), [closeOnEscapeKeyDown, closeOnReferencePress]); 5143 const floating = React26.useMemo(() => ({ 5144 onKeyDown: closeOnEscapeKeyDown, 5145 // `onMouseDown` may be blocked if `event.preventDefault()` is called in 5146 // `onPointerDown`, such as with <NumberField.ScrubArea>. 5147 // See https://github.com/mui/base-ui/pull/3379 5148 onPointerDown: markInsidePressStartPrevented, 5149 onMouseDown: markInsidePressStartPrevented, 5150 onClickCapture: markInsideReactTree, 5151 onMouseDownCapture(event) { 5152 markInsideReactTree(); 5153 markPressStartedInsideReactTree(event); 5154 }, 5155 onPointerDownCapture(event) { 5156 markInsideReactTree(); 5157 markPressStartedInsideReactTree(event); 5158 }, 5159 onMouseUpCapture: markInsideReactTree, 5160 onTouchEndCapture: markInsideReactTree, 5161 onTouchMoveCapture: markInsideReactTree 5162 }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]); 5163 return React26.useMemo(() => enabled ? { 5164 reference, 5165 floating, 5166 trigger: reference 5167 } : {}, [enabled, reference, floating]); 5168 } 5169 5170 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupHandle.mjs 5171 var BasePopupHandle = class { 5172 /** 5173 * Stores of every root currently using this handle, in attach order. A handle is meant to be used 5174 * by a single mounted root, but roots can transiently overlap (e.g. during an animated route 5175 * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of 5176 * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first. 5177 */ 5178 attachedStores = []; 5179 /** 5180 * Store of the root that currently controls the handle: the most recently attached one still 5181 * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`. 5182 */ 5183 attachedStoreValue = null; 5184 /** 5185 * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer. 5186 */ 5187 storeListeners = /* @__PURE__ */ new Set(); 5188 /** 5189 * Creates a handle backed by the store used while no root is attached. 5190 * 5191 * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached, 5192 * so they can render and register without a mounted root. Triggers register into whichever store 5193 * `store` currently resolves to, so while detached they live in this store's trigger map and 5194 * migrate themselves to the root's store (and back) as it attaches/detaches. 5195 * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces 5196 * `MenuHandle.open()` in warning text. 5197 * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is 5198 * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to, 5199 * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning. 5200 */ 5201 constructor(fallbackStore, componentName, throwOnMissingTrigger = true) { 5202 this.fallbackStore = fallbackStore; 5203 this.componentName = componentName; 5204 this.throwOnMissingTrigger = throwOnMissingTrigger; 5205 } 5206 get attachedStore() { 5207 return this.attachedStoreValue; 5208 } 5209 /** 5210 * Store that detached triggers read from: the attached root's store, or an inert fallback store 5211 * used while no root is attached. 5212 * @internal 5213 */ 5214 get store() { 5215 return this.attachedStoreValue ?? this.fallbackStore; 5216 } 5217 /** 5218 * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on 5219 * the handle during render because a handle can be shared by concurrent server-rendered requests. 5220 * @internal 5221 */ 5222 get serverStore() { 5223 return this.fallbackStore; 5224 } 5225 /** 5226 * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind 5227 * when a root attaches or detaches. Returns a function that removes the listener. 5228 * @internal 5229 */ 5230 subscribeStore(listener) { 5231 this.storeListeners.add(listener); 5232 return () => { 5233 this.storeListeners.delete(listener); 5234 }; 5235 } 5236 /** 5237 * Points the handle at a root's store and notifies subscribers so detached triggers re-render and 5238 * re-register into it (their registration effect migrates them when the store pointer changes). 5239 * Returns a cleanup function that detaches the store again. 5240 * @internal 5241 */ 5242 attachStore(newStore) { 5243 this.attachedStores.push(newStore); 5244 this.setActiveStore(newStore); 5245 if (true) { 5246 if (this.attachedStores.length > 1) { 5247 const dev = this; 5248 (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => { 5249 if (this.attachedStores.length > 1) { 5250 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."); 5251 } 5252 }); 5253 } 5254 } 5255 return () => { 5256 const index2 = this.attachedStores.lastIndexOf(newStore); 5257 if (index2 !== -1) { 5258 this.attachedStores.splice(index2, 1); 5259 } 5260 this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null); 5261 }; 5262 } 5263 /** 5264 * Sets the store that currently controls the handle and notifies subscribers when it changes, so 5265 * detached triggers re-render and migrate their registration to the new store. 5266 */ 5267 setActiveStore(store) { 5268 if (this.attachedStoreValue !== store) { 5269 this.attachedStoreValue = store; 5270 this.storeListeners.forEach((listener) => { 5271 listener(); 5272 }); 5273 } 5274 } 5275 /** 5276 * Opens the attached root's store and associates it with the trigger with the given id, or a 5277 * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public 5278 * `open()` method, which only narrows the parameter type. 5279 * 5280 * When a trigger id is given but no matching trigger is registered, anchored popups throw (see 5281 * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead. 5282 * 5283 * This method should only be called in an event handler or an effect (not during rendering). 5284 * 5285 * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open 5286 * without associating any trigger. 5287 */ 5288 openByTrigger(triggerId) { 5289 const attachedStore = this.attachedStore; 5290 if (attachedStore === null) { 5291 if (true) { 5292 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.`); 5293 } 5294 return; 5295 } 5296 let triggerElement; 5297 if (triggerId) { 5298 for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) { 5299 triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId); 5300 } 5301 triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId); 5302 } 5303 if (triggerId && !triggerElement) { 5304 if (this.throwOnMissingTrigger) { 5305 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)); 5306 } 5307 if (true) { 5308 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.`); 5309 } 5310 } 5311 attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement)); 5312 } 5313 /** 5314 * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning) 5315 * while no root is attached. Shared by every concrete handle's public `close()` method. 5316 * 5317 * This method should only be called in an event handler or an effect (not during rendering). 5318 */ 5319 closePopup() { 5320 const attachedStore = this.attachedStore; 5321 if (attachedStore === null) { 5322 if (true) { 5323 console.warn(`Base UI: $this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`); 5324 } 5325 return; 5326 } 5327 attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction)); 5328 } 5329 }; 5330 5331 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs 5332 var React28 = __toESM(require_react(), 1); 5333 var ReactDOM3 = __toESM(require_react_dom(), 1); 5334 5335 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs 5336 function useSyncedFloatingRootContext(options) { 5337 const { 5338 popupStore, 5339 treatPopupAsFloatingElement = false, 5340 floatingRootContext: store, 5341 floatingId, 5342 nested, 5343 onOpenChange 5344 } = options; 5345 const open2 = popupStore.useState("open"); 5346 const referenceElement = popupStore.useState("activeTriggerElement"); 5347 const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement"); 5348 const handleOpenChange = onOpenChange; 5349 popupStore.useSyncedValue("floatingId", floatingId); 5350 useIsoLayoutEffect(() => { 5351 const valuesToSync = { 5352 open: open2, 5353 floatingId, 5354 referenceElement, 5355 floatingElement 5356 }; 5357 if (isElement(referenceElement)) { 5358 valuesToSync.domReferenceElement = referenceElement; 5359 } 5360 if (store.state.positionReference === store.state.referenceElement) { 5361 valuesToSync.positionReference = referenceElement; 5362 } 5363 store.update(valuesToSync); 5364 }, [open2, floatingId, referenceElement, floatingElement, store]); 5365 store.context.onOpenChange = handleOpenChange; 5366 store.context.nested = nested; 5367 return store; 5368 } 5369 5370 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useUnmountAfterClose.mjs 5371 var React27 = __toESM(require_react(), 1); 5372 function useUnmountAfterClose(parameters) { 5373 const { 5374 open: open2, 5375 ref, 5376 preventUnmountOnClose, 5377 setPreventUnmountOnClose: setPreventUnmountOnCloseParam, 5378 onUnmount, 5379 animateInitialOpen 5380 } = parameters; 5381 const setPreventUnmountOnClose = useStableCallback(setPreventUnmountOnCloseParam); 5382 const { 5383 mounted, 5384 setMounted, 5385 transitionStatus 5386 } = useTransitionStatus(open2, false, false, animateInitialOpen); 5387 const preventUnmountingOnClose = open2 ? false : preventUnmountOnClose; 5388 useIsoLayoutEffect(() => { 5389 if (open2) { 5390 setPreventUnmountOnClose(false); 5391 } 5392 }, [open2, setPreventUnmountOnClose]); 5393 const mountedRef = React27.useRef(mounted); 5394 const pendingUnmountRef = React27.useRef(false); 5395 const rerender = useForcedRerendering(); 5396 const unmount = () => { 5397 mountedRef.current = false; 5398 setMounted(false); 5399 onUnmount(); 5400 }; 5401 useIsoLayoutEffect(() => { 5402 mountedRef.current = mounted; 5403 if (pendingUnmountRef.current) { 5404 pendingUnmountRef.current = false; 5405 if (!open2 && mounted) { 5406 unmount(); 5407 } 5408 } 5409 }); 5410 const forceUnmount = useStableCallback(() => { 5411 if (!mountedRef.current) { 5412 return; 5413 } 5414 if (open2) { 5415 pendingUnmountRef.current = true; 5416 rerender(); 5417 return; 5418 } 5419 unmount(); 5420 }); 5421 useOpenChangeComplete({ 5422 enabled: mounted && !open2 && !preventUnmountingOnClose, 5423 open: open2, 5424 ref, 5425 onComplete() { 5426 if (!open2) { 5427 forceUnmount(); 5428 } 5429 } 5430 }); 5431 return { 5432 mounted, 5433 transitionStatus, 5434 preventUnmountingOnClose, 5435 forceUnmount 5436 }; 5437 } 5438 5439 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs 5440 var FOCUSABLE_POPUP_PROPS = { 5441 tabIndex: -1, 5442 [FOCUSABLE_ATTRIBUTE]: "" 5443 }; 5444 function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) { 5445 const floatingId = useId(); 5446 const nested = useFloatingParentNodeId() != null; 5447 const store = useRefWithInit(() => createStore(floatingId, nested)).current; 5448 useSyncedFloatingRootContext({ 5449 popupStore: store, 5450 treatPopupAsFloatingElement, 5451 floatingRootContext: store.state.floatingRootContext, 5452 floatingId, 5453 nested, 5454 onOpenChange: store.setOpen 5455 }); 5456 return store; 5457 } 5458 function PopupHandleAttachment({ 5459 handle, 5460 store 5461 }) { 5462 useIsoLayoutEffect(() => { 5463 return handle.attachStore(store); 5464 }, [handle, store]); 5465 return null; 5466 } 5467 function syncTriggerCount(store) { 5468 const triggerCount = store.context.triggerElements.size; 5469 if (store.select("open") && store.state.triggerCount !== triggerCount) { 5470 store.set("triggerCount", triggerCount); 5471 } 5472 } 5473 function useTriggerRegistration(id, store) { 5474 const registrationRef = React28.useRef(null); 5475 return useStableCallback((element) => { 5476 const registration = registrationRef.current; 5477 if (registration !== null) { 5478 if (registration.element === element && registration.store === store && registration.id === id) { 5479 return; 5480 } 5481 registrationRef.current = null; 5482 const registeredStore = registration.store; 5483 if (registeredStore.context.triggerElements.getById(registration.id) === registration.element) { 5484 registeredStore.context.triggerElements.delete(registration.id); 5485 syncTriggerCount(registeredStore); 5486 } 5487 } 5488 if (element !== null && id !== void 0) { 5489 registrationRef.current = { 5490 store, 5491 id, 5492 element 5493 }; 5494 store.context.triggerElements.add(id, element); 5495 syncTriggerCount(store); 5496 } 5497 }); 5498 } 5499 function createPopupOpenState(state, open2, trigger, preventUnmountOnClose = false) { 5500 let preventUnmountingOnClose = state.preventUnmountingOnClose; 5501 if (open2) { 5502 preventUnmountingOnClose = false; 5503 } else if (preventUnmountOnClose) { 5504 preventUnmountingOnClose = true; 5505 } 5506 const triggerId = trigger?.id ?? null; 5507 let activeTriggerId = state.activeTriggerId; 5508 let activeTriggerElement = state.activeTriggerElement; 5509 if (triggerId || open2) { 5510 activeTriggerId = triggerId; 5511 activeTriggerElement = trigger ?? null; 5512 } 5513 return { 5514 open: open2, 5515 preventUnmountingOnClose, 5516 activeTriggerId, 5517 activeTriggerElement, 5518 // An open request without a trigger (a handle's `open(null)` or `openWithPayload()`) must not 5519 // be reassociated with a lone registered trigger later on. Controlled and default opens never 5520 // pass through here, so they keep claiming a lone trigger. A close request keeps the flag: a 5521 // controlled root may decline it and stay open, so the Root clears the flag only once the 5522 // popup is effectively closed. 5523 openedWithoutTrigger: open2 ? trigger == null : state.openedWithoutTrigger 5524 }; 5525 } 5526 function attachPreventUnmountOnClose(eventDetails) { 5527 let preventUnmountOnClose = false; 5528 eventDetails.preventUnmountOnClose = () => { 5529 preventUnmountOnClose = true; 5530 }; 5531 return () => preventUnmountOnClose; 5532 } 5533 function applyPopupOpenChange(store, nextOpen, eventDetails, options = {}) { 5534 const reason = eventDetails.reason; 5535 const isHover = reason === reason_parts_exports.triggerHover; 5536 const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus; 5537 const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey); 5538 const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails); 5539 store.context.onOpenChange?.(nextOpen, eventDetails); 5540 if (eventDetails.isCanceled) { 5541 return; 5542 } 5543 options.onBeforeDispatch?.(); 5544 store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails); 5545 const changeState = () => { 5546 const popupOpenState = createPopupOpenState(store.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose()); 5547 const updatedState = { 5548 ...options.extraState, 5549 ...popupOpenState 5550 }; 5551 if (isFocusOpen) { 5552 updatedState.instantType = "focus"; 5553 } else if (isDismissClose) { 5554 updatedState.instantType = "dismiss"; 5555 } else if (isHover) { 5556 updatedState.instantType = void 0; 5557 } 5558 store.update(updatedState); 5559 }; 5560 if (isHover) { 5561 ReactDOM3.flushSync(changeState); 5562 } else { 5563 changeState(); 5564 } 5565 } 5566 function useTriggerDataForwarding(triggerId, triggerElementRef, store, stateUpdates) { 5567 const isMountedByThisTrigger = store.useState("isMountedByTrigger", triggerId); 5568 const baseRegisterTrigger = useTriggerRegistration(triggerId, store); 5569 const applyTriggerData = useStableCallback((element) => { 5570 const open2 = store.select("open"); 5571 const activeTriggerId = store.select("activeTriggerId"); 5572 if (activeTriggerId === triggerId) { 5573 const changes = { 5574 activeTriggerElement: element, 5575 ...open2 ? stateUpdates : null 5576 }; 5577 store.update(changes); 5578 return; 5579 } 5580 if (activeTriggerId == null && open2 && !store.state.openedWithoutTrigger) { 5581 const changes = { 5582 activeTriggerId: triggerId ?? null, 5583 activeTriggerElement: element, 5584 ...stateUpdates 5585 }; 5586 store.update(changes); 5587 } 5588 }); 5589 const registerTrigger = useStableCallback((element) => { 5590 baseRegisterTrigger(element); 5591 if (element) { 5592 applyTriggerData(element); 5593 } 5594 }); 5595 useIsoLayoutEffect(() => { 5596 registerTrigger(triggerElementRef.current); 5597 return () => registerTrigger(null); 5598 }, [registerTrigger, triggerElementRef, store, triggerId]); 5599 useIsoLayoutEffect(() => { 5600 if (isMountedByThisTrigger) { 5601 const changes = { 5602 activeTriggerElement: triggerElementRef.current, 5603 ...stateUpdates 5604 }; 5605 store.update(changes); 5606 } 5607 }, [isMountedByThisTrigger, store, triggerElementRef, ...Object.values(stateUpdates)]); 5608 return { 5609 registerTrigger, 5610 isMountedByThisTrigger 5611 }; 5612 } 5613 function useImplicitActiveTrigger(store, options = {}) { 5614 const { 5615 closeOnActiveTriggerUnmount = false 5616 } = options; 5617 const resolvedActiveTriggerIdRef = React28.useRef(null); 5618 const open2 = store.useState("open"); 5619 const reactiveTriggerCount = store.useState("triggerCount"); 5620 const activeTriggerId = store.useState("activeTriggerId"); 5621 const reactiveActiveTriggerElement = store.useState("activeTriggerElement"); 5622 useIsoLayoutEffect(() => { 5623 if (!open2) { 5624 resolvedActiveTriggerIdRef.current = null; 5625 if (store.state.triggerCount !== 0) { 5626 store.set("triggerCount", 0); 5627 } 5628 if (store.state.openedWithoutTrigger) { 5629 store.set("openedWithoutTrigger", false); 5630 } 5631 return; 5632 } 5633 const triggerCount = store.context.triggerElements.size; 5634 const stateUpdates = {}; 5635 if (store.state.triggerCount !== triggerCount) { 5636 stateUpdates.triggerCount = triggerCount; 5637 } 5638 const currentActiveTriggerId = store.select("activeTriggerId"); 5639 let lostActiveTriggerId = null; 5640 if (currentActiveTriggerId) { 5641 const activeTriggerElement = store.context.triggerElements.getById(currentActiveTriggerId); 5642 if (!activeTriggerElement) { 5643 for (const [triggerId, triggerElement] of store.context.triggerElements.entries()) { 5644 if (triggerElement === store.state.activeTriggerElement) { 5645 stateUpdates.activeTriggerId = triggerId; 5646 stateUpdates.activeTriggerElement = triggerElement; 5647 resolvedActiveTriggerIdRef.current = triggerId; 5648 break; 5649 } 5650 } 5651 if (stateUpdates.activeTriggerId === void 0) { 5652 if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) { 5653 lostActiveTriggerId = currentActiveTriggerId; 5654 } else { 5655 resolvedActiveTriggerIdRef.current = null; 5656 } 5657 } 5658 } else { 5659 resolvedActiveTriggerIdRef.current = currentActiveTriggerId; 5660 if (activeTriggerElement !== store.state.activeTriggerElement) { 5661 stateUpdates.activeTriggerElement = activeTriggerElement; 5662 } 5663 } 5664 } else { 5665 resolvedActiveTriggerIdRef.current = null; 5666 } 5667 if (!lostActiveTriggerId && !currentActiveTriggerId && !store.state.openedWithoutTrigger && triggerCount === 1) { 5668 const iteratorResult = store.context.triggerElements.entries().next(); 5669 if (!iteratorResult.done) { 5670 const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value; 5671 stateUpdates.activeTriggerId = implicitTriggerId; 5672 stateUpdates.activeTriggerElement = implicitTriggerElement; 5673 resolvedActiveTriggerIdRef.current = implicitTriggerId; 5674 } 5675 } 5676 if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) { 5677 store.update(stateUpdates); 5678 } 5679 if (lostActiveTriggerId) { 5680 if (closeOnActiveTriggerUnmount) { 5681 queueMicrotask(() => { 5682 if (store.select("open") && store.select("activeTriggerId") === lostActiveTriggerId && !store.context.triggerElements.getById(lostActiveTriggerId)) { 5683 const eventDetails = createChangeEventDetails(reason_parts_exports.none); 5684 store.setOpen(false, eventDetails); 5685 if (!eventDetails.isCanceled) { 5686 store.update({ 5687 activeTriggerId: null, 5688 activeTriggerElement: null 5689 }); 5690 } 5691 } 5692 }); 5693 } 5694 } 5695 }, [open2, store, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]); 5696 } 5697 function useOpenStateTransitions(open2, store, onUnmount, animateInitialOpen) { 5698 const { 5699 mounted, 5700 transitionStatus, 5701 forceUnmount 5702 } = useUnmountAfterClose({ 5703 open: open2, 5704 ref: store.context.popupRef, 5705 preventUnmountOnClose: store.useState("preventUnmountingOnClose"), 5706 setPreventUnmountOnClose: (preventUnmountOnClose) => store.set("preventUnmountingOnClose", preventUnmountOnClose), 5707 animateInitialOpen, 5708 onUnmount() { 5709 store.update({ 5710 activeTriggerId: null, 5711 activeTriggerElement: null, 5712 mounted: false, 5713 preventUnmountingOnClose: false 5714 }); 5715 onUnmount?.(); 5716 store.context.onOpenChangeComplete?.(false); 5717 } 5718 }); 5719 useRefWithInit(() => { 5720 store.set("mounted", mounted); 5721 return null; 5722 }); 5723 store.useSyncedValues({ 5724 mounted, 5725 transitionStatus 5726 }); 5727 return { 5728 forceUnmount, 5729 transitionStatus 5730 }; 5731 } 5732 function usePopupInteractionProps(store, statePart) { 5733 store.useSyncedValues(statePart); 5734 useIsoLayoutEffect(() => () => { 5735 store.update({ 5736 activeTriggerProps: EMPTY_OBJECT, 5737 inactiveTriggerProps: EMPTY_OBJECT, 5738 popupProps: EMPTY_OBJECT 5739 }); 5740 }, [store]); 5741 } 5742 5743 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs 5744 var devElementIdsByMap; 5745 function getDevElementIds(map) { 5746 devElementIdsByMap ??= /* @__PURE__ */ new WeakMap(); 5747 let elementIds = devElementIdsByMap.get(map); 5748 if (!elementIds) { 5749 elementIds = /* @__PURE__ */ new WeakMap(); 5750 devElementIdsByMap.set(map, elementIds); 5751 } 5752 return elementIds; 5753 } 5754 var PopupTriggerMap = class { 5755 idMap = /* @__PURE__ */ new Map(); 5756 /** 5757 * Adds a trigger element with the given ID. 5758 * 5759 * Note: The provided element is assumed to not be registered under multiple IDs. 5760 */ 5761 add(id, element) { 5762 if (true) { 5763 const elementIds = getDevElementIds(this); 5764 const existingId = elementIds.get(element); 5765 if (existingId !== void 0 && existingId !== id) { 5766 throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap."); 5767 } 5768 const previousElement = this.idMap.get(id); 5769 if (previousElement !== void 0 && previousElement !== element) { 5770 elementIds.delete(previousElement); 5771 } 5772 elementIds.set(element, id); 5773 } 5774 this.idMap.set(id, element); 5775 } 5776 /** 5777 * Removes the trigger element with the given ID. 5778 */ 5779 delete(id) { 5780 if (true) { 5781 const element = this.idMap.get(id); 5782 if (element !== void 0) { 5783 devElementIdsByMap?.get(this)?.delete(element); 5784 } 5785 } 5786 this.idMap.delete(id); 5787 } 5788 /** 5789 * Whether the given element is registered as a trigger. 5790 */ 5791 hasElement(element) { 5792 for (const registered of this.idMap.values()) { 5793 if (registered === element) { 5794 return true; 5795 } 5796 } 5797 return false; 5798 } 5799 /** 5800 * Whether there is a registered trigger element matching the given predicate. 5801 */ 5802 hasMatchingElement(predicate) { 5803 for (const element of this.idMap.values()) { 5804 if (predicate(element)) { 5805 return true; 5806 } 5807 } 5808 return false; 5809 } 5810 /** 5811 * Returns the trigger element associated with the given ID, or undefined if no such element exists. 5812 */ 5813 getById(id) { 5814 return this.idMap.get(id); 5815 } 5816 /** 5817 * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element]. 5818 */ 5819 entries() { 5820 return this.idMap.entries(); 5821 } 5822 /** 5823 * Returns an iterable of all registered trigger elements. 5824 */ 5825 elements() { 5826 return this.idMap.values(); 5827 } 5828 /** 5829 * Returns the number of registered trigger elements. 5830 */ 5831 get size() { 5832 return this.idMap.size; 5833 } 5834 }; 5835 5836 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/useStore.mjs 5837 var React30 = __toESM(require_react(), 1); 5838 var import_shim = __toESM(require_shim(), 1); 5839 var import_with_selector = __toESM(require_with_selector(), 1); 5840 5841 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/fastHooks.mjs 5842 var React29 = __toESM(require_react(), 1); 5843 var hooks = []; 5844 var currentInstance = void 0; 5845 function getInstance() { 5846 return currentInstance; 5847 } 5848 function register(hook) { 5849 hooks.push(hook); 5850 } 5851 function fastComponent(fn) { 5852 const FastComponent = (props, forwardedRef) => { 5853 const instance = useRefWithInit(createInstance).current; 5854 let result; 5855 try { 5856 currentInstance = instance; 5857 for (const hook of hooks) { 5858 hook.before(instance); 5859 } 5860 result = fn(props, forwardedRef); 5861 for (const hook of hooks) { 5862 hook.after(instance); 5863 } 5864 instance.didInitialize = true; 5865 } finally { 5866 currentInstance = void 0; 5867 } 5868 return result; 5869 }; 5870 FastComponent.displayName = fn.displayName || fn.name; 5871 return FastComponent; 5872 } 5873 function fastComponentRef(fn) { 5874 return /* @__PURE__ */ React29.forwardRef(fastComponent(fn)); 5875 } 5876 function createInstance() { 5877 return { 5878 didInitialize: false 5879 }; 5880 } 5881 5882 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/useStore.mjs 5883 var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19); 5884 var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy; 5885 function useStore(store, selector, a1, a2, a3) { 5886 return useStoreImplementation(store, selector, a1, a2, a3); 5887 } 5888 function useStoreR19(store, selector, a1, a2, a3) { 5889 const getSelection = React30.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [store, selector, a1, a2, a3]); 5890 return (0, import_shim.useSyncExternalStore)(store.subscribe, getSelection, getSelection); 5891 } 5892 register({ 5893 before(instance) { 5894 instance.syncIndex = 0; 5895 if (!instance.didInitialize) { 5896 instance.syncTick = 1; 5897 instance.syncHooks = []; 5898 instance.didChangeStore = true; 5899 instance.getSnapshot = () => { 5900 let didChange2 = false; 5901 for (let i = 0; i < instance.syncHooks.length; i += 1) { 5902 const hook = instance.syncHooks[i]; 5903 const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3); 5904 if (!Object.is(hook.value, value)) { 5905 didChange2 = true; 5906 hook.value = value; 5907 } 5908 } 5909 if (didChange2) { 5910 instance.syncTick += 1; 5911 } 5912 return instance.syncTick; 5913 }; 5914 } 5915 }, 5916 after(instance) { 5917 if (instance.syncHooks.length > 0) { 5918 if (instance.didChangeStore) { 5919 instance.didChangeStore = false; 5920 instance.subscribe = (onStoreChange) => { 5921 const stores = /* @__PURE__ */ new Set(); 5922 for (const hook of instance.syncHooks) { 5923 stores.add(hook.store); 5924 } 5925 const unsubscribes = []; 5926 for (const store of stores) { 5927 unsubscribes.push(store.subscribe(onStoreChange)); 5928 } 5929 return () => { 5930 for (const unsubscribe of unsubscribes) { 5931 unsubscribe(); 5932 } 5933 }; 5934 }; 5935 } 5936 (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot); 5937 } 5938 } 5939 }); 5940 function useStoreFast(store, selector, a1, a2, a3) { 5941 const instance = getInstance(); 5942 if (!instance) { 5943 return useStoreR19(store, selector, a1, a2, a3); 5944 } 5945 const index2 = instance.syncIndex; 5946 instance.syncIndex += 1; 5947 let hook; 5948 if (!instance.didInitialize) { 5949 hook = { 5950 store, 5951 selector, 5952 a1, 5953 a2, 5954 a3, 5955 value: selector(store.getSnapshot(), a1, a2, a3) 5956 }; 5957 instance.syncHooks.push(hook); 5958 } else { 5959 hook = instance.syncHooks[index2]; 5960 if (hook.store !== store || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) { 5961 if (hook.store !== store) { 5962 instance.didChangeStore = true; 5963 } 5964 hook.store = store; 5965 hook.selector = selector; 5966 hook.a1 = a1; 5967 hook.a2 = a2; 5968 hook.a3 = a3; 5969 hook.value = selector(store.getSnapshot(), a1, a2, a3); 5970 } 5971 } 5972 return hook.value; 5973 } 5974 function useStoreLegacy(store, selector, a1, a2, a3) { 5975 return (0, import_with_selector.useSyncExternalStoreWithSelector)(store.subscribe, store.getSnapshot, store.getSnapshot, (state) => selector(state, a1, a2, a3)); 5976 } 5977 5978 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/Store.mjs 5979 var Store = class { 5980 /** 5981 * Creates a store with the given initial state, constructing the class it is called on. 5982 * Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that 5983 * class but degrades the inferred instance type to `Store`; use `new` there instead. 5984 */ 5985 static create(state) { 5986 return new this(state); 5987 } 5988 /** 5989 * The current state of the store. 5990 * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}. 5991 * 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). 5992 * The values can be used directly (to avoid subscribing to the store) in effects or event handlers. 5993 * 5994 * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification. 5995 */ 5996 // Internal state to handle recursive `setState()` calls 5997 constructor(state) { 5998 this.state = state; 5999 this.listeners = /* @__PURE__ */ new Set(); 6000 this.updateTick = 0; 6001 } 6002 /** 6003 * Registers a listener that will be called whenever the store's state changes. 6004 * 6005 * @param fn The listener function to be called on state changes. 6006 * @returns A function to unsubscribe the listener. 6007 */ 6008 subscribe = (fn) => { 6009 this.listeners.add(fn); 6010 return () => { 6011 this.listeners.delete(fn); 6012 }; 6013 }; 6014 /** 6015 * Returns the current state of the store. 6016 */ 6017 getSnapshot = () => { 6018 return this.state; 6019 }; 6020 /** 6021 * Updates the entire store's state and notifies all registered listeners. 6022 * 6023 * @param newState The new state to set for the store. 6024 */ 6025 setState(newState) { 6026 if (this.state === newState) { 6027 return; 6028 } 6029 this.state = newState; 6030 this.updateTick += 1; 6031 const currentTick = this.updateTick; 6032 for (const listener of this.listeners) { 6033 if (currentTick !== this.updateTick) { 6034 return; 6035 } 6036 listener(newState); 6037 } 6038 } 6039 /** 6040 * Merges the provided changes into the current state and notifies listeners if there are changes. 6041 * Each value must match its state key. Pass an exact known subset rather than a broad 6042 * `Partial<State>`, which may contain `undefined` for required state fields. 6043 * 6044 * @param changes An object containing the changes to apply to the current state. 6045 */ 6046 update(changes) { 6047 for (const key in changes) { 6048 if (!Object.is(this.state[key], changes[key])) { 6049 this.setState({ 6050 ...this.state, 6051 ...changes 6052 }); 6053 return; 6054 } 6055 } 6056 } 6057 /** 6058 * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed. 6059 * 6060 * @param key The key in the store's state to update. 6061 * @param value The new value to set for the specified key. 6062 */ 6063 set(key, value) { 6064 if (!Object.is(this.state[key], value)) { 6065 this.setState({ 6066 ...this.state, 6067 [key]: value 6068 }); 6069 } 6070 } 6071 /** 6072 * Gives the state a new reference and updates all registered listeners. 6073 */ 6074 notifyAll() { 6075 const newState = { 6076 ...this.state 6077 }; 6078 this.setState(newState); 6079 } 6080 use(selector, a1, a2, a3) { 6081 return useStore(this, selector, a1, a2, a3); 6082 } 6083 }; 6084 6085 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/ReactStore.mjs 6086 var React31 = __toESM(require_react(), 1); 6087 var ReactStore = class extends Store { 6088 /** 6089 * Creates a new ReactStore instance. 6090 * 6091 * @param state Initial state of the store. 6092 * @param context Non-reactive context values. 6093 * @param selectors Optional selectors for use with `useState`. 6094 */ 6095 constructor(state, context = {}, selectors6) { 6096 super(state); 6097 this.context = context; 6098 this.selectors = selectors6; 6099 } 6100 /** 6101 * Non-reactive values such as refs, callbacks, etc. 6102 */ 6103 /** 6104 * Synchronizes a single external value into the store. 6105 * 6106 * Note that the while the value in `state` is updated immediately, the value returned 6107 * by `useState` is updated before the next render (similarly to React's `useState`). 6108 */ 6109 useSyncedValue(key, value) { 6110 React31.useDebugValue(key); 6111 const store = this; 6112 useIsoLayoutEffect(() => { 6113 if (store.state[key] !== value) { 6114 store.set(key, value); 6115 } 6116 }, [store, key, value]); 6117 } 6118 /** 6119 * Synchronizes a single external value into the store and 6120 * cleans it up (sets to `undefined`) on unmount. 6121 * 6122 * Note that the while the value in `state` is updated immediately, the value returned 6123 * by `useState` is updated before the next render (similarly to React's `useState`). 6124 */ 6125 useSyncedValueWithCleanup(key, value) { 6126 const store = this; 6127 useIsoLayoutEffect(() => { 6128 if (store.state[key] !== value) { 6129 store.set(key, value); 6130 } 6131 return () => { 6132 store.set(key, void 0); 6133 }; 6134 }, [store, key, value]); 6135 } 6136 /** 6137 * Synchronizes multiple external values into the store. 6138 * Each value must match its state key. Pass an exact known subset rather than a broad 6139 * `Partial<State>`, which may contain `undefined` for required state fields. 6140 * 6141 * Note that the while the values in `state` are updated immediately, the values returned 6142 * by `useState` are updated before the next render (similarly to React's `useState`). 6143 * 6144 * @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted. 6145 */ 6146 useSyncedValues(statePart) { 6147 const store = this; 6148 if (true) { 6149 React31.useDebugValue(statePart, (p3) => Object.keys(p3)); 6150 const keys = React31.useRef(Object.keys(statePart)).current; 6151 const nextKeys = Object.keys(statePart); 6152 if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) { 6153 console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable."); 6154 } 6155 } 6156 const dependencies = Object.values(statePart); 6157 useIsoLayoutEffect(() => { 6158 store.update(statePart); 6159 }, [store, ...dependencies]); 6160 } 6161 /** 6162 * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled` 6163 * is non-undefined, the store's state at `key` is updated to match `controlled`. 6164 */ 6165 useControlledProp(key, controlled) { 6166 React31.useDebugValue(key); 6167 const store = this; 6168 const isControlled = controlled !== void 0; 6169 useIsoLayoutEffect(() => { 6170 if (isControlled && !Object.is(store.state[key], controlled)) { 6171 store.setState({ 6172 ...store.state, 6173 [key]: controlled 6174 }); 6175 } 6176 }, [store, key, controlled, isControlled]); 6177 if (true) { 6178 const cache2 = this.controlledValues ??= /* @__PURE__ */ new Map(); 6179 if (!cache2.has(key)) { 6180 cache2.set(key, isControlled); 6181 } 6182 const previouslyControlled = cache2.get(key); 6183 if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) { 6184 console.error(`A component is changing the $previouslyControlled ? "" : "un"}controlled state of $key.toString()} to be $previouslyControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`); 6185 } 6186 } 6187 } 6188 /** Gets the current value from the store using a selector with the provided key. 6189 * 6190 * @param key Key of the selector to use. 6191 */ 6192 select(key, a1, a2, a3) { 6193 const selector = this.selectors[key]; 6194 return selector(this.state, a1, a2, a3); 6195 } 6196 /** 6197 * Returns a value from the store's state using a selector function. 6198 * Used to subscribe to specific parts of the state. 6199 * This methods causes a rerender whenever the selected state changes. 6200 * 6201 * @param key Key of the selector to use. 6202 */ 6203 useState(key, a1, a2, a3) { 6204 React31.useDebugValue(key); 6205 return useStore(this, this.selectors[key], a1, a2, a3); 6206 } 6207 /** 6208 * Wraps a function with `useStableCallback` to ensure it has a stable reference 6209 * and assigns it to the context. 6210 * 6211 * @param key Key of the event callback. Must be a function in the context. 6212 * @param fn Function to assign. 6213 */ 6214 useContextCallback(key, fn) { 6215 React31.useDebugValue(key); 6216 const stableFunction = useStableCallback(fn ?? NOOP); 6217 this.context[key] = stableFunction; 6218 } 6219 /** 6220 * Returns a stable setter function for a specific key in the store's state. 6221 * It's commonly used to pass as a ref callback to React elements. 6222 * 6223 * @param key Key of the state to set. 6224 */ 6225 useStateSetter(key) { 6226 const ref = React31.useRef(void 0); 6227 if (ref.current === void 0) { 6228 ref.current = (value) => { 6229 this.set(key, value); 6230 }; 6231 } 6232 return ref.current; 6233 } 6234 /** 6235 * Observes changes derived from the store's selectors and calls the listener when the selected value changes. 6236 * 6237 * @param key Key of the selector to observe. 6238 * @param listener Listener function called when the selector result changes. 6239 */ 6240 observe(selector, listener) { 6241 let selectFn; 6242 if (typeof selector === "function") { 6243 selectFn = selector; 6244 } else { 6245 selectFn = this.selectors[selector]; 6246 } 6247 let prevValue = selectFn(this.state); 6248 listener(prevValue, prevValue, this); 6249 return this.subscribe((nextState) => { 6250 const nextValue = selectFn(nextState); 6251 if (!Object.is(prevValue, nextValue)) { 6252 const oldValue = prevValue; 6253 prevValue = nextValue; 6254 listener(nextValue, oldValue, this); 6255 } 6256 }); 6257 } 6258 }; 6259 6260 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs 6261 var selectors = { 6262 open: (state) => state.open, 6263 transitionStatus: (state) => state.transitionStatus, 6264 domReferenceElement: (state) => state.domReferenceElement, 6265 referenceElement: (state) => state.positionReference ?? state.referenceElement, 6266 floatingElement: (state) => state.floatingElement, 6267 floatingId: (state) => state.floatingId 6268 }; 6269 var FloatingRootStore = class extends ReactStore { 6270 constructor(options) { 6271 const { 6272 syncOnly, 6273 nested, 6274 onOpenChange, 6275 triggerElements, 6276 ...initialState 6277 } = options; 6278 super({ 6279 ...initialState, 6280 positionReference: initialState.referenceElement, 6281 domReferenceElement: initialState.referenceElement 6282 }, { 6283 onOpenChange, 6284 dataRef: { 6285 current: {} 6286 }, 6287 events: createEventEmitter(), 6288 nested, 6289 triggerElements 6290 }, selectors); 6291 this.syncOnly = syncOnly; 6292 } 6293 /** 6294 * Syncs the event used by hover logic to distinguish hover-open from click-like interaction. 6295 */ 6296 syncOpenEvent = (newOpen, event) => { 6297 if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing 6298 // click events to upgrade a hover-open. 6299 event != null && isClickLikeEvent(event)) { 6300 this.context.dataRef.current.openEvent = newOpen ? event : void 0; 6301 } 6302 }; 6303 /** 6304 * Runs the root-owned side effects for an open state change. 6305 */ 6306 dispatchOpenChange = (newOpen, eventDetails) => { 6307 this.syncOpenEvent(newOpen, eventDetails.event); 6308 const details = { 6309 open: newOpen, 6310 reason: eventDetails.reason, 6311 nativeEvent: eventDetails.event, 6312 nested: this.context.nested, 6313 triggerElement: eventDetails.trigger 6314 }; 6315 this.context.events.emit("openchange", details); 6316 }; 6317 /** 6318 * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments. 6319 * 6320 * @param newOpen The new open state. 6321 * @param eventDetails Details about the event that triggered the open state change. 6322 */ 6323 setOpen = (newOpen, eventDetails) => { 6324 if (this.syncOnly) { 6325 this.context.onOpenChange?.(newOpen, eventDetails); 6326 return; 6327 } 6328 this.dispatchOpenChange(newOpen, eventDetails); 6329 this.context.onOpenChange?.(newOpen, eventDetails); 6330 }; 6331 }; 6332 6333 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/store.mjs 6334 function createInitialPopupStoreState(triggerElements, floatingId, nested = false) { 6335 return { 6336 open: false, 6337 openProp: void 0, 6338 mounted: false, 6339 transitionStatus: void 0, 6340 floatingRootContext: new FloatingRootStore({ 6341 open: false, 6342 transitionStatus: void 0, 6343 floatingElement: null, 6344 referenceElement: null, 6345 triggerElements, 6346 floatingId, 6347 syncOnly: true, 6348 nested, 6349 onOpenChange: void 0 6350 }), 6351 floatingId, 6352 triggerCount: 0, 6353 preventUnmountingOnClose: false, 6354 payload: void 0, 6355 activeTriggerId: null, 6356 activeTriggerElement: null, 6357 openedWithoutTrigger: false, 6358 triggerIdProp: void 0, 6359 popupElement: null, 6360 positionerElement: null, 6361 activeTriggerProps: EMPTY_OBJECT, 6362 inactiveTriggerProps: EMPTY_OBJECT, 6363 popupProps: EMPTY_OBJECT 6364 }; 6365 } 6366 var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId; 6367 var openSelector = (state) => state.openProp ?? state.open; 6368 var popupIdSelector = (state) => { 6369 const popupId = state.popupElement?.id ?? state.floatingId; 6370 return popupId || void 0; 6371 }; 6372 function triggerOwnsOpenPopup(state, triggerId) { 6373 return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId; 6374 } 6375 function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) { 6376 if (triggerOwnsOpenPopup(state, triggerId)) { 6377 return true; 6378 } 6379 return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && !state.openedWithoutTrigger && state.triggerCount === 1; 6380 } 6381 var popupStoreSelectors = { 6382 open: openSelector, 6383 mounted: (state) => state.mounted, 6384 // `open` is written synchronously on an open change; `mounted`/`transitionStatus` sync in a 6385 // layout effect. Match useTransitionStatus so a retained popup does not miss its starting phase. 6386 transitionStatus: (state) => openSelector(state) && !state.mounted ? "starting" : state.transitionStatus, 6387 floatingRootContext: (state) => state.floatingRootContext, 6388 triggerCount: (state) => state.triggerCount, 6389 preventUnmountingOnClose: (state) => state.preventUnmountingOnClose, 6390 payload: (state) => state.payload, 6391 activeTriggerId: activeTriggerIdSelector, 6392 activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null, 6393 popupId: popupIdSelector, 6394 /** 6395 * Whether the trigger with the given ID was used to open the popup. 6396 */ 6397 isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId, 6398 /** 6399 * Whether the popup is open and was activated by a trigger with the given ID. 6400 */ 6401 isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId), 6402 /** 6403 * Whether the popup is mounted and was activated by a trigger with the given ID. 6404 */ 6405 isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted, 6406 triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps, 6407 /** 6408 * Popup id for the trigger that currently owns the open popup. 6409 */ 6410 triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0, 6411 popupProps: (state) => state.popupProps, 6412 popupElement: (state) => state.popupElement, 6413 positionerElement: (state) => state.positionerElement 6414 }; 6415 6416 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs 6417 var React32 = __toESM(require_react(), 1); 6418 var import_shim2 = __toESM(require_shim(), 1); 6419 function usePopupHandleStore(handle) { 6420 const subscribe = React32.useCallback((listener) => { 6421 if (handle === void 0) { 6422 return NOOP; 6423 } 6424 return handle.subscribeStore(listener); 6425 }, [handle]); 6426 const getSnapshot = React32.useCallback(() => { 6427 return handle === void 0 ? void 0 : handle.store; 6428 }, [handle]); 6429 return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore); 6430 } 6431 6432 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useFloatingRootContext.mjs 6433 function useFloatingRootContext(options) { 6434 const { 6435 open: open2 = false, 6436 onOpenChange, 6437 elements = {} 6438 } = options; 6439 const floatingId = useId(); 6440 const nested = useFloatingParentNodeId() != null; 6441 if (true) { 6442 const optionDomReference = elements.reference; 6443 if (optionDomReference && !isElement(optionDomReference)) { 6444 console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead."); 6445 } 6446 } 6447 const store = useRefWithInit(() => new FloatingRootStore({ 6448 open: open2, 6449 transitionStatus: void 0, 6450 onOpenChange, 6451 referenceElement: elements.reference ?? null, 6452 floatingElement: elements.floating ?? null, 6453 triggerElements: new PopupTriggerMap(), 6454 floatingId, 6455 syncOnly: false, 6456 nested 6457 })).current; 6458 useIsoLayoutEffect(() => { 6459 const valuesToSync = { 6460 open: open2, 6461 floatingId 6462 }; 6463 if (elements.reference !== void 0) { 6464 valuesToSync.referenceElement = elements.reference; 6465 valuesToSync.domReferenceElement = isElement(elements.reference) ? elements.reference : null; 6466 } 6467 if (elements.floating !== void 0) { 6468 valuesToSync.floatingElement = elements.floating; 6469 } 6470 store.update(valuesToSync); 6471 }, [open2, floatingId, elements.reference, elements.floating, store]); 6472 store.context.onOpenChange = onOpenChange; 6473 store.context.nested = nested; 6474 return store; 6475 } 6476 6477 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs 6478 var React33 = __toESM(require_react(), 1); 6479 var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit; 6480 function useFocus(store, props = {}) { 6481 const { 6482 enabled = true, 6483 delay 6484 } = props; 6485 const { 6486 events, 6487 dataRef 6488 } = store.context; 6489 const blockFocusRef = React33.useRef(false); 6490 const blockedReferenceRef = React33.useRef(null); 6491 const keyboardModalityRef = React33.useRef(true); 6492 const timeout = useTimeout(); 6493 React33.useEffect(() => { 6494 const domReference = store.select("domReferenceElement"); 6495 if (!enabled) { 6496 return void 0; 6497 } 6498 const win = getWindow(domReference); 6499 function onBlur() { 6500 const currentDomReference = store.select("domReferenceElement"); 6501 if (!store.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) { 6502 blockFocusRef.current = true; 6503 blockedReferenceRef.current = currentDomReference; 6504 } 6505 } 6506 function onKeyDown() { 6507 keyboardModalityRef.current = true; 6508 } 6509 function onPointerDown() { 6510 keyboardModalityRef.current = false; 6511 } 6512 return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true)); 6513 }, [store, enabled]); 6514 React33.useEffect(() => { 6515 if (!enabled) { 6516 return void 0; 6517 } 6518 function onOpenChangeLocal(details) { 6519 if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) { 6520 const referenceElement = store.select("domReferenceElement"); 6521 if (isElement(referenceElement)) { 6522 blockedReferenceRef.current = referenceElement; 6523 blockFocusRef.current = true; 6524 } 6525 } 6526 } 6527 events.on("openchange", onOpenChangeLocal); 6528 return () => { 6529 events.off("openchange", onOpenChangeLocal); 6530 }; 6531 }, [events, enabled, store]); 6532 const reference = React33.useMemo(() => { 6533 function resetBlockedFocus() { 6534 blockFocusRef.current = false; 6535 blockedReferenceRef.current = null; 6536 } 6537 return { 6538 onMouseLeave() { 6539 resetBlockedFocus(); 6540 }, 6541 onFocus(event) { 6542 const focusTarget = event.currentTarget; 6543 if (blockFocusRef.current) { 6544 if (blockedReferenceRef.current === focusTarget) { 6545 return; 6546 } 6547 resetBlockedFocus(); 6548 } 6549 const target = getTarget(event.nativeEvent); 6550 if (isElement(target)) { 6551 if (isMacSafari && !event.relatedTarget) { 6552 if (!keyboardModalityRef.current && !isTypeableElement(target)) { 6553 return; 6554 } 6555 } else if (!matchesFocusVisible(target)) { 6556 return; 6557 } 6558 } 6559 const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements); 6560 const { 6561 nativeEvent, 6562 currentTarget 6563 } = event; 6564 if (store.select("open") && movedFromOtherEnabledTrigger || !delay) { 6565 store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget)); 6566 return; 6567 } 6568 timeout.start(delay, () => { 6569 if (blockFocusRef.current) { 6570 return; 6571 } 6572 store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget)); 6573 }); 6574 }, 6575 onBlur(event) { 6576 resetBlockedFocus(); 6577 const relatedTarget = event.relatedTarget; 6578 const nativeEvent = event.nativeEvent; 6579 const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside"; 6580 timeout.start(0, () => { 6581 const domReference = store.select("domReferenceElement"); 6582 const activeEl = activeElement(ownerDocument(domReference)); 6583 if (!relatedTarget && activeEl === domReference) { 6584 return; 6585 } 6586 if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) { 6587 return; 6588 } 6589 const nextFocusedElement = relatedTarget ?? activeEl; 6590 if (isTargetInsideEnabledTrigger(nextFocusedElement, store.context.triggerElements)) { 6591 return; 6592 } 6593 store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent)); 6594 }); 6595 } 6596 }; 6597 }, [dataRef, delay, store, timeout]); 6598 return React33.useMemo(() => enabled ? { 6599 reference, 6600 trigger: reference 6601 } : {}, [enabled, reference]); 6602 } 6603 6604 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs 6605 var React34 = __toESM(require_react(), 1); 6606 6607 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs 6608 var HoverInteraction = class _HoverInteraction { 6609 pointerType = void 0; 6610 interactedInside = false; 6611 handler = void 0; 6612 blockMouseMove = true; 6613 performedPointerEventsMutation = false; 6614 pointerEventsScopeElement = null; 6615 pointerEventsReferenceElement = null; 6616 pointerEventsFloatingElement = null; 6617 restTimeoutPending = false; 6618 openChangeTimeout = new Timeout(); 6619 restTimeout = new Timeout(); 6620 handleCloseOptions = void 0; 6621 static create() { 6622 return new _HoverInteraction(); 6623 } 6624 dispose = () => { 6625 this.openChangeTimeout.clear(); 6626 this.restTimeout.clear(); 6627 }; 6628 disposeEffect = () => { 6629 return this.dispose; 6630 }; 6631 }; 6632 var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap(); 6633 function clearSafePolygonPointerEventsMutation(instance) { 6634 if (!instance.performedPointerEventsMutation) { 6635 return; 6636 } 6637 const scopeElement = instance.pointerEventsScopeElement; 6638 if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) { 6639 instance.pointerEventsScopeElement?.style.removeProperty("pointer-events"); 6640 instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events"); 6641 instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events"); 6642 pointerEventsMutationOwnerByScopeElement.delete(scopeElement); 6643 } 6644 instance.performedPointerEventsMutation = false; 6645 instance.pointerEventsScopeElement = null; 6646 instance.pointerEventsReferenceElement = null; 6647 instance.pointerEventsFloatingElement = null; 6648 } 6649 function applySafePolygonPointerEventsMutation(instance, options) { 6650 const { 6651 scopeElement, 6652 referenceElement, 6653 floatingElement 6654 } = options; 6655 const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement); 6656 if (existingOwner && existingOwner !== instance) { 6657 clearSafePolygonPointerEventsMutation(existingOwner); 6658 } 6659 clearSafePolygonPointerEventsMutation(instance); 6660 instance.performedPointerEventsMutation = true; 6661 instance.pointerEventsScopeElement = scopeElement; 6662 instance.pointerEventsReferenceElement = referenceElement; 6663 instance.pointerEventsFloatingElement = floatingElement; 6664 pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance); 6665 scopeElement.style.pointerEvents = "none"; 6666 referenceElement.style.pointerEvents = "auto"; 6667 floatingElement.style.pointerEvents = "auto"; 6668 } 6669 function useHoverInteractionSharedState(store) { 6670 const data = store.context.dataRef.current; 6671 const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current; 6672 if (!data.hoverInteractionState) { 6673 data.hoverInteractionState = instance; 6674 } 6675 useOnMount(data.hoverInteractionState.disposeEffect); 6676 return data.hoverInteractionState; 6677 } 6678 6679 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs 6680 function useHoverFloatingInteraction(store, parameters = {}) { 6681 const { 6682 enabled = true, 6683 closeDelay: closeDelayProp = 0, 6684 nodeId: nodeIdProp 6685 } = parameters; 6686 const open2 = store.useState("open"); 6687 const floatingElement = store.useState("floatingElement"); 6688 const domReferenceElement = store.useState("domReferenceElement"); 6689 const { 6690 dataRef 6691 } = store.context; 6692 const tree = useFloatingTree(); 6693 const parentId = useFloatingParentNodeId(); 6694 const instance = useHoverInteractionSharedState(store); 6695 const childClosedTimeout = useTimeout(); 6696 const isClickLikeOpenEvent2 = useStableCallback(() => { 6697 return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside); 6698 }); 6699 const isHoverOpen = useStableCallback(() => { 6700 return isHoverOpenEvent(dataRef.current.openEvent?.type); 6701 }); 6702 const clearPointerEvents = useStableCallback(() => { 6703 clearSafePolygonPointerEventsMutation(instance); 6704 }); 6705 useIsoLayoutEffect(() => { 6706 if (!open2) { 6707 instance.pointerType = void 0; 6708 instance.restTimeoutPending = false; 6709 instance.interactedInside = false; 6710 clearPointerEvents(); 6711 } 6712 }, [open2, instance, clearPointerEvents]); 6713 React34.useEffect(() => { 6714 return clearPointerEvents; 6715 }, [clearPointerEvents]); 6716 useIsoLayoutEffect(() => { 6717 if (!enabled) { 6718 return void 0; 6719 } 6720 if (open2 && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) { 6721 const ref = domReferenceElement; 6722 const floatingEl = floatingElement; 6723 const doc = ownerDocument(floatingElement); 6724 const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating; 6725 if (parentFloating) { 6726 parentFloating.style.pointerEvents = ""; 6727 } 6728 const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null; 6729 const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null; 6730 const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? closest(ref, "[data-rootownerid]") ?? doc.body; 6731 applySafePolygonPointerEventsMutation(instance, { 6732 scopeElement, 6733 referenceElement: ref, 6734 floatingElement: floatingEl 6735 }); 6736 return () => { 6737 clearPointerEvents(); 6738 }; 6739 } 6740 return void 0; 6741 }, [enabled, open2, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]); 6742 React34.useEffect(() => { 6743 if (!enabled) { 6744 return void 0; 6745 } 6746 function hasParentChildren() { 6747 return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0); 6748 } 6749 function closeWithDelay(event) { 6750 const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType); 6751 const close = () => { 6752 store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event)); 6753 tree?.events.emit("floating.closed", event); 6754 }; 6755 if (closeDelay) { 6756 instance.openChangeTimeout.start(closeDelay, close); 6757 } else { 6758 instance.openChangeTimeout.clear(); 6759 close(); 6760 } 6761 } 6762 function handleInteractInside(event) { 6763 const target = getTarget(event); 6764 if (!isInteractiveElement(target)) { 6765 instance.interactedInside = false; 6766 return; 6767 } 6768 instance.interactedInside = closest(target, "[aria-haspopup]") != null; 6769 } 6770 function onFloatingMouseEnter() { 6771 instance.openChangeTimeout.clear(); 6772 childClosedTimeout.clear(); 6773 tree?.events.off("floating.closed", onNodeClosed); 6774 clearPointerEvents(); 6775 } 6776 function onFloatingMouseLeave(event) { 6777 if (hasParentChildren() && tree) { 6778 tree.events.on("floating.closed", onNodeClosed); 6779 return; 6780 } 6781 if (isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) { 6782 return; 6783 } 6784 const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp; 6785 const relatedTarget = event.relatedTarget; 6786 const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget)); 6787 if (isMovingIntoDescendantFloating) { 6788 return; 6789 } 6790 if (instance.handler) { 6791 instance.handler(event); 6792 return; 6793 } 6794 clearPointerEvents(); 6795 if (isHoverOpen() && !isClickLikeOpenEvent2()) { 6796 closeWithDelay(event); 6797 } 6798 } 6799 function onNodeClosed(event) { 6800 if (!tree || !parentId || hasParentChildren()) { 6801 return; 6802 } 6803 childClosedTimeout.start(0, () => { 6804 tree.events.off("floating.closed", onNodeClosed); 6805 store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event)); 6806 tree.events.emit("floating.closed", event); 6807 }); 6808 } 6809 const floating = floatingElement; 6810 return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => { 6811 tree?.events.off("floating.closed", onNodeClosed); 6812 }); 6813 }, [enabled, floatingElement, store, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]); 6814 } 6815 6816 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs 6817 var React35 = __toESM(require_react(), 1); 6818 var ReactDOM4 = __toESM(require_react_dom(), 1); 6819 var EMPTY_REF = { 6820 current: null 6821 }; 6822 function useHoverReferenceInteraction(store, props = {}) { 6823 const { 6824 enabled = true, 6825 delay = 0, 6826 handleClose = null, 6827 mouseOnly = false, 6828 restMs = 0, 6829 move = true, 6830 triggerElementRef = EMPTY_REF, 6831 externalTree, 6832 isActiveTrigger = true, 6833 getHandleCloseContext, 6834 isClosing, 6835 shouldOpen: shouldOpenProp, 6836 guardStaleOpen = false 6837 } = props; 6838 const { 6839 dataRef, 6840 events 6841 } = store.context; 6842 const tree = useFloatingTree(externalTree); 6843 const instance = useHoverInteractionSharedState(store); 6844 const isHoverCloseActiveRef = React35.useRef(false); 6845 const handleCloseRef = useValueAsRef(handleClose); 6846 const delayRef = useValueAsRef(delay); 6847 const restMsRef = useValueAsRef(restMs); 6848 const enabledRef = useValueAsRef(enabled); 6849 const shouldOpenRef = useValueAsRef(shouldOpenProp); 6850 const isClosingRef = useValueAsRef(isClosing); 6851 const isClickLikeOpenEvent2 = useStableCallback(() => { 6852 return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside); 6853 }); 6854 const checkShouldOpen = useStableCallback(() => { 6855 return shouldOpenRef.current?.() !== false; 6856 }); 6857 const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => { 6858 const allTriggers = store.context.triggerElements; 6859 if (allTriggers.hasElement(currentTarget)) { 6860 return !currentDomReference || !contains(currentDomReference, currentTarget); 6861 } 6862 if (!isElement(target)) { 6863 return false; 6864 } 6865 const targetElement = target; 6866 return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement)); 6867 }); 6868 const cleanupMouseMoveHandler = useStableCallback(() => { 6869 if (!instance.handler) { 6870 return; 6871 } 6872 const doc = ownerDocument(store.select("domReferenceElement")); 6873 doc.removeEventListener("mousemove", instance.handler); 6874 instance.handler = void 0; 6875 }); 6876 const clearPointerEvents = useStableCallback(() => { 6877 clearSafePolygonPointerEventsMutation(instance); 6878 }); 6879 if (isActiveTrigger) { 6880 instance.handleCloseOptions = handleClose?.__options; 6881 } 6882 React35.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]); 6883 React35.useEffect(() => { 6884 if (!enabled) { 6885 return void 0; 6886 } 6887 function onOpenChangeLocal(details) { 6888 if (!details.open) { 6889 isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover; 6890 cleanupMouseMoveHandler(); 6891 instance.openChangeTimeout.clear(); 6892 instance.restTimeout.clear(); 6893 instance.blockMouseMove = true; 6894 instance.restTimeoutPending = false; 6895 } else { 6896 isHoverCloseActiveRef.current = false; 6897 } 6898 } 6899 events.on("openchange", onOpenChangeLocal); 6900 return () => { 6901 events.off("openchange", onOpenChangeLocal); 6902 }; 6903 }, [enabled, events, instance, cleanupMouseMoveHandler]); 6904 React35.useEffect(() => { 6905 if (!enabled) { 6906 return void 0; 6907 } 6908 function closeWithDelay(event, runElseBranch = true) { 6909 const closeDelay = getDelay(delayRef.current, "close", instance.pointerType); 6910 if (closeDelay) { 6911 instance.openChangeTimeout.start(closeDelay, () => { 6912 store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event)); 6913 tree?.events.emit("floating.closed", event); 6914 }); 6915 } else if (runElseBranch) { 6916 instance.openChangeTimeout.clear(); 6917 store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event)); 6918 tree?.events.emit("floating.closed", event); 6919 } 6920 } 6921 const trigger = triggerElementRef.current ?? (isActiveTrigger ? store.select("domReferenceElement") : null); 6922 if (!isElement(trigger)) { 6923 return void 0; 6924 } 6925 function onMouseEnter(event) { 6926 instance.openChangeTimeout.clear(); 6927 instance.blockMouseMove = false; 6928 if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) { 6929 return; 6930 } 6931 const restMsValue = getRestMs(restMsRef.current); 6932 const openDelay = getDelay(delayRef.current, "open", instance.pointerType); 6933 const eventTarget = getTarget(event); 6934 const currentTarget = event.currentTarget ?? null; 6935 const currentDomReference = store.select("domReferenceElement"); 6936 let triggerNode = currentTarget; 6937 if (isElement(eventTarget) && !store.context.triggerElements.hasElement(eventTarget)) { 6938 for (const triggerElement of store.context.triggerElements.elements()) { 6939 if (contains(triggerElement, eventTarget)) { 6940 triggerNode = triggerElement; 6941 break; 6942 } 6943 } 6944 } 6945 if (isElement(currentTarget) && isElement(currentDomReference) && !store.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) { 6946 triggerNode = currentDomReference; 6947 } 6948 const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget); 6949 const isOpen = store.select("open"); 6950 const isInClosingTransition = isClosingRef.current?.() ?? store.select("transitionStatus") === "ending"; 6951 const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current; 6952 const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition; 6953 const isRestOnlyDelay = restMsValue > 0 && !openDelay; 6954 const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition; 6955 const shouldOpen = !isOpen || isOverInactive; 6956 if (shouldOpenImmediately) { 6957 if (checkShouldOpen()) { 6958 store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode)); 6959 } 6960 return; 6961 } 6962 if (isRestOnlyDelay) { 6963 return; 6964 } 6965 if (openDelay) { 6966 instance.openChangeTimeout.start(openDelay, () => { 6967 if (shouldOpen && checkShouldOpen()) { 6968 store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode)); 6969 } 6970 }); 6971 } else if (shouldOpen) { 6972 if (checkShouldOpen()) { 6973 store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode)); 6974 } 6975 } 6976 } 6977 function onMouseLeave(event) { 6978 if (isClickLikeOpenEvent2()) { 6979 clearPointerEvents(); 6980 return; 6981 } 6982 cleanupMouseMoveHandler(); 6983 const domReferenceElement = store.select("domReferenceElement"); 6984 const doc = ownerDocument(domReferenceElement); 6985 instance.restTimeout.clear(); 6986 instance.restTimeoutPending = false; 6987 const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.(); 6988 if (isTargetInsideEnabledTrigger(event.relatedTarget, store.context.triggerElements)) { 6989 return; 6990 } 6991 if (handleCloseRef.current && handleCloseContextBase) { 6992 if (!store.select("open")) { 6993 instance.openChangeTimeout.clear(); 6994 } 6995 const currentTrigger = triggerElementRef.current; 6996 instance.handler = handleCloseRef.current({ 6997 ...handleCloseContextBase, 6998 tree, 6999 x: event.clientX, 7000 y: event.clientY, 7001 onClose() { 7002 clearPointerEvents(); 7003 cleanupMouseMoveHandler(); 7004 if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store.select("domReferenceElement")) { 7005 closeWithDelay(event, true); 7006 } 7007 } 7008 }); 7009 doc.addEventListener("mousemove", instance.handler); 7010 instance.handler(event); 7011 return; 7012 } 7013 const shouldClose = instance.pointerType === "touch" ? !contains(store.select("floatingElement"), event.relatedTarget) : true; 7014 if (shouldClose) { 7015 closeWithDelay(event); 7016 } 7017 } 7018 function onMouseOut(event) { 7019 if (contains(trigger, event.relatedTarget)) { 7020 return; 7021 } 7022 instance.openChangeTimeout.clear(); 7023 instance.restTimeout.clear(); 7024 instance.restTimeoutPending = false; 7025 } 7026 const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0; 7027 if (move) { 7028 return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, { 7029 once: true 7030 }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard); 7031 } 7032 return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard); 7033 }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]); 7034 return React35.useMemo(() => { 7035 if (!enabled) { 7036 return void 0; 7037 } 7038 function setPointerRef(event) { 7039 instance.pointerType = event.pointerType; 7040 } 7041 return { 7042 onPointerDown: setPointerRef, 7043 onPointerEnter: setPointerRef, 7044 onMouseMove(event) { 7045 const { 7046 nativeEvent 7047 } = event; 7048 const trigger = event.currentTarget; 7049 const currentDomReference = store.select("domReferenceElement"); 7050 const currentOpen = store.select("open"); 7051 const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target); 7052 if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) { 7053 return; 7054 } 7055 if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) { 7056 const floatingElement = store.select("floatingElement"); 7057 if (floatingElement) { 7058 const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body; 7059 applySafePolygonPointerEventsMutation(instance, { 7060 scopeElement, 7061 referenceElement: trigger, 7062 floatingElement 7063 }); 7064 } 7065 } 7066 const restMsValue = getRestMs(restMsRef.current); 7067 if (currentOpen && !isOverInactive || restMsValue === 0) { 7068 return; 7069 } 7070 if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) { 7071 return; 7072 } 7073 instance.restTimeout.clear(); 7074 function handleMouseMove() { 7075 instance.restTimeoutPending = false; 7076 if (isClickLikeOpenEvent2()) { 7077 return; 7078 } 7079 const latestOpen = store.select("open"); 7080 if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) { 7081 store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger)); 7082 } 7083 } 7084 if (instance.pointerType === "touch") { 7085 ReactDOM4.flushSync(() => { 7086 handleMouseMove(); 7087 }); 7088 } else if (isOverInactive && currentOpen) { 7089 handleMouseMove(); 7090 } else { 7091 instance.restTimeoutPending = true; 7092 instance.restTimeout.start(restMsValue, handleMouseMove); 7093 } 7094 } 7095 }; 7096 }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store, restMsRef, checkShouldOpen]); 7097 } 7098 7099 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useListNavigation.mjs 7100 var React36 = __toESM(require_react(), 1); 7101 function isStationaryWebKitPointer(event) { 7102 return parts_exports.engine.webkit && event.movementX === 0 && event.movementY === 0; 7103 } 7104 function doSwitch(orientation, vertical, horizontal) { 7105 switch (orientation) { 7106 case "vertical": 7107 return vertical; 7108 case "horizontal": 7109 return horizontal; 7110 default: 7111 return vertical || horizontal; 7112 } 7113 } 7114 function isMainOrientationKey(key, orientation) { 7115 const vertical = key === ARROW_UP || key === ARROW_DOWN; 7116 const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT; 7117 return doSwitch(orientation, vertical, horizontal); 7118 } 7119 function isMainOrientationToEndKey(key, orientation, rtl) { 7120 const vertical = key === ARROW_DOWN; 7121 const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT; 7122 return doSwitch(orientation, vertical, horizontal) || key === "Enter" || key === " " || key === ""; 7123 } 7124 function isCrossOrientationOpenKey(key, orientation, rtl) { 7125 const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT; 7126 const horizontal = key === ARROW_DOWN; 7127 return doSwitch(orientation, vertical, horizontal); 7128 } 7129 function isCrossOrientationCloseKey(key, orientation, rtl, grid) { 7130 const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT; 7131 const horizontal = key === ARROW_UP; 7132 if (orientation === "both" || orientation === "horizontal" && grid) { 7133 return key === "Escape"; 7134 } 7135 return doSwitch(orientation, vertical, horizontal); 7136 } 7137 function useListNavigation(store, props) { 7138 const { 7139 listRef, 7140 activeIndex, 7141 onNavigate: onNavigateProp = () => { 7142 }, 7143 enabled = true, 7144 selectedIndex = null, 7145 allowEscape = false, 7146 loopFocus = false, 7147 nested = false, 7148 rtl = false, 7149 virtual = false, 7150 focusItemOnOpen = "auto", 7151 focusItemOnHover = true, 7152 openOnArrowKeyDown = true, 7153 disabledIndices = void 0, 7154 orientation = "vertical", 7155 triggerOrientation = orientation, 7156 parentOrientation, 7157 id, 7158 resetOnPointerLeave = true, 7159 externalTree, 7160 nestedReturnFocusRef, 7161 grid: navigateGrid 7162 } = props; 7163 const isGrid = navigateGrid != null; 7164 if (true) { 7165 if (allowEscape) { 7166 if (!loopFocus) { 7167 console.warn("`useListNavigation` looping must be enabled to allow escaping."); 7168 } 7169 if (!virtual) { 7170 console.warn("`useListNavigation` must be virtual to allow escaping."); 7171 } 7172 } 7173 if (orientation === "vertical" && isGrid) { 7174 console.warn("In grid list navigation mode, the `orientation` should", 'be either "horizontal" or "both".'); 7175 } 7176 } 7177 const open2 = store.useState("open"); 7178 const floatingElement = store.useState("floatingElement"); 7179 const domReferenceElement = store.useState("domReferenceElement"); 7180 const dataRef = store.context.dataRef; 7181 const floatingFocusElement = getFloatingFocusElement(floatingElement); 7182 const typeableComboboxReference = isTypeableCombobox(domReferenceElement); 7183 const floatingFocusElementRef = useValueAsRef(floatingFocusElement); 7184 const parentId = useFloatingParentNodeId(); 7185 const tree = useFloatingTree(externalTree); 7186 const focusItemOnOpenRef = React36.useRef(focusItemOnOpen); 7187 const indexRef = React36.useRef(selectedIndex ?? -1); 7188 const keyRef = React36.useRef(null); 7189 const isPointerModalityRef = React36.useRef(true); 7190 const onNavigate = useStableCallback((event) => { 7191 onNavigateProp(indexRef.current === -1 ? null : indexRef.current, event); 7192 }); 7193 const previousMountedRef = React36.useRef(!!floatingElement); 7194 const previousOpenRef = React36.useRef(open2); 7195 const forceSyncFocusRef = React36.useRef(false); 7196 const forceScrollIntoViewRef = React36.useRef(false); 7197 const cancelQueuedFocusRef = React36.useRef(null); 7198 const disabledIndicesRef = useValueAsRef(disabledIndices); 7199 const latestOpenRef = useValueAsRef(open2); 7200 const selectedIndexRef = useValueAsRef(selectedIndex); 7201 const resetOnPointerLeaveRef = useValueAsRef(resetOnPointerLeave); 7202 const focusFrame = useAnimationFrame(); 7203 const waitForListPopulatedFrame = useAnimationFrame(); 7204 const focusItem = useStableCallback(() => { 7205 focusFrame.cancel(); 7206 function runFocus(item2) { 7207 if (!virtual) { 7208 cancelQueuedFocusRef.current = enqueueFocus(item2, { 7209 sync: forceSyncFocusRef.current, 7210 preventScroll: true 7211 }); 7212 } 7213 } 7214 const initialItem = listRef.current[indexRef.current]; 7215 const forceScrollIntoView = forceScrollIntoViewRef.current; 7216 if (initialItem) { 7217 runFocus(initialItem); 7218 } 7219 const scheduler2 = forceSyncFocusRef.current ? (callback) => callback() : (callback) => focusFrame.request(callback); 7220 scheduler2(() => { 7221 const waitedItem = listRef.current[indexRef.current] || initialItem; 7222 if (!waitedItem) { 7223 return; 7224 } 7225 if (!initialItem) { 7226 runFocus(waitedItem); 7227 } 7228 const shouldScrollIntoView = ( 7229 // eslint-disable-next-line @typescript-eslint/no-use-before-define 7230 item && (forceScrollIntoView || !isPointerModalityRef.current) 7231 ); 7232 if (shouldScrollIntoView) { 7233 waitedItem.scrollIntoView?.({ 7234 block: "nearest", 7235 inline: "nearest" 7236 }); 7237 } 7238 }); 7239 }); 7240 useIsoLayoutEffect(() => { 7241 dataRef.current.orientation = orientation; 7242 }, [dataRef, orientation]); 7243 useIsoLayoutEffect(() => { 7244 if (!open2) { 7245 keyRef.current = null; 7246 } 7247 if (!open2 || focusItemOnOpen !== "auto") { 7248 focusItemOnOpenRef.current = focusItemOnOpen; 7249 } 7250 }, [open2, focusItemOnOpen]); 7251 useIsoLayoutEffect(() => { 7252 if (!enabled) { 7253 return; 7254 } 7255 if (open2 && floatingElement) { 7256 indexRef.current = selectedIndex ?? -1; 7257 if (focusItemOnOpenRef.current && selectedIndex != null) { 7258 forceScrollIntoViewRef.current = true; 7259 onNavigate(); 7260 } 7261 } else if (previousMountedRef.current) { 7262 indexRef.current = -1; 7263 onNavigate(); 7264 } 7265 }, [enabled, open2, floatingElement, selectedIndex, onNavigate]); 7266 useIsoLayoutEffect(() => { 7267 if (!enabled) { 7268 return; 7269 } 7270 if (!open2) { 7271 forceSyncFocusRef.current = false; 7272 return; 7273 } 7274 if (!floatingElement) { 7275 return; 7276 } 7277 if (activeIndex == null) { 7278 forceSyncFocusRef.current = false; 7279 if (selectedIndexRef.current != null) { 7280 return; 7281 } 7282 if (previousMountedRef.current) { 7283 indexRef.current = -1; 7284 focusItem(); 7285 } 7286 if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) { 7287 let runs = 0; 7288 const waitForListPopulated = () => { 7289 if (listRef.current[0] == null) { 7290 if (runs < 2) { 7291 const scheduler2 = runs ? (callback) => waitForListPopulatedFrame.request(callback) : queueMicrotask; 7292 scheduler2(waitForListPopulated); 7293 } 7294 runs += 1; 7295 } else { 7296 indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, triggerOrientation, rtl) || nested ? getMinListIndex(listRef) : getMaxListIndex(listRef); 7297 keyRef.current = null; 7298 onNavigate(); 7299 } 7300 }; 7301 waitForListPopulated(); 7302 } 7303 } else if (!isIndexOutOfListBounds(listRef.current, activeIndex)) { 7304 indexRef.current = activeIndex; 7305 focusItem(); 7306 forceScrollIntoViewRef.current = false; 7307 } 7308 }, [enabled, open2, floatingElement, activeIndex, selectedIndexRef, nested, listRef, triggerOrientation, rtl, onNavigate, focusItem, waitForListPopulatedFrame]); 7309 useIsoLayoutEffect(() => { 7310 if (!enabled || floatingElement || !tree || virtual || !previousMountedRef.current) { 7311 return; 7312 } 7313 const nodes = tree.nodesRef.current; 7314 const parent = nodes.find((node) => node.id === parentId)?.context?.elements.floating; 7315 const activeEl = activeElement(ownerDocument(domReferenceElement ?? parent ?? null)); 7316 const treeContainsActiveEl = nodes.some((node) => node.context && contains(node.context.elements.floating, activeEl)); 7317 if (parent && !treeContainsActiveEl && isPointerModalityRef.current) { 7318 parent.focus({ 7319 preventScroll: true 7320 }); 7321 } 7322 }, [enabled, floatingElement, domReferenceElement, tree, parentId, virtual]); 7323 useIsoLayoutEffect(() => { 7324 previousOpenRef.current = open2; 7325 previousMountedRef.current = !!floatingElement; 7326 }); 7327 const hasActiveIndex = activeIndex != null; 7328 const syncCurrentTarget = useStableCallback((event) => { 7329 if (!latestOpenRef.current) { 7330 return; 7331 } 7332 const index2 = listRef.current.indexOf(event.currentTarget); 7333 if (index2 !== -1 && (indexRef.current !== index2 || activeIndex !== index2)) { 7334 indexRef.current = index2; 7335 onNavigate(event); 7336 } 7337 }); 7338 const getParentOrientation = useStableCallback(() => { 7339 return parentOrientation ?? tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.dataRef?.current.orientation; 7340 }); 7341 const getMinEnabledIndex = useStableCallback(() => { 7342 return getMinListIndex(listRef, disabledIndicesRef.current); 7343 }); 7344 const commonOnKeyDown = useStableCallback((event) => { 7345 isPointerModalityRef.current = false; 7346 forceSyncFocusRef.current = true; 7347 if (event.which === 229) { 7348 return; 7349 } 7350 if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) { 7351 return; 7352 } 7353 if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl, isGrid)) { 7354 if (!isMainOrientationKey(event.key, getParentOrientation())) { 7355 stopEvent(event); 7356 } 7357 store.setOpen(false, createChangeEventDetails(reason_parts_exports.listNavigation, event.nativeEvent)); 7358 const returnElement = nestedReturnFocusRef?.current ?? domReferenceElement; 7359 if (isHTMLElement(returnElement)) { 7360 returnElement.focus(); 7361 } 7362 return; 7363 } 7364 if (activeIndex != null && activeIndex !== indexRef.current && !isIndexOutOfListBounds(listRef.current, activeIndex)) { 7365 indexRef.current = activeIndex; 7366 } 7367 const currentIndex = indexRef.current; 7368 const minIndex = getMinListIndex(listRef, disabledIndices); 7369 const maxIndex = getMaxListIndex(listRef, disabledIndices); 7370 if (!typeableComboboxReference) { 7371 if (event.key === "Home") { 7372 stopEvent(event); 7373 indexRef.current = minIndex; 7374 onNavigate(event); 7375 } 7376 if (event.key === "End") { 7377 stopEvent(event); 7378 indexRef.current = maxIndex; 7379 onNavigate(event); 7380 } 7381 } 7382 if (navigateGrid != null) { 7383 const index2 = navigateGrid(event, indexRef.current, listRef, orientation, loopFocus, rtl, disabledIndices, minIndex, maxIndex); 7384 if (index2 != null && index2 !== indexRef.current) { 7385 indexRef.current = index2; 7386 onNavigate(event); 7387 } 7388 if (orientation === "both") { 7389 return; 7390 } 7391 } 7392 if (isMainOrientationKey(event.key, orientation)) { 7393 stopEvent(event); 7394 const focusedElement = activeElement(event.currentTarget.ownerDocument); 7395 if (open2 && !virtual && contains(event.currentTarget, focusedElement) && !listRef.current.some((item2) => item2 != null && contains(item2, focusedElement))) { 7396 indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex; 7397 onNavigate(event); 7398 if (activeIndex === indexRef.current) { 7399 focusItem(); 7400 } 7401 return; 7402 } 7403 const { 7404 index: index2, 7405 wrapped 7406 } = getNextListIndex(listRef.current, currentIndex, { 7407 decrement: !isMainOrientationToEndKey(event.key, orientation, rtl), 7408 loopFocus, 7409 allowEscape, 7410 disabledIndices, 7411 minIndex, 7412 maxIndex 7413 }); 7414 if (wrapped) { 7415 forceSyncFocusRef.current = false; 7416 } 7417 indexRef.current = index2; 7418 onNavigate(event); 7419 } 7420 }); 7421 const item = React36.useMemo(() => { 7422 const itemProps = { 7423 onFocus(event) { 7424 forceSyncFocusRef.current = true; 7425 syncCurrentTarget(event); 7426 }, 7427 onClick({ 7428 currentTarget 7429 }) { 7430 if (!virtual) { 7431 currentTarget.focus({ 7432 preventScroll: true 7433 }); 7434 } 7435 }, 7436 onMouseMove(event) { 7437 if (isStationaryWebKitPointer(event)) { 7438 return; 7439 } 7440 forceSyncFocusRef.current = true; 7441 forceScrollIntoViewRef.current = false; 7442 if (focusItemOnHover) { 7443 syncCurrentTarget(event); 7444 } 7445 }, 7446 onPointerLeave(event) { 7447 if (!latestOpenRef.current || !isPointerModalityRef.current || event.pointerType === "touch") { 7448 return; 7449 } 7450 forceSyncFocusRef.current = true; 7451 const relatedTarget = event.relatedTarget; 7452 if (!focusItemOnHover || listRef.current.includes(relatedTarget)) { 7453 return; 7454 } 7455 if (!resetOnPointerLeaveRef.current) { 7456 return; 7457 } 7458 cancelQueuedFocusRef.current?.(); 7459 cancelQueuedFocusRef.current = null; 7460 indexRef.current = -1; 7461 onNavigate(event); 7462 if (!virtual) { 7463 const floatingFocusEl = floatingFocusElementRef.current; 7464 const activeEl = activeElement(ownerDocument(floatingFocusEl)); 7465 if (floatingFocusEl && contains(floatingFocusEl, activeEl)) { 7466 floatingFocusEl.focus({ 7467 preventScroll: true 7468 }); 7469 } 7470 } 7471 } 7472 }; 7473 return itemProps; 7474 }, [syncCurrentTarget, latestOpenRef, floatingFocusElementRef, focusItemOnHover, listRef, onNavigate, resetOnPointerLeaveRef, virtual]); 7475 const ariaActiveDescendantProp = React36.useMemo(() => { 7476 return virtual && open2 && hasActiveIndex && { 7477 "aria-activedescendant": `$id}-$activeIndex}` 7478 }; 7479 }, [virtual, open2, hasActiveIndex, id, activeIndex]); 7480 const floating = React36.useMemo(() => { 7481 return { 7482 ...!typeableComboboxReference ? ariaActiveDescendantProp : {}, 7483 onKeyDown(event) { 7484 if (event.key === "Tab" && event.shiftKey && open2 && !virtual) { 7485 const target = getTarget(event.nativeEvent); 7486 if (target && !contains(floatingFocusElementRef.current, target)) { 7487 return; 7488 } 7489 stopEvent(event); 7490 const details = createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent); 7491 store.setOpen(false, details); 7492 const returnElement = nestedReturnFocusRef?.current ?? domReferenceElement; 7493 if (!details.isCanceled && isHTMLElement(returnElement)) { 7494 returnElement.focus(); 7495 } 7496 return; 7497 } 7498 commonOnKeyDown(event); 7499 }, 7500 onPointerMove(event) { 7501 if (isStationaryWebKitPointer(event)) { 7502 return; 7503 } 7504 isPointerModalityRef.current = true; 7505 } 7506 }; 7507 }, [ariaActiveDescendantProp, commonOnKeyDown, floatingFocusElementRef, typeableComboboxReference, store, open2, virtual, domReferenceElement, nestedReturnFocusRef]); 7508 const trigger = React36.useMemo(() => { 7509 function openOnNavigationKeyDown(event) { 7510 store.setOpen(true, createChangeEventDetails(reason_parts_exports.listNavigation, event.nativeEvent, event.currentTarget)); 7511 } 7512 function checkVirtualMouse(event) { 7513 if (focusItemOnOpen === "auto" && isVirtualClick(event.nativeEvent)) { 7514 focusItemOnOpenRef.current = !virtual; 7515 } 7516 } 7517 function checkVirtualPointer(event) { 7518 focusItemOnOpenRef.current = focusItemOnOpen; 7519 if (focusItemOnOpen === "auto" && isVirtualPointerEvent(event.nativeEvent)) { 7520 focusItemOnOpenRef.current = true; 7521 } 7522 } 7523 return { 7524 onKeyDown(event) { 7525 const currentOpen = store.select("open"); 7526 isPointerModalityRef.current = false; 7527 const isArrowKey = event.key.startsWith("Arrow"); 7528 const isParentCrossOpenKey = isCrossOrientationOpenKey(event.key, getParentOrientation(), rtl); 7529 const isMainKey = isMainOrientationKey(event.key, currentOpen ? orientation : triggerOrientation); 7530 const isNavigationKey = (nested ? isParentCrossOpenKey : isMainKey) || event.key === "Enter" || event.key.trim() === ""; 7531 if (virtual && currentOpen && (!nested || isTypeableElement(event.currentTarget))) { 7532 return commonOnKeyDown(event); 7533 } 7534 if (!currentOpen && !openOnArrowKeyDown && isArrowKey) { 7535 return void 0; 7536 } 7537 if (isNavigationKey) { 7538 const isParentMainKey = isMainOrientationKey(event.key, getParentOrientation()); 7539 keyRef.current = nested && isParentMainKey ? null : event.key; 7540 } 7541 if (nested) { 7542 if (isParentCrossOpenKey) { 7543 stopEvent(event); 7544 if (currentOpen) { 7545 indexRef.current = getMinEnabledIndex(); 7546 onNavigate(event); 7547 if (virtual) { 7548 floatingFocusElementRef.current?.focus(); 7549 } 7550 } else { 7551 openOnNavigationKeyDown(event); 7552 } 7553 } 7554 return void 0; 7555 } 7556 if (isMainKey) { 7557 if (selectedIndexRef.current != null) { 7558 indexRef.current = selectedIndexRef.current; 7559 } 7560 stopEvent(event); 7561 if (!currentOpen && openOnArrowKeyDown) { 7562 openOnNavigationKeyDown(event); 7563 } else { 7564 commonOnKeyDown(event); 7565 } 7566 if (currentOpen) { 7567 onNavigate(event); 7568 } 7569 } 7570 return void 0; 7571 }, 7572 onFocus(event) { 7573 if (event.target !== event.currentTarget) { 7574 return; 7575 } 7576 if (store.select("open") && !virtual) { 7577 indexRef.current = -1; 7578 onNavigate(event); 7579 } 7580 }, 7581 onPointerDown: checkVirtualPointer, 7582 onPointerEnter: checkVirtualPointer, 7583 onMouseDown: checkVirtualMouse, 7584 onClick: checkVirtualMouse 7585 }; 7586 }, [commonOnKeyDown, focusItemOnOpen, getMinEnabledIndex, nested, onNavigate, store, openOnArrowKeyDown, orientation, triggerOrientation, getParentOrientation, rtl, selectedIndexRef, virtual, floatingFocusElementRef]); 7587 const reference = React36.useMemo(() => { 7588 return { 7589 ...ariaActiveDescendantProp, 7590 ...trigger 7591 }; 7592 }, [ariaActiveDescendantProp, trigger]); 7593 return React36.useMemo(() => enabled ? { 7594 reference, 7595 floating, 7596 item, 7597 trigger 7598 } : {}, [enabled, reference, floating, trigger, item]); 7599 } 7600 7601 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useTypeahead.mjs 7602 var React37 = __toESM(require_react(), 1); 7603 function useTypeahead(store, props) { 7604 const { 7605 listRef, 7606 elementsRef, 7607 activeIndex, 7608 onMatch: onMatchProp, 7609 disabledIndices, 7610 onTyping: onTypingProp, 7611 enabled = true, 7612 resetMs = 750, 7613 selectedIndex = null 7614 } = props; 7615 const onTyping = useStableCallback(onTypingProp); 7616 const open2 = store.useState("open"); 7617 const timeout = useTimeout(); 7618 const stringRef = React37.useRef(""); 7619 const prevIndexRef = React37.useRef(selectedIndex ?? activeIndex ?? -1); 7620 const matchIndexRef = React37.useRef(null); 7621 const onKeyDown = useStableCallback((event) => { 7622 function getElement(index3) { 7623 return elementsRef?.current[index3]; 7624 } 7625 function isItemAvailable(index3) { 7626 const element = getElement(index3); 7627 if (element && !isElementVisible(element) || element?.matches(":disabled")) { 7628 return false; 7629 } 7630 return disabledIndices == null || !isListIndexDisabled(EMPTY_ARRAY, index3, disabledIndices); 7631 } 7632 function getMatchingIndex(list, string, startIndex2 = 0) { 7633 if (list.length === 0) { 7634 return -1; 7635 } 7636 const normalizedStartIndex = (startIndex2 % list.length + list.length) % list.length; 7637 const lowerString = string.toLowerCase(); 7638 for (let offset4 = 0; offset4 < list.length; offset4 += 1) { 7639 const index3 = (normalizedStartIndex + offset4) % list.length; 7640 const text = list[index3]; 7641 if (!text?.toLowerCase().startsWith(lowerString) || !isItemAvailable(index3)) { 7642 continue; 7643 } 7644 return index3; 7645 } 7646 return -1; 7647 } 7648 const listContent = listRef.current; 7649 if (stringRef.current.length > 0 && event.key === " ") { 7650 stopEvent(event); 7651 onTyping?.(true); 7652 } 7653 if (stringRef.current.length > 0 && stringRef.current[0] !== " ") { 7654 if (getMatchingIndex(listContent, stringRef.current) === -1 && event.key !== " ") { 7655 onTyping?.(false); 7656 } 7657 } 7658 if (listContent == null || // Character key. 7659 event.key.length !== 1 || // Modifier key. 7660 event.ctrlKey || event.metaKey || event.altKey) { 7661 return; 7662 } 7663 if (open2 && event.key !== " ") { 7664 stopEvent(event); 7665 onTyping?.(true); 7666 } 7667 const isNewSession = stringRef.current === ""; 7668 if (isNewSession) { 7669 prevIndexRef.current = selectedIndex ?? activeIndex ?? -1; 7670 } 7671 const allowRapidSuccessionOfFirstLetter = listContent.every((text, index3) => text && isItemAvailable(index3) ? text[0]?.toLowerCase() !== text[1]?.toLowerCase() : true); 7672 if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) { 7673 stringRef.current = ""; 7674 prevIndexRef.current = matchIndexRef.current; 7675 } 7676 stringRef.current += event.key; 7677 timeout.start(resetMs, () => { 7678 stringRef.current = ""; 7679 prevIndexRef.current = matchIndexRef.current; 7680 onTyping?.(false); 7681 }); 7682 const prevIndex = isNewSession ? selectedIndex ?? activeIndex ?? -1 : prevIndexRef.current; 7683 const startIndex = (prevIndex ?? 0) + 1; 7684 const index2 = getMatchingIndex(listContent, stringRef.current, startIndex); 7685 if (index2 !== -1) { 7686 onMatchProp?.(index2, event); 7687 matchIndexRef.current = index2; 7688 } else if (event.key !== " ") { 7689 stringRef.current = ""; 7690 onTyping?.(false); 7691 } 7692 }); 7693 const onBlur = useStableCallback((event) => { 7694 const next = event.relatedTarget; 7695 const currentDomReferenceElement = store.select("domReferenceElement"); 7696 const currentFloatingElement = store.select("floatingElement"); 7697 const withinComposite = contains(currentDomReferenceElement, next) || contains(currentFloatingElement, next); 7698 if (withinComposite) { 7699 return; 7700 } 7701 timeout.clear(); 7702 stringRef.current = ""; 7703 prevIndexRef.current = matchIndexRef.current; 7704 onTyping?.(false); 7705 }); 7706 useIsoLayoutEffect(() => { 7707 if (!open2 && selectedIndex !== null) { 7708 return; 7709 } 7710 timeout.clear(); 7711 matchIndexRef.current = null; 7712 if (stringRef.current !== "") { 7713 stringRef.current = ""; 7714 onTyping?.(false); 7715 } 7716 }, [open2, selectedIndex, timeout, onTyping]); 7717 const sharedProps = React37.useMemo(() => ({ 7718 onKeyDown, 7719 onBlur 7720 }), [onKeyDown, onBlur]); 7721 return React37.useMemo(() => enabled ? { 7722 reference: sharedProps, 7723 floating: sharedProps 7724 } : {}, [enabled, sharedProps]); 7725 } 7726 7727 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs 7728 var CURSOR_SPEED_THRESHOLD = 0.1; 7729 var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD; 7730 var POLYGON_BUFFER = 0.5; 7731 function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) { 7732 return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi; 7733 } 7734 function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) { 7735 let isInsideValue = false; 7736 if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) { 7737 isInsideValue = !isInsideValue; 7738 } 7739 if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) { 7740 isInsideValue = !isInsideValue; 7741 } 7742 if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) { 7743 isInsideValue = !isInsideValue; 7744 } 7745 if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) { 7746 isInsideValue = !isInsideValue; 7747 } 7748 return isInsideValue; 7749 } 7750 function isInsideRect(pointX, pointY, rect) { 7751 return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height; 7752 } 7753 function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) { 7754 const minX = Math.min(x1, x2); 7755 const maxX = Math.max(x1, x2); 7756 const minY = Math.min(y1, y2); 7757 const maxY = Math.max(y1, y2); 7758 return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY; 7759 } 7760 function safePolygon(options = {}) { 7761 const { 7762 blockPointerEvents = false 7763 } = options; 7764 const timeout = new Timeout(); 7765 const fn = ({ 7766 x: x2, 7767 y: y2, 7768 placement, 7769 elements, 7770 onClose, 7771 nodeId, 7772 tree 7773 }) => { 7774 const side = placement?.split("-")[0]; 7775 let hasLanded = false; 7776 let lastX = null; 7777 let lastY = null; 7778 let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0; 7779 function isCursorMovingSlowly(nextX, nextY) { 7780 const currentTime = performance.now(); 7781 const elapsedTime = currentTime - lastCursorTime; 7782 if (lastX === null || lastY === null || elapsedTime === 0) { 7783 lastX = nextX; 7784 lastY = nextY; 7785 lastCursorTime = currentTime; 7786 return false; 7787 } 7788 const deltaX = nextX - lastX; 7789 const deltaY = nextY - lastY; 7790 const distanceSquared = deltaX * deltaX + deltaY * deltaY; 7791 const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED; 7792 lastX = nextX; 7793 lastY = nextY; 7794 lastCursorTime = currentTime; 7795 return distanceSquared < thresholdSquared; 7796 } 7797 function close() { 7798 timeout.clear(); 7799 onClose(); 7800 } 7801 return function onMouseMove(event) { 7802 timeout.clear(); 7803 const domReference = elements.domReference; 7804 const floating = elements.floating; 7805 if (!domReference || !floating || side == null || x2 == null || y2 == null) { 7806 return void 0; 7807 } 7808 const { 7809 clientX, 7810 clientY 7811 } = event; 7812 const target = getTarget(event); 7813 const isLeave = event.type === "mouseleave"; 7814 const isOverFloatingEl = contains(floating, target); 7815 const isOverReferenceEl = contains(domReference, target); 7816 if (isOverFloatingEl) { 7817 hasLanded = true; 7818 if (!isLeave) { 7819 return void 0; 7820 } 7821 } 7822 if (isOverReferenceEl) { 7823 hasLanded = false; 7824 if (!isLeave) { 7825 hasLanded = true; 7826 return void 0; 7827 } 7828 } 7829 if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) { 7830 return void 0; 7831 } 7832 function hasOpenChildNode() { 7833 return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0); 7834 } 7835 function closeIfNoOpenChild() { 7836 if (!hasOpenChildNode()) { 7837 close(); 7838 } 7839 } 7840 if (hasOpenChildNode()) { 7841 return void 0; 7842 } 7843 const refRect = domReference.getBoundingClientRect(); 7844 const rect = floating.getBoundingClientRect(); 7845 const cursorLeaveFromRight = x2 > rect.right - rect.width / 2; 7846 const cursorLeaveFromBottom = y2 > rect.bottom - rect.height / 2; 7847 const isFloatingWider = rect.width > refRect.width; 7848 const isFloatingTaller = rect.height > refRect.height; 7849 const left = (isFloatingWider ? refRect : rect).left; 7850 const right = (isFloatingWider ? refRect : rect).right; 7851 const top = (isFloatingTaller ? refRect : rect).top; 7852 const bottom = (isFloatingTaller ? refRect : rect).bottom; 7853 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) { 7854 closeIfNoOpenChild(); 7855 return void 0; 7856 } 7857 let isInsideTroughRect = false; 7858 switch (side) { 7859 case "top": 7860 isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1); 7861 break; 7862 case "bottom": 7863 isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1); 7864 break; 7865 case "left": 7866 isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top); 7867 break; 7868 case "right": 7869 isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top); 7870 break; 7871 default: 7872 } 7873 if (isInsideTroughRect) { 7874 return void 0; 7875 } 7876 if (hasLanded && !isInsideRect(clientX, clientY, refRect)) { 7877 closeIfNoOpenChild(); 7878 return void 0; 7879 } 7880 if (!isLeave && isCursorMovingSlowly(clientX, clientY)) { 7881 closeIfNoOpenChild(); 7882 return void 0; 7883 } 7884 let isInsidePolygon = false; 7885 switch (side) { 7886 case "top": { 7887 const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4; 7888 const cursorPointOneX = isFloatingWider ? x2 + cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset; 7889 const cursorPointTwoX = isFloatingWider ? x2 - cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset; 7890 const cursorPointY = y2 + POLYGON_BUFFER + 1; 7891 const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top; 7892 const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER; 7893 isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight); 7894 break; 7895 } 7896 case "bottom": { 7897 const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4; 7898 const cursorPointOneX = isFloatingWider ? x2 + cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset; 7899 const cursorPointTwoX = isFloatingWider ? x2 - cursorXOffset : cursorLeaveFromRight ? x2 + cursorXOffset : x2 - cursorXOffset; 7900 const cursorPointY = y2 - POLYGON_BUFFER; 7901 const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom; 7902 const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER; 7903 isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight); 7904 break; 7905 } 7906 case "left": { 7907 const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4; 7908 const cursorPointOneY = isFloatingTaller ? y2 + cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset; 7909 const cursorPointTwoY = isFloatingTaller ? y2 - cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset; 7910 const cursorPointX = x2 + POLYGON_BUFFER + 1; 7911 const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left; 7912 const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER; 7913 isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY); 7914 break; 7915 } 7916 case "right": { 7917 const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4; 7918 const cursorPointOneY = isFloatingTaller ? y2 + cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset; 7919 const cursorPointTwoY = isFloatingTaller ? y2 - cursorYOffset : cursorLeaveFromBottom ? y2 + cursorYOffset : y2 - cursorYOffset; 7920 const cursorPointX = x2 - POLYGON_BUFFER; 7921 const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right; 7922 const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER; 7923 isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom); 7924 break; 7925 } 7926 default: 7927 } 7928 if (!isInsidePolygon) { 7929 closeIfNoOpenChild(); 7930 } else if (!hasLanded) { 7931 timeout.start(40, closeIfNoOpenChild); 7932 } 7933 return void 0; 7934 }; 7935 }; 7936 fn.__options = { 7937 ...options, 7938 blockPointerEvents 7939 }; 7940 return fn; 7941 } 7942 7943 // node_modules/.store/@floating-ui/core@1.8.0-3V8aS7jJHHGcsCINjP9-5A/node_modules/@floating-ui/core/dist/floating-ui.core.mjs 7944 function computeCoordsFromPlacement(_ref, placement, rtl) { 7945 let { 7946 reference, 7947 floating 7948 } = _ref; 7949 const sideAxis = getSideAxis(placement); 7950 const alignmentAxis = getAlignmentAxis(placement); 7951 const alignLength = getAxisLength(alignmentAxis); 7952 const side = getSide(placement); 7953 const isVertical = sideAxis === "y"; 7954 const commonX = reference.x + reference.width / 2 - floating.width / 2; 7955 const commonY = reference.y + reference.height / 2 - floating.height / 2; 7956 const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; 7957 let coords; 7958 switch (side) { 7959 case "top": 7960 coords = { 7961 x: commonX, 7962 y: reference.y - floating.height 7963 }; 7964 break; 7965 case "bottom": 7966 coords = { 7967 x: commonX, 7968 y: reference.y + reference.height 7969 }; 7970 break; 7971 case "right": 7972 coords = { 7973 x: reference.x + reference.width, 7974 y: commonY 7975 }; 7976 break; 7977 case "left": 7978 coords = { 7979 x: reference.x - floating.width, 7980 y: commonY 7981 }; 7982 break; 7983 default: 7984 coords = { 7985 x: reference.x, 7986 y: reference.y 7987 }; 7988 } 7989 const alignment = getAlignment(placement); 7990 if (alignment) { 7991 coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1); 7992 } 7993 return coords; 7994 } 7995 async function detectOverflow(state, options) { 7996 var _await$platform$isEle; 7997 if (options === void 0) { 7998 options = {}; 7999 } 8000 const { 8001 x: x2, 8002 y: y2, 8003 platform: platform3, 8004 rects, 8005 elements, 8006 strategy 8007 } = state; 8008 const { 8009 boundary = "clippingAncestors", 8010 rootBoundary = "viewport", 8011 elementContext = "floating", 8012 altBoundary = false, 8013 padding = 0 8014 } = evaluate(options, state); 8015 const paddingObject = getPaddingObject(padding); 8016 const altContext = elementContext === "floating" ? "reference" : "floating"; 8017 const element = elements[altBoundary ? altContext : elementContext]; 8018 const clippingClientRect = rectToClientRect(await platform3.getClippingRect({ 8019 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(elements.floating)), 8020 boundary, 8021 rootBoundary, 8022 strategy 8023 })); 8024 const rect = elementContext === "floating" ? { 8025 x: x2, 8026 y: y2, 8027 width: rects.floating.width, 8028 height: rects.floating.height 8029 } : rects.reference; 8030 const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating)); 8031 const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || { 8032 x: 1, 8033 y: 1 8034 }; 8035 const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({ 8036 elements, 8037 rect, 8038 offsetParent, 8039 strategy 8040 }) : rect); 8041 return { 8042 top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, 8043 bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, 8044 left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, 8045 right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x 8046 }; 8047 } 8048 var MAX_RESET_COUNT = 50; 8049 var computePosition = async (reference, floating, config) => { 8050 const { 8051 placement = "bottom", 8052 strategy = "absolute", 8053 middleware = [], 8054 platform: platform3 8055 } = config; 8056 const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : { 8057 ...platform3, 8058 detectOverflow 8059 }; 8060 const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating)); 8061 let rects = await platform3.getElementRects({ 8062 reference, 8063 floating, 8064 strategy 8065 }); 8066 let { 8067 x: x2, 8068 y: y2 8069 } = computeCoordsFromPlacement(rects, placement, rtl); 8070 let statefulPlacement = placement; 8071 let resetCount = 0; 8072 const middlewareData = {}; 8073 for (let i = 0; i < middleware.length; i++) { 8074 const currentMiddleware = middleware[i]; 8075 if (!currentMiddleware) { 8076 continue; 8077 } 8078 const { 8079 name: name2, 8080 fn 8081 } = currentMiddleware; 8082 const { 8083 x: nextX, 8084 y: nextY, 8085 data, 8086 reset 8087 } = await fn({ 8088 x: x2, 8089 y: y2, 8090 initialPlacement: placement, 8091 placement: statefulPlacement, 8092 strategy, 8093 middlewareData, 8094 rects, 8095 platform: platformWithDetectOverflow, 8096 elements: { 8097 reference, 8098 floating 8099 } 8100 }); 8101 x2 = nextX != null ? nextX : x2; 8102 y2 = nextY != null ? nextY : y2; 8103 middlewareData[name2] = { 8104 ...middlewareData[name2], 8105 ...data 8106 }; 8107 if (reset && resetCount < MAX_RESET_COUNT) { 8108 resetCount++; 8109 if (typeof reset === "object") { 8110 if (reset.placement) { 8111 statefulPlacement = reset.placement; 8112 } 8113 if (reset.rects) { 8114 rects = reset.rects === true ? await platform3.getElementRects({ 8115 reference, 8116 floating, 8117 strategy 8118 }) : reset.rects; 8119 } 8120 ({ 8121 x: x2, 8122 y: y2 8123 } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); 8124 } 8125 i = -1; 8126 } 8127 } 8128 return { 8129 x: x2, 8130 y: y2, 8131 placement: statefulPlacement, 8132 strategy, 8133 middlewareData 8134 }; 8135 }; 8136 var flip = function(options) { 8137 if (options === void 0) { 8138 options = {}; 8139 } 8140 return { 8141 name: "flip", 8142 options, 8143 async fn(state) { 8144 var _middlewareData$arrow, _middlewareData$flip; 8145 const { 8146 placement, 8147 middlewareData, 8148 rects, 8149 initialPlacement, 8150 platform: platform3, 8151 elements 8152 } = state; 8153 const { 8154 mainAxis: checkMainAxis = true, 8155 crossAxis: checkCrossAxis = true, 8156 fallbackPlacements: specifiedFallbackPlacements, 8157 fallbackStrategy = "bestFit", 8158 fallbackAxisSideDirection = "none", 8159 flipAlignment = true, 8160 ...detectOverflowOptions 8161 } = evaluate(options, state); 8162 if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { 8163 return {}; 8164 } 8165 const side = getSide(placement); 8166 const initialSideAxis = getSideAxis(initialPlacement); 8167 const isBasePlacement = getSide(initialPlacement) === initialPlacement; 8168 const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)); 8169 const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)); 8170 const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none"; 8171 if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) { 8172 fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); 8173 } 8174 const placements2 = [initialPlacement, ...fallbackPlacements]; 8175 const overflow = await platform3.detectOverflow(state, detectOverflowOptions); 8176 const overflows = []; 8177 let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; 8178 if (checkMainAxis) { 8179 overflows.push(overflow[side]); 8180 } 8181 if (checkCrossAxis) { 8182 const sides2 = getAlignmentSides(placement, rects, rtl); 8183 overflows.push(overflow[sides2[0]], overflow[sides2[1]]); 8184 } 8185 overflowsData = [...overflowsData, { 8186 placement, 8187 overflows 8188 }]; 8189 if (!overflows.every((side2) => side2 <= 0)) { 8190 var _middlewareData$flip2, _overflowsData$filter; 8191 const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; 8192 const nextPlacement = placements2[nextIndex]; 8193 if (nextPlacement) { 8194 const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false; 8195 if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis 8196 // overflows the main axis. 8197 overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) { 8198 return { 8199 data: { 8200 index: nextIndex, 8201 overflows: overflowsData 8202 }, 8203 reset: { 8204 placement: nextPlacement 8205 } 8206 }; 8207 } 8208 } 8209 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; 8210 if (!resetPlacement) { 8211 switch (fallbackStrategy) { 8212 case "bestFit": { 8213 var _overflowsData$filter2; 8214 const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => { 8215 if (hasFallbackAxisSideDirection) { 8216 const currentSideAxis = getSideAxis(d.placement); 8217 return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal 8218 // reading directions favoring greater width. 8219 currentSideAxis === "y"; 8220 } 8221 return true; 8222 }).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]; 8223 if (placement2) { 8224 resetPlacement = placement2; 8225 } 8226 break; 8227 } 8228 case "initialPlacement": 8229 resetPlacement = initialPlacement; 8230 break; 8231 } 8232 } 8233 if (placement !== resetPlacement) { 8234 return { 8235 reset: { 8236 placement: resetPlacement 8237 } 8238 }; 8239 } 8240 } 8241 return {}; 8242 } 8243 }; 8244 }; 8245 var originSides = /* @__PURE__ */ new Set(["left", "top"]); 8246 async function convertValueToCoords(state, options) { 8247 const { 8248 placement, 8249 platform: platform3, 8250 elements 8251 } = state; 8252 const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)); 8253 const side = getSide(placement); 8254 const alignment = getAlignment(placement); 8255 const isVertical = getSideAxis(placement) === "y"; 8256 const mainAxisMulti = originSides.has(side) ? -1 : 1; 8257 const crossAxisMulti = rtl && isVertical ? -1 : 1; 8258 const rawValue = evaluate(options, state); 8259 let { 8260 mainAxis, 8261 crossAxis, 8262 alignmentAxis 8263 } = typeof rawValue === "number" ? { 8264 mainAxis: rawValue, 8265 crossAxis: 0, 8266 alignmentAxis: null 8267 } : { 8268 mainAxis: rawValue.mainAxis || 0, 8269 crossAxis: rawValue.crossAxis || 0, 8270 alignmentAxis: rawValue.alignmentAxis 8271 }; 8272 if (alignment && typeof alignmentAxis === "number") { 8273 crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis; 8274 } 8275 return isVertical ? { 8276 x: crossAxis * crossAxisMulti, 8277 y: mainAxis * mainAxisMulti 8278 } : { 8279 x: mainAxis * mainAxisMulti, 8280 y: crossAxis * crossAxisMulti 8281 }; 8282 } 8283 var offset = function(options) { 8284 if (options === void 0) { 8285 options = 0; 8286 } 8287 return { 8288 name: "offset", 8289 options, 8290 async fn(state) { 8291 var _middlewareData$offse, _middlewareData$arrow; 8292 const { 8293 x: x2, 8294 y: y2, 8295 placement, 8296 middlewareData 8297 } = state; 8298 const diffCoords = await convertValueToCoords(state, options); 8299 if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { 8300 return {}; 8301 } 8302 return { 8303 x: x2 + diffCoords.x, 8304 y: y2 + diffCoords.y, 8305 data: { 8306 ...diffCoords, 8307 placement 8308 } 8309 }; 8310 } 8311 }; 8312 }; 8313 var shift = function(options) { 8314 if (options === void 0) { 8315 options = {}; 8316 } 8317 return { 8318 name: "shift", 8319 options, 8320 async fn(state) { 8321 const { 8322 x: x2, 8323 y: y2, 8324 placement, 8325 platform: platform3 8326 } = state; 8327 const { 8328 mainAxis: checkMainAxis = true, 8329 crossAxis: checkCrossAxis = false, 8330 limiter = { 8331 fn: (_ref) => { 8332 let { 8333 x: x3, 8334 y: y3 8335 } = _ref; 8336 return { 8337 x: x3, 8338 y: y3 8339 }; 8340 } 8341 }, 8342 ...detectOverflowOptions 8343 } = evaluate(options, state); 8344 const coords = { 8345 x: x2, 8346 y: y2 8347 }; 8348 const overflow = await platform3.detectOverflow(state, detectOverflowOptions); 8349 const crossAxis = getSideAxis(placement); 8350 const mainAxis = getOppositeAxis(crossAxis); 8351 let mainAxisCoord = coords[mainAxis]; 8352 let crossAxisCoord = coords[crossAxis]; 8353 const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]); 8354 if (checkMainAxis) { 8355 mainAxisCoord = clampCoord(mainAxis, mainAxisCoord); 8356 } 8357 if (checkCrossAxis) { 8358 crossAxisCoord = clampCoord(crossAxis, crossAxisCoord); 8359 } 8360 const limitedCoords = limiter.fn({ 8361 ...state, 8362 [mainAxis]: mainAxisCoord, 8363 [crossAxis]: crossAxisCoord 8364 }); 8365 return { 8366 ...limitedCoords, 8367 data: { 8368 x: limitedCoords.x - x2, 8369 y: limitedCoords.y - y2, 8370 enabled: { 8371 [mainAxis]: checkMainAxis, 8372 [crossAxis]: checkCrossAxis 8373 } 8374 } 8375 }; 8376 } 8377 }; 8378 }; 8379 var limitShift = function(options) { 8380 if (options === void 0) { 8381 options = {}; 8382 } 8383 return { 8384 options, 8385 fn(state) { 8386 var _rawOffset$mainAxis, _rawOffset$crossAxis; 8387 const { 8388 x: x2, 8389 y: y2, 8390 placement, 8391 rects, 8392 middlewareData 8393 } = state; 8394 const { 8395 offset: offset4 = 0, 8396 mainAxis: checkMainAxis = true, 8397 crossAxis: checkCrossAxis = true 8398 } = evaluate(options, state); 8399 const coords = { 8400 x: x2, 8401 y: y2 8402 }; 8403 const crossAxis = getSideAxis(placement); 8404 const mainAxis = getOppositeAxis(crossAxis); 8405 let mainAxisCoord = coords[mainAxis]; 8406 let crossAxisCoord = coords[crossAxis]; 8407 const rawOffset = evaluate(offset4, state); 8408 const computedOffset = typeof rawOffset === "number" ? { 8409 mainAxis: rawOffset, 8410 crossAxis: 0 8411 } : { 8412 mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0, 8413 crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0 8414 }; 8415 if (checkMainAxis) { 8416 const len = mainAxis === "y" ? "height" : "width"; 8417 const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis; 8418 const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis; 8419 if (mainAxisCoord < limitMin) { 8420 mainAxisCoord = limitMin; 8421 } else if (mainAxisCoord > limitMax) { 8422 mainAxisCoord = limitMax; 8423 } 8424 } 8425 if (checkCrossAxis) { 8426 var _middlewareData$offse, _middlewareData$offse2; 8427 const len = mainAxis === "y" ? "width" : "height"; 8428 const isOriginSide = originSides.has(getSide(placement)); 8429 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); 8430 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); 8431 if (crossAxisCoord < limitMin) { 8432 crossAxisCoord = limitMin; 8433 } else if (crossAxisCoord > limitMax) { 8434 crossAxisCoord = limitMax; 8435 } 8436 } 8437 return { 8438 [mainAxis]: mainAxisCoord, 8439 [crossAxis]: crossAxisCoord 8440 }; 8441 } 8442 }; 8443 }; 8444 var size = function(options) { 8445 if (options === void 0) { 8446 options = {}; 8447 } 8448 return { 8449 name: "size", 8450 options, 8451 async fn(state) { 8452 const { 8453 placement, 8454 rects, 8455 platform: platform3, 8456 elements 8457 } = state; 8458 const { 8459 apply = () => { 8460 }, 8461 ...detectOverflowOptions 8462 } = evaluate(options, state); 8463 const overflow = await platform3.detectOverflow(state, detectOverflowOptions); 8464 const side = getSide(placement); 8465 const alignment = getAlignment(placement); 8466 const isYAxis = getSideAxis(placement) === "y"; 8467 const { 8468 width, 8469 height 8470 } = rects.floating; 8471 let heightSide; 8472 let widthSide; 8473 if (side === "top" || side === "bottom") { 8474 heightSide = side; 8475 widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right"; 8476 } else { 8477 widthSide = side; 8478 heightSide = alignment === "end" ? "top" : "bottom"; 8479 } 8480 const maximumClippingHeight = height - overflow.top - overflow.bottom; 8481 const maximumClippingWidth = width - overflow.left - overflow.right; 8482 const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight); 8483 const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth); 8484 const shiftData = state.middlewareData.shift; 8485 const noShift = !shiftData; 8486 let availableHeight2 = overflowAvailableHeight; 8487 let availableWidth2 = overflowAvailableWidth; 8488 if (shiftData != null && shiftData.enabled.x) { 8489 availableWidth2 = maximumClippingWidth; 8490 } 8491 if (shiftData != null && shiftData.enabled.y) { 8492 availableHeight2 = maximumClippingHeight; 8493 } 8494 if (noShift && !alignment) { 8495 if (isYAxis) { 8496 availableWidth2 = width - 2 * max(overflow.left, overflow.right); 8497 } else { 8498 availableHeight2 = height - 2 * max(overflow.top, overflow.bottom); 8499 } 8500 } 8501 await apply({ 8502 ...state, 8503 availableWidth: availableWidth2, 8504 availableHeight: availableHeight2 8505 }); 8506 const nextDimensions = await platform3.getDimensions(elements.floating); 8507 if (width !== nextDimensions.width || height !== nextDimensions.height) { 8508 return { 8509 reset: { 8510 rects: true 8511 } 8512 }; 8513 } 8514 return {}; 8515 } 8516 }; 8517 }; 8518 8519 // node_modules/.store/@floating-ui/dom@1.8.0-vHXcr4FgWneV0cgwFw-d7A/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs 8520 function getCssDimensions(element) { 8521 const css = getComputedStyle2(element); 8522 let width = parseFloat(css.width) || 0; 8523 let height = parseFloat(css.height) || 0; 8524 const hasOffset = isHTMLElement(element); 8525 const offsetWidth = hasOffset ? element.offsetWidth : width; 8526 const offsetHeight = hasOffset ? element.offsetHeight : height; 8527 const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight; 8528 if (shouldFallback) { 8529 width = offsetWidth; 8530 height = offsetHeight; 8531 } 8532 return { 8533 width, 8534 height, 8535 $: shouldFallback 8536 }; 8537 } 8538 function unwrapElement(element) { 8539 return !isElement(element) ? element.contextElement : element; 8540 } 8541 function getScale(element) { 8542 const domElement = unwrapElement(element); 8543 if (!isHTMLElement(domElement)) { 8544 return createCoords(1); 8545 } 8546 const rect = domElement.getBoundingClientRect(); 8547 const { 8548 width, 8549 height, 8550 $: $2 8551 } = getCssDimensions(domElement); 8552 let x2 = ($2 ? round(rect.width) : rect.width) / width; 8553 let y2 = ($2 ? round(rect.height) : rect.height) / height; 8554 if (!x2 || !Number.isFinite(x2)) { 8555 x2 = 1; 8556 } 8557 if (!y2 || !Number.isFinite(y2)) { 8558 y2 = 1; 8559 } 8560 return { 8561 x: x2, 8562 y: y2 8563 }; 8564 } 8565 var noOffsets = /* @__PURE__ */ createCoords(0); 8566 function getVisualOffsets(element) { 8567 const win = getWindow(element); 8568 if (!isWebKit() || !win.visualViewport) { 8569 return noOffsets; 8570 } 8571 return { 8572 x: win.visualViewport.offsetLeft, 8573 y: win.visualViewport.offsetTop 8574 }; 8575 } 8576 function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { 8577 if (isFixed === void 0) { 8578 isFixed = false; 8579 } 8580 return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element); 8581 } 8582 function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { 8583 if (includeScale === void 0) { 8584 includeScale = false; 8585 } 8586 if (isFixedStrategy === void 0) { 8587 isFixedStrategy = false; 8588 } 8589 const clientRect = element.getBoundingClientRect(); 8590 const domElement = unwrapElement(element); 8591 let scale = createCoords(1); 8592 if (includeScale) { 8593 if (offsetParent) { 8594 if (isElement(offsetParent)) { 8595 scale = getScale(offsetParent); 8596 } 8597 } else { 8598 scale = getScale(element); 8599 } 8600 } 8601 const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0); 8602 let x2 = (clientRect.left + visualOffsets.x) / scale.x; 8603 let y2 = (clientRect.top + visualOffsets.y) / scale.y; 8604 let width = clientRect.width / scale.x; 8605 let height = clientRect.height / scale.y; 8606 if (domElement && offsetParent) { 8607 const win = getWindow(domElement); 8608 const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent; 8609 let currentWin = win; 8610 let currentIFrame = getFrameElement(currentWin); 8611 while (currentIFrame && offsetWin !== currentWin) { 8612 const iframeScale = getScale(currentIFrame); 8613 const iframeRect = currentIFrame.getBoundingClientRect(); 8614 const css = getComputedStyle2(currentIFrame); 8615 const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; 8616 const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; 8617 x2 *= iframeScale.x; 8618 y2 *= iframeScale.y; 8619 width *= iframeScale.x; 8620 height *= iframeScale.y; 8621 x2 += left; 8622 y2 += top; 8623 currentWin = getWindow(currentIFrame); 8624 currentIFrame = getFrameElement(currentWin); 8625 } 8626 } 8627 return rectToClientRect({ 8628 width, 8629 height, 8630 x: x2, 8631 y: y2 8632 }); 8633 } 8634 function getWindowScrollBarX(element, rect) { 8635 const leftScroll = getNodeScroll(element).scrollLeft; 8636 if (!rect) { 8637 return getBoundingClientRect(getDocumentElement(element)).left + leftScroll; 8638 } 8639 return rect.left + leftScroll; 8640 } 8641 function getHTMLOffset(documentElement, scroll) { 8642 const htmlRect = documentElement.getBoundingClientRect(); 8643 const x2 = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect); 8644 const y2 = htmlRect.top + scroll.scrollTop; 8645 return { 8646 x: x2, 8647 y: y2 8648 }; 8649 } 8650 function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { 8651 let { 8652 elements, 8653 rect, 8654 offsetParent, 8655 strategy 8656 } = _ref; 8657 const isFixed = strategy === "fixed"; 8658 const documentElement = getDocumentElement(offsetParent); 8659 const topLayer = elements ? isTopLayer(elements.floating) : false; 8660 if (offsetParent === documentElement || topLayer && isFixed) { 8661 return rect; 8662 } 8663 let scroll = { 8664 scrollLeft: 0, 8665 scrollTop: 0 8666 }; 8667 let scale = createCoords(1); 8668 const offsets = createCoords(0); 8669 const isOffsetParentAnElement = isHTMLElement(offsetParent); 8670 if (isOffsetParentAnElement || !isFixed) { 8671 if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { 8672 scroll = getNodeScroll(offsetParent); 8673 } 8674 if (isOffsetParentAnElement) { 8675 const offsetRect = getBoundingClientRect(offsetParent); 8676 scale = getScale(offsetParent); 8677 offsets.x = offsetRect.x + offsetParent.clientLeft; 8678 offsets.y = offsetRect.y + offsetParent.clientTop; 8679 } 8680 } 8681 const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0); 8682 return { 8683 width: rect.width * scale.x, 8684 height: rect.height * scale.y, 8685 x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x, 8686 y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y 8687 }; 8688 } 8689 function getClientRects(element) { 8690 return element.getClientRects ? Array.from(element.getClientRects()) : []; 8691 } 8692 function getDocumentRect(html) { 8693 const scroll = getNodeScroll(html); 8694 const body = html.ownerDocument.body; 8695 const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); 8696 const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); 8697 let x2 = -scroll.scrollLeft + getWindowScrollBarX(html); 8698 const y2 = -scroll.scrollTop; 8699 if (getComputedStyle2(body).direction === "rtl") { 8700 x2 += max(html.clientWidth, body.clientWidth) - width; 8701 } 8702 return { 8703 width, 8704 height, 8705 x: x2, 8706 y: y2 8707 }; 8708 } 8709 var SCROLLBAR_MAX = 25; 8710 function getViewportRect(element, strategy, rootBoundary) { 8711 if (rootBoundary === void 0) { 8712 rootBoundary = "viewport"; 8713 } 8714 const isLayoutViewport = rootBoundary === "layoutViewport"; 8715 const win = getWindow(element); 8716 const html = getDocumentElement(element); 8717 const visualViewport = win.visualViewport; 8718 let width = html.clientWidth; 8719 let height = html.clientHeight; 8720 let x2 = 0; 8721 let y2 = 0; 8722 if (visualViewport) { 8723 const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed"; 8724 if (isLayoutViewport) { 8725 if (!layoutRelativeClientCoords) { 8726 x2 = -visualViewport.offsetLeft; 8727 y2 = -visualViewport.offsetTop; 8728 } 8729 } else { 8730 width = visualViewport.width; 8731 height = visualViewport.height; 8732 if (layoutRelativeClientCoords) { 8733 x2 = visualViewport.offsetLeft; 8734 y2 = visualViewport.offsetTop; 8735 } 8736 } 8737 } 8738 const windowScrollbarX = getWindowScrollBarX(html); 8739 if (windowScrollbarX <= 0) { 8740 const doc = html.ownerDocument; 8741 const body = doc.body; 8742 const bodyStyles = getComputedStyle(body); 8743 const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0; 8744 const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline); 8745 const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth; 8746 if (gutter <= SCROLLBAR_MAX) { 8747 width -= gutter; 8748 } 8749 } 8750 return { 8751 width, 8752 height, 8753 x: x2, 8754 y: y2 8755 }; 8756 } 8757 function getInnerBoundingClientRect(element, strategy) { 8758 const clientRect = getBoundingClientRect(element, true, strategy === "fixed"); 8759 const top = clientRect.top + element.clientTop; 8760 const left = clientRect.left + element.clientLeft; 8761 const scale = getScale(element); 8762 const width = element.clientWidth * scale.x; 8763 const height = element.clientHeight * scale.y; 8764 const x2 = left * scale.x; 8765 const y2 = top * scale.y; 8766 return { 8767 width, 8768 height, 8769 x: x2, 8770 y: y2 8771 }; 8772 } 8773 function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { 8774 let rect; 8775 if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") { 8776 rect = getViewportRect(element, strategy, clippingAncestor); 8777 } else if (clippingAncestor === "document") { 8778 rect = getDocumentRect(getDocumentElement(element)); 8779 } else if (isElement(clippingAncestor)) { 8780 rect = getInnerBoundingClientRect(clippingAncestor, strategy); 8781 } else { 8782 const visualOffsets = getVisualOffsets(element); 8783 rect = { 8784 x: clippingAncestor.x - visualOffsets.x, 8785 y: clippingAncestor.y - visualOffsets.y, 8786 width: clippingAncestor.width, 8787 height: clippingAncestor.height 8788 }; 8789 } 8790 return rectToClientRect(rect); 8791 } 8792 function getClippingElementAncestors(element, cache2) { 8793 const cachedResult = cache2.get(element); 8794 if (cachedResult) { 8795 return cachedResult; 8796 } 8797 let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body"); 8798 let lastKeptComputedStyle = null; 8799 const elementIsFixed = getComputedStyle2(element).position === "fixed"; 8800 let currentNode = elementIsFixed ? getParentNode(element) : element; 8801 while (isElement(currentNode) && !isLastTraversableNode(currentNode)) { 8802 const computedStyle = getComputedStyle2(currentNode); 8803 const currentNodeIsContaining = isContainingBlock(currentNode); 8804 const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : ""; 8805 const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static"); 8806 if (shouldDropCurrentNode) { 8807 result = result.filter((ancestor) => ancestor !== currentNode); 8808 } else { 8809 lastKeptComputedStyle = computedStyle; 8810 } 8811 currentNode = getParentNode(currentNode); 8812 } 8813 cache2.set(element, result); 8814 return result; 8815 } 8816 function getClippingRect(_ref) { 8817 let { 8818 element, 8819 boundary, 8820 rootBoundary, 8821 strategy 8822 } = _ref; 8823 const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary); 8824 const clippingAncestors = [...elementClippingAncestors, rootBoundary]; 8825 const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy); 8826 let top = firstRect.top; 8827 let right = firstRect.right; 8828 let bottom = firstRect.bottom; 8829 let left = firstRect.left; 8830 for (let i = 1; i < clippingAncestors.length; i++) { 8831 const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy); 8832 top = max(rect.top, top); 8833 right = min(rect.right, right); 8834 bottom = min(rect.bottom, bottom); 8835 left = max(rect.left, left); 8836 } 8837 return { 8838 width: right - left, 8839 height: bottom - top, 8840 x: left, 8841 y: top 8842 }; 8843 } 8844 function getDimensions(element) { 8845 const { 8846 width, 8847 height 8848 } = getCssDimensions(element); 8849 return { 8850 width, 8851 height 8852 }; 8853 } 8854 function getRectRelativeToOffsetParent(element, offsetParent, strategy) { 8855 const isOffsetParentAnElement = isHTMLElement(offsetParent); 8856 const documentElement = getDocumentElement(offsetParent); 8857 const isFixed = strategy === "fixed"; 8858 const rect = getBoundingClientRect(element, true, isFixed, offsetParent); 8859 let scroll = { 8860 scrollLeft: 0, 8861 scrollTop: 0 8862 }; 8863 const offsets = createCoords(0); 8864 if (isOffsetParentAnElement || !isFixed) { 8865 if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { 8866 scroll = getNodeScroll(offsetParent); 8867 } 8868 if (isOffsetParentAnElement) { 8869 const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); 8870 offsets.x = offsetRect.x + offsetParent.clientLeft; 8871 offsets.y = offsetRect.y + offsetParent.clientTop; 8872 } 8873 } 8874 if (!isOffsetParentAnElement && documentElement) { 8875 offsets.x = getWindowScrollBarX(documentElement); 8876 } 8877 const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0); 8878 const x2 = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x; 8879 const y2 = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y; 8880 return { 8881 x: x2, 8882 y: y2, 8883 width: rect.width, 8884 height: rect.height 8885 }; 8886 } 8887 function isStaticPositioned(element) { 8888 return getComputedStyle2(element).position === "static"; 8889 } 8890 function getTrueOffsetParent(element, polyfill) { 8891 if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") { 8892 return null; 8893 } 8894 if (polyfill) { 8895 return polyfill(element); 8896 } 8897 let rawOffsetParent = element.offsetParent; 8898 if (getDocumentElement(element) === rawOffsetParent) { 8899 rawOffsetParent = rawOffsetParent.ownerDocument.body; 8900 } 8901 return rawOffsetParent; 8902 } 8903 function getOffsetParent(element, polyfill) { 8904 const win = getWindow(element); 8905 if (isTopLayer(element)) { 8906 return win; 8907 } 8908 if (!isHTMLElement(element)) { 8909 let svgOffsetParent = getParentNode(element); 8910 while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) { 8911 if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) { 8912 return svgOffsetParent; 8913 } 8914 svgOffsetParent = getParentNode(svgOffsetParent); 8915 } 8916 return win; 8917 } 8918 let offsetParent = getTrueOffsetParent(element, polyfill); 8919 while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) { 8920 offsetParent = getTrueOffsetParent(offsetParent, polyfill); 8921 } 8922 if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) { 8923 return win; 8924 } 8925 return offsetParent || getContainingBlock(element) || win; 8926 } 8927 var getElementRects = async function(data) { 8928 const getOffsetParentFn = this.getOffsetParent || getOffsetParent; 8929 const getDimensionsFn = this.getDimensions; 8930 const floatingDimensions = await getDimensionsFn(data.floating); 8931 return { 8932 reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), 8933 floating: { 8934 x: 0, 8935 y: 0, 8936 width: floatingDimensions.width, 8937 height: floatingDimensions.height 8938 } 8939 }; 8940 }; 8941 function isRTL(element) { 8942 return getComputedStyle2(element).direction === "rtl"; 8943 } 8944 var platform2 = { 8945 convertOffsetParentRelativeRectToViewportRelativeRect, 8946 getDocumentElement, 8947 getClippingRect, 8948 getOffsetParent, 8949 getElementRects, 8950 getClientRects, 8951 getDimensions, 8952 getScale, 8953 isElement, 8954 isRTL 8955 }; 8956 function rectsAreEqual(a, b) { 8957 return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height; 8958 } 8959 function observeMove(element, onMove, ancestorResize) { 8960 let io = null; 8961 let timeoutId; 8962 const root = getDocumentElement(element); 8963 function cleanup() { 8964 var _io; 8965 clearTimeout(timeoutId); 8966 (_io = io) == null || _io.disconnect(); 8967 io = null; 8968 } 8969 function refresh(skip, threshold) { 8970 if (skip === void 0) { 8971 skip = false; 8972 } 8973 if (threshold === void 0) { 8974 threshold = 1; 8975 } 8976 cleanup(); 8977 const elementRectForRootMargin = element.getBoundingClientRect(); 8978 const { 8979 left, 8980 top, 8981 width, 8982 height 8983 } = elementRectForRootMargin; 8984 if (!skip) { 8985 onMove(); 8986 } 8987 if (!width || !height) { 8988 return; 8989 } 8990 const insetTop = floor(top); 8991 const insetRight = floor(root.clientWidth - (left + width)); 8992 const insetBottom = floor(root.clientHeight - (top + height)); 8993 const insetLeft = floor(left); 8994 const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; 8995 const options = { 8996 rootMargin, 8997 threshold: max(0, min(1, threshold)) || 1 8998 }; 8999 let isFirstUpdate = true; 9000 function handleObserve(entries) { 9001 const ratio = entries[0].intersectionRatio; 9002 if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) { 9003 return refresh(); 9004 } 9005 if (ratio !== threshold) { 9006 if (!isFirstUpdate) { 9007 return refresh(); 9008 } 9009 if (!ratio) { 9010 timeoutId = setTimeout(() => { 9011 refresh(false, 1e-7); 9012 }, 1e3); 9013 } else { 9014 refresh(false, ratio); 9015 } 9016 } 9017 isFirstUpdate = false; 9018 } 9019 try { 9020 io = new IntersectionObserver(handleObserve, { 9021 ...options, 9022 // Handle <iframe>s 9023 root: root.ownerDocument 9024 }); 9025 } catch (_e) { 9026 io = new IntersectionObserver(handleObserve, options); 9027 } 9028 io.observe(element); 9029 } 9030 const win = getWindow(element); 9031 const handleResize = () => refresh(ancestorResize); 9032 win.addEventListener("resize", handleResize); 9033 refresh(true); 9034 return () => { 9035 win.removeEventListener("resize", handleResize); 9036 cleanup(); 9037 }; 9038 } 9039 function autoUpdate(reference, floating, update2, options) { 9040 if (options === void 0) { 9041 options = {}; 9042 } 9043 const { 9044 ancestorScroll = true, 9045 ancestorResize = true, 9046 elementResize = typeof ResizeObserver === "function", 9047 layoutShift = typeof IntersectionObserver === "function", 9048 animationFrame = false 9049 } = options; 9050 const referenceEl = unwrapElement(reference); 9051 const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : []; 9052 ancestors.forEach((ancestor) => { 9053 ancestorScroll && ancestor.addEventListener("scroll", update2); 9054 ancestorResize && ancestor.addEventListener("resize", update2); 9055 }); 9056 const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null; 9057 let reobserveFrame = -1; 9058 let resizeObserver = null; 9059 if (elementResize) { 9060 resizeObserver = new ResizeObserver((_ref) => { 9061 let [firstEntry] = _ref; 9062 if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) { 9063 resizeObserver.unobserve(floating); 9064 cancelAnimationFrame(reobserveFrame); 9065 reobserveFrame = requestAnimationFrame(() => { 9066 var _resizeObserver; 9067 (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating); 9068 }); 9069 } 9070 update2(); 9071 }); 9072 if (referenceEl && !animationFrame) { 9073 resizeObserver.observe(referenceEl); 9074 } 9075 if (floating) { 9076 resizeObserver.observe(floating); 9077 } 9078 } 9079 let frameId; 9080 let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null; 9081 if (animationFrame) { 9082 frameLoop(); 9083 } 9084 function frameLoop() { 9085 const nextRefRect = getBoundingClientRect(reference); 9086 if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) { 9087 update2(); 9088 } 9089 prevRefRect = nextRefRect; 9090 frameId = requestAnimationFrame(frameLoop); 9091 } 9092 update2(); 9093 return () => { 9094 var _resizeObserver2; 9095 ancestors.forEach((ancestor) => { 9096 ancestorScroll && ancestor.removeEventListener("scroll", update2); 9097 ancestorResize && ancestor.removeEventListener("resize", update2); 9098 }); 9099 cleanupIo == null || cleanupIo(); 9100 (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect(); 9101 resizeObserver = null; 9102 if (animationFrame) { 9103 cancelAnimationFrame(frameId); 9104 } 9105 }; 9106 } 9107 var offset2 = offset; 9108 var shift2 = shift; 9109 var flip2 = flip; 9110 var size2 = size; 9111 var limitShift2 = limitShift; 9112 var computePosition2 = (reference, floating, options) => { 9113 const cache2 = /* @__PURE__ */ new Map(); 9114 const mergedOptions = options != null ? options : {}; 9115 const platformWithCache = { 9116 ...platform2, 9117 ...mergedOptions.platform, 9118 _c: cache2 9119 }; 9120 return computePosition(reference, floating, { 9121 ...mergedOptions, 9122 platform: platformWithCache 9123 }); 9124 }; 9125 9126 // node_modules/.store/@floating-ui/react-dom@2.1.9-AxWcAwqlMfOrAFOinFKSVg/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs 9127 var React38 = __toESM(require_react(), 1); 9128 var import_react2 = __toESM(require_react(), 1); 9129 var ReactDOM5 = __toESM(require_react_dom(), 1); 9130 var isClient = typeof document !== "undefined"; 9131 var noop2 = function noop3() { 9132 }; 9133 var index = isClient ? import_react2.useLayoutEffect : noop2; 9134 function deepEqual(a, b) { 9135 if (a === b) { 9136 return true; 9137 } 9138 if (typeof a !== typeof b) { 9139 return false; 9140 } 9141 if (typeof a === "function" && a.toString() === b.toString()) { 9142 return true; 9143 } 9144 let length; 9145 let i; 9146 let keys; 9147 if (a && b && typeof a === "object") { 9148 if (Array.isArray(a)) { 9149 length = a.length; 9150 if (length !== b.length) return false; 9151 for (i = length; i-- !== 0; ) { 9152 if (!deepEqual(a[i], b[i])) { 9153 return false; 9154 } 9155 } 9156 return true; 9157 } 9158 keys = Object.keys(a); 9159 length = keys.length; 9160 if (length !== Object.keys(b).length) { 9161 return false; 9162 } 9163 for (i = length; i-- !== 0; ) { 9164 if (!{}.hasOwnProperty.call(b, keys[i])) { 9165 return false; 9166 } 9167 } 9168 for (i = length; i-- !== 0; ) { 9169 const key = keys[i]; 9170 if (key === "_owner" && a.$$typeof) { 9171 continue; 9172 } 9173 if (!deepEqual(a[key], b[key])) { 9174 return false; 9175 } 9176 } 9177 return true; 9178 } 9179 return a !== a && b !== b; 9180 } 9181 function getDPR(element) { 9182 if (typeof window === "undefined") { 9183 return 1; 9184 } 9185 const win = element.ownerDocument.defaultView || window; 9186 return win.devicePixelRatio || 1; 9187 } 9188 function roundByDPR(element, value) { 9189 const dpr = getDPR(element); 9190 return Math.round(value * dpr) / dpr; 9191 } 9192 function useLatestRef(value) { 9193 const ref = React38.useRef(value); 9194 index(() => { 9195 ref.current = value; 9196 }); 9197 return ref; 9198 } 9199 function useFloating(options) { 9200 if (options === void 0) { 9201 options = {}; 9202 } 9203 const { 9204 placement = "bottom", 9205 strategy = "absolute", 9206 middleware = [], 9207 platform: platform3, 9208 elements: { 9209 reference: externalReference, 9210 floating: externalFloating 9211 } = {}, 9212 transform = true, 9213 whileElementsMounted, 9214 open: open2 9215 } = options; 9216 const [data, setData] = React38.useState({ 9217 x: 0, 9218 y: 0, 9219 strategy, 9220 placement, 9221 middlewareData: {}, 9222 isPositioned: false 9223 }); 9224 const [latestMiddleware, setLatestMiddleware] = React38.useState(middleware); 9225 if (!deepEqual(latestMiddleware, middleware)) { 9226 setLatestMiddleware(middleware); 9227 } 9228 const [_reference, _setReference] = React38.useState(null); 9229 const [_floating, _setFloating] = React38.useState(null); 9230 const setReference = React38.useCallback((node) => { 9231 if (node !== referenceRef.current) { 9232 referenceRef.current = node; 9233 _setReference(node); 9234 } 9235 }, []); 9236 const setFloating = React38.useCallback((node) => { 9237 if (node !== floatingRef.current) { 9238 floatingRef.current = node; 9239 _setFloating(node); 9240 } 9241 }, []); 9242 const referenceEl = externalReference || _reference; 9243 const floatingEl = externalFloating || _floating; 9244 const referenceRef = React38.useRef(null); 9245 const floatingRef = React38.useRef(null); 9246 const dataRef = React38.useRef(data); 9247 const hasWhileElementsMounted = whileElementsMounted != null; 9248 const whileElementsMountedRef = useLatestRef(whileElementsMounted); 9249 const platformRef = useLatestRef(platform3); 9250 const openRef = useLatestRef(open2); 9251 const update2 = React38.useCallback(() => { 9252 if (!referenceRef.current || !floatingRef.current) { 9253 return; 9254 } 9255 const config = { 9256 placement, 9257 strategy, 9258 middleware: latestMiddleware 9259 }; 9260 if (platformRef.current) { 9261 config.platform = platformRef.current; 9262 } 9263 computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => { 9264 const fullData = { 9265 ...data2, 9266 // The floating element's position may be recomputed while it's closed 9267 // but still mounted (such as when transitioning out). To ensure 9268 // `isPositioned` will be `false` initially on the next open, avoid 9269 // setting it to `true` when `open === false` (must be specified). 9270 isPositioned: openRef.current !== false 9271 }; 9272 if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) { 9273 dataRef.current = fullData; 9274 ReactDOM5.flushSync(() => { 9275 setData(fullData); 9276 }); 9277 } 9278 }); 9279 }, [latestMiddleware, placement, strategy, platformRef, openRef]); 9280 index(() => { 9281 if (open2 === false && dataRef.current.isPositioned) { 9282 dataRef.current.isPositioned = false; 9283 setData((data2) => ({ 9284 ...data2, 9285 isPositioned: false 9286 })); 9287 } 9288 }, [open2]); 9289 const isMountedRef = React38.useRef(false); 9290 index(() => { 9291 isMountedRef.current = true; 9292 return () => { 9293 isMountedRef.current = false; 9294 }; 9295 }, []); 9296 index(() => { 9297 if (referenceEl) referenceRef.current = referenceEl; 9298 if (floatingEl) floatingRef.current = floatingEl; 9299 if (referenceEl && floatingEl) { 9300 if (whileElementsMountedRef.current) { 9301 return whileElementsMountedRef.current(referenceEl, floatingEl, update2); 9302 } 9303 update2(); 9304 } 9305 }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]); 9306 const refs = React38.useMemo(() => ({ 9307 reference: referenceRef, 9308 floating: floatingRef, 9309 setReference, 9310 setFloating 9311 }), [setReference, setFloating]); 9312 const elements = React38.useMemo(() => ({ 9313 reference: referenceEl, 9314 floating: floatingEl 9315 }), [referenceEl, floatingEl]); 9316 const floatingStyles = React38.useMemo(() => { 9317 const initialStyles = { 9318 position: strategy, 9319 left: 0, 9320 top: 0 9321 }; 9322 if (!elements.floating) { 9323 return initialStyles; 9324 } 9325 const x2 = roundByDPR(elements.floating, data.x); 9326 const y2 = roundByDPR(elements.floating, data.y); 9327 if (transform) { 9328 return { 9329 ...initialStyles, 9330 transform: "translate(" + x2 + "px, " + y2 + "px)", 9331 ...getDPR(elements.floating) >= 1.5 && { 9332 willChange: "transform" 9333 } 9334 }; 9335 } 9336 return { 9337 position: strategy, 9338 left: x2, 9339 top: y2 9340 }; 9341 }, [strategy, transform, elements.floating, data.x, data.y]); 9342 return React38.useMemo(() => ({ 9343 ...data, 9344 update: update2, 9345 refs, 9346 elements, 9347 floatingStyles 9348 }), [data, update2, refs, elements, floatingStyles]); 9349 } 9350 var offset3 = (options, deps) => { 9351 const result = offset2(options); 9352 return { 9353 name: result.name, 9354 fn: result.fn, 9355 options: [options, deps] 9356 }; 9357 }; 9358 var shift3 = (options, deps) => { 9359 const result = shift2(options); 9360 return { 9361 name: result.name, 9362 fn: result.fn, 9363 options: [options, deps] 9364 }; 9365 }; 9366 var limitShift3 = (options, deps) => { 9367 const result = limitShift2(options); 9368 return { 9369 fn: result.fn, 9370 options: [options, deps] 9371 }; 9372 }; 9373 var flip3 = (options, deps) => { 9374 const result = flip2(options); 9375 return { 9376 name: result.name, 9377 fn: result.fn, 9378 options: [options, deps] 9379 }; 9380 }; 9381 var size3 = (options, deps) => { 9382 const result = size2(options); 9383 return { 9384 name: result.name, 9385 fn: result.fn, 9386 options: [options, deps] 9387 }; 9388 }; 9389 9390 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/NullStore.mjs 9391 var NullStore = class extends ReactStore { 9392 // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding 9393 // `setState` alone would neutralize them today. They are overridden explicitly so the store stays 9394 // inert even if a future base-class change stops routing a mutator through `setState`. 9395 setState(_newState) { 9396 } 9397 update(_changes) { 9398 } 9399 set(_key, _value) { 9400 } 9401 notifyAll() { 9402 } 9403 }; 9404 9405 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/composite/composite.mjs 9406 var ARROW_UP2 = "ArrowUp"; 9407 var ARROW_DOWN2 = "ArrowDown"; 9408 var ARROW_LEFT2 = "ArrowLeft"; 9409 var ARROW_RIGHT2 = "ArrowRight"; 9410 var HOME = "Home"; 9411 var END = "End"; 9412 var COMPOSITE_KEYS = /* @__PURE__ */ new Set([ARROW_UP2, ARROW_DOWN2, ARROW_LEFT2, ARROW_RIGHT2, HOME, END]); 9413 9414 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/inertValue.mjs 9415 function inertValue(value) { 9416 if (isReactVersionAtLeast(19)) { 9417 return value; 9418 } 9419 return value ? "true" : void 0; 9420 } 9421 9422 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/InternalBackdrop.mjs 9423 var React39 = __toESM(require_react(), 1); 9424 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1); 9425 var InternalBackdrop = /* @__PURE__ */ React39.forwardRef(function InternalBackdrop2(props, ref) { 9426 const { 9427 cutout, 9428 ...otherProps 9429 } = props; 9430 let clipPath; 9431 if (cutout) { 9432 const rect = cutout.getBoundingClientRect(); 9433 clipPath = `polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,$rect.left}px $rect.top}px,$rect.left}px $rect.bottom}px,$rect.right}px $rect.bottom}px,$rect.right}px $rect.top}px,$rect.left}px $rect.top}px)`; 9434 } 9435 return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { 9436 ref, 9437 role: "presentation", 9438 "data-base-ui-inert": "", 9439 ...otherProps, 9440 style: { 9441 position: "fixed", 9442 inset: 0, 9443 userSelect: "none", 9444 WebkitUserSelect: "none", 9445 clipPath 9446 } 9447 }); 9448 }); 9449 if (true) InternalBackdrop.displayName = "InternalBackdrop"; 9450 9451 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/useOpenInteractionType.mjs 9452 var React42 = __toESM(require_react(), 1); 9453 9454 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useEnhancedClickHandler.mjs 9455 var React40 = __toESM(require_react(), 1); 9456 function useEnhancedClickHandler(handler) { 9457 const lastClickInteractionTypeRef = React40.useRef(""); 9458 const handlePointerDown = React40.useCallback((event) => { 9459 if (event.defaultPrevented) { 9460 return; 9461 } 9462 lastClickInteractionTypeRef.current = event.pointerType; 9463 handler(event, event.pointerType); 9464 }, [handler]); 9465 const handleClick = React40.useCallback((event) => { 9466 if (event.detail === 0) { 9467 handler(event, "keyboard"); 9468 return; 9469 } 9470 if ("pointerType" in event) { 9471 handler(event, event.pointerType); 9472 } else { 9473 handler(event, lastClickInteractionTypeRef.current); 9474 } 9475 lastClickInteractionTypeRef.current = ""; 9476 }, [handler]); 9477 return { 9478 onClick: handleClick, 9479 onPointerDown: handlePointerDown 9480 }; 9481 } 9482 9483 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useValueChanged.mjs 9484 var React41 = __toESM(require_react(), 1); 9485 function useValueChanged(value, onChange) { 9486 const valueRef = React41.useRef(value); 9487 const onChangeCallback = useStableCallback(onChange); 9488 useIsoLayoutEffect(() => { 9489 if (valueRef.current !== value) { 9490 onChangeCallback(valueRef.current); 9491 } 9492 valueRef.current = value; 9493 }, [value, onChangeCallback]); 9494 } 9495 9496 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/useOpenInteractionType.mjs 9497 function useOpenMethodTriggerProps(open2, setOpenMethod) { 9498 const handleTriggerClick = useStableCallback((_, interactionType) => { 9499 const isOpen = typeof open2 === "function" ? open2() : open2; 9500 if (!isOpen) { 9501 setOpenMethod(interactionType || // On iOS Safari, the hitslop around touch targets means tapping outside an element's 9502 // bounds does not fire `pointerdown` but does fire `mousedown`. The `interactionType` 9503 // will be "" in that case. 9504 (parts_exports.os.ios ? "touch" : "")); 9505 } 9506 }); 9507 const { 9508 onClick, 9509 onPointerDown 9510 } = useEnhancedClickHandler(handleTriggerClick); 9511 return React42.useMemo(() => ({ 9512 onClick, 9513 onPointerDown 9514 }), [onClick, onPointerDown]); 9515 } 9516 function useOpenInteractionType(open2) { 9517 const [openMethod, setOpenMethod] = React42.useState(null); 9518 const triggerProps = useOpenMethodTriggerProps(open2, setOpenMethod); 9519 useValueChanged(open2, (previousOpen) => { 9520 if (previousOpen && !open2) { 9521 setOpenMethod(null); 9522 } 9523 }); 9524 return React42.useMemo(() => ({ 9525 openMethod, 9526 triggerProps 9527 }), [openMethod, triggerProps]); 9528 } 9529 9530 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useOnFirstRender.mjs 9531 var React43 = __toESM(require_react(), 1); 9532 function useOnFirstRender(fn) { 9533 const ref = React43.useRef(true); 9534 if (ref.current) { 9535 ref.current = false; 9536 fn(); 9537 } 9538 } 9539 9540 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/getHighlightReason.mjs 9541 function getHighlightReason(event) { 9542 if (event == null) { 9543 return reason_parts_exports.none; 9544 } 9545 if (event.type.startsWith("key")) { 9546 return reason_parts_exports.keyboard; 9547 } 9548 if (event.type.startsWith("mouse") || event.type.startsWith("pointer")) { 9549 return reason_parts_exports.pointer; 9550 } 9551 return reason_parts_exports.none; 9552 } 9553 9554 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/areArraysEqual.mjs 9555 function areArraysEqual(array1, array2, itemComparer = Object.is) { 9556 const { 9557 length 9558 } = array1; 9559 if (length !== array2.length) { 9560 return false; 9561 } 9562 for (let i = 0; i < length; i += 1) { 9563 if (!itemComparer(array1[i], array2[i])) { 9564 return false; 9565 } 9566 } 9567 return true; 9568 } 9569 9570 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/itemEquality.mjs 9571 var defaultItemEquality = (itemValue, selectedValue) => Object.is(itemValue, selectedValue); 9572 function compareItemEquality(itemValue, selectedValue, comparer) { 9573 if (itemValue == null || selectedValue == null) { 9574 return Object.is(itemValue, selectedValue); 9575 } 9576 return comparer(itemValue, selectedValue); 9577 } 9578 function isSelectedValueDirty(currentValue, initialValue, comparer) { 9579 if (Array.isArray(currentValue) && Array.isArray(initialValue)) { 9580 return !areArraysEqual(currentValue, initialValue, (itemValue, initialItemValue) => compareItemEquality(itemValue, initialItemValue, comparer)); 9581 } 9582 return currentValue !== initialValue; 9583 } 9584 function selectedValueIncludes(selectedValues, itemValue, comparer) { 9585 if (!selectedValues) { 9586 return false; 9587 } 9588 return selectedValues.some((selectedValue) => { 9589 if (selectedValue === void 0) { 9590 return false; 9591 } 9592 return compareItemEquality(itemValue, selectedValue, comparer); 9593 }); 9594 } 9595 function findItemIndex(itemValues, selectedValue, comparer) { 9596 if (!itemValues) { 9597 return -1; 9598 } 9599 return itemValues.findIndex((itemValue) => { 9600 if (itemValue === void 0) { 9601 return false; 9602 } 9603 return compareItemEquality(itemValue, selectedValue, comparer); 9604 }); 9605 } 9606 function createSelectionMatcher(selectedValues, comparer) { 9607 if (comparer !== defaultItemEquality) { 9608 return (itemValue) => selectedValueIncludes(selectedValues, itemValue, comparer); 9609 } 9610 const index2 = new Set(selectedValues); 9611 index2.delete(void 0); 9612 return (itemValue) => index2.has(itemValue) && (itemValue !== 0 || selectedValues.some((v2) => Object.is(itemValue, v2))); 9613 } 9614 function findSelectionIndex(itemValues, selectedValue, comparer, multiple) { 9615 const index2 = multiple && Array.isArray(selectedValue) ? ( 9616 // Anchor to the first selected item in rendered order so the index does not depend 9617 // on the order in which the values were added to the array. 9618 itemValues.findIndex(createSelectionMatcher(selectedValue, comparer)) 9619 ) : findItemIndex(itemValues, selectedValue, comparer); 9620 return index2 === -1 ? null : index2; 9621 } 9622 function resolveSelectedIndex(index2, itemValue, registry, selectedValues, comparer, currentIndex) { 9623 if (selectedValueIncludes(selectedValues, itemValue, comparer)) { 9624 return currentIndex != null && index2 > currentIndex && selectedValueIncludes(selectedValues, registry[currentIndex], comparer) ? currentIndex : index2; 9625 } 9626 return index2 === currentIndex ? findSelectionIndex(registry, selectedValues, comparer, true) : currentIndex; 9627 } 9628 function removeItem(selectedValues, itemValue, comparer) { 9629 return selectedValues.filter((selectedValue) => !compareItemEquality(itemValue, selectedValue, comparer)); 9630 } 9631 9632 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/resolveValueLabel.mjs 9633 var React44 = __toESM(require_react(), 1); 9634 9635 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/serializeValue.mjs 9636 function serializeValue(value) { 9637 if (value == null) { 9638 return ""; 9639 } 9640 if (typeof value === "string") { 9641 return value; 9642 } 9643 try { 9644 return JSON.stringify(value); 9645 } catch { 9646 return String(value); 9647 } 9648 } 9649 9650 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/resolveValueLabel.mjs 9651 var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1); 9652 function isGroup(item) { 9653 return typeof item === "object" && item != null && Array.isArray(item.items); 9654 } 9655 function isGroupedItems(items) { 9656 return isGroup(items?.[0]); 9657 } 9658 function flattenLeafItems(items) { 9659 return isGroupedItems(items) ? items.flatMap((group) => group.items) : items; 9660 } 9661 function hasNullItemLabel(items) { 9662 if (!Array.isArray(items)) { 9663 return items != null && "null" in items; 9664 } 9665 const arrayItems = items; 9666 if (isGroupedItems(arrayItems)) { 9667 for (const group of arrayItems) { 9668 for (const item of group.items) { 9669 if (item && item.value == null && item.label != null) { 9670 return true; 9671 } 9672 } 9673 } 9674 return false; 9675 } 9676 for (const item of arrayItems) { 9677 if (item && item.value == null && item.label != null) { 9678 return true; 9679 } 9680 } 9681 return false; 9682 } 9683 function stringifyAsLabel(item, itemToStringLabel) { 9684 if (itemToStringLabel && item != null) { 9685 return itemToStringLabel(item) ?? ""; 9686 } 9687 if (item && typeof item === "object") { 9688 if ("label" in item && item.label != null) { 9689 return String(item.label); 9690 } 9691 if ("value" in item) { 9692 return String(item.value); 9693 } 9694 } 9695 return serializeValue(item); 9696 } 9697 function stringifyAsValue(item, itemToStringValue) { 9698 if (itemToStringValue && item != null) { 9699 return itemToStringValue(item) ?? ""; 9700 } 9701 if (item && typeof item === "object" && "value" in item && "label" in item) { 9702 return serializeValue(item.value); 9703 } 9704 return serializeValue(item); 9705 } 9706 function resolveSelectedLabel(value, items, itemToStringLabel) { 9707 function fallback() { 9708 return stringifyAsLabel(value, itemToStringLabel); 9709 } 9710 if (itemToStringLabel && value != null) { 9711 return itemToStringLabel(value); 9712 } 9713 if (value && typeof value === "object" && "label" in value && value.label != null) { 9714 return value.label; 9715 } 9716 if (items && !Array.isArray(items)) { 9717 const label = Object.hasOwn(items, value) ? items[value] : void 0; 9718 return label ?? fallback(); 9719 } 9720 if (Array.isArray(items)) { 9721 const arrayItems = items; 9722 const flatItems = flattenLeafItems(arrayItems); 9723 if (value == null || typeof value !== "object") { 9724 const match2 = flatItems.find((item) => item.value === value); 9725 if (match2 && match2.label != null) { 9726 return match2.label; 9727 } 9728 return fallback(); 9729 } 9730 if ("value" in value) { 9731 const match2 = flatItems.find((item) => item && item.value === value.value); 9732 if (match2 && match2.label != null) { 9733 return match2.label; 9734 } 9735 } 9736 } 9737 return fallback(); 9738 } 9739 function resolveMultipleLabels(values, items, itemToStringLabel) { 9740 return values.reduce((acc, value, index2) => { 9741 if (index2 > 0) { 9742 acc.push(", "); 9743 } 9744 acc.push(/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(React44.Fragment, { 9745 children: resolveSelectedLabel(value, items, itemToStringLabel) 9746 }, index2)); 9747 return acc; 9748 }, []); 9749 } 9750 9751 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs 9752 var React45 = __toESM(require_react(), 1); 9753 9754 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs 9755 var valid = "data-valid"; 9756 var invalid = "data-invalid"; 9757 9758 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/field-constants/constants.mjs 9759 var DEFAULT_VALIDITY_STATE = { 9760 badInput: false, 9761 customError: false, 9762 patternMismatch: false, 9763 rangeOverflow: false, 9764 rangeUnderflow: false, 9765 stepMismatch: false, 9766 tooLong: false, 9767 tooShort: false, 9768 typeMismatch: false, 9769 valid: null, 9770 valueMissing: false 9771 }; 9772 var DEFAULT_FIELD_STATE_ATTRIBUTES = { 9773 valid: null, 9774 touched: false, 9775 dirty: false, 9776 filled: false, 9777 focused: false 9778 }; 9779 var DEFAULT_FIELD_ROOT_STATE = { 9780 disabled: false, 9781 ...DEFAULT_FIELD_STATE_ATTRIBUTES 9782 }; 9783 var fieldValidityMapping = { 9784 valid(value) { 9785 if (value === null) { 9786 return null; 9787 } 9788 if (value) { 9789 return { 9790 [valid]: "" 9791 }; 9792 } 9793 return { 9794 [invalid]: "" 9795 }; 9796 } 9797 }; 9798 9799 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs 9800 var DEFAULT_FIELD_ROOT_CONTEXT = { 9801 invalid: void 0, 9802 name: void 0, 9803 validityData: { 9804 state: DEFAULT_VALIDITY_STATE, 9805 errors: [], 9806 error: "", 9807 value: "", 9808 initialValue: null 9809 }, 9810 setValidityData: NOOP, 9811 disabled: void 0, 9812 setTouched: NOOP, 9813 setDirty: NOOP, 9814 setFilled: NOOP, 9815 setFocused: NOOP, 9816 focusOwnerRef: { 9817 current: void 0 9818 }, 9819 validationMode: "onSubmit", 9820 shouldValidateOnChange: () => false, 9821 state: DEFAULT_FIELD_ROOT_STATE, 9822 registerFieldControl: NOOP, 9823 validation: { 9824 getValidationProps: (_disabled, props = EMPTY_OBJECT) => props, 9825 inputRef: { 9826 current: null 9827 }, 9828 registeredInputs: /* @__PURE__ */ new Map(), 9829 registerInput: NOOP, 9830 getInputControl: () => null, 9831 commit: async () => { 9832 }, 9833 change: NOOP 9834 } 9835 }; 9836 var FieldRootContext = /* @__PURE__ */ React45.createContext(DEFAULT_FIELD_ROOT_CONTEXT); 9837 if (true) FieldRootContext.displayName = "FieldRootContext"; 9838 function useFieldRootContext(optional = true) { 9839 const context = React45.useContext(FieldRootContext); 9840 if (context.setValidityData === NOOP && !optional) { 9841 throw new Error(true ? "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>." : formatErrorMessage_default(28)); 9842 } 9843 return context; 9844 } 9845 9846 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs 9847 function useRegisterFieldControl(controlRef, id, value, getFormValueOverride, enabled = true, name2) { 9848 const { 9849 registerFieldControl 9850 } = useFieldRootContext(); 9851 const sourceRef = useRefWithInit(() => /* @__PURE__ */ Symbol()); 9852 useIsoLayoutEffect(() => { 9853 const source = sourceRef.current; 9854 if (!enabled) { 9855 registerFieldControl(source, void 0); 9856 return; 9857 } 9858 const registration = { 9859 controlRef, 9860 getValue: getFormValueOverride, 9861 id, 9862 name: name2, 9863 value 9864 }; 9865 registerFieldControl(source, registration); 9866 }, [controlRef, enabled, getFormValueOverride, id, name2, registerFieldControl, sourceRef, value]); 9867 useIsoLayoutEffect(() => { 9868 const source = sourceRef.current; 9869 return () => { 9870 registerFieldControl(source, void 0); 9871 }; 9872 }, [registerFieldControl, sourceRef]); 9873 } 9874 9875 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/form-context/FormContext.mjs 9876 var React46 = __toESM(require_react(), 1); 9877 var FormContext = /* @__PURE__ */ React46.createContext({ 9878 elementRef: { 9879 current: null 9880 }, 9881 formRef: { 9882 current: { 9883 fields: /* @__PURE__ */ new Map() 9884 } 9885 }, 9886 errors: {}, 9887 clearErrors: NOOP, 9888 validationMode: "onSubmit", 9889 submitCountRef: { 9890 current: 0 9891 } 9892 }); 9893 if (true) FormContext.displayName = "FormContext"; 9894 function useFormContext() { 9895 return React46.useContext(FormContext); 9896 } 9897 9898 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs 9899 var React48 = __toESM(require_react(), 1); 9900 9901 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs 9902 var React47 = __toESM(require_react(), 1); 9903 var LabelableContext = /* @__PURE__ */ React47.createContext({ 9904 controlId: void 0, 9905 registerControlId: NOOP, 9906 resetControlId: NOOP, 9907 labelId: void 0, 9908 setLabelId: NOOP, 9909 messageIds: [], 9910 setMessageIds: NOOP, 9911 getDescriptionProps: (externalProps) => externalProps 9912 }); 9913 if (true) LabelableContext.displayName = "LabelableContext"; 9914 function useLabelableContext() { 9915 return React47.useContext(LabelableContext); 9916 } 9917 9918 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs 9919 function useLabelableId(params = {}) { 9920 const { 9921 id, 9922 enabled = true 9923 } = params; 9924 const { 9925 controlId, 9926 registerControlId, 9927 resetControlId 9928 } = useLabelableContext(); 9929 const defaultId = useBaseUiId(); 9930 const controlSourceRef = useRefWithInit(() => /* @__PURE__ */ Symbol()); 9931 const hasRegisteredRef = React48.useRef(false); 9932 const hadExplicitIdRef = React48.useRef(false); 9933 const unregisterControlId = useStableCallback(() => { 9934 if (!hasRegisteredRef.current || registerControlId === NOOP) { 9935 return; 9936 } 9937 hasRegisteredRef.current = false; 9938 registerControlId(controlSourceRef.current, void 0); 9939 }); 9940 useIsoLayoutEffect(() => { 9941 if (!enabled || registerControlId === NOOP) { 9942 unregisterControlId(); 9943 return void 0; 9944 } 9945 let nextId; 9946 if (id !== void 0) { 9947 hadExplicitIdRef.current = true; 9948 nextId = id; 9949 } else if (hadExplicitIdRef.current) { 9950 nextId = defaultId; 9951 } else { 9952 resetControlId(); 9953 return void 0; 9954 } 9955 if (nextId === void 0) { 9956 unregisterControlId(); 9957 return void 0; 9958 } 9959 hasRegisteredRef.current = true; 9960 registerControlId(controlSourceRef.current, nextId); 9961 return void 0; 9962 }, [id, enabled, registerControlId, resetControlId, defaultId, controlSourceRef, unregisterControlId]); 9963 useIsoLayoutEffect(() => { 9964 return unregisterControlId; 9965 }, [unregisterControlId]); 9966 return (enabled ? controlId : void 0) ?? id ?? defaultId; 9967 } 9968 9969 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/stringifyLocale.mjs 9970 function stringifyLocale(locale) { 9971 if (Array.isArray(locale)) { 9972 return locale.map((value) => stringifyLocale(value)).join(","); 9973 } 9974 if (locale == null) { 9975 return ""; 9976 } 9977 return String(locale); 9978 } 9979 9980 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/filter.mjs 9981 var filterCache = /* @__PURE__ */ new Map(); 9982 function getFilter(options = {}) { 9983 const { 9984 locale, 9985 ...restOptions 9986 } = options; 9987 const collatorOptions = { 9988 usage: "search", 9989 sensitivity: "base", 9990 ignorePunctuation: true, 9991 ...restOptions 9992 }; 9993 const cacheKey = `$stringifyLocale(locale)}|$JSON.stringify(collatorOptions)}`; 9994 const cachedFilter = filterCache.get(cacheKey); 9995 if (cachedFilter) { 9996 return cachedFilter; 9997 } 9998 const collator = new Intl.Collator(locale, collatorOptions); 9999 const filter = { 10000 contains(item, query, itemToString) { 10001 if (!query) { 10002 return true; 10003 } 10004 const itemString = stringifyAsLabel(item, itemToString); 10005 for (let i = 0; i <= itemString.length - query.length; i += 1) { 10006 if (collator.compare(itemString.slice(i, i + query.length), query) === 0) { 10007 return true; 10008 } 10009 } 10010 return false; 10011 }, 10012 startsWith(item, query, itemToString) { 10013 if (!query) { 10014 return true; 10015 } 10016 const itemString = stringifyAsLabel(item, itemToString); 10017 return collator.compare(itemString.slice(0, query.length), query) === 0; 10018 }, 10019 endsWith(item, query, itemToString) { 10020 if (!query) { 10021 return true; 10022 } 10023 const itemString = stringifyAsLabel(item, itemToString); 10024 const queryLength = query.length; 10025 return itemString.length >= queryLength && collator.compare(itemString.slice(itemString.length - queryLength), query) === 0; 10026 } 10027 }; 10028 filterCache.set(cacheKey, filter); 10029 return filter; 10030 } 10031 10032 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs 10033 var React49 = __toESM(require_react(), 1); 10034 var DirectionContext = /* @__PURE__ */ React49.createContext(void 0); 10035 if (true) DirectionContext.displayName = "DirectionContext"; 10036 function useDirection() { 10037 const context = React49.useContext(DirectionContext); 10038 return context?.direction ?? "ltr"; 10039 } 10040 10041 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/field-root-context/useSetFieldFocused.mjs 10042 function useSetFieldFocused(disabled2, focusTargetRef, onFocusedChange) { 10043 const { 10044 setFocused, 10045 focusOwnerRef 10046 } = useFieldRootContext(); 10047 const setFieldFocused = useStableCallback((focused) => { 10048 if (focused ? !disabled2 : focusOwnerRef.current === setFieldFocused) { 10049 focusOwnerRef.current = focused && setFieldFocused; 10050 onFocusedChange?.(focused); 10051 setFocused(focused); 10052 } 10053 }); 10054 useIsoLayoutEffect(() => { 10055 const el = focusTargetRef.current; 10056 const root = el?.getRootNode(); 10057 if (root?.activeElement === el) { 10058 setFieldFocused(true); 10059 } 10060 return () => setFieldFocused(false); 10061 }, [disabled2, focusTargetRef, setFieldFocused]); 10062 return setFieldFocused; 10063 } 10064 10065 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/getPseudoElementBounds.mjs 10066 var BOUNDARY_OFFSET = 5; 10067 function isMouseWithinBounds(event, element) { 10068 const bounds = getPseudoElementBounds(element); 10069 return event.clientX >= bounds.left - BOUNDARY_OFFSET && event.clientX <= bounds.right + BOUNDARY_OFFSET && event.clientY >= bounds.top - BOUNDARY_OFFSET && event.clientY <= bounds.bottom + BOUNDARY_OFFSET; 10070 } 10071 function getPseudoElementBounds(element) { 10072 const elementRect = element.getBoundingClientRect(); 10073 const win = getWindow(element); 10074 if (parts_exports.env.jsdom) { 10075 return elementRect; 10076 } 10077 const beforeStyles = win.getComputedStyle(element, "::before"); 10078 const afterStyles = win.getComputedStyle(element, "::after"); 10079 const hasPseudoElements = beforeStyles.content !== "none" || afterStyles.content !== "none"; 10080 if (!hasPseudoElements) { 10081 return elementRect; 10082 } 10083 const beforeWidth = parseFloat(beforeStyles.width) || 0; 10084 const beforeHeight = parseFloat(beforeStyles.height) || 0; 10085 const afterWidth = parseFloat(afterStyles.width) || 0; 10086 const afterHeight = parseFloat(afterStyles.height) || 0; 10087 const totalWidth = Math.max(elementRect.width, beforeWidth, afterWidth); 10088 const totalHeight = Math.max(elementRect.height, beforeHeight, afterHeight); 10089 const widthDiff = totalWidth - elementRect.width; 10090 const heightDiff = totalHeight - elementRect.height; 10091 return { 10092 left: elementRect.left - widthDiff / 2, 10093 right: elementRect.right + widthDiff / 2, 10094 top: elementRect.top - heightDiff / 2, 10095 bottom: elementRect.bottom + heightDiff / 2 10096 }; 10097 } 10098 10099 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveAriaLabelledBy.mjs 10100 function getDefaultLabelId(id) { 10101 return id == null ? void 0 : `$id}-label`; 10102 } 10103 function resolveAriaLabelledBy(fieldLabelId, localLabelId) { 10104 return fieldLabelId ?? localLabelId; 10105 } 10106 10107 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useInitialLiveRegionTextMutation.mjs 10108 var React50 = __toESM(require_react(), 1); 10109 var LIVE_REGION_MARKER = "\u2060"; 10110 var INITIAL_LIVE_REGION_TEXT_MUTATION_RESET_DELAY = 200; 10111 function findLastTextNode(root) { 10112 const walker = root.ownerDocument.createTreeWalker(root, NodeFilter.SHOW_TEXT); 10113 let lastTextNode = null; 10114 while (walker.nextNode()) { 10115 const textNode = walker.currentNode; 10116 if (textNode.nodeValue !== "") { 10117 lastTextNode = textNode; 10118 } 10119 } 10120 return lastTextNode; 10121 } 10122 function useInitialLiveRegionTextMutation(present = true) { 10123 const timeout = useTimeout(); 10124 const rootRef = React50.useRef(null); 10125 React50.useEffect(() => { 10126 if (!present || parts_exports.os.ios) { 10127 return void 0; 10128 } 10129 const root = rootRef.current; 10130 if (root == null) { 10131 return void 0; 10132 } 10133 const textNode = findLastTextNode(root); 10134 if (textNode == null) { 10135 return void 0; 10136 } 10137 const originalValue = textNode.data; 10138 const markedValue = `$originalValue}$LIVE_REGION_MARKER}`; 10139 textNode.nodeValue = markedValue; 10140 timeout.start(INITIAL_LIVE_REGION_TEXT_MUTATION_RESET_DELAY, () => { 10141 if (textNode.nodeValue === markedValue) { 10142 textNode.nodeValue = originalValue; 10143 } 10144 }); 10145 return () => { 10146 timeout.clear(); 10147 if (textNode.nodeValue === markedValue) { 10148 textNode.nodeValue = originalValue; 10149 } 10150 }; 10151 }, [present, rootRef, timeout]); 10152 return rootRef; 10153 } 10154 10155 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnchorPositioning.mjs 10156 var React52 = __toESM(require_react(), 1); 10157 10158 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs 10159 var React51 = __toESM(require_react(), 1); 10160 function useBaseUIFloating(options) { 10161 const { 10162 nodeId, 10163 externalTree, 10164 rootContext: store 10165 } = options; 10166 const referenceElement = store.useState("referenceElement"); 10167 const floatingElement = store.useState("floatingElement"); 10168 const domReferenceElement = store.useState("domReferenceElement"); 10169 const open2 = store.useState("open"); 10170 const floatingId = store.useState("floatingId"); 10171 const [positionReference, setPositionReferenceRaw] = React51.useState(null); 10172 const domReferenceRef = React51.useRef(null); 10173 const tree = useFloatingTree(externalTree); 10174 const storeElements = React51.useMemo(() => ({ 10175 reference: referenceElement, 10176 floating: floatingElement, 10177 domReference: domReferenceElement 10178 }), [referenceElement, floatingElement, domReferenceElement]); 10179 const position = useFloating({ 10180 ...options, 10181 elements: { 10182 ...storeElements, 10183 ...positionReference && { 10184 reference: positionReference 10185 } 10186 } 10187 }); 10188 const setPositionReference = React51.useCallback((node) => { 10189 const computedPositionReference = isElement(node) ? { 10190 getBoundingClientRect: () => node.getBoundingClientRect(), 10191 getClientRects: () => node.getClientRects(), 10192 contextElement: node 10193 } : node; 10194 setPositionReferenceRaw(computedPositionReference); 10195 position.refs.setReference(computedPositionReference); 10196 }, [position.refs]); 10197 const refs = React51.useMemo(() => ({ 10198 ...position.refs, 10199 setPositionReference, 10200 domReference: domReferenceRef 10201 }), [position.refs, setPositionReference]); 10202 const elements = React51.useMemo(() => ({ 10203 ...position.elements, 10204 domReference: domReferenceElement 10205 }), [position.elements, domReferenceElement]); 10206 const context = React51.useMemo(() => ({ 10207 ...position, 10208 dataRef: store.context.dataRef, 10209 open: open2, 10210 onOpenChange: store.setOpen, 10211 events: store.context.events, 10212 floatingId, 10213 refs, 10214 elements, 10215 nodeId, 10216 rootStore: store 10217 }), [position, refs, elements, nodeId, store, open2, floatingId]); 10218 useIsoLayoutEffect(() => { 10219 if (domReferenceElement) { 10220 domReferenceRef.current = domReferenceElement; 10221 } 10222 }, [domReferenceElement]); 10223 useIsoLayoutEffect(() => { 10224 store.context.dataRef.current.floatingContext = context; 10225 const node = tree?.nodesRef.current.find((n) => n.id === nodeId); 10226 if (node) { 10227 node.context = context; 10228 } 10229 }); 10230 return React51.useMemo(() => ({ 10231 ...position, 10232 context, 10233 refs, 10234 elements, 10235 rootStore: store 10236 }), [position, refs, elements, context, store]); 10237 } 10238 10239 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs 10240 var baseArrow = (options) => ({ 10241 name: "arrow", 10242 options, 10243 async fn(state) { 10244 const { 10245 x: x2, 10246 y: y2, 10247 placement, 10248 rects, 10249 platform: platform3, 10250 elements, 10251 middlewareData 10252 } = state; 10253 const { 10254 element, 10255 padding = 0 10256 } = evaluate(options, state) || {}; 10257 if (element == null) { 10258 return {}; 10259 } 10260 const paddingObject = getPaddingObject(padding); 10261 const coords = { 10262 x: x2, 10263 y: y2 10264 }; 10265 const axis = getAlignmentAxis(placement); 10266 const length = getAxisLength(axis); 10267 const arrowDimensions = await platform3.getDimensions(element); 10268 const isYAxis = axis === "y"; 10269 const minProp = isYAxis ? "top" : "left"; 10270 const maxProp = isYAxis ? "bottom" : "right"; 10271 const clientProp = isYAxis ? "clientHeight" : "clientWidth"; 10272 const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; 10273 const startDiff = coords[axis] - rects.reference[axis]; 10274 const clientSize = elements.floating[clientProp] || rects.floating[length]; 10275 const centerToReference = endDiff / 2 - startDiff / 2; 10276 const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; 10277 const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding); 10278 const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding); 10279 const min2 = minPadding; 10280 const max2 = clientSize - arrowDimensions[length] - maxPadding; 10281 const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; 10282 const offset4 = clamp(min2, center, max2); 10283 const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; 10284 const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0; 10285 return { 10286 [axis]: coords[axis] + alignmentOffset, 10287 data: { 10288 [axis]: offset4, 10289 centerOffset: center - offset4 - alignmentOffset, 10290 ...shouldAddOffset && { 10291 alignmentOffset 10292 } 10293 }, 10294 reset: shouldAddOffset 10295 }; 10296 } 10297 }); 10298 var arrow4 = (options, deps) => { 10299 const { 10300 name: name2, 10301 fn 10302 } = baseArrow(options); 10303 return { 10304 name: name2, 10305 fn, 10306 options: [options, deps] 10307 }; 10308 }; 10309 10310 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/hideMiddleware.mjs 10311 var hide4 = { 10312 name: "hide", 10313 async fn(state) { 10314 const { 10315 width, 10316 height, 10317 x: x2, 10318 y: y2 10319 } = state.rects.reference; 10320 const anchorHidden2 = width === 0 && height === 0 && x2 === 0 && y2 === 0; 10321 const overflow = await state.platform.detectOverflow(state, { 10322 elementContext: "reference" 10323 }); 10324 const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0; 10325 return { 10326 data: { 10327 referenceHidden: referenceHidden || anchorHidden2 10328 } 10329 }; 10330 } 10331 }; 10332 10333 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs 10334 var DEFAULT_SIDES = { 10335 sideX: "left", 10336 sideY: "top" 10337 }; 10338 10339 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonPositionerCssVars.mjs 10340 var availableWidth = "--available-width"; 10341 var availableHeight = "--available-height"; 10342 var anchorWidth = "--anchor-width"; 10343 var anchorHeight = "--anchor-height"; 10344 var transformOrigin = "--transform-origin"; 10345 var positionerWidth = "--positioner-width"; 10346 var positionerHeight = "--positioner-height"; 10347 10348 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnchorPositioning.mjs 10349 var AVAILABLE_WIDTH_VAR = availableWidth; 10350 var AVAILABLE_HEIGHT_VAR = availableHeight; 10351 function getLogicalSide(sideParam, renderedSide, isRtl) { 10352 const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end"; 10353 const logicalRight = isRtl ? "inline-start" : "inline-end"; 10354 const logicalLeft = isRtl ? "inline-end" : "inline-start"; 10355 return { 10356 top: "top", 10357 right: isLogicalSideParam ? logicalRight : "right", 10358 bottom: "bottom", 10359 left: isLogicalSideParam ? logicalLeft : "left" 10360 }[renderedSide]; 10361 } 10362 function getOffsetData(state, sideParam, isRtl) { 10363 const { 10364 rects, 10365 placement 10366 } = state; 10367 const data = { 10368 side: getLogicalSide(sideParam, getSide(placement), isRtl), 10369 align: getAlignment(placement) || "center", 10370 anchor: { 10371 width: rects.reference.width, 10372 height: rects.reference.height 10373 }, 10374 positioner: { 10375 width: rects.floating.width, 10376 height: rects.floating.height 10377 } 10378 }; 10379 return data; 10380 } 10381 function useAnchorPositioning(params) { 10382 return useAnchorPositioningWithHook(params, useBaseUIFloating); 10383 } 10384 function useAnchorPositioningWithHook(params, useFloatingHook) { 10385 const { 10386 // Public parameters 10387 anchor, 10388 positionMethod = "absolute", 10389 side: sideParam = "bottom", 10390 sideOffset = 0, 10391 align = "center", 10392 alignOffset = 0, 10393 collisionBoundary, 10394 collisionPadding: collisionPaddingParam = 5, 10395 sticky = false, 10396 arrowPadding = 5, 10397 disableAnchorTracking = false, 10398 inline: inlineMiddleware, 10399 // Private parameters 10400 keepMounted = false, 10401 floatingRootContext, 10402 mounted, 10403 collisionAvoidance, 10404 shift: shift4, 10405 nodeId, 10406 adaptiveOrigin: adaptiveOrigin2, 10407 lazyFlip = false, 10408 externalTree 10409 } = params; 10410 const collisionAvoidanceSide = collisionAvoidance.side || "flip"; 10411 const collisionAvoidanceAlign = collisionAvoidance.align || "flip"; 10412 const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end"; 10413 const shiftCrossAxis = shift4?.crossAxis ?? false; 10414 const shiftRootBoundary = shift4?.rootBoundary; 10415 const anchorFn = typeof anchor === "function" ? anchor : void 0; 10416 const anchorFnCallback = useStableCallback(anchorFn); 10417 const anchorDep = anchorFn ? anchorFnCallback : anchor; 10418 const anchorValueRef = useValueAsRef(anchor); 10419 const mountedRef = useValueAsRef(mounted); 10420 const direction = useDirection(); 10421 const isRtl = direction === "rtl"; 10422 const [mountPlacement, setMountPlacement] = React52.useState(null); 10423 if (!mounted && mountPlacement !== null) { 10424 setMountPlacement(null); 10425 } 10426 const lockAlign = lazyFlip === "placement"; 10427 const mountSide = mountPlacement ? getSide(mountPlacement) : null; 10428 const mountAlign = mountPlacement && lockAlign ? getAlignment(mountPlacement) || "center" : null; 10429 const side = mountSide || { 10430 top: "top", 10431 right: "right", 10432 bottom: "bottom", 10433 left: "left", 10434 "inline-end": isRtl ? "left" : "right", 10435 "inline-start": isRtl ? "right" : "left" 10436 }[sideParam]; 10437 const placementAlign = mountAlign || align; 10438 const placement = placementAlign === "center" ? side : `$side}-$placementAlign}`; 10439 let collisionPadding = collisionPaddingParam; 10440 if (typeof collisionPadding === "number") { 10441 collisionPadding = { 10442 top: collisionPadding, 10443 right: collisionPadding, 10444 bottom: collisionPadding, 10445 left: collisionPadding 10446 }; 10447 } else if (collisionPadding) { 10448 collisionPadding = { 10449 top: collisionPadding.top || 0, 10450 right: collisionPadding.right || 0, 10451 bottom: collisionPadding.bottom || 0, 10452 left: collisionPadding.left || 0 10453 }; 10454 } 10455 const bias = 1; 10456 const biasTop = sideParam === "bottom" ? bias : 0; 10457 const biasBottom = sideParam === "top" ? bias : 0; 10458 const biasLeft = sideParam === "right" ? bias : 0; 10459 const biasRight = sideParam === "left" ? bias : 0; 10460 const commonCollisionProps = { 10461 boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary, 10462 padding: collisionPadding 10463 }; 10464 const arrowRef = React52.useRef(null); 10465 const sideOffsetRef = useValueAsRef(sideOffset); 10466 const alignOffsetRef = useValueAsRef(alignOffset); 10467 const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0; 10468 const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0; 10469 const middleware = []; 10470 if (inlineMiddleware) { 10471 middleware.push(inlineMiddleware); 10472 } 10473 middleware.push(offset3((state) => { 10474 const data = getOffsetData(state, sideParam, isRtl); 10475 const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current; 10476 const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current; 10477 return { 10478 mainAxis: sideAxis, 10479 crossAxis: alignAxis, 10480 alignmentAxis: alignAxis 10481 }; 10482 }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam])); 10483 const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift"; 10484 const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift"); 10485 const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({ 10486 ...commonCollisionProps, 10487 // Ensure the popup flips if it's been limited by its --available-height and it resizes. 10488 // Since the size() padding is smaller than the flip() padding, flip() will take precedence. 10489 padding: { 10490 top: collisionPadding.top + bias + biasTop, 10491 right: collisionPadding.right + bias + biasRight, 10492 bottom: collisionPadding.bottom + bias + biasBottom, 10493 left: collisionPadding.left + bias + biasLeft 10494 }, 10495 mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip", 10496 crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false, 10497 fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide 10498 }); 10499 const shiftMiddleware = shiftDisabled ? null : shift3({ 10500 ...commonCollisionProps, 10501 // Use the Layout Viewport to avoid shifting around when pinch-zooming. 10502 rootBoundary: shiftRootBoundary, 10503 mainAxis: collisionAvoidanceAlign !== "none", 10504 crossAxis: crossAxisShiftEnabled, 10505 limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => { 10506 if (!arrowRef.current) { 10507 return {}; 10508 } 10509 const { 10510 width, 10511 height 10512 } = arrowRef.current.getBoundingClientRect(); 10513 const sideAxis = getSideAxis(getSide(limitData.placement)); 10514 const arrowSize = sideAxis === "y" ? width : height; 10515 const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom; 10516 return { 10517 offset: arrowSize / 2 + offsetAmount / 2 10518 }; 10519 }) 10520 }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]); 10521 if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || placementAlign === "center") { 10522 middleware.push(shiftMiddleware, flipMiddleware); 10523 } else { 10524 middleware.push(flipMiddleware, shiftMiddleware); 10525 } 10526 middleware.push(size3({ 10527 ...commonCollisionProps, 10528 apply({ 10529 elements: { 10530 floating 10531 }, 10532 availableWidth: availableWidth2, 10533 availableHeight: availableHeight2, 10534 rects 10535 }) { 10536 if (!mountedRef.current) { 10537 return; 10538 } 10539 const floatingStyle = floating.style; 10540 floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `$availableWidth2}px`); 10541 floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `$availableHeight2}px`); 10542 const dpr = getWindow(floating).devicePixelRatio || 1; 10543 const { 10544 x: x3, 10545 y: y3, 10546 width, 10547 height 10548 } = rects.reference; 10549 const anchorWidth2 = (Math.round((x3 + width) * dpr) - Math.round(x3 * dpr)) / dpr; 10550 const anchorHeight2 = (Math.round((y3 + height) * dpr) - Math.round(y3 * dpr)) / dpr; 10551 floatingStyle.setProperty(anchorWidth, `$anchorWidth2}px`); 10552 floatingStyle.setProperty(anchorHeight, `$anchorHeight2}px`); 10553 } 10554 }), arrow4((state) => ({ 10555 // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set, 10556 // we'll create a fake element. 10557 element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"), 10558 // No padding for the fake arrow: it would displace aligned popups on narrow anchors. 10559 padding: arrowRef.current ? arrowPadding : 0 10560 }), [arrowPadding]), { 10561 name: "transformOrigin", 10562 fn(state) { 10563 const { 10564 elements: { 10565 floating 10566 }, 10567 middlewareData: middlewareData2, 10568 placement: renderedPlacement2, 10569 platform: platform3, 10570 rects, 10571 y: y3 10572 } = state; 10573 const renderedSide2 = getSide(renderedPlacement2); 10574 const renderedAlign2 = getAlignment(renderedPlacement2); 10575 const isVertical = getSideAxis(renderedSide2) === "y"; 10576 const arrowEl = arrowRef.current; 10577 const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset; 10578 let crossOrigin; 10579 if (!arrowEl && renderedAlign2 && Math.abs(isVertical ? middlewareData2.shift?.x || 0 : middlewareData2.shift?.y || 0) <= 1) { 10580 crossOrigin = renderedAlign2 === "start" === (isVertical && platform3.isRTL?.(floating) === true) ? "100%" : "0%"; 10581 } else { 10582 const arrowOffset = isVertical ? middlewareData2.arrow?.x || 0 : middlewareData2.arrow?.y || 0; 10583 const arrowSize = isVertical ? arrowEl?.clientWidth || 0 : arrowEl?.clientHeight || 0; 10584 crossOrigin = `$arrowOffset + arrowSize / 2}px`; 10585 } 10586 let sideOrigin = renderedSide2 === "top" || renderedSide2 === "left" ? `calc(100% + $sideOffsetValue}px)` : `${-sideOffsetValue}px`; 10587 if (crossAxisShiftEnabled && isVertical && Math.abs(middlewareData2.shift?.y || 0) > sideOffsetValue) { 10588 sideOrigin = `$rects.reference.y + rects.reference.height / 2 - y3}px`; 10589 } 10590 floating.style.setProperty(transformOrigin, isVertical ? `$crossOrigin} $sideOrigin}` : `$sideOrigin} $crossOrigin}`); 10591 return {}; 10592 } 10593 }, hide4, adaptiveOrigin2); 10594 useIsoLayoutEffect(() => { 10595 if (!mounted && floatingRootContext) { 10596 floatingRootContext.update({ 10597 referenceElement: null, 10598 floatingElement: null, 10599 domReferenceElement: null, 10600 positionReference: null 10601 }); 10602 } 10603 }, [mounted, floatingRootContext]); 10604 const autoUpdateOptions = React52.useMemo(() => ({ 10605 ancestorScroll: !disableAnchorTracking, 10606 elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined", 10607 layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined" 10608 }), [disableAnchorTracking]); 10609 const { 10610 refs, 10611 elements, 10612 x: x2, 10613 y: y2, 10614 middlewareData, 10615 update: update2, 10616 placement: renderedPlacement, 10617 context, 10618 isPositioned, 10619 floatingStyles: originalFloatingStyles 10620 } = useFloatingHook({ 10621 rootContext: floatingRootContext, 10622 open: keepMounted ? mounted : void 0, 10623 placement, 10624 middleware, 10625 strategy: positionMethod, 10626 whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions), 10627 nodeId, 10628 externalTree 10629 }); 10630 const { 10631 sideX, 10632 sideY 10633 } = middlewareData.adaptiveOrigin || DEFAULT_SIDES; 10634 const resolvedPosition = isPositioned ? positionMethod : "fixed"; 10635 const floatingStyles = React52.useMemo(() => { 10636 let base; 10637 if (!isPositioned) { 10638 base = { 10639 position: resolvedPosition, 10640 top: 0, 10641 left: 0 10642 }; 10643 } else if (adaptiveOrigin2) { 10644 base = { 10645 position: resolvedPosition, 10646 [sideX]: x2, 10647 [sideY]: y2 10648 }; 10649 } else { 10650 base = { 10651 ...originalFloatingStyles, 10652 position: resolvedPosition 10653 }; 10654 } 10655 base[AVAILABLE_WIDTH_VAR] = "100vw"; 10656 base[AVAILABLE_HEIGHT_VAR] = "100vh"; 10657 if (!isPositioned) { 10658 base.opacity = 0; 10659 } 10660 return base; 10661 }, [adaptiveOrigin2, resolvedPosition, sideX, x2, sideY, y2, originalFloatingStyles, isPositioned]); 10662 const registeredPositionReferenceRef = React52.useRef(null); 10663 useIsoLayoutEffect(() => { 10664 if (!mounted) { 10665 return; 10666 } 10667 const anchorValue = anchorValueRef.current; 10668 const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue; 10669 const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null; 10670 const finalAnchor = unwrappedElement || null; 10671 if (finalAnchor !== registeredPositionReferenceRef.current) { 10672 refs.setPositionReference(finalAnchor); 10673 registeredPositionReferenceRef.current = finalAnchor; 10674 } 10675 }, [mounted, refs, anchorDep, anchorValueRef]); 10676 React52.useEffect(() => { 10677 if (!mounted) { 10678 return; 10679 } 10680 const anchorValue = anchorValueRef.current; 10681 if (typeof anchorValue === "function") { 10682 return; 10683 } 10684 if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) { 10685 refs.setPositionReference(anchorValue.current); 10686 registeredPositionReferenceRef.current = anchorValue.current; 10687 } 10688 }, [mounted, refs, anchorDep, anchorValueRef]); 10689 React52.useEffect(() => { 10690 if (keepMounted && mounted && elements.reference && elements.floating) { 10691 return autoUpdate(elements.reference, elements.floating, update2, autoUpdateOptions); 10692 } 10693 return void 0; 10694 }, [keepMounted, mounted, elements, update2, autoUpdateOptions]); 10695 const renderedSide = getSide(renderedPlacement); 10696 const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl); 10697 const renderedAlign = getAlignment(renderedPlacement) || "center"; 10698 const anchorHidden2 = Boolean(middlewareData.hide?.referenceHidden); 10699 useIsoLayoutEffect(() => { 10700 if (lazyFlip && mounted && isPositioned && (renderedSide !== side || lockAlign && renderedAlign !== placementAlign)) { 10701 setMountPlacement(renderedPlacement); 10702 } 10703 }, [lazyFlip, lockAlign, mounted, isPositioned, renderedPlacement, renderedSide, renderedAlign, side, placementAlign]); 10704 const arrowStyles = React52.useMemo(() => ({ 10705 position: "absolute", 10706 top: middlewareData.arrow?.y, 10707 left: middlewareData.arrow?.x 10708 }), [middlewareData.arrow]); 10709 const arrowUncentered = middlewareData.arrow?.centerOffset !== 0; 10710 return React52.useMemo(() => ({ 10711 positionerStyles: floatingStyles, 10712 arrowStyles, 10713 arrowRef, 10714 arrowUncentered, 10715 side: logicalRenderedSide, 10716 align: renderedAlign, 10717 physicalSide: renderedSide, 10718 anchorHidden: anchorHidden2, 10719 refs, 10720 context, 10721 isPositioned, 10722 update: update2 10723 }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden2, refs, context, isPositioned, update2]); 10724 } 10725 function isRef(param) { 10726 return param != null && "current" in param; 10727 } 10728 10729 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs 10730 function getDisabledMountTransitionStyles(transitionStatus) { 10731 return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT; 10732 } 10733 10734 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePositioner.mjs 10735 function usePositioner(componentProps, state, { 10736 styles, 10737 transitionStatus, 10738 props, 10739 refs, 10740 hidden, 10741 inert = false 10742 }) { 10743 const style = { 10744 ...styles 10745 }; 10746 if (inert) { 10747 style.pointerEvents = "none"; 10748 } 10749 return useRenderElement("div", componentProps, { 10750 state, 10751 ref: refs, 10752 props: [{ 10753 role: "presentation", 10754 hidden, 10755 style 10756 }, getDisabledMountTransitionStyles(transitionStatus), props], 10757 stateAttributesMapping: popupStateMapping 10758 }); 10759 } 10760 10761 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/useAnchoredPopupScrollLock.mjs 10762 var React53 = __toESM(require_react(), 1); 10763 var VIEWPORT_WIDTH_TOLERANCE_PX = 20; 10764 function useAnchoredPopupScrollLock(enabled, touchOpen, positionerElement, referenceElement) { 10765 const [touchOpenShouldLockScroll, setTouchOpenShouldLockScroll] = React53.useState(false); 10766 useIsoLayoutEffect(() => { 10767 if (!enabled || !touchOpen || positionerElement == null) { 10768 setTouchOpenShouldLockScroll(false); 10769 return; 10770 } 10771 const viewportWidth = ownerDocument(positionerElement).documentElement.clientWidth; 10772 const popupWidth2 = positionerElement.offsetWidth; 10773 setTouchOpenShouldLockScroll(viewportWidth > 0 && popupWidth2 > 0 && popupWidth2 >= viewportWidth - VIEWPORT_WIDTH_TOLERANCE_PX); 10774 }, [enabled, touchOpen, positionerElement]); 10775 useScrollLock(enabled && (!touchOpen || touchOpenShouldLockScroll), referenceElement); 10776 } 10777 10778 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/listbox-separator/ListboxSeparator.mjs 10779 var React54 = __toESM(require_react(), 1); 10780 var ListboxSeparator = /* @__PURE__ */ React54.forwardRef(function ListboxSeparator2(componentProps, forwardedRef) { 10781 const { 10782 className, 10783 render, 10784 orientation = "horizontal", 10785 style, 10786 ...elementProps 10787 } = componentProps; 10788 const state = { 10789 orientation 10790 }; 10791 return useRenderElement("div", componentProps, { 10792 state, 10793 ref: forwardedRef, 10794 props: [{ 10795 role: "presentation" 10796 }, elementProps] 10797 }); 10798 }); 10799 if (true) ListboxSeparator.displayName = "ListboxSeparator"; 10800 10801 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/useRegisteredLabelId.mjs 10802 function useRegisteredLabelId(idProp, setLabelId) { 10803 const id = useBaseUiId(idProp); 10804 useIsoLayoutEffect(() => { 10805 setLabelId(id); 10806 return () => { 10807 setLabelId((currentId) => currentId === id ? void 0 : currentId); 10808 }; 10809 }, [id, setLabelId]); 10810 return id; 10811 } 10812 10813 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/labelable-provider/useLabel.mjs 10814 function useLabel(params = {}) { 10815 const { 10816 id: idProp, 10817 fallbackControlId, 10818 native = false, 10819 setLabelId: setLabelIdProp, 10820 focusControl: focusControlProp 10821 } = params; 10822 const { 10823 controlId: contextControlId, 10824 setLabelId: setContextLabelId 10825 } = useLabelableContext(); 10826 const syncLabelId = useStableCallback((nextLabelId) => { 10827 setContextLabelId(nextLabelId); 10828 setLabelIdProp?.(nextLabelId); 10829 }); 10830 const id = useRegisteredLabelId(idProp, syncLabelId); 10831 const resolvedControlId = contextControlId ?? fallbackControlId; 10832 function focusControl(event) { 10833 if (focusControlProp) { 10834 focusControlProp(event, resolvedControlId); 10835 return; 10836 } 10837 if (!resolvedControlId) { 10838 return; 10839 } 10840 const controlElement = getControlById(event.currentTarget, resolvedControlId); 10841 if (isHTMLElement(controlElement)) { 10842 focusElementWithVisible(controlElement); 10843 } 10844 } 10845 function handleInteraction(event) { 10846 const target = getTarget(event.nativeEvent); 10847 if (closest(target, "button,input,select,textarea")) { 10848 return; 10849 } 10850 if (!event.defaultPrevented && event.detail > 1) { 10851 event.preventDefault(); 10852 } 10853 if (native) { 10854 return; 10855 } 10856 focusControl(event); 10857 } 10858 return native ? { 10859 id, 10860 htmlFor: resolvedControlId, 10861 onMouseDown: handleInteraction 10862 } : { 10863 id, 10864 onClick: handleInteraction, 10865 onPointerDown(event) { 10866 event.preventDefault(); 10867 } 10868 }; 10869 } 10870 function getControlById(label, id) { 10871 let root = label.getRootNode(); 10872 while (isShadowRoot(root)) { 10873 const element = root.getElementById(id); 10874 if (element) { 10875 return element; 10876 } 10877 root = root.host.getRootNode(); 10878 } 10879 return ownerDocument(label).getElementById(id); 10880 } 10881 function focusElementWithVisible(element) { 10882 element.focus({ 10883 // Available from Chrome 144+ (January 2026). 10884 // Safari and Firefox already support it. 10885 focusVisible: true 10886 }); 10887 } 10888 10889 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/ItemIndicator.mjs 10890 var React55 = __toESM(require_react(), 1); 10891 var ItemIndicator = /* @__PURE__ */ React55.memo(/* @__PURE__ */ React55.forwardRef(function ItemIndicator2(componentProps, forwardedRef) { 10892 const { 10893 render, 10894 className, 10895 style, 10896 keepMounted, 10897 selected, 10898 ...elementProps 10899 } = componentProps; 10900 const indicatorRef = React55.useRef(null); 10901 const { 10902 transitionStatus, 10903 setMounted 10904 } = useTransitionStatus(selected); 10905 const state = { 10906 selected, 10907 transitionStatus 10908 }; 10909 const element = useRenderElement("span", componentProps, { 10910 ref: [forwardedRef, indicatorRef], 10911 state, 10912 props: [{ 10913 "aria-hidden": true, 10914 children: "\u2714\uFE0F" 10915 }, elementProps], 10916 stateAttributesMapping: transitionStatusMapping 10917 }); 10918 useOpenChangeComplete({ 10919 batch: true, 10920 enabled: !selected, 10921 open: selected, 10922 ref: indicatorRef, 10923 onComplete() { 10924 if (!selected) { 10925 setMounted(false); 10926 } 10927 } 10928 }); 10929 return element; 10930 })); 10931 if (true) ItemIndicator.displayName = "ItemIndicator"; 10932 10933 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/context-menu/root/ContextMenuRootContext.mjs 10934 var React56 = __toESM(require_react(), 1); 10935 var ContextMenuRootContext = /* @__PURE__ */ React56.createContext(void 0); 10936 if (true) ContextMenuRootContext.displayName = "ContextMenuRootContext"; 10937 function useContextMenuRootContext(optional = true) { 10938 const context = React56.useContext(ContextMenuRootContext); 10939 if (context === void 0 && !optional) { 10940 throw new Error(true ? "Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>." : formatErrorMessage_default(25)); 10941 } 10942 return context; 10943 } 10944 10945 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/index.parts.mjs 10946 var index_parts_exports = {}; 10947 __export(index_parts_exports, { 10948 Arrow: () => MenuArrow, 10949 Backdrop: () => MenuBackdrop, 10950 CheckboxItem: () => MenuCheckboxItem, 10951 CheckboxItemIndicator: () => MenuCheckboxItemIndicator, 10952 Clear: () => MenuClear, 10953 Empty: () => MenuEmpty, 10954 FilterProvider: () => MenuFilterProvider, 10955 Group: () => MenuGroup, 10956 GroupLabel: () => MenuGroupLabel, 10957 Handle: () => MenuHandle, 10958 Input: () => MenuInput, 10959 Item: () => MenuItem, 10960 LinkItem: () => MenuLinkItem, 10961 List: () => MenuList, 10962 Popup: () => MenuPopup, 10963 Portal: () => MenuPortal, 10964 Positioner: () => MenuPositioner, 10965 RadioGroup: () => MenuRadioGroup, 10966 RadioItem: () => MenuRadioItem, 10967 RadioItemIndicator: () => MenuRadioItemIndicator, 10968 Root: () => MenuRoot, 10969 Separator: () => Separator, 10970 SubmenuRoot: () => MenuSubmenuRoot, 10971 SubmenuTrigger: () => MenuSubmenuTrigger, 10972 Trigger: () => MenuTrigger, 10973 Viewport: () => MenuViewport, 10974 createHandle: () => createMenuHandle, 10975 useFilter: () => getFilter 10976 }); 10977 10978 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/arrow/MenuArrow.mjs 10979 var React59 = __toESM(require_react(), 1); 10980 10981 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/positioner/MenuPositionerContext.mjs 10982 var React57 = __toESM(require_react(), 1); 10983 var MenuPositionerContext = /* @__PURE__ */ React57.createContext(void 0); 10984 if (true) MenuPositionerContext.displayName = "MenuPositionerContext"; 10985 function useMenuPositionerContext(optional) { 10986 const context = React57.useContext(MenuPositionerContext); 10987 if (context === void 0 && !optional) { 10988 throw new Error(true ? "Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>." : formatErrorMessage_default(33)); 10989 } 10990 return context; 10991 } 10992 10993 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/root/MenuRootContext.mjs 10994 var React58 = __toESM(require_react(), 1); 10995 var MenuRootContext = /* @__PURE__ */ React58.createContext(void 0); 10996 if (true) MenuRootContext.displayName = "MenuRootContext"; 10997 function useMenuRootContext(optional) { 10998 const context = React58.useContext(MenuRootContext); 10999 if (context === void 0 && !optional) { 11000 throw new Error(true ? "Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>." : formatErrorMessage_default(36)); 11001 } 11002 return context; 11003 } 11004 11005 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/arrow/MenuArrow.mjs 11006 var MenuArrow = /* @__PURE__ */ React59.forwardRef(function MenuArrow2(componentProps, forwardedRef) { 11007 const { 11008 render, 11009 className, 11010 style, 11011 ...elementProps 11012 } = componentProps; 11013 const { 11014 store 11015 } = useMenuRootContext(); 11016 const { 11017 arrowRef, 11018 side, 11019 align, 11020 arrowUncentered, 11021 arrowStyles 11022 } = useMenuPositionerContext(); 11023 const open2 = store.useState("open"); 11024 const state = { 11025 open: open2, 11026 side, 11027 align, 11028 uncentered: arrowUncentered 11029 }; 11030 return useRenderElement("div", componentProps, { 11031 ref: [arrowRef, forwardedRef], 11032 stateAttributesMapping: popupStateMapping, 11033 state, 11034 props: { 11035 style: arrowStyles, 11036 "aria-hidden": true, 11037 ...elementProps 11038 } 11039 }); 11040 }); 11041 if (true) MenuArrow.displayName = "MenuArrow"; 11042 11043 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/backdrop/MenuBackdrop.mjs 11044 var React60 = __toESM(require_react(), 1); 11045 var MenuBackdrop = /* @__PURE__ */ React60.forwardRef(function MenuBackdrop2(componentProps, forwardedRef) { 11046 const { 11047 render, 11048 className, 11049 style, 11050 ...elementProps 11051 } = componentProps; 11052 const { 11053 store 11054 } = useMenuRootContext(); 11055 const open2 = store.useState("open"); 11056 const mounted = store.useState("mounted"); 11057 const transitionStatus = store.useState("transitionStatus"); 11058 const lastOpenChangeReason = store.useState("lastOpenChangeReason"); 11059 const contextMenuContext = useContextMenuRootContext(); 11060 const state = { 11061 open: open2, 11062 transitionStatus 11063 }; 11064 return useRenderElement("div", componentProps, { 11065 ref: contextMenuContext?.backdropRef ? [forwardedRef, contextMenuContext.backdropRef] : forwardedRef, 11066 state, 11067 stateAttributesMapping: popupTransitionStateMapping, 11068 props: [{ 11069 role: "presentation", 11070 hidden: !mounted, 11071 style: { 11072 pointerEvents: lastOpenChangeReason === reason_parts_exports.triggerHover ? "none" : void 0, 11073 userSelect: "none", 11074 WebkitUserSelect: "none" 11075 } 11076 }, elementProps] 11077 }); 11078 }); 11079 if (true) MenuBackdrop.displayName = "MenuBackdrop"; 11080 11081 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItem.mjs 11082 var React65 = __toESM(require_react(), 1); 11083 11084 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterContext.mjs 11085 var React61 = __toESM(require_react(), 1); 11086 var MenuFilterImplContext = /* @__PURE__ */ React61.createContext(null); 11087 if (true) MenuFilterImplContext.displayName = "MenuFilterImplContext"; 11088 function useMenuFilterImpl(scope = "root") { 11089 const impl = React61.useContext(MenuFilterImplContext); 11090 const root = React61.useContext(MenuRootContext); 11091 if (impl === null || root === void 0) { 11092 return null; 11093 } 11094 const filterable = scope === "submenu-trigger" ? root.virtualFocus || root.parentVirtualFocus : root.virtualFocus; 11095 return filterable ? impl : null; 11096 } 11097 function useMenuFilterPart(part) { 11098 if (useMenuFilterImpl() === null) { 11099 throw new Error(true ? `Base UI: <Menu.$part}> must be placed in a menu wrapped in <Menu.FilterProvider>. It reads the filter query and the matching items from the provider, which a plain menu does not have. Wrap the <Menu.Root> or <Menu.SubmenuRoot> it belongs to in <Menu.FilterProvider>. See https://base-ui.com/react/components/menu#filtering` : formatErrorMessage_default(104, part)); 11100 } 11101 } 11102 var UNFILTERED = { 11103 visible: true, 11104 ref: null 11105 }; 11106 function useUnfilteredItem() { 11107 return UNFILTERED; 11108 } 11109 function useMenuFilterItem(props, forwardedRef, scope = "root") { 11110 const impl = useMenuFilterImpl(scope); 11111 const useItem = (scope === "submenu-trigger" ? impl?.useSubmenuTrigger : impl?.useItem) ?? useUnfilteredItem; 11112 const item = useItem({ 11113 label: props.label, 11114 children: props.children, 11115 render: props.render 11116 }); 11117 const ref = useMergedRefs(forwardedRef, item.ref); 11118 return { 11119 visible: item.visible, 11120 ref, 11121 props: item.props 11122 }; 11123 } 11124 11125 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItemContext.mjs 11126 var React62 = __toESM(require_react(), 1); 11127 var MenuCheckboxItemContext = /* @__PURE__ */ React62.createContext(void 0); 11128 if (true) MenuCheckboxItemContext.displayName = "MenuCheckboxItemContext"; 11129 function useMenuCheckboxItemContext() { 11130 const context = React62.useContext(MenuCheckboxItemContext); 11131 if (context === void 0) { 11132 throw new Error(true ? "Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>." : formatErrorMessage_default(30)); 11133 } 11134 return context; 11135 } 11136 11137 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/item/useMenuItem.mjs 11138 var React64 = __toESM(require_react(), 1); 11139 11140 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/item/useMenuItemCommonProps.mjs 11141 var React63 = __toESM(require_react(), 1); 11142 function preventMouseDownDefault(event) { 11143 event.preventDefault(); 11144 } 11145 function useMenuItemCommonProps(params) { 11146 const { 11147 closeOnClick, 11148 highlighted, 11149 id, 11150 nodeId, 11151 store, 11152 typingRef, 11153 itemRef, 11154 itemMetadata 11155 } = params; 11156 const rootContext = useMenuRootContext(); 11157 const contextMenuContext = useContextMenuRootContext(true); 11158 const isSubmenuTrigger = itemMetadata.type === "submenu-trigger"; 11159 const virtualFocus = isSubmenuTrigger ? rootContext.parentVirtualFocus : rootContext.virtualFocus; 11160 const selectionStore = isSubmenuTrigger && rootContext.parent.type === "menu" ? rootContext.parent.store : rootContext.store; 11161 const ariaSelected = selectionStore.useState("webkitAriaSelected", highlighted); 11162 const { 11163 events: menuEvents 11164 } = store.useState("floatingTreeRoot"); 11165 const open2 = store.useState("open"); 11166 const isContextMenu = contextMenuContext !== void 0; 11167 const tabIndex = !virtualFocus && open2 && highlighted ? 0 : -1; 11168 return React63.useMemo(() => ({ 11169 id, 11170 role: "menuitem", 11171 tabIndex, 11172 "aria-selected": ariaSelected, 11173 // Real focus stays on the input or list that owns virtual navigation. 11174 onMouseDown: virtualFocus ? preventMouseDownDefault : void 0, 11175 onKeyDown(event) { 11176 if (event.key === " " && typingRef?.current) { 11177 event.preventDefault(); 11178 } 11179 }, 11180 onMouseMove(event) { 11181 if (!nodeId) { 11182 return; 11183 } 11184 menuEvents.emit("itemhover", { 11185 nodeId, 11186 target: event.currentTarget 11187 }); 11188 }, 11189 onClick(event) { 11190 if (closeOnClick) { 11191 menuEvents.emit("close", { 11192 domEvent: event.nativeEvent, 11193 reason: reason_parts_exports.itemPress 11194 }); 11195 } 11196 }, 11197 onMouseUp(event) { 11198 if (contextMenuContext) { 11199 const initialCursorPoint = contextMenuContext.initialCursorPointRef.current; 11200 contextMenuContext.initialCursorPointRef.current = null; 11201 if (isContextMenu && initialCursorPoint && Math.abs(event.clientX - initialCursorPoint.x) <= 1 && Math.abs(event.clientY - initialCursorPoint.y) <= 1) { 11202 return; 11203 } 11204 if (isContextMenu && !parts_exports.os.mac && event.button === 2) { 11205 return; 11206 } 11207 } 11208 if (itemRef.current && store.context.allowMouseUpTriggerRef.current && (!isContextMenu || event.button === 2)) { 11209 if (itemMetadata.type === "regular-item") { 11210 dispatchClickWithModifiers(itemRef.current, event, { 11211 detail: 1, 11212 pointerType: "mouse" 11213 }); 11214 } 11215 } 11216 } 11217 }), [closeOnClick, tabIndex, id, menuEvents, nodeId, store.context.allowMouseUpTriggerRef, typingRef, itemRef, contextMenuContext, isContextMenu, itemMetadata.type, ariaSelected, virtualFocus]); 11218 } 11219 11220 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/item/useMenuItem.mjs 11221 var REGULAR_ITEM = { 11222 type: "regular-item" 11223 }; 11224 function useMenuItem(params) { 11225 const { 11226 closeOnClick, 11227 disabled: disabled2, 11228 highlighted, 11229 id, 11230 store, 11231 typingRef = store.context.typingRef, 11232 nativeButton, 11233 itemMetadata, 11234 nodeId 11235 } = params; 11236 const itemRef = React64.useRef(null); 11237 const { 11238 getButtonProps, 11239 buttonRef 11240 } = useButton({ 11241 disabled: disabled2, 11242 focusableWhenDisabled: true, 11243 native: nativeButton, 11244 composite: true 11245 }); 11246 const commonProps = useMenuItemCommonProps({ 11247 closeOnClick, 11248 highlighted, 11249 id, 11250 nodeId, 11251 store, 11252 typingRef, 11253 itemRef, 11254 itemMetadata 11255 }); 11256 const getItemProps = React64.useCallback((externalProps) => { 11257 return mergeProps(commonProps, { 11258 onMouseEnter(event) { 11259 if (itemMetadata.type !== "submenu-trigger") { 11260 return; 11261 } 11262 itemMetadata.setActive(event.nativeEvent); 11263 } 11264 }, externalProps, getButtonProps); 11265 }, [commonProps, getButtonProps, itemMetadata]); 11266 const mergedRef = useMergedRefs(itemRef, buttonRef); 11267 return React64.useMemo(() => ({ 11268 getItemProps, 11269 itemRef: mergedRef 11270 }), [getItemProps, mergedRef]); 11271 } 11272 11273 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItemDataAttributes.mjs 11274 var checked = "data-checked"; 11275 var unchecked = "data-unchecked"; 11276 11277 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/utils/stateAttributesMapping.mjs 11278 var itemMapping = { 11279 checked(value) { 11280 if (value) { 11281 return { 11282 [checked]: "" 11283 }; 11284 } 11285 return { 11286 [unchecked]: "" 11287 }; 11288 }, 11289 ...transitionStatusMapping 11290 }; 11291 11292 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItem.mjs 11293 var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1); 11294 var MenuCheckboxItemPlain = /* @__PURE__ */ React65.forwardRef(function MenuCheckboxItemPlain2(componentProps, forwardedRef) { 11295 const { 11296 render, 11297 className, 11298 id: idProp, 11299 label, 11300 nativeButton = false, 11301 disabled: disabledProp = false, 11302 closeOnClick = false, 11303 checked: checked2 = false, 11304 onCheckedChange, 11305 style, 11306 ...elementProps 11307 } = componentProps; 11308 const { 11309 store 11310 } = useMenuRootContext(); 11311 const listItem = useCompositeListItem({ 11312 guess: true, 11313 label 11314 }); 11315 const id = useBaseUiId(idProp); 11316 const rootDisabled = store.useState("disabled"); 11317 const highlighted = store.useState("isActive", listItem.index); 11318 const nodeId = store.useState("floatingNodeId"); 11319 const itemProps = store.useState("itemProps"); 11320 const disabled2 = disabledProp || rootDisabled; 11321 const { 11322 getItemProps, 11323 itemRef 11324 } = useMenuItem({ 11325 closeOnClick, 11326 disabled: disabled2, 11327 highlighted, 11328 id, 11329 store, 11330 nativeButton, 11331 nodeId, 11332 itemMetadata: REGULAR_ITEM 11333 }); 11334 const state = React65.useMemo(() => ({ 11335 disabled: disabled2, 11336 highlighted, 11337 checked: checked2 11338 }), [disabled2, highlighted, checked2]); 11339 function handleClick(event) { 11340 const details = createChangeEventDetails(reason_parts_exports.itemPress, event.nativeEvent, void 0, { 11341 preventUnmountOnClose: NOOP 11342 }); 11343 onCheckedChange?.(!checked2, details); 11344 } 11345 const element = useRenderElement("div", componentProps, { 11346 state, 11347 stateAttributesMapping: itemMapping, 11348 props: [itemProps, { 11349 role: "menuitemcheckbox", 11350 "aria-checked": checked2, 11351 onClick: handleClick 11352 }, elementProps, getItemProps], 11353 ref: [itemRef, forwardedRef, listItem.ref] 11354 }); 11355 return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MenuCheckboxItemContext.Provider, { 11356 value: state, 11357 children: element 11358 }); 11359 }); 11360 if (true) MenuCheckboxItemPlain.displayName = "MenuCheckboxItemPlain"; 11361 var MenuCheckboxItem = /* @__PURE__ */ React65.forwardRef(function MenuCheckboxItem2(props, forwardedRef) { 11362 const { 11363 checked: checkedProp, 11364 defaultChecked, 11365 onCheckedChange, 11366 ...plainProps 11367 } = props; 11368 const [checked2, setChecked] = useControlled({ 11369 controlled: checkedProp, 11370 default: defaultChecked ?? false, 11371 name: "MenuCheckboxItem", 11372 state: "checked" 11373 }); 11374 const filterItem = useMenuFilterItem(props, forwardedRef); 11375 function handleCheckedChange(nextChecked, eventDetails) { 11376 onCheckedChange?.(nextChecked, eventDetails); 11377 if (!eventDetails.isCanceled) { 11378 setChecked(nextChecked); 11379 } 11380 } 11381 if (!filterItem.visible) { 11382 return null; 11383 } 11384 return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MenuCheckboxItemPlain, { 11385 ...plainProps, 11386 checked: checked2, 11387 onCheckedChange: handleCheckedChange, 11388 ref: filterItem.ref 11389 }); 11390 }); 11391 if (true) MenuCheckboxItem.displayName = "MenuCheckboxItem"; 11392 11393 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.mjs 11394 var React66 = __toESM(require_react(), 1); 11395 var MenuCheckboxItemIndicator = /* @__PURE__ */ React66.forwardRef(function MenuCheckboxItemIndicator2(componentProps, forwardedRef) { 11396 const { 11397 render, 11398 className, 11399 style, 11400 keepMounted = false, 11401 ...elementProps 11402 } = componentProps; 11403 const item = useMenuCheckboxItemContext(); 11404 const indicatorRef = React66.useRef(null); 11405 const { 11406 transitionStatus, 11407 mounted, 11408 setMounted 11409 } = useTransitionStatus(item.checked); 11410 useOpenChangeComplete({ 11411 batch: true, 11412 enabled: !item.checked, 11413 open: item.checked, 11414 ref: indicatorRef, 11415 onComplete() { 11416 if (!item.checked) { 11417 setMounted(false); 11418 } 11419 } 11420 }); 11421 const state = { 11422 checked: item.checked, 11423 disabled: item.disabled, 11424 highlighted: item.highlighted, 11425 transitionStatus 11426 }; 11427 const element = useRenderElement("span", componentProps, { 11428 state, 11429 ref: [forwardedRef, indicatorRef], 11430 stateAttributesMapping: itemMapping, 11431 props: { 11432 "aria-hidden": true, 11433 ...elementProps 11434 }, 11435 enabled: keepMounted || mounted 11436 }); 11437 return element; 11438 }); 11439 if (true) MenuCheckboxItemIndicator.displayName = "MenuCheckboxItemIndicator"; 11440 11441 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/group/MenuGroup.mjs 11442 var React68 = __toESM(require_react(), 1); 11443 11444 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/group/MenuGroupContext.mjs 11445 var React67 = __toESM(require_react(), 1); 11446 var MenuGroupContext = /* @__PURE__ */ React67.createContext(void 0); 11447 if (true) MenuGroupContext.displayName = "MenuGroupContext"; 11448 function useMenuGroupRootContext() { 11449 const context = React67.useContext(MenuGroupContext); 11450 if (context === void 0) { 11451 throw new Error(true ? "Base UI: MenuGroupContext is missing. Menu group parts must be used within <Menu.Group> or <Menu.RadioGroup>." : formatErrorMessage_default(31)); 11452 } 11453 return context; 11454 } 11455 11456 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/group/MenuGroup.mjs 11457 var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1); 11458 var MenuGroupPlain = /* @__PURE__ */ React68.forwardRef(function MenuGroupPlain2(componentProps, forwardedRef) { 11459 const { 11460 render, 11461 className, 11462 style, 11463 ...elementProps 11464 } = componentProps; 11465 const [labelId, setLabelId] = React68.useState(void 0); 11466 const element = useRenderElement("div", componentProps, { 11467 ref: forwardedRef, 11468 props: { 11469 role: "group", 11470 "aria-labelledby": labelId, 11471 ...elementProps 11472 } 11473 }); 11474 return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MenuGroupContext.Provider, { 11475 value: setLabelId, 11476 children: element 11477 }); 11478 }); 11479 if (true) MenuGroupPlain.displayName = "MenuGroupPlain"; 11480 var MenuGroup = /* @__PURE__ */ React68.forwardRef(function MenuGroup2(props, forwardedRef) { 11481 const Group3 = useMenuFilterImpl()?.Group ?? MenuGroupPlain; 11482 return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Group3, { 11483 ...props, 11484 ref: forwardedRef 11485 }); 11486 }); 11487 if (true) MenuGroup.displayName = "MenuGroup"; 11488 11489 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/group-label/MenuGroupLabel.mjs 11490 var React69 = __toESM(require_react(), 1); 11491 var MenuGroupLabel = /* @__PURE__ */ React69.forwardRef(function MenuGroupLabel2(componentProps, forwardedRef) { 11492 const { 11493 render, 11494 className, 11495 style, 11496 id: idProp, 11497 ...elementProps 11498 } = componentProps; 11499 const id = useBaseUiId(idProp); 11500 const setLabelId = useMenuGroupRootContext(); 11501 useIsoLayoutEffect(() => { 11502 setLabelId(id); 11503 return () => { 11504 setLabelId((currentId) => currentId === id ? void 0 : currentId); 11505 }; 11506 }, [setLabelId, id]); 11507 return useRenderElement("div", componentProps, { 11508 ref: forwardedRef, 11509 props: { 11510 id, 11511 "aria-hidden": true, 11512 ...elementProps 11513 } 11514 }); 11515 }); 11516 if (true) MenuGroupLabel.displayName = "MenuGroupLabel"; 11517 11518 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/item/MenuItem.mjs 11519 var React70 = __toESM(require_react(), 1); 11520 var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1); 11521 var MenuItemPlain = /* @__PURE__ */ React70.forwardRef(function MenuItemPlain2(componentProps, forwardedRef) { 11522 const { 11523 render, 11524 className, 11525 id: idProp, 11526 label, 11527 nativeButton = false, 11528 disabled: disabledProp = false, 11529 closeOnClick = true, 11530 style, 11531 ...elementProps 11532 } = componentProps; 11533 const { 11534 store 11535 } = useMenuRootContext(); 11536 const listItem = useCompositeListItem({ 11537 guess: true, 11538 label 11539 }); 11540 const id = useBaseUiId(idProp); 11541 const rootDisabled = store.useState("disabled"); 11542 const highlighted = store.useState("isActive", listItem.index); 11543 const nodeId = store.useState("floatingNodeId"); 11544 const itemProps = store.useState("itemProps"); 11545 const disabled2 = disabledProp || rootDisabled; 11546 const { 11547 getItemProps, 11548 itemRef 11549 } = useMenuItem({ 11550 closeOnClick, 11551 disabled: disabled2, 11552 highlighted, 11553 id, 11554 store, 11555 nativeButton, 11556 nodeId, 11557 itemMetadata: REGULAR_ITEM 11558 }); 11559 const state = { 11560 disabled: disabled2, 11561 highlighted 11562 }; 11563 return useRenderElement("div", componentProps, { 11564 state, 11565 props: [itemProps, elementProps, getItemProps], 11566 ref: [itemRef, forwardedRef, listItem.ref] 11567 }); 11568 }); 11569 if (true) MenuItemPlain.displayName = "MenuItemPlain"; 11570 var MenuItem = /* @__PURE__ */ React70.forwardRef(function MenuItem2(props, forwardedRef) { 11571 const filterItem = useMenuFilterItem(props, forwardedRef); 11572 if (!filterItem.visible) { 11573 return null; 11574 } 11575 return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MenuItemPlain, { 11576 ...props, 11577 ref: filterItem.ref 11578 }); 11579 }); 11580 if (true) MenuItem.displayName = "MenuItem"; 11581 11582 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/link-item/MenuLinkItem.mjs 11583 var React71 = __toESM(require_react(), 1); 11584 var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1); 11585 var MenuLinkItemPlain = /* @__PURE__ */ React71.forwardRef(function MenuLinkItemPlain2(componentProps, forwardedRef) { 11586 const { 11587 render, 11588 className, 11589 id: idProp, 11590 label, 11591 closeOnClick = false, 11592 style, 11593 ...elementProps 11594 } = componentProps; 11595 const { 11596 store 11597 } = useMenuRootContext(); 11598 const linkRef = React71.useRef(null); 11599 const listItem = useCompositeListItem({ 11600 guess: true, 11601 label 11602 }); 11603 const id = useBaseUiId(idProp); 11604 const highlighted = store.useState("isActive", listItem.index); 11605 const nodeId = store.useState("floatingNodeId"); 11606 const itemProps = store.useState("itemProps"); 11607 const typingRef = store.context.typingRef; 11608 const { 11609 getButtonProps, 11610 buttonRef 11611 } = useButton({ 11612 native: false, 11613 composite: true 11614 }); 11615 const commonProps = useMenuItemCommonProps({ 11616 closeOnClick, 11617 highlighted, 11618 id, 11619 nodeId, 11620 store, 11621 typingRef, 11622 itemRef: linkRef, 11623 itemMetadata: REGULAR_ITEM 11624 }); 11625 function getItemProps(externalProps) { 11626 return mergeProps(commonProps, externalProps, getButtonProps); 11627 } 11628 const state = { 11629 highlighted 11630 }; 11631 return useRenderElement("a", componentProps, { 11632 state, 11633 props: [itemProps, elementProps, getItemProps], 11634 ref: [linkRef, buttonRef, forwardedRef, listItem.ref] 11635 }); 11636 }); 11637 if (true) MenuLinkItemPlain.displayName = "MenuLinkItemPlain"; 11638 var MenuLinkItem = /* @__PURE__ */ React71.forwardRef(function MenuLinkItem2(props, forwardedRef) { 11639 const filterItem = useMenuFilterItem(props, forwardedRef); 11640 if (!filterItem.visible) { 11641 return null; 11642 } 11643 return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuLinkItemPlain, { 11644 ...props, 11645 ref: filterItem.ref 11646 }); 11647 }); 11648 if (true) MenuLinkItem.displayName = "MenuLinkItem"; 11649 11650 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/popup/MenuPopup.mjs 11651 var React76 = __toESM(require_react(), 1); 11652 11653 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/toolbar/root/ToolbarRootContext.mjs 11654 var React72 = __toESM(require_react(), 1); 11655 var ToolbarRootContext = /* @__PURE__ */ React72.createContext(void 0); 11656 if (true) ToolbarRootContext.displayName = "ToolbarRootContext"; 11657 function useToolbarRootContext(optional) { 11658 const context = React72.useContext(ToolbarRootContext); 11659 if (context === void 0 && !optional) { 11660 throw new Error(true ? "Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>." : formatErrorMessage_default(69)); 11661 } 11662 return context; 11663 } 11664 11665 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/submenu-root/MenuSubmenuRootContext.mjs 11666 var React73 = __toESM(require_react(), 1); 11667 var MenuSubmenuRootContext = /* @__PURE__ */ React73.createContext(void 0); 11668 if (true) MenuSubmenuRootContext.displayName = "MenuSubmenuRootContext"; 11669 function useMenuSubmenuRootContext() { 11670 return React73.useContext(MenuSubmenuRootContext); 11671 } 11672 11673 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/resolveRenderedId.mjs 11674 var React74 = __toESM(require_react(), 1); 11675 function resolveRenderedId(props, fallbackId) { 11676 const render = unwrapLazyRenderProp(props.render); 11677 if (/* @__PURE__ */ React74.isValidElement(render)) { 11678 const renderProps = render.props; 11679 if (Object.hasOwn(renderProps, "id")) { 11680 return renderProps.id ?? ""; 11681 } 11682 } 11683 return props.id ?? fallbackId; 11684 } 11685 function useRenderedId(props, defaultId, setId) { 11686 const id = resolveRenderedId(props, defaultId); 11687 const registeredId = id === defaultId ? void 0 : id; 11688 const ref = React74.useCallback((element) => setId?.(element ? registeredId : void 0), [registeredId, setId]); 11689 return [id, ref]; 11690 } 11691 11692 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/resolvePopupLabel.mjs 11693 var React75 = __toESM(require_react(), 1); 11694 function resolvePopupLabel(props, activeTriggerElement, activeTriggerId) { 11695 const render = unwrapLazyRenderProp(props.render); 11696 const renderedElementProps = /* @__PURE__ */ React75.isValidElement(render) ? render.props : void 0; 11697 const ariaLabel = props["aria-label"] ?? renderedElementProps?.["aria-label"]; 11698 let ariaLabelledBy = props["aria-labelledby"] ?? renderedElementProps?.["aria-labelledby"]; 11699 if (ariaLabelledBy == null && !ariaLabel) { 11700 ariaLabelledBy = activeTriggerElement ? activeTriggerElement.id || void 0 : activeTriggerId || void 0; 11701 } 11702 return ariaLabelledBy; 11703 } 11704 11705 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/popup/MenuPopup.mjs 11706 var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1); 11707 var MenuPopupPlain = /* @__PURE__ */ React76.forwardRef(function MenuPopupPlain2(componentProps, forwardedRef) { 11708 const { 11709 render, 11710 className, 11711 style, 11712 finalFocus, 11713 id: idProp, 11714 initialFocus: initialFocusProp, 11715 ...elementProps 11716 } = componentProps; 11717 const { 11718 store, 11719 defaultFloatingId, 11720 setRenderedFloatingId, 11721 virtualFocus, 11722 orientation 11723 } = useMenuRootContext(); 11724 const inheritedSubmenuRootContext = useMenuSubmenuRootContext(); 11725 const { 11726 side, 11727 align 11728 } = useMenuPositionerContext(); 11729 const insideToolbar = useToolbarRootContext(true) != null; 11730 const open2 = store.useState("open"); 11731 const transitionStatus = store.useState("transitionStatus"); 11732 const popupProps = store.useState("popupProps"); 11733 const mounted = store.useState("mounted"); 11734 const instantType = store.useState("instantType"); 11735 const activeTriggerElement = store.useState("activeTriggerElement"); 11736 const parent = store.useState("parent"); 11737 const lastOpenChangeReason = store.useState("lastOpenChangeReason"); 11738 const rootId = store.useState("rootId"); 11739 const floatingContext = store.useState("floatingRootContext"); 11740 const floatingTreeRoot = store.useState("floatingTreeRoot"); 11741 const closeDelay = store.useState("closeDelay"); 11742 const hoverEnabled = store.useState("hoverEnabled"); 11743 const disabled2 = store.useState("disabled"); 11744 const openMethod = store.useState("openMethod"); 11745 const activeTriggerId = store.useState("activeTriggerId"); 11746 const listElement = store.useState("listElement"); 11747 const [id, registerIdRef] = useRenderedId(componentProps, defaultFloatingId, setRenderedFloatingId); 11748 const ariaLabelledBy = resolvePopupLabel(componentProps, activeTriggerElement, activeTriggerId); 11749 const submenuRootContext = parent.type === "menu" ? inheritedSubmenuRootContext : void 0; 11750 const isContextMenu = parent.type === "context-menu"; 11751 let initialFocus = initialFocusProp ?? parent.type !== "menu"; 11752 if (initialFocusProp === void 0 && listElement && parent.type !== "menu") { 11753 initialFocus = () => { 11754 if (store.state.activeIndex !== null) { 11755 return false; 11756 } 11757 return listElement; 11758 }; 11759 } 11760 useOpenChangeComplete({ 11761 open: open2, 11762 ref: store.context.popupRef, 11763 onComplete() { 11764 if (open2) { 11765 store.context.onOpenChangeComplete?.(true); 11766 } 11767 } 11768 }); 11769 React76.useEffect(() => { 11770 function handleClose(event) { 11771 store.setOpen(false, createChangeEventDetails(event.reason, event.domEvent)); 11772 } 11773 floatingTreeRoot.events.on("close", handleClose); 11774 return () => { 11775 floatingTreeRoot.events.off("close", handleClose); 11776 }; 11777 }, [floatingTreeRoot.events, store]); 11778 useHoverFloatingInteraction(floatingContext, { 11779 enabled: hoverEnabled && !disabled2 && !isContextMenu && parent.type !== "menubar", 11780 closeDelay 11781 }); 11782 const setPopupElement = store.useStateSetter("popupElement"); 11783 const useParentHandoff = React76.useContext(MenuFilterImplContext)?.useParentHandoff ?? useNoParentHandoff; 11784 const { 11785 parentVirtualFocusRef, 11786 handleFocus 11787 } = useParentHandoff(store, parent, open2, virtualFocus); 11788 const state = { 11789 transitionStatus, 11790 side, 11791 align, 11792 open: open2, 11793 nested: parent.type === "menu", 11794 instant: instantType 11795 }; 11796 const element = useRenderElement("div", componentProps, { 11797 state, 11798 ref: [forwardedRef, store.context.popupRef, setPopupElement, registerIdRef], 11799 stateAttributesMapping: popupTransitionStateMapping, 11800 props: [popupProps, { 11801 id, 11802 // A rendered `Menu.List` carries the `menu` semantics instead. 11803 ...listElement ? { 11804 role: "presentation" 11805 } : { 11806 role: "menu", 11807 // `menu` is implicitly vertical, so only the non-default value needs to be 11808 // rendered. 11809 "aria-orientation": orientation === "horizontal" ? "horizontal" : void 0, 11810 "aria-labelledby": ariaLabelledBy 11811 }, 11812 onKeyDown(event) { 11813 submenuRootContext?.onPopupKeyDown?.(event); 11814 if (insideToolbar && COMPOSITE_KEYS.has(event.key)) { 11815 event.stopPropagation(); 11816 } 11817 }, 11818 onFocus: handleFocus 11819 }, getDisabledMountTransitionStyles(transitionStatus), elementProps, { 11820 "data-rootownerid": rootId 11821 }] 11822 }); 11823 let returnFocus = parent.type === void 0 || isContextMenu; 11824 if (activeTriggerElement || parent.type === "menubar" && lastOpenChangeReason !== reason_parts_exports.outsidePress) { 11825 returnFocus = true; 11826 } 11827 const dynamicReturnFocus = submenuRootContext?.getReturnElement ?? parentVirtualFocusRef; 11828 return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FloatingFocusManager, { 11829 context: floatingContext, 11830 openInteractionType: openMethod, 11831 modal: isContextMenu, 11832 disabled: !mounted, 11833 returnFocus: finalFocus ?? dynamicReturnFocus ?? returnFocus, 11834 explicitReturnFocus: finalFocus === void 0 && dynamicReturnFocus ? false : void 0, 11835 initialFocus, 11836 restoreFocus: true, 11837 getInsideElements: parent.type === void 0 ? () => [store.context.beforeTriggerFocusGuardRef.current] : void 0, 11838 externalTree: parent.type !== "menubar" ? floatingTreeRoot : void 0, 11839 previousFocusableElement: activeTriggerElement, 11840 nextFocusableElement: parent.type === void 0 ? store.context.triggerFocusTargetRef : void 0, 11841 beforeContentFocusGuardRef: store.context.beforeContentFocusGuardRef, 11842 children: element 11843 }); 11844 }); 11845 if (true) MenuPopupPlain.displayName = "MenuPopupPlain"; 11846 var NO_PARENT_HANDOFF = { 11847 parentVirtualFocusRef: void 0, 11848 handleFocus: void 0 11849 }; 11850 function useNoParentHandoff() { 11851 return NO_PARENT_HANDOFF; 11852 } 11853 var MenuPopup = /* @__PURE__ */ React76.forwardRef(function MenuPopup2(props, forwardedRef) { 11854 const Popup4 = useMenuFilterImpl()?.Popup ?? MenuPopupPlain; 11855 return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Popup4, { 11856 ...props, 11857 ref: forwardedRef 11858 }); 11859 }); 11860 if (true) MenuPopup.displayName = "MenuPopup"; 11861 11862 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/portal/MenuPortal.mjs 11863 var React78 = __toESM(require_react(), 1); 11864 11865 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/portal/MenuPortalContext.mjs 11866 var React77 = __toESM(require_react(), 1); 11867 var MenuPortalContext = /* @__PURE__ */ React77.createContext(void 0); 11868 if (true) MenuPortalContext.displayName = "MenuPortalContext"; 11869 function useMenuPortalContext() { 11870 const value = React77.useContext(MenuPortalContext); 11871 if (value === void 0) { 11872 throw new Error(true ? "Base UI: <Menu.Portal> is missing." : formatErrorMessage_default(32)); 11873 } 11874 return value; 11875 } 11876 11877 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/portal/MenuPortal.mjs 11878 var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1); 11879 var MenuPortal = /* @__PURE__ */ React78.forwardRef(function MenuPortal2(props, forwardedRef) { 11880 const { 11881 keepMounted = false, 11882 ...portalProps 11883 } = props; 11884 const { 11885 store, 11886 parent 11887 } = useMenuRootContext(); 11888 const mounted = store.useState("mounted"); 11889 const shouldRender = mounted || keepMounted; 11890 if (!shouldRender) { 11891 return null; 11892 } 11893 const portalOwnerRole = parent.type === "menu" || parent.type === "menubar" ? "group" : void 0; 11894 return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MenuPortalContext.Provider, { 11895 value: keepMounted, 11896 children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FloatingPortal, { 11897 ref: forwardedRef, 11898 ...portalProps, 11899 portalOwnerRole 11900 }) 11901 }); 11902 }); 11903 if (true) MenuPortal.displayName = "MenuPortal"; 11904 11905 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/positioner/MenuPositioner.mjs 11906 var React80 = __toESM(require_react(), 1); 11907 11908 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useTriggerSwitchTransition.mjs 11909 var React79 = __toESM(require_react(), 1); 11910 function useTriggerSwitchTransition(parameters) { 11911 const { 11912 store, 11913 domReference, 11914 positionerElement, 11915 open: open2 11916 } = parameters; 11917 const previousTriggerRef = React79.useRef(null); 11918 const pendingSwitchRef = React79.useRef(null); 11919 const runOnceAnimationsFinish = useAnimationsFinished(positionerElement); 11920 useIsoLayoutEffect(() => { 11921 if (open2) { 11922 return; 11923 } 11924 pendingSwitchRef.current?.abort(); 11925 pendingSwitchRef.current = null; 11926 if (store.state.instantType === "trigger-change") { 11927 store.set("instantType", void 0); 11928 } 11929 }, [open2, store]); 11930 useIsoLayoutEffect(() => { 11931 const currentTrigger = domReference; 11932 const previousTrigger = previousTriggerRef.current; 11933 if (currentTrigger) { 11934 previousTriggerRef.current = currentTrigger; 11935 } 11936 if (!previousTrigger || !currentTrigger || currentTrigger === previousTrigger) { 11937 return void 0; 11938 } 11939 if (!store.select("open")) { 11940 return void 0; 11941 } 11942 store.set("instantType", void 0); 11943 const abortController = new AbortController(); 11944 pendingSwitchRef.current = abortController; 11945 runOnceAnimationsFinish(() => { 11946 if (store.select("open")) { 11947 store.set("instantType", "trigger-change"); 11948 } 11949 }, abortController.signal); 11950 return () => { 11951 abortController.abort(); 11952 }; 11953 }, [domReference, runOnceAnimationsFinish, store]); 11954 } 11955 11956 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/positioner/MenuPositioner.mjs 11957 var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1); 11958 var MenuPositioner = /* @__PURE__ */ React80.forwardRef(function MenuPositioner2(componentProps, forwardedRef) { 11959 const { 11960 anchor: anchorProp, 11961 positionMethod: positionMethodProp = "absolute", 11962 className, 11963 render, 11964 side, 11965 align: alignProp, 11966 sideOffset: sideOffsetProp = 0, 11967 alignOffset: alignOffsetProp = 0, 11968 collisionBoundary = "clipping-ancestors", 11969 collisionPadding = 5, 11970 arrowPadding = 5, 11971 sticky = false, 11972 disableAnchorTracking = false, 11973 collisionAvoidance: collisionAvoidanceProp = DROPDOWN_COLLISION_AVOIDANCE, 11974 style, 11975 ...elementProps 11976 } = componentProps; 11977 const { 11978 store, 11979 virtualFocus, 11980 syncHighlightedItem 11981 } = useMenuRootContext(); 11982 const keepMounted = useMenuPortalContext(); 11983 const contextMenuContext = useContextMenuRootContext(true); 11984 const parent = store.useState("parent"); 11985 const floatingRootContext = store.useState("floatingRootContext"); 11986 const floatingTreeRoot = store.useState("floatingTreeRoot"); 11987 const mounted = store.useState("mounted"); 11988 const open2 = store.useState("open"); 11989 const modal = store.useState("modal"); 11990 const openMethod = store.useState("openMethod"); 11991 const triggerElement = store.useState("activeTriggerElement"); 11992 const transitionStatus = store.useState("transitionStatus"); 11993 const positionerElement = store.useState("positionerElement"); 11994 const instantType = store.useState("instantType"); 11995 const adaptiveOrigin2 = store.useState("adaptiveOrigin"); 11996 const lastOpenChangeReason = store.useState("lastOpenChangeReason"); 11997 const floatingNodeId = store.useState("floatingNodeId"); 11998 const floatingParentNodeId = store.useState("floatingParentNodeId"); 11999 const domReference = floatingRootContext.useState("domReferenceElement"); 12000 let anchor = anchorProp; 12001 let sideOffset = sideOffsetProp; 12002 let alignOffset = alignOffsetProp; 12003 let align = alignProp; 12004 let collisionAvoidance = collisionAvoidanceProp; 12005 if (parent.type === "context-menu") { 12006 anchor = anchorProp ?? parent.context?.anchor; 12007 align = align ?? "start"; 12008 if (!side && align !== "center") { 12009 alignOffset = componentProps.alignOffset ?? 2; 12010 sideOffset = componentProps.sideOffset ?? -5; 12011 } 12012 } 12013 let computedSide = side; 12014 let computedAlign = align; 12015 if (parent.type === "menu") { 12016 computedSide = computedSide ?? "inline-end"; 12017 computedAlign = computedAlign ?? "start"; 12018 collisionAvoidance = componentProps.collisionAvoidance ?? POPUP_COLLISION_AVOIDANCE; 12019 } else if (parent.type === "menubar") { 12020 computedSide = computedSide ?? (parent.context.orientation === "vertical" ? "inline-end" : "bottom"); 12021 computedAlign = computedAlign ?? "start"; 12022 } 12023 const contextMenu = parent.type === "context-menu"; 12024 const positioner = useAnchorPositioning({ 12025 anchor, 12026 floatingRootContext, 12027 positionMethod: contextMenuContext ? "fixed" : positionMethodProp, 12028 mounted, 12029 side: computedSide, 12030 sideOffset, 12031 align: computedAlign, 12032 alignOffset, 12033 arrowPadding: contextMenu ? 0 : arrowPadding, 12034 collisionBoundary, 12035 collisionPadding, 12036 sticky, 12037 nodeId: floatingNodeId, 12038 keepMounted, 12039 disableAnchorTracking, 12040 collisionAvoidance, 12041 shift: contextMenu ? { 12042 crossAxis: !("side" in collisionAvoidance && collisionAvoidance.side === "flip"), 12043 rootBoundary: "layoutViewport" 12044 } : void 0, 12045 externalTree: floatingTreeRoot, 12046 adaptiveOrigin: adaptiveOrigin2, 12047 lazyFlip: virtualFocus ? "placement" : false 12048 }); 12049 React80.useEffect(() => { 12050 function onMenuOpenChange(details) { 12051 if (details.open) { 12052 if (details.parentNodeId === floatingNodeId) { 12053 store.set("hoverEnabled", false); 12054 } 12055 if (details.nodeId !== floatingNodeId && details.parentNodeId === store.select("floatingParentNodeId")) { 12056 store.setOpen(false, createChangeEventDetails(reason_parts_exports.siblingOpen)); 12057 } 12058 } 12059 } 12060 floatingTreeRoot.events.on("menuopenchange", onMenuOpenChange); 12061 return () => { 12062 floatingTreeRoot.events.off("menuopenchange", onMenuOpenChange); 12063 }; 12064 }, [store, floatingTreeRoot.events, floatingNodeId]); 12065 React80.useEffect(() => { 12066 if (store.select("floatingParentNodeId") == null) { 12067 return void 0; 12068 } 12069 function onParentClose(details) { 12070 if (details.open || details.nodeId !== store.select("floatingParentNodeId")) { 12071 return; 12072 } 12073 const reason = details.reason ?? reason_parts_exports.siblingOpen; 12074 store.setOpen(false, createChangeEventDetails(reason)); 12075 } 12076 floatingTreeRoot.events.on("menuopenchange", onParentClose); 12077 return () => { 12078 floatingTreeRoot.events.off("menuopenchange", onParentClose); 12079 }; 12080 }, [floatingTreeRoot.events, store]); 12081 const closeTimeout = useTimeout(); 12082 React80.useEffect(() => { 12083 if (!open2) { 12084 closeTimeout.clear(); 12085 } 12086 }, [open2, closeTimeout]); 12087 React80.useEffect(() => { 12088 function onItemHover(event) { 12089 if (!open2 || event.nodeId !== store.select("floatingParentNodeId")) { 12090 return; 12091 } 12092 if (event.target && triggerElement && triggerElement !== event.target) { 12093 const delay = store.select("closeDelay"); 12094 if (delay > 0) { 12095 if (!closeTimeout.isStarted()) { 12096 closeTimeout.start(delay, () => { 12097 store.setOpen(false, createChangeEventDetails(reason_parts_exports.siblingOpen)); 12098 }); 12099 } 12100 } else { 12101 store.setOpen(false, createChangeEventDetails(reason_parts_exports.siblingOpen)); 12102 } 12103 } else { 12104 closeTimeout.clear(); 12105 } 12106 } 12107 floatingTreeRoot.events.on("itemhover", onItemHover); 12108 return () => { 12109 floatingTreeRoot.events.off("itemhover", onItemHover); 12110 }; 12111 }, [floatingTreeRoot.events, open2, triggerElement, store, closeTimeout]); 12112 React80.useEffect(() => { 12113 const eventDetails = { 12114 open: open2, 12115 nodeId: floatingNodeId, 12116 parentNodeId: floatingParentNodeId, 12117 reason: store.select("lastOpenChangeReason") 12118 }; 12119 floatingTreeRoot.events.emit("menuopenchange", eventDetails); 12120 }, [floatingTreeRoot.events, open2, store, floatingNodeId, floatingParentNodeId]); 12121 useTriggerSwitchTransition({ 12122 store, 12123 domReference, 12124 positionerElement, 12125 open: open2 12126 }); 12127 const state = { 12128 open: open2, 12129 side: positioner.side, 12130 align: positioner.align, 12131 anchorHidden: positioner.anchorHidden, 12132 nested: parent.type === "menu", 12133 instant: instantType 12134 }; 12135 const menubarModal = parent.type === "menubar" && parent.context.modal; 12136 const popupModal = modal && lastOpenChangeReason !== reason_parts_exports.triggerHover; 12137 useAnchoredPopupScrollLock(open2 && (menubarModal || popupModal), openMethod === "touch", positionerElement, triggerElement); 12138 const element = usePositioner(componentProps, state, { 12139 styles: positioner.positionerStyles, 12140 transitionStatus, 12141 props: elementProps, 12142 refs: [forwardedRef, store.useStateSetter("positionerElement")], 12143 hidden: !mounted, 12144 inert: !open2 12145 }); 12146 const shouldRenderBackdrop = mounted && parent.type !== "menu" && (parent.type !== "menubar" && modal && lastOpenChangeReason !== reason_parts_exports.triggerHover || parent.type === "menubar" && parent.context.modal); 12147 let backdropCutout = null; 12148 if (parent.type === "menubar") { 12149 backdropCutout = parent.context.contentElement; 12150 } else if (parent.type === void 0) { 12151 backdropCutout = triggerElement; 12152 } 12153 return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(MenuPositionerContext.Provider, { 12154 value: positioner, 12155 children: [shouldRenderBackdrop && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(InternalBackdrop, { 12156 ref: parent.type === "context-menu" || parent.type === "nested-context-menu" ? parent.context.internalBackdropRef : null, 12157 inert: inertValue(!open2), 12158 cutout: backdropCutout 12159 }), /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FloatingNode, { 12160 id: floatingNodeId, 12161 children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CompositeList, { 12162 elementsRef: store.context.itemDomElements, 12163 labelsRef: store.context.itemLabels, 12164 onMapChange: syncHighlightedItem, 12165 children: element 12166 }) 12167 })] 12168 }); 12169 }); 12170 if (true) MenuPositioner.displayName = "MenuPositioner"; 12171 12172 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/radio-group/MenuRadioGroup.mjs 12173 var React82 = __toESM(require_react(), 1); 12174 12175 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/radio-group/MenuRadioGroupContext.mjs 12176 var React81 = __toESM(require_react(), 1); 12177 var MenuRadioGroupContext = /* @__PURE__ */ React81.createContext(void 0); 12178 if (true) MenuRadioGroupContext.displayName = "MenuRadioGroupContext"; 12179 function useMenuRadioGroupContext() { 12180 const context = React81.useContext(MenuRadioGroupContext); 12181 if (context === void 0) { 12182 throw new Error(true ? "Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>." : formatErrorMessage_default(34)); 12183 } 12184 return context; 12185 } 12186 12187 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/radio-group/MenuRadioGroup.mjs 12188 var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1); 12189 var MenuRadioGroupPlain = /* @__PURE__ */ React82.forwardRef(function MenuRadioGroupPlain2(componentProps, forwardedRef) { 12190 const { 12191 render, 12192 className, 12193 value: valueProp, 12194 defaultValue, 12195 onValueChange: onValueChangeProp, 12196 disabled: disabled2 = false, 12197 style, 12198 "aria-labelledby": ariaLabelledByProp, 12199 ...elementProps 12200 } = componentProps; 12201 const [labelId, setLabelId] = React82.useState(void 0); 12202 const [value, setValueUnwrapped] = useControlled({ 12203 controlled: valueProp, 12204 default: defaultValue, 12205 name: "MenuRadioGroup" 12206 }); 12207 const setValue = useStableCallback((newValue, eventDetails) => { 12208 onValueChangeProp?.(newValue, eventDetails); 12209 if (eventDetails.isCanceled) { 12210 return; 12211 } 12212 setValueUnwrapped(newValue); 12213 }); 12214 const state = { 12215 disabled: disabled2 12216 }; 12217 const element = useRenderElement("div", componentProps, { 12218 state, 12219 ref: forwardedRef, 12220 props: { 12221 role: "group", 12222 "aria-labelledby": ariaLabelledByProp ?? labelId, 12223 "aria-disabled": disabled2 || void 0, 12224 ...elementProps 12225 } 12226 }); 12227 const context = React82.useMemo(() => ({ 12228 value, 12229 setValue, 12230 disabled: disabled2 12231 }), [value, setValue, disabled2]); 12232 return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MenuGroupContext.Provider, { 12233 value: setLabelId, 12234 children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MenuRadioGroupContext.Provider, { 12235 value: context, 12236 children: element 12237 }) 12238 }); 12239 }); 12240 if (true) MenuRadioGroupPlain.displayName = "MenuRadioGroupPlain"; 12241 var MenuRadioGroup = /* @__PURE__ */ React82.memo(/* @__PURE__ */ React82.forwardRef(function MenuRadioGroup2(props, forwardedRef) { 12242 const RadioGroup2 = useMenuFilterImpl()?.RadioGroup ?? MenuRadioGroupPlain; 12243 return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RadioGroup2, { 12244 ...props, 12245 ref: forwardedRef 12246 }); 12247 })); 12248 if (true) MenuRadioGroup.displayName = "MenuRadioGroup"; 12249 12250 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/radio-item/MenuRadioItem.mjs 12251 var React84 = __toESM(require_react(), 1); 12252 12253 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/radio-item/MenuRadioItemContext.mjs 12254 var React83 = __toESM(require_react(), 1); 12255 var MenuRadioItemContext = /* @__PURE__ */ React83.createContext(void 0); 12256 if (true) MenuRadioItemContext.displayName = "MenuRadioItemContext"; 12257 function useMenuRadioItemContext() { 12258 const context = React83.useContext(MenuRadioItemContext); 12259 if (context === void 0) { 12260 throw new Error(true ? "Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>." : formatErrorMessage_default(35)); 12261 } 12262 return context; 12263 } 12264 12265 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/radio-item/MenuRadioItem.mjs 12266 var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1); 12267 var MenuRadioItemPlain = /* @__PURE__ */ React84.forwardRef(function MenuRadioItemPlain2(componentProps, forwardedRef) { 12268 const { 12269 render, 12270 className, 12271 id: idProp, 12272 label, 12273 nativeButton = false, 12274 disabled: disabledProp = false, 12275 closeOnClick = false, 12276 value, 12277 style, 12278 ...elementProps 12279 } = componentProps; 12280 const { 12281 store 12282 } = useMenuRootContext(); 12283 const { 12284 value: selectedValue, 12285 setValue: setSelectedValue, 12286 disabled: groupDisabled 12287 } = useMenuRadioGroupContext(); 12288 const listItem = useCompositeListItem({ 12289 guess: true, 12290 label 12291 }); 12292 const id = useBaseUiId(idProp); 12293 const highlighted = store.useState("isActive", listItem.index); 12294 const nodeId = store.useState("floatingNodeId"); 12295 const itemProps = store.useState("itemProps"); 12296 const rootDisabled = store.useState("disabled"); 12297 const disabled2 = disabledProp || groupDisabled || rootDisabled; 12298 const checked2 = selectedValue === value; 12299 const { 12300 getItemProps, 12301 itemRef 12302 } = useMenuItem({ 12303 closeOnClick, 12304 disabled: disabled2, 12305 highlighted, 12306 id, 12307 store, 12308 nativeButton, 12309 nodeId, 12310 itemMetadata: REGULAR_ITEM 12311 }); 12312 const state = React84.useMemo(() => ({ 12313 disabled: disabled2, 12314 highlighted, 12315 checked: checked2 12316 }), [disabled2, highlighted, checked2]); 12317 function handleClick(event) { 12318 const details = createChangeEventDetails(reason_parts_exports.itemPress, event.nativeEvent, void 0, { 12319 preventUnmountOnClose: NOOP 12320 }); 12321 setSelectedValue(value, details); 12322 } 12323 const element = useRenderElement("div", componentProps, { 12324 state, 12325 stateAttributesMapping: itemMapping, 12326 props: [itemProps, { 12327 role: "menuitemradio", 12328 "aria-checked": checked2, 12329 onClick: handleClick 12330 }, elementProps, getItemProps], 12331 ref: [itemRef, forwardedRef, listItem.ref] 12332 }); 12333 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MenuRadioItemContext.Provider, { 12334 value: state, 12335 children: element 12336 }); 12337 }); 12338 if (true) MenuRadioItemPlain.displayName = "MenuRadioItemPlain"; 12339 var MenuRadioItem = /* @__PURE__ */ React84.forwardRef(function MenuRadioItem2(props, forwardedRef) { 12340 const filterItem = useMenuFilterItem(props, forwardedRef); 12341 if (!filterItem.visible) { 12342 return null; 12343 } 12344 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MenuRadioItemPlain, { 12345 ...props, 12346 ref: filterItem.ref 12347 }); 12348 }); 12349 if (true) MenuRadioItem.displayName = "MenuRadioItem"; 12350 12351 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/radio-item-indicator/MenuRadioItemIndicator.mjs 12352 var React85 = __toESM(require_react(), 1); 12353 var MenuRadioItemIndicator = /* @__PURE__ */ React85.forwardRef(function MenuRadioItemIndicator2(componentProps, forwardedRef) { 12354 const { 12355 render, 12356 className, 12357 style, 12358 keepMounted = false, 12359 ...elementProps 12360 } = componentProps; 12361 const item = useMenuRadioItemContext(); 12362 const indicatorRef = React85.useRef(null); 12363 const { 12364 transitionStatus, 12365 mounted, 12366 setMounted 12367 } = useTransitionStatus(item.checked); 12368 useOpenChangeComplete({ 12369 batch: true, 12370 enabled: !item.checked, 12371 open: item.checked, 12372 ref: indicatorRef, 12373 onComplete() { 12374 if (!item.checked) { 12375 setMounted(false); 12376 } 12377 } 12378 }); 12379 const state = { 12380 checked: item.checked, 12381 disabled: item.disabled, 12382 highlighted: item.highlighted, 12383 transitionStatus 12384 }; 12385 const element = useRenderElement("span", componentProps, { 12386 state, 12387 stateAttributesMapping: itemMapping, 12388 ref: [forwardedRef, indicatorRef], 12389 props: { 12390 "aria-hidden": true, 12391 ...elementProps 12392 }, 12393 enabled: keepMounted || mounted 12394 }); 12395 return element; 12396 }); 12397 if (true) MenuRadioItemIndicator.displayName = "MenuRadioItemIndicator"; 12398 12399 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/root/MenuRoot.mjs 12400 var React89 = __toESM(require_react(), 1); 12401 12402 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menubar/MenubarContext.mjs 12403 var React86 = __toESM(require_react(), 1); 12404 var MenubarContext = /* @__PURE__ */ React86.createContext(null); 12405 if (true) MenubarContext.displayName = "MenubarContext"; 12406 function useMenubarContext(optional) { 12407 const context = React86.useContext(MenubarContext); 12408 if (context === null && !optional) { 12409 throw new Error(true ? "Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>." : formatErrorMessage_default(5)); 12410 } 12411 return context; 12412 } 12413 12414 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/store/MenuStore.mjs 12415 var React87 = __toESM(require_react(), 1); 12416 var selectors2 = { 12417 ...popupStoreSelectors, 12418 disabled: (state) => state.parent.type === "menubar" ? state.parent.context.disabled || state.disabled : state.disabled, 12419 modal: (state) => (state.parent.type === void 0 || state.parent.type === "context-menu") && (state.modal ?? true), 12420 openMethod: (state) => state.openMethod, 12421 keyboardOpen: (state) => state.keyboardOpen, 12422 allowMouseEnter: (state) => state.allowMouseEnter, 12423 highlightItemOnHover: (state) => state.highlightItemOnHover, 12424 parent: (state) => state.parent, 12425 rootId: (state) => { 12426 if (state.parent.type === "menu") { 12427 return state.parent.store.select("rootId"); 12428 } 12429 return state.parent.type !== void 0 ? state.parent.context.rootId : state.rootId; 12430 }, 12431 activeIndex: (state) => state.activeIndex, 12432 listElement: (state) => state.listElement, 12433 /** The trigger's `aria-controls`: the list when one holds the `menu` role, else the popup. */ 12434 triggerControlsId: (state, triggerId) => { 12435 const popupId = popupStoreSelectors.triggerPopupId(state, triggerId); 12436 return popupId ? state.listElement?.id || popupId : void 0; 12437 }, 12438 filterTriggerProps: (state) => state.filterTriggerProps, 12439 inputProps: (state) => state.inputProps, 12440 // `aria-selected` is invalid on `menuitem`, but Safari VoiceOver needs it for arrow-key 12441 // navigation. Limit it to WebKit while the input has focus so normal VoiceOver navigation 12442 // does not encounter the invalid attribute. 12443 webkitAriaSelected: (state, highlighted) => parts_exports.engine.webkit && state.inputFocused && highlighted ? true : void 0, 12444 highlightedItemId: (state) => state.highlightedItem?.id || void 0, 12445 isActive: (state, itemIndex) => state.activeIndex === itemIndex, 12446 hoverEnabled: (state) => state.hoverEnabled, 12447 // `trigger-change` describes a popup moving between triggers, which only has 12448 // meaning while it is open. Dropping it once closed keeps a late or stale 12449 // restoration from marking a closing popup instant and skipping its exit 12450 // transition, including on close paths that never reach `setOpen` — a 12451 // controlled consumer committing `open={false}` goes straight through the prop. 12452 instantType: (state) => state.instantType === "trigger-change" && !popupStoreSelectors.open(state) ? void 0 : state.instantType, 12453 lastOpenChangeReason: (state) => state.openChangeReason, 12454 floatingTreeRoot: (state) => { 12455 if (state.parent.type === "menu") { 12456 return state.parent.store.select("floatingTreeRoot"); 12457 } 12458 return state.floatingTreeRoot; 12459 }, 12460 floatingNodeId: (state) => state.floatingNodeId, 12461 floatingParentNodeId: (state) => state.floatingParentNodeId, 12462 itemProps: (state) => state.itemProps, 12463 closeDelay: (state) => state.closeDelay, 12464 adaptiveOrigin: (state) => state.adaptiveOrigin, 12465 keyboardEventRelay: (state) => { 12466 if (state.keyboardEventRelay) { 12467 return state.keyboardEventRelay; 12468 } 12469 if (state.parent.type === "menu") { 12470 return state.parent.store.select("keyboardEventRelay"); 12471 } 12472 return void 0; 12473 } 12474 }; 12475 var MenuStore = class extends ReactStore { 12476 constructor(initialState, floatingId, nested = false) { 12477 const triggerElements = new PopupTriggerMap(); 12478 const state = createInitialState(triggerElements, floatingId, nested, initialState); 12479 super(state, createInitialContext(triggerElements), selectors2); 12480 void this.observe("parent", (parent) => { 12481 if (parent.type === "menu") { 12482 this.context.allowMouseUpTriggerRef = parent.store.context.allowMouseUpTriggerRef; 12483 } else if (parent.type !== void 0) { 12484 this.context.allowMouseUpTriggerRef = parent.context.allowMouseUpTriggerRef; 12485 } 12486 }); 12487 } 12488 /** 12489 * Propagates changes of the parent menu's shared tree state to this store's subscribers. 12490 * The owning `Menu.Root` calls it from an effect so the parent store subscription is released 12491 * when the submenu unmounts. 12492 * @returns A function that removes the parent store subscription. 12493 */ 12494 subscribeToParentMenu() { 12495 const parent = this.state.parent; 12496 if (parent.type !== "menu") { 12497 return void 0; 12498 } 12499 let rootId = parent.store.select("rootId"); 12500 let floatingTreeRoot = parent.store.select("floatingTreeRoot"); 12501 let keyboardEventRelay = parent.store.select("keyboardEventRelay"); 12502 return parent.store.subscribe(() => { 12503 const nextRootId = parent.store.select("rootId"); 12504 const nextFloatingTreeRoot = parent.store.select("floatingTreeRoot"); 12505 const nextKeyboardEventRelay = parent.store.select("keyboardEventRelay"); 12506 if (rootId === nextRootId && floatingTreeRoot === nextFloatingTreeRoot && keyboardEventRelay === nextKeyboardEventRelay) { 12507 return; 12508 } 12509 rootId = nextRootId; 12510 floatingTreeRoot = nextFloatingTreeRoot; 12511 keyboardEventRelay = nextKeyboardEventRelay; 12512 this.notifyAll(); 12513 }); 12514 } 12515 setOpen(open2, eventDetails) { 12516 this.state.floatingRootContext.context.events.emit("setOpen", { 12517 open: open2, 12518 eventDetails 12519 }); 12520 } 12521 setActiveIndex(activeIndex, reason, event) { 12522 if (this.state.activeIndex !== activeIndex) { 12523 const item = activeIndex === null ? void 0 : this.context.itemDomElements.current[activeIndex]; 12524 const isWriteBack = item === this.context.reportedItem; 12525 this.context.highlightReason = isWriteBack ? "none" : reason; 12526 this.context.highlightEvent = isWriteBack ? void 0 : event; 12527 } 12528 this.set("activeIndex", activeIndex); 12529 } 12530 highlightItem(element, reason, event) { 12531 const index2 = this.context.itemDomElements.current.indexOf(element); 12532 if (index2 > -1) { 12533 this.setActiveIndex(index2, reason, event); 12534 } 12535 } 12536 }; 12537 function createNullMenuStore() { 12538 const triggerElements = new PopupTriggerMap(); 12539 const store = new NullStore(Object.freeze(createInitialState(triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2); 12540 return Object.assign(store, { 12541 setOpen: NOOP 12542 }); 12543 } 12544 function createInitialContext(triggerElements) { 12545 return { 12546 positionerRef: /* @__PURE__ */ React87.createRef(), 12547 popupRef: /* @__PURE__ */ React87.createRef(), 12548 typingRef: { 12549 current: false 12550 }, 12551 itemDomElements: { 12552 current: [] 12553 }, 12554 itemLabels: { 12555 current: [] 12556 }, 12557 highlightReason: "none", 12558 highlightEvent: void 0, 12559 reportedItem: void 0, 12560 allowMouseUpTriggerRef: { 12561 current: false 12562 }, 12563 virtualFocusRef: void 0, 12564 triggerFocusTargetRef: /* @__PURE__ */ React87.createRef(), 12565 beforeTriggerFocusGuardRef: /* @__PURE__ */ React87.createRef(), 12566 beforeContentFocusGuardRef: /* @__PURE__ */ React87.createRef(), 12567 onOpenChangeComplete: void 0, 12568 triggerElements 12569 }; 12570 } 12571 function createInitialState(triggerElements, floatingId, nested = false, initialState) { 12572 return { 12573 ...createInitialPopupStoreState(triggerElements, floatingId, nested), 12574 disabled: false, 12575 modal: true, 12576 openMethod: null, 12577 keyboardOpen: false, 12578 allowMouseEnter: false, 12579 highlightItemOnHover: true, 12580 parent: { 12581 type: void 0 12582 }, 12583 rootId: void 0, 12584 activeIndex: null, 12585 listElement: null, 12586 filterTriggerProps: EMPTY_OBJECT, 12587 inputProps: EMPTY_OBJECT, 12588 inputFocused: false, 12589 highlightedItem: void 0, 12590 hoverEnabled: true, 12591 instantType: void 0, 12592 openChangeReason: null, 12593 floatingTreeRoot: new FloatingTreeStore(), 12594 floatingNodeId: void 0, 12595 floatingParentNodeId: null, 12596 itemProps: EMPTY_OBJECT, 12597 keyboardEventRelay: void 0, 12598 closeDelay: 0, 12599 adaptiveOrigin: void 0, 12600 ...initialState 12601 }; 12602 } 12603 12604 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-provider/MenuFilterProviderContext.mjs 12605 var React88 = __toESM(require_react(), 1); 12606 var MenuFilterProviderContext = /* @__PURE__ */ React88.createContext(null); 12607 if (true) MenuFilterProviderContext.displayName = "MenuFilterProviderContext"; 12608 12609 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/utils/isKeyboardOpen.mjs 12610 function isKeyboardClick(reason, event) { 12611 return (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.itemPress) && event?.detail === 0; 12612 } 12613 function isKeyboardOpen(reason, event) { 12614 return reason === reason_parts_exports.listNavigation || isKeyboardClick(reason, event); 12615 } 12616 12617 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/root/MenuRoot.mjs 12618 var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1); 12619 var MenuRootInternal = fastComponent(function MenuRootInternal2(props) { 12620 const { 12621 children, 12622 open: openProp, 12623 onOpenChange, 12624 onOpenChangeComplete, 12625 onItemHighlighted: onItemHighlightedProp, 12626 defaultOpen = false, 12627 disabled: disabledProp = false, 12628 modal: modalProp, 12629 loopFocus = true, 12630 orientation = "vertical", 12631 actionsRef, 12632 closeParentOnEsc = false, 12633 handle, 12634 triggerId: triggerIdProp, 12635 defaultTriggerId: defaultTriggerIdProp = null, 12636 highlightItemOnHover = true, 12637 isSubmenu = false, 12638 virtualFocus = false, 12639 virtualFocusRef, 12640 allowEscape = true, 12641 resetOnPointerLeave = true 12642 } = props; 12643 const contextMenuContext = useContextMenuRootContext(true); 12644 const parentMenuRootContext = useMenuRootContext(true); 12645 const menubarContext = useMenubarContext(true); 12646 const enclosingMenuStore = parentMenuRootContext?.store; 12647 const parentVirtualFocus = parentMenuRootContext?.virtualFocus ?? false; 12648 const parentFromContext = React89.useMemo(() => { 12649 if (isSubmenu && enclosingMenuStore) { 12650 return { 12651 type: "menu", 12652 store: enclosingMenuStore 12653 }; 12654 } 12655 if (menubarContext) { 12656 return { 12657 type: "menubar", 12658 context: menubarContext 12659 }; 12660 } 12661 if (contextMenuContext && !enclosingMenuStore) { 12662 return { 12663 type: "context-menu", 12664 context: contextMenuContext 12665 }; 12666 } 12667 return { 12668 type: void 0 12669 }; 12670 }, [contextMenuContext, enclosingMenuStore, menubarContext, isSubmenu]); 12671 const rootId = useBaseUiId(); 12672 const defaultFloatingId = useBaseUiId(); 12673 const [renderedFloatingId, setRenderedFloatingId] = React89.useState(void 0); 12674 const floatingId = (renderedFloatingId ?? defaultFloatingId) || void 0; 12675 const floatingParentNodeIdFromContext = useFloatingParentNodeId(); 12676 const parentMenuStore = parentFromContext.type === "menu" ? parentFromContext.store : void 0; 12677 const animateInitialOpen = (openProp ?? defaultOpen) && parentMenuStore?.state.transitionStatus === "starting"; 12678 const seededInstantType = useRefWithInit(() => animateInitialOpen ? parentMenuStore?.state.instantType : void 0).current; 12679 const store = useRefWithInit(() => { 12680 const menuStore = new MenuStore({ 12681 open: defaultOpen, 12682 openProp, 12683 activeTriggerId: defaultTriggerIdProp, 12684 triggerIdProp, 12685 parent: parentFromContext, 12686 disabled: disabledProp, 12687 highlightItemOnHover, 12688 modal: parentFromContext.type === void 0 ? modalProp : void 0, 12689 rootId, 12690 instantType: seededInstantType 12691 }, floatingId, floatingParentNodeIdFromContext != null); 12692 menuStore.context.virtualFocusRef = virtualFocusRef; 12693 return menuStore; 12694 }).current; 12695 store.useControlledProp("openProp", openProp); 12696 store.useControlledProp("triggerIdProp", triggerIdProp); 12697 store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete); 12698 const floatingTreeRoot = store.useState("floatingTreeRoot"); 12699 const floatingNodeIdFromContext = useFloatingNodeId(floatingTreeRoot); 12700 const open2 = store.useState("open"); 12701 const activeTriggerElement = store.useState("activeTriggerElement"); 12702 const positionerElement = store.useState("positionerElement"); 12703 const hoverEnabled = store.useState("hoverEnabled"); 12704 const disabled2 = store.useState("disabled"); 12705 const lastOpenChangeReason = store.useState("lastOpenChangeReason"); 12706 const parent = store.useState("parent"); 12707 const activeIndex = store.useState("activeIndex"); 12708 const keyboardOpen = store.useState("keyboardOpen"); 12709 const payload = store.useState("payload"); 12710 const floatingParentNodeId = store.useState("floatingParentNodeId"); 12711 const openEventRef = React89.useRef(null); 12712 const allowOutsidePressDismissalRef = React89.useRef(parent.type !== "context-menu"); 12713 const allowOutsidePressDismissalTimeout = useTimeout(); 12714 const allowTouchToCloseRef = React89.useRef(true); 12715 const allowTouchToCloseTimeout = useTimeout(); 12716 const nested = floatingParentNodeId != null; 12717 if (true) { 12718 if (parent.type !== void 0 && modalProp !== void 0) { 12719 console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored."); 12720 } 12721 } 12722 const { 12723 openMethod, 12724 triggerProps: interactionTypeProps 12725 } = useOpenInteractionType(open2); 12726 store.useSyncedValues({ 12727 disabled: disabledProp, 12728 highlightItemOnHover, 12729 modal: parent.type === void 0 ? modalProp : void 0, 12730 openMethod, 12731 rootId 12732 }); 12733 useImplicitActiveTrigger(store); 12734 const { 12735 forceUnmount, 12736 transitionStatus 12737 } = useOpenStateTransitions(open2, store, () => { 12738 store.set("allowMouseEnter", false); 12739 }, animateInitialOpen); 12740 const runOnceAnimationsFinish = useAnimationsFinished(store.context.popupRef); 12741 React89.useEffect(() => { 12742 if (seededInstantType === void 0) { 12743 return void 0; 12744 } 12745 const clearSeededInstantType = () => { 12746 if (store.state.instantType === seededInstantType) { 12747 store.set("instantType", void 0); 12748 } 12749 }; 12750 if (!open2) { 12751 clearSeededInstantType(); 12752 return void 0; 12753 } 12754 if (transitionStatus !== void 0) { 12755 return void 0; 12756 } 12757 if (store.context.popupRef.current == null) { 12758 clearSeededInstantType(); 12759 return void 0; 12760 } 12761 const abortController = new AbortController(); 12762 runOnceAnimationsFinish(clearSeededInstantType, abortController.signal); 12763 return () => { 12764 abortController.abort(); 12765 }; 12766 }, [seededInstantType, open2, transitionStatus, runOnceAnimationsFinish, store]); 12767 useIsoLayoutEffect(() => { 12768 if (contextMenuContext && !parentMenuRootContext) { 12769 store.update({ 12770 parent: { 12771 type: "context-menu", 12772 context: contextMenuContext 12773 }, 12774 floatingNodeId: floatingNodeIdFromContext, 12775 floatingParentNodeId: floatingParentNodeIdFromContext 12776 }); 12777 } else if (parentMenuRootContext || !store.select("activeTriggerElement")) { 12778 store.update({ 12779 floatingNodeId: floatingNodeIdFromContext, 12780 floatingParentNodeId: floatingParentNodeIdFromContext 12781 }); 12782 } 12783 }, [contextMenuContext, parentMenuRootContext, floatingNodeIdFromContext, floatingParentNodeIdFromContext, activeTriggerElement, store]); 12784 React89.useEffect(() => { 12785 if (!open2) { 12786 openEventRef.current = null; 12787 } 12788 if (parent.type !== "context-menu") { 12789 return; 12790 } 12791 if (!open2) { 12792 allowOutsidePressDismissalTimeout.clear(); 12793 allowOutsidePressDismissalRef.current = false; 12794 return; 12795 } 12796 allowOutsidePressDismissalTimeout.start(500, () => { 12797 allowOutsidePressDismissalRef.current = true; 12798 }); 12799 }, [allowOutsidePressDismissalTimeout, open2, parent.type]); 12800 useIsoLayoutEffect(() => { 12801 if (!open2 && !hoverEnabled) { 12802 store.set("hoverEnabled", true); 12803 } 12804 }, [open2, hoverEnabled, store]); 12805 const setOpen = useStableCallback((nextOpen, eventDetails) => { 12806 const reason = eventDetails.reason; 12807 if (!nextOpen && !store.select("open")) { 12808 return; 12809 } 12810 if (open2 === nextOpen && eventDetails.trigger === activeTriggerElement && lastOpenChangeReason === reason) { 12811 return; 12812 } 12813 const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails); 12814 if (!nextOpen && eventDetails.trigger == null) { 12815 eventDetails.trigger = activeTriggerElement ?? void 0; 12816 } 12817 onOpenChange?.(nextOpen, eventDetails); 12818 if (eventDetails.isCanceled) { 12819 return; 12820 } 12821 store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails); 12822 const nativeEvent = eventDetails.event; 12823 if (nextOpen === false && reason !== reason_parts_exports.itemPress && nativeEvent?.type === "click" && nativeEvent.pointerType === "touch" && !allowTouchToCloseRef.current) { 12824 return; 12825 } 12826 if (nextOpen && reason === reason_parts_exports.triggerFocus) { 12827 allowTouchToCloseRef.current = false; 12828 allowTouchToCloseTimeout.start(300, () => { 12829 allowTouchToCloseRef.current = true; 12830 }); 12831 } else { 12832 allowTouchToCloseRef.current = true; 12833 allowTouchToCloseTimeout.clear(); 12834 } 12835 const isDismissClose = !nextOpen && (reason === reason_parts_exports.escapeKey || reason == null); 12836 openEventRef.current = eventDetails.event; 12837 const popupOpenState = createPopupOpenState(store.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose()); 12838 popupOpenState.openChangeReason = reason; 12839 popupOpenState.keyboardOpen = nextOpen && isKeyboardOpen(reason, nativeEvent); 12840 if (parent.type === "menubar" && (reason === reason_parts_exports.triggerFocus || reason === reason_parts_exports.focusOut || reason === reason_parts_exports.triggerHover || reason === reason_parts_exports.listNavigation || reason === reason_parts_exports.siblingOpen)) { 12841 popupOpenState.instantType = "group"; 12842 } else if (isKeyboardClick(reason, nativeEvent)) { 12843 popupOpenState.instantType = "click"; 12844 } else if (isDismissClose) { 12845 popupOpenState.instantType = "dismiss"; 12846 } else { 12847 popupOpenState.instantType = void 0; 12848 } 12849 store.update(popupOpenState); 12850 }); 12851 const floatingRootContext = useSyncedFloatingRootContext({ 12852 popupStore: store, 12853 floatingRootContext: store.state.floatingRootContext, 12854 floatingId, 12855 nested: floatingParentNodeIdFromContext != null, 12856 onOpenChange: setOpen 12857 }); 12858 const floatingEvents = floatingRootContext.context.events; 12859 useIsoLayoutEffect(() => { 12860 const handleSetOpenEvent = ({ 12861 open: nextOpen, 12862 eventDetails 12863 }) => setOpen(nextOpen, eventDetails); 12864 floatingEvents.on("setOpen", handleSetOpenEvent); 12865 return () => { 12866 floatingEvents?.off("setOpen", handleSetOpenEvent); 12867 }; 12868 }, [floatingEvents, setOpen]); 12869 useIsoLayoutEffect(() => store.subscribeToParentMenu(), [store]); 12870 const handleImperativeClose = React89.useCallback(() => { 12871 store.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction)); 12872 }, [store]); 12873 React89.useImperativeHandle(actionsRef, () => ({ 12874 unmount: forceUnmount, 12875 close: handleImperativeClose 12876 }), [forceUnmount, handleImperativeClose]); 12877 let ctx; 12878 if (parent.type === "context-menu") { 12879 ctx = parent.context; 12880 } 12881 React89.useImperativeHandle(ctx?.positionerRef, () => positionerElement, [positionerElement]); 12882 React89.useImperativeHandle(ctx?.actionsRef, () => ({ 12883 setOpen 12884 }), [setOpen]); 12885 const dismiss = useDismiss(floatingRootContext, { 12886 enabled: !disabled2, 12887 bubbles: { 12888 escapeKey: closeParentOnEsc && parent.type === "menu" 12889 }, 12890 outsidePress() { 12891 if (parent.type !== "context-menu" || openEventRef.current?.type === "contextmenu") { 12892 return true; 12893 } 12894 return allowOutsidePressDismissalRef.current; 12895 }, 12896 externalTree: nested ? floatingTreeRoot : void 0 12897 }); 12898 const direction = useDirection(); 12899 const listNavigation2 = useListNavigation(floatingRootContext, { 12900 enabled: !disabled2, 12901 listRef: store.context.itemDomElements, 12902 activeIndex, 12903 virtual: virtualFocus, 12904 nested: parent.type === "menubar" || !virtualFocus && parent.type !== void 0, 12905 parentOrientation: parent.type === "menubar" ? parent.context.orientation : void 0, 12906 loopFocus, 12907 // Filtered menus keep DOM focus on the input, while keyboard and virtual opens initially 12908 // highlight an item as ordinary menus do. The input stays in the arrow-key loop unless the 12909 // filter highlights automatically. 12910 focusItemOnOpen: virtualFocus ? keyboardOpen : void 0, 12911 allowEscape: virtualFocus && loopFocus && allowEscape, 12912 orientation, 12913 // A virtual-focus list can navigate on either axis, but its trigger always opens on the 12914 // vertical one. 12915 triggerOrientation: virtualFocus ? "vertical" : orientation, 12916 rtl: direction === "rtl", 12917 disabledIndices: EMPTY_ARRAY, 12918 onNavigate(nextActiveIndex, event) { 12919 store.setActiveIndex(nextActiveIndex, getHighlightReason(event), event?.nativeEvent); 12920 }, 12921 // A virtual-focus submenu's keyboard opening is orchestrated by its navigation wrapper based 12922 // on both menus' orientations; the generic arrow-key opening would also react to the parent's 12923 // forwarded cross-axis keys while closed. 12924 openOnArrowKeyDown: parent.type !== "context-menu" && !(virtualFocus && isSubmenu), 12925 externalTree: !virtualFocus && nested ? floatingTreeRoot : void 0, 12926 nestedReturnFocusRef: parentMenuStore?.context.virtualFocusRef, 12927 focusItemOnHover: highlightItemOnHover, 12928 resetOnPointerLeave 12929 }); 12930 const onTyping = React89.useCallback((nextTyping) => { 12931 store.context.typingRef.current = nextTyping; 12932 }, [store]); 12933 const typeahead = useTypeahead(floatingRootContext, { 12934 // Under virtual focus the input owns typing, so typeahead would race the filter query. 12935 enabled: !disabled2 && !virtualFocus, 12936 listRef: store.context.itemLabels, 12937 elementsRef: store.context.itemDomElements, 12938 activeIndex, 12939 resetMs: TYPEAHEAD_RESET_MS, 12940 onMatch: (index2, event) => { 12941 if (open2 && index2 !== activeIndex) { 12942 store.setActiveIndex(index2, reason_parts_exports.keyboard, event.nativeEvent); 12943 } 12944 }, 12945 onTyping 12946 }); 12947 const onItemHighlighted = useStableCallback(onItemHighlightedProp); 12948 const lastHighlightIndexRef = React89.useRef(-1); 12949 const syncHighlightedItem = useStableCallback(() => { 12950 const index2 = store.state.activeIndex; 12951 const item = index2 === null ? void 0 : store.context.itemDomElements.current[index2] ?? void 0; 12952 if (item?.isConnected === false) { 12953 return; 12954 } 12955 const itemIndex = item === void 0 ? -1 : index2; 12956 if (lastHighlightIndexRef.current === itemIndex && store.context.reportedItem === item) { 12957 return; 12958 } 12959 lastHighlightIndexRef.current = itemIndex; 12960 store.context.reportedItem = item; 12961 if (virtualFocus) { 12962 store.set("highlightedItem", item); 12963 } 12964 const { 12965 highlightReason, 12966 highlightEvent 12967 } = store.context; 12968 store.context.highlightReason = reason_parts_exports.none; 12969 store.context.highlightEvent = void 0; 12970 if (!onItemHighlightedProp) { 12971 return; 12972 } 12973 onItemHighlighted(item, createGenericEventDetails(highlightReason, highlightEvent, { 12974 label: item === void 0 ? void 0 : store.context.itemLabels.current[itemIndex] ?? void 0 12975 })); 12976 }); 12977 useIsoLayoutEffect(() => { 12978 syncHighlightedItem(); 12979 }, [activeIndex, syncHighlightedItem]); 12980 const openTriggerProps = React89.useMemo(() => { 12981 if (!virtualFocus) { 12982 return listNavigation2.reference; 12983 } 12984 if (!listNavigation2.trigger) { 12985 return EMPTY_OBJECT; 12986 } 12987 const { 12988 onFocus, 12989 ...rest 12990 } = listNavigation2.trigger; 12991 return rest; 12992 }, [virtualFocus, listNavigation2.reference, listNavigation2.trigger]); 12993 store.useSyncedValue("inputProps", virtualFocus ? listNavigation2.reference ?? EMPTY_OBJECT : EMPTY_OBJECT); 12994 const activeTriggerProps = React89.useMemo(() => { 12995 const mergedProps = mergeProps(typeahead.reference, openTriggerProps, dismiss.reference, { 12996 onMouseMove() { 12997 store.set("allowMouseEnter", true); 12998 } 12999 }, interactionTypeProps); 13000 mergedProps["aria-haspopup"] = "menu"; 13001 mergedProps["aria-expanded"] = open2; 13002 return mergedProps; 13003 }, [store, typeahead.reference, openTriggerProps, dismiss.reference, interactionTypeProps, open2]); 13004 const inactiveTriggerProps = React89.useMemo(() => { 13005 const mergedProps = mergeProps(listNavigation2.trigger, dismiss.trigger, interactionTypeProps); 13006 mergedProps["aria-haspopup"] = "menu"; 13007 mergedProps["aria-expanded"] = false; 13008 return mergedProps; 13009 }, [listNavigation2.trigger, dismiss.trigger, interactionTypeProps]); 13010 useRefWithInit(() => { 13011 store.update({ 13012 inactiveTriggerProps 13013 }); 13014 return null; 13015 }); 13016 const popupProps = React89.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, { 13017 onMouseMove() { 13018 store.set("allowMouseEnter", true); 13019 if (parent.type === "menu") { 13020 store.set("hoverEnabled", false); 13021 } 13022 }, 13023 onClick() { 13024 if (store.select("hoverEnabled")) { 13025 store.set("hoverEnabled", false); 13026 } 13027 }, 13028 onKeyDown(event) { 13029 const relay = store.select("keyboardEventRelay"); 13030 if (relay && !event.isPropagationStopped()) { 13031 relay(event); 13032 } 13033 } 13034 }, typeahead.floating, listNavigation2.floating, dismiss.floating), [parent.type, store, typeahead.floating, listNavigation2.floating, dismiss.floating]); 13035 const itemProps = listNavigation2.item ?? EMPTY_OBJECT; 13036 usePopupInteractionProps(store, { 13037 floatingRootContext, 13038 activeTriggerProps, 13039 inactiveTriggerProps, 13040 popupProps, 13041 itemProps 13042 }); 13043 const context = React89.useMemo(() => ({ 13044 store, 13045 parent: parentFromContext, 13046 orientation, 13047 loopFocus, 13048 allowEscape, 13049 defaultFloatingId, 13050 setRenderedFloatingId, 13051 virtualFocus, 13052 parentVirtualFocus, 13053 syncHighlightedItem 13054 }), [store, parentFromContext, orientation, loopFocus, allowEscape, defaultFloatingId, virtualFocus, parentVirtualFocus, syncHighlightedItem]); 13055 const renderedChildren = typeof children === "function" ? children({ 13056 payload 13057 }) : children; 13058 let content = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(MenuRootContext.Provider, { 13059 value: context, 13060 children: [handle && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopupHandleAttachment, { 13061 handle, 13062 store 13063 }), renderedChildren] 13064 }); 13065 if (parent.type === void 0 || parent.type === "context-menu") { 13066 content = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FloatingTree, { 13067 externalTree: floatingTreeRoot, 13068 children: content 13069 }); 13070 } 13071 return content; 13072 }); 13073 if (true) MenuRootInternal.displayName = "MenuRootInternal"; 13074 function MenuRoot(props) { 13075 const filterProvider = React89.useContext(MenuFilterProviderContext); 13076 if (filterProvider === null) { 13077 return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MenuRootInternal, { 13078 ...props 13079 }); 13080 } 13081 const FilterRoot = filterProvider.Root; 13082 return ( 13083 // The root consumes its provider so a plain submenu inside doesn't inherit it. 13084 /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MenuFilterProviderContext.Provider, { 13085 value: null, 13086 children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FilterRoot, { 13087 ...filterProvider.options, 13088 ...props 13089 }) 13090 }) 13091 ); 13092 } 13093 13094 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/submenu-root/MenuSubmenuRoot.mjs 13095 var React90 = __toESM(require_react(), 1); 13096 var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1); 13097 var EMPTY_SUBMENU_ROOT_CONTEXT = {}; 13098 function MenuSubmenuRoot(props) { 13099 useMenuRootContext(); 13100 const filterProvider = React90.useContext(MenuFilterProviderContext); 13101 if (filterProvider !== null) { 13102 const FilterSubmenuRoot = filterProvider.SubmenuRoot; 13103 return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MenuFilterProviderContext.Provider, { 13104 value: null, 13105 children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FilterSubmenuRoot, { 13106 ...filterProvider.options, 13107 ...props 13108 }) 13109 }); 13110 } 13111 return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MenuSubmenuRootContext.Provider, { 13112 value: EMPTY_SUBMENU_ROOT_CONTEXT, 13113 children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MenuRootInternal, { 13114 ...props, 13115 isSubmenu: true 13116 }) 13117 }); 13118 } 13119 13120 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/trigger/MenuTrigger.mjs 13121 var React93 = __toESM(require_react(), 1); 13122 13123 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs 13124 var React91 = __toESM(require_react(), 1); 13125 function useCompositeItem(params = {}) { 13126 const { 13127 highlightItemOnHover, 13128 highlightedIndex, 13129 onHighlightedIndexChange 13130 } = useCompositeRootContext(); 13131 const { 13132 ref, 13133 index: index2 13134 } = useCompositeListItem(params); 13135 const isHighlighted = highlightedIndex === index2; 13136 const itemRef = React91.useRef(null); 13137 const mergedRef = useMergedRefs(ref, itemRef); 13138 const compositeProps = { 13139 tabIndex: isHighlighted ? 0 : -1, 13140 onFocus() { 13141 onHighlightedIndexChange(index2); 13142 }, 13143 onMouseMove() { 13144 const item = itemRef.current; 13145 if (!highlightItemOnHover || !item) { 13146 return; 13147 } 13148 const disabled2 = item.hasAttribute("disabled") || item.ariaDisabled === "true"; 13149 if (!isHighlighted && !disabled2) { 13150 item.focus(); 13151 } 13152 } 13153 }; 13154 return { 13155 compositeProps, 13156 compositeRef: mergedRef, 13157 index: index2 13158 }; 13159 } 13160 13161 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/composite/item/CompositeItem.mjs 13162 function CompositeItem(componentProps) { 13163 const { 13164 render, 13165 className, 13166 style, 13167 state = EMPTY_OBJECT, 13168 props = EMPTY_ARRAY, 13169 refs = EMPTY_ARRAY, 13170 metadata, 13171 stateAttributesMapping: stateAttributesMapping5, 13172 tag = "div", 13173 ...elementProps 13174 } = componentProps; 13175 const { 13176 compositeProps, 13177 compositeRef 13178 } = useCompositeItem({ 13179 metadata 13180 }); 13181 return useRenderElement(tag, componentProps, { 13182 state, 13183 // The composite ref attaches first so an outer item wins when nested items share a DOM node. 13184 ref: [compositeRef, ...refs], 13185 props: [compositeProps, ...props, elementProps], 13186 stateAttributesMapping: stateAttributesMapping5 13187 }); 13188 } 13189 13190 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/utils/findRootOwnerId.mjs 13191 function findRootOwnerId(node) { 13192 if (isHTMLElement(node) && node.hasAttribute("data-rootownerid")) { 13193 return node.getAttribute("data-rootownerid"); 13194 } 13195 if (isLastTraversableNode(node)) { 13196 return void 0; 13197 } 13198 return findRootOwnerId(getParentNode(node)); 13199 } 13200 13201 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/useTriggerFocusGuards.mjs 13202 var ReactDOM6 = __toESM(require_react_dom(), 1); 13203 function useTriggerFocusGuards(store, triggerElementRef) { 13204 function closeAndFocus(event, direction, positionerElement) { 13205 const guard = event.currentTarget; 13206 ReactDOM6.flushSync(() => { 13207 store.setOpen(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent, guard)); 13208 }); 13209 getTabbableNearElement(guard.isConnected ? guard : triggerElementRef.current, direction, positionerElement)?.focus(); 13210 } 13211 function handlePreFocusGuardFocus(event) { 13212 closeAndFocus(event, -1, store.select("positionerElement")); 13213 } 13214 function handleFocusTargetFocus(event) { 13215 const positionerElement = store.select("positionerElement"); 13216 if (positionerElement && isOutsideEvent(event, positionerElement)) { 13217 store.context.beforeContentFocusGuardRef.current?.focus(); 13218 } else { 13219 closeAndFocus(event, 1, positionerElement); 13220 } 13221 } 13222 return { 13223 handlePreFocusGuardFocus, 13224 handleFocusTargetFocus 13225 }; 13226 } 13227 13228 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/useMixedToggleClickHandler.mjs 13229 var React92 = __toESM(require_react(), 1); 13230 function useMixedToggleClickHandler(params) { 13231 const { 13232 enabled = true, 13233 mouseDownAction, 13234 open: open2 13235 } = params; 13236 const ignoreClickRef = React92.useRef(false); 13237 return React92.useMemo(() => { 13238 if (!enabled) { 13239 return EMPTY_OBJECT; 13240 } 13241 return { 13242 onMouseDown: (event) => { 13243 if (mouseDownAction === "open" && !open2 || mouseDownAction === "close" && open2) { 13244 ignoreClickRef.current = true; 13245 ownerDocument(event.currentTarget).addEventListener("click", () => { 13246 ignoreClickRef.current = false; 13247 }, { 13248 once: true 13249 }); 13250 } 13251 }, 13252 onClick: (event) => { 13253 if (ignoreClickRef.current) { 13254 ignoreClickRef.current = false; 13255 event.preventBaseUIHandler(); 13256 } 13257 } 13258 }; 13259 }, [enabled, mouseDownAction, open2]); 13260 } 13261 13262 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/trigger/MenuTrigger.mjs 13263 var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1); 13264 var MenuTrigger = fastComponentRef(function MenuTrigger2(componentProps, forwardedRef) { 13265 const { 13266 render, 13267 className, 13268 style, 13269 disabled: disabledProp = false, 13270 nativeButton = true, 13271 id: idProp, 13272 openOnHover: openOnHoverProp, 13273 delay = 100, 13274 closeDelay = 0, 13275 handle, 13276 payload, 13277 ...elementProps 13278 } = componentProps; 13279 const rootContext = useMenuRootContext(true); 13280 const handleStore = usePopupHandleStore(handle); 13281 const store = handleStore ?? rootContext?.store; 13282 if (!store) { 13283 throw new Error(true ? "Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle." : formatErrorMessage_default(85)); 13284 } 13285 const thisTriggerId = useBaseUiId(idProp); 13286 const isTriggerActive = store.useState("isTriggerActive", thisTriggerId); 13287 const floatingRootContext = store.useState("floatingRootContext"); 13288 const isOpenedByThisTrigger = store.useState("isOpenedByTrigger", thisTriggerId); 13289 const controlsId = store.useState("triggerControlsId", thisTriggerId); 13290 const triggerElementRef = React93.useRef(null); 13291 const parent = useMenuParent(); 13292 const compositeRootContext = useCompositeRootContext(true); 13293 const floatingTreeRootFromContext = useFloatingTree(); 13294 const floatingTreeRoot = React93.useMemo(() => { 13295 return floatingTreeRootFromContext ?? new FloatingTreeStore(); 13296 }, [floatingTreeRootFromContext]); 13297 const floatingNodeId = useFloatingNodeId(floatingTreeRoot); 13298 const floatingParentNodeId = useFloatingParentNodeId(); 13299 const { 13300 registerTrigger, 13301 isMountedByThisTrigger 13302 } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, { 13303 payload, 13304 closeDelay, 13305 parent, 13306 floatingTreeRoot, 13307 floatingNodeId, 13308 floatingParentNodeId, 13309 keyboardEventRelay: compositeRootContext?.relayKeyboardEvent 13310 }); 13311 const isInMenubar = parent.type === "menubar"; 13312 const rootDisabled = store.useState("disabled"); 13313 const disabled2 = disabledProp || rootDisabled || isInMenubar && parent.context.disabled; 13314 const { 13315 getButtonProps, 13316 buttonRef 13317 } = useButton({ 13318 disabled: disabled2, 13319 native: nativeButton 13320 }); 13321 React93.useEffect(() => { 13322 if (!isOpenedByThisTrigger && parent.type === void 0) { 13323 store.context.allowMouseUpTriggerRef.current = false; 13324 } 13325 }, [store, isOpenedByThisTrigger, parent.type]); 13326 const triggerRef = React93.useRef(null); 13327 const allowMouseUpTriggerTimeout = useTimeout(); 13328 const handleDocumentMouseUp = useStableCallback((mouseEvent) => { 13329 if (!triggerRef.current) { 13330 return; 13331 } 13332 allowMouseUpTriggerTimeout.clear(); 13333 store.context.allowMouseUpTriggerRef.current = false; 13334 const mouseUpTarget = mouseEvent.target; 13335 if (contains(triggerRef.current, mouseUpTarget) || contains(store.select("positionerElement"), mouseUpTarget) || mouseUpTarget === triggerRef.current) { 13336 return; 13337 } 13338 if (mouseUpTarget != null && findRootOwnerId(mouseUpTarget) === store.select("rootId")) { 13339 return; 13340 } 13341 if (isMouseWithinBounds(mouseEvent, triggerRef.current)) { 13342 return; 13343 } 13344 floatingTreeRoot.events.emit("close", { 13345 domEvent: mouseEvent, 13346 reason: reason_parts_exports.cancelOpen 13347 }); 13348 }); 13349 React93.useEffect(() => { 13350 const doc = ownerDocument(triggerRef.current); 13351 if (isOpenedByThisTrigger && store.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) { 13352 doc.addEventListener("mouseup", handleDocumentMouseUp, { 13353 once: true 13354 }); 13355 return () => { 13356 doc.removeEventListener("mouseup", handleDocumentMouseUp); 13357 }; 13358 } 13359 return void 0; 13360 }, [isOpenedByThisTrigger, handleDocumentMouseUp, store]); 13361 const parentMenubarHasSubmenuOpen = isInMenubar && parent.context.hasSubmenuOpen; 13362 const openOnHover = openOnHoverProp ?? parentMenubarHasSubmenuOpen; 13363 const hoverProps = useHoverReferenceInteraction(floatingRootContext, { 13364 enabled: openOnHover && !disabled2 && (!isInMenubar || parentMenubarHasSubmenuOpen && !isMountedByThisTrigger), 13365 handleClose: safePolygon({ 13366 blockPointerEvents: !isInMenubar 13367 }), 13368 mouseOnly: true, 13369 move: false, 13370 restMs: parent.type === void 0 ? delay : void 0, 13371 delay: { 13372 close: closeDelay 13373 }, 13374 triggerElementRef, 13375 externalTree: floatingTreeRoot, 13376 isActiveTrigger: isTriggerActive, 13377 isClosing: () => store.select("transitionStatus") === "ending" 13378 }); 13379 const stickIfOpen = useStickIfOpen(isOpenedByThisTrigger, store.select("lastOpenChangeReason")); 13380 const click = useClick(floatingRootContext, { 13381 enabled: !disabled2, 13382 event: isOpenedByThisTrigger && isInMenubar ? "click" : "mousedown", 13383 toggle: true, 13384 ignoreMouse: false, 13385 stickIfOpen: parent.type === void 0 ? stickIfOpen : false 13386 }); 13387 const focus = useFocus(floatingRootContext, { 13388 enabled: !disabled2 && parentMenubarHasSubmenuOpen 13389 }); 13390 const mixedToggleHandlers = useMixedToggleClickHandler({ 13391 open: isOpenedByThisTrigger, 13392 enabled: isInMenubar, 13393 mouseDownAction: "open" 13394 }); 13395 const localInteractionProps = React93.useMemo(() => mergeProps(focus.reference, click.reference), [focus.reference, click.reference]); 13396 const rootTriggerProps = store.useState("triggerProps", isMountedByThisTrigger); 13397 const filterTriggerProps = store.useState("filterTriggerProps"); 13398 const { 13399 handlePreFocusGuardFocus, 13400 handleFocusTargetFocus 13401 } = useTriggerFocusGuards(store, triggerElementRef); 13402 const state = { 13403 disabled: disabled2, 13404 open: isOpenedByThisTrigger 13405 }; 13406 const ref = [triggerRef, forwardedRef, buttonRef, registerTrigger, triggerElementRef]; 13407 const props = [localInteractionProps, hoverProps ?? EMPTY_OBJECT, rootTriggerProps, { 13408 "aria-haspopup": "menu", 13409 "aria-controls": controlsId, 13410 id: thisTriggerId, 13411 onMouseDown: (event) => { 13412 if (store.select("open")) { 13413 return; 13414 } 13415 allowMouseUpTriggerTimeout.start(200, () => { 13416 store.context.allowMouseUpTriggerRef.current = true; 13417 }); 13418 const doc = ownerDocument(event.currentTarget); 13419 doc.addEventListener("mouseup", handleDocumentMouseUp, { 13420 once: true 13421 }); 13422 } 13423 }, filterTriggerProps, isInMenubar ? { 13424 role: "menuitem" 13425 } : {}, mixedToggleHandlers, elementProps, getButtonProps]; 13426 const element = useRenderElement("button", componentProps, { 13427 enabled: !isInMenubar, 13428 stateAttributesMapping: pressableTriggerOpenStateMapping, 13429 state, 13430 ref, 13431 props 13432 }); 13433 if (isInMenubar) { 13434 return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CompositeItem, { 13435 tag: "button", 13436 render, 13437 className, 13438 style, 13439 state, 13440 refs: ref, 13441 props, 13442 stateAttributesMapping: pressableTriggerOpenStateMapping 13443 }); 13444 } 13445 if (isOpenedByThisTrigger) { 13446 return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(React93.Fragment, { 13447 children: [/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FocusGuard, { 13448 ref: store.context.beforeTriggerFocusGuardRef, 13449 onFocus: handlePreFocusGuardFocus 13450 }, `$thisTriggerId}-pre-focus-guard`), /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(React93.Fragment, { 13451 children: element 13452 }, thisTriggerId), /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FocusGuard, { 13453 ref: store.context.triggerFocusTargetRef, 13454 onFocus: handleFocusTargetFocus 13455 }, `$thisTriggerId}-post-focus-guard`)] 13456 }); 13457 } 13458 return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(React93.Fragment, { 13459 children: element 13460 }, thisTriggerId); 13461 }); 13462 if (true) MenuTrigger.displayName = "MenuTrigger"; 13463 function useStickIfOpen(open2, openReason) { 13464 const stickIfOpenTimeout = useTimeout(); 13465 const [stickIfOpen, setStickIfOpen] = React93.useState(false); 13466 useIsoLayoutEffect(() => { 13467 if (open2 && openReason === reason_parts_exports.triggerHover) { 13468 setStickIfOpen(true); 13469 stickIfOpenTimeout.start(PATIENT_CLICK_THRESHOLD, () => { 13470 setStickIfOpen(false); 13471 }); 13472 } else if (!open2) { 13473 stickIfOpenTimeout.clear(); 13474 setStickIfOpen(false); 13475 } 13476 }, [open2, openReason, stickIfOpenTimeout]); 13477 return stickIfOpen; 13478 } 13479 function useMenuParent() { 13480 const menubarContext = useMenubarContext(true); 13481 const parent = React93.useMemo(() => { 13482 if (menubarContext) { 13483 return { 13484 type: "menubar", 13485 context: menubarContext 13486 }; 13487 } 13488 return { 13489 type: void 0 13490 }; 13491 }, [menubarContext]); 13492 return parent; 13493 } 13494 13495 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/viewport/MenuViewport.mjs 13496 var React98 = __toESM(require_react(), 1); 13497 13498 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupViewport.mjs 13499 var React97 = __toESM(require_react(), 1); 13500 var ReactDOM7 = __toESM(require_react_dom(), 1); 13501 13502 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/usePreviousValue.mjs 13503 var React94 = __toESM(require_react(), 1); 13504 function usePreviousValue(value) { 13505 const [state, setState] = React94.useState({ 13506 current: value, 13507 previous: null 13508 }); 13509 if (!Object.is(value, state.current)) { 13510 setState({ 13511 current: value, 13512 previous: state.current 13513 }); 13514 } 13515 return state.previous; 13516 } 13517 13518 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupAutoResize.mjs 13519 var React95 = __toESM(require_react(), 1); 13520 13521 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/getCssDimensions.mjs 13522 function getCssDimensions2(element) { 13523 const css = getComputedStyle2(element); 13524 let width = parseFloat(css.width) || 0; 13525 let height = parseFloat(css.height) || 0; 13526 const hasOffset = isHTMLElement(element); 13527 const offsetWidth = hasOffset ? element.offsetWidth : width; 13528 const offsetHeight = hasOffset ? element.offsetHeight : height; 13529 const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight; 13530 if (shouldFallback) { 13531 width = offsetWidth; 13532 height = offsetHeight; 13533 } 13534 return { 13535 width, 13536 height 13537 }; 13538 } 13539 13540 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonPopupCssVars.mjs 13541 var popupWidth = "--popup-width"; 13542 var popupHeight = "--popup-height"; 13543 13544 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupAutoResize.mjs 13545 function usePopupAutoResize(parameters) { 13546 const { 13547 popupElement, 13548 positionerElement, 13549 content, 13550 mounted, 13551 onMeasureLayout: onMeasureLayoutParam, 13552 onMeasureLayoutComplete: onMeasureLayoutCompleteParam, 13553 side, 13554 direction 13555 } = parameters; 13556 const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true); 13557 const animationFrame = useAnimationFrame(); 13558 const committedDimensionsRef = React95.useRef(null); 13559 const onMeasureLayout = useStableCallback(onMeasureLayoutParam); 13560 const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam); 13561 const anchoringStyles = React95.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]); 13562 useIsoLayoutEffect(() => { 13563 if (!mounted) { 13564 committedDimensionsRef.current = null; 13565 return void 0; 13566 } 13567 if (!popupElement || !positionerElement) { 13568 return void 0; 13569 } 13570 const restoreAnchoringStyles = applyElementStyles(popupElement, anchoringStyles); 13571 setPopupCssSize(popupElement, "auto"); 13572 const restorePopupPosition = overrideElementStyle(popupElement, "position", "static"); 13573 const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none"); 13574 const restorePopupScale = overrideElementStyle(popupElement, "scale", "1"); 13575 const restorePositionerAvailableSize = applyElementStyles(positionerElement, { 13576 [availableWidth]: "max-content", 13577 [availableHeight]: "max-content" 13578 }); 13579 function restoreMeasurementOverrides() { 13580 restorePopupPosition(); 13581 restorePopupTransform(); 13582 restorePositionerAvailableSize(); 13583 restorePopupScale(); 13584 } 13585 onMeasureLayout?.(); 13586 if (committedDimensionsRef.current === null) { 13587 setPositionerCssSize(positionerElement, "max-content"); 13588 const dimensions = getCssDimensions2(popupElement); 13589 committedDimensionsRef.current = dimensions; 13590 setPositionerCssSize(positionerElement, dimensions); 13591 restoreMeasurementOverrides(); 13592 onMeasureLayoutComplete?.(null, dimensions); 13593 return restoreAnchoringStyles; 13594 } 13595 setPositionerCssSize(positionerElement, "max-content"); 13596 const previousDimensions = committedDimensionsRef.current; 13597 const newDimensions = getCssDimensions2(popupElement); 13598 committedDimensionsRef.current = newDimensions; 13599 setPopupCssSize(popupElement, previousDimensions); 13600 restoreMeasurementOverrides(); 13601 onMeasureLayoutComplete?.(previousDimensions, newDimensions); 13602 setPositionerCssSize(positionerElement, newDimensions); 13603 const abortController = new AbortController(); 13604 animationFrame.request(() => { 13605 setPopupCssSize(popupElement, newDimensions); 13606 runOnceAnimationsFinish(() => { 13607 popupElement.style.setProperty(popupWidth, "auto"); 13608 popupElement.style.setProperty(popupHeight, "auto"); 13609 }, abortController.signal); 13610 }); 13611 return () => { 13612 abortController.abort(); 13613 animationFrame.cancel(); 13614 restoreAnchoringStyles(); 13615 }; 13616 }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]); 13617 } 13618 function getPopupAnchoringStyles(side, direction) { 13619 const isPhysicalTop = side === "top"; 13620 const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start"); 13621 if (!isPhysicalTop && !isPhysicalLeft) { 13622 return EMPTY_OBJECT; 13623 } 13624 return { 13625 position: "absolute", 13626 [isPhysicalTop ? "bottom" : "top"]: "0", 13627 [isPhysicalLeft ? "right" : "left"]: "0" 13628 }; 13629 } 13630 function overrideElementStyle(element, property, value) { 13631 const originalValue = element.style.getPropertyValue(property); 13632 element.style.setProperty(property, value); 13633 return () => { 13634 element.style.setProperty(property, originalValue); 13635 }; 13636 } 13637 function applyElementStyles(element, styles) { 13638 const restorers = []; 13639 for (const [key, value] of Object.entries(styles)) { 13640 restorers.push(overrideElementStyle(element, key, value)); 13641 } 13642 return restorers.length ? () => { 13643 restorers.forEach((restore) => restore()); 13644 } : NOOP; 13645 } 13646 function setPopupCssSize(popupElement, size4) { 13647 const width = size4 === "auto" ? "auto" : `$size4.width}px`; 13648 const height = size4 === "auto" ? "auto" : `$size4.height}px`; 13649 popupElement.style.setProperty(popupWidth, width); 13650 popupElement.style.setProperty(popupHeight, height); 13651 } 13652 function setPositionerCssSize(positionerElement, size4) { 13653 const width = size4 === "max-content" ? "max-content" : `$size4.width}px`; 13654 const height = size4 === "max-content" ? "max-content" : `$size4.height}px`; 13655 positionerElement.style.setProperty(positionerWidth, width); 13656 positionerElement.style.setProperty(positionerHeight, height); 13657 } 13658 13659 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs 13660 var React96 = __toESM(require_react(), 1); 13661 var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1); 13662 var DirectionProvider = function DirectionProvider2(props) { 13663 const { 13664 direction = "ltr" 13665 } = props; 13666 const contextValue = React96.useMemo(() => ({ 13667 direction 13668 }), [direction]); 13669 return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DirectionContext.Provider, { 13670 value: contextValue, 13671 children: props.children 13672 }); 13673 }; 13674 if (true) DirectionProvider.displayName = "DirectionProvider"; 13675 13676 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs 13677 var adaptiveOrigin = { 13678 name: "adaptiveOrigin", 13679 async fn(state) { 13680 const { 13681 x: rawX, 13682 y: rawY, 13683 rects: { 13684 floating: floatRect 13685 }, 13686 elements: { 13687 floating 13688 }, 13689 platform: platform3, 13690 strategy, 13691 placement 13692 } = state; 13693 const win = getWindow(floating); 13694 const styles = win.getComputedStyle(floating); 13695 const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== ""; 13696 if (!hasTransition) { 13697 return { 13698 x: rawX, 13699 y: rawY, 13700 data: DEFAULT_SIDES 13701 }; 13702 } 13703 const offsetParent = await platform3.getOffsetParent?.(floating); 13704 let offsetDimensions = { 13705 width: 0, 13706 height: 0 13707 }; 13708 if (strategy === "fixed" && win?.visualViewport) { 13709 offsetDimensions = { 13710 width: win.visualViewport.width, 13711 height: win.visualViewport.height 13712 }; 13713 } else if (offsetParent === win) { 13714 const doc = ownerDocument(floating); 13715 offsetDimensions = { 13716 width: doc.documentElement.clientWidth, 13717 height: doc.documentElement.clientHeight 13718 }; 13719 } else if (await platform3.isElement?.(offsetParent)) { 13720 offsetDimensions = await platform3.getDimensions(offsetParent); 13721 } 13722 const currentSide = getSide(placement); 13723 let x2 = rawX; 13724 let y2 = rawY; 13725 if (currentSide === "left") { 13726 x2 = offsetDimensions.width - (rawX + floatRect.width); 13727 } 13728 if (currentSide === "top") { 13729 y2 = offsetDimensions.height - (rawY + floatRect.height); 13730 } 13731 const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX; 13732 const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY; 13733 return { 13734 x: x2, 13735 y: y2, 13736 data: { 13737 sideX, 13738 sideY 13739 } 13740 }; 13741 } 13742 }; 13743 13744 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonViewportDataAttributes.mjs 13745 var activationDirection = "data-activation-direction"; 13746 13747 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupViewport.mjs 13748 var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1); 13749 var popupViewportStateMapping = { 13750 activationDirection: (value) => value ? { 13751 [activationDirection]: value 13752 } : null 13753 }; 13754 function usePopupViewport(parameters) { 13755 const { 13756 store, 13757 side, 13758 children 13759 } = parameters; 13760 const direction = useDirection(); 13761 const activeTrigger = store.useState("activeTriggerElement"); 13762 const activeTriggerId = store.useState("activeTriggerId"); 13763 const open2 = store.useState("open"); 13764 const payload = store.useState("payload"); 13765 const mounted = store.useState("mounted"); 13766 const popupElement = store.useState("popupElement"); 13767 const positionerElement = store.useState("positionerElement"); 13768 const previousActiveTrigger = usePreviousValue(open2 ? activeTrigger : null); 13769 const currentContentKey = usePopupContentKey(activeTriggerId, payload); 13770 const capturedNodeRef = React97.useRef(null); 13771 const [previousContentNode, setPreviousContentNode] = React97.useState(null); 13772 const [newTriggerOffset, setNewTriggerOffset] = React97.useState(null); 13773 const currentContainerRef = React97.useRef(null); 13774 const previousContainerRef = React97.useRef(null); 13775 const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true); 13776 const cleanupFrame = useAnimationFrame(); 13777 const cleanupControllerRef = React97.useRef(null); 13778 const [previousContentDimensions, setPreviousContentDimensions] = React97.useState(null); 13779 const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React97.useState(false); 13780 useIsoLayoutEffect(() => { 13781 store.set("adaptiveOrigin", adaptiveOrigin); 13782 return () => { 13783 store.set("adaptiveOrigin", void 0); 13784 }; 13785 }, [store]); 13786 const handleMeasureLayout = useStableCallback(() => { 13787 currentContainerRef.current?.style.setProperty("animation", "none"); 13788 currentContainerRef.current?.style.setProperty("transition", "none"); 13789 previousContainerRef.current?.style.setProperty("display", "none"); 13790 }); 13791 const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => { 13792 currentContainerRef.current?.style.removeProperty("animation"); 13793 currentContainerRef.current?.style.removeProperty("transition"); 13794 previousContainerRef.current?.style.removeProperty("display"); 13795 if (previousDimensions) { 13796 setPreviousContentDimensions(previousDimensions); 13797 } 13798 }); 13799 const armViewportCleanup = useStableCallback(() => { 13800 cleanupControllerRef.current?.abort(); 13801 const controller = new AbortController(); 13802 cleanupControllerRef.current = controller; 13803 onAnimationsFinished(() => { 13804 setPreviousContentNode(null); 13805 setPreviousContentDimensions(null); 13806 capturedNodeRef.current = null; 13807 }, controller.signal); 13808 }); 13809 const lastHandledTriggerRef = React97.useRef(null); 13810 useIsoLayoutEffect(() => { 13811 if (!open2 || !mounted) { 13812 lastHandledTriggerRef.current = null; 13813 } 13814 }, [open2, mounted]); 13815 useIsoLayoutEffect(() => { 13816 if (open2 && activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) { 13817 setPreviousContentNode(capturedNodeRef.current); 13818 setShowStartingStyleAttribute(true); 13819 const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger); 13820 setNewTriggerOffset(offset4); 13821 lastHandledTriggerRef.current = activeTrigger; 13822 } 13823 }, [open2, activeTrigger, previousActiveTrigger]); 13824 useIsoLayoutEffect(() => { 13825 if (previousContentNode == null) { 13826 return; 13827 } 13828 cleanupControllerRef.current?.abort(); 13829 setShowStartingStyleAttribute(true); 13830 cleanupFrame.request(() => { 13831 ReactDOM7.flushSync(() => { 13832 setShowStartingStyleAttribute(false); 13833 }); 13834 armViewportCleanup(); 13835 }); 13836 }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]); 13837 useIsoLayoutEffect(() => { 13838 const source = currentContainerRef.current; 13839 if (!source) { 13840 return; 13841 } 13842 const wrapper = ownerDocument(source).createElement("div"); 13843 for (const child of Array.from(source.childNodes)) { 13844 wrapper.appendChild(child.cloneNode(true)); 13845 } 13846 capturedNodeRef.current = wrapper; 13847 }); 13848 const isTransitioning = previousContentNode != null; 13849 let childrenToRender; 13850 if (!isTransitioning) { 13851 childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { 13852 "data-current": true, 13853 ref: currentContainerRef, 13854 children 13855 }, currentContentKey); 13856 } else { 13857 childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(React97.Fragment, { 13858 children: [/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { 13859 "data-previous": true, 13860 inert: inertValue(true), 13861 ref: previousContainerRef, 13862 style: { 13863 ...previousContentDimensions ? { 13864 [popupWidth]: `$previousContentDimensions.width}px`, 13865 [popupHeight]: `$previousContentDimensions.height}px` 13866 } : null, 13867 position: "absolute" 13868 }, 13869 "data-ending-style": showStartingStyleAttribute ? void 0 : "" 13870 }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { 13871 "data-current": true, 13872 ref: currentContainerRef, 13873 "data-starting-style": showStartingStyleAttribute ? "" : void 0, 13874 children 13875 }, currentContentKey)] 13876 }); 13877 } 13878 useIsoLayoutEffect(() => { 13879 const container = previousContainerRef.current; 13880 if (!container || !previousContentNode) { 13881 return; 13882 } 13883 container.replaceChildren(...Array.from(previousContentNode.childNodes)); 13884 }, [previousContentNode]); 13885 usePopupAutoResize({ 13886 popupElement, 13887 positionerElement, 13888 mounted, 13889 content: payload, 13890 onMeasureLayout: handleMeasureLayout, 13891 onMeasureLayoutComplete: handleMeasureLayoutComplete, 13892 side, 13893 direction 13894 }); 13895 const state = { 13896 activationDirection: getActivationDirection(newTriggerOffset), 13897 transitioning: isTransitioning 13898 }; 13899 return { 13900 children: childrenToRender, 13901 state 13902 }; 13903 } 13904 function getActivationDirection(offset4) { 13905 if (!offset4) { 13906 return void 0; 13907 } 13908 return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`; 13909 } 13910 function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) { 13911 if (value > tolerance) { 13912 return positiveLabel; 13913 } 13914 if (value < -tolerance) { 13915 return negativeLabel; 13916 } 13917 return ""; 13918 } 13919 function calculateRelativePosition(from, to) { 13920 const fromRect = from.getBoundingClientRect(); 13921 const toRect = to.getBoundingClientRect(); 13922 const fromCenter = { 13923 x: fromRect.left + fromRect.width / 2, 13924 y: fromRect.top + fromRect.height / 2 13925 }; 13926 const toCenter = { 13927 x: toRect.left + toRect.width / 2, 13928 y: toRect.top + toRect.height / 2 13929 }; 13930 return { 13931 horizontal: toCenter.x - fromCenter.x, 13932 vertical: toCenter.y - fromCenter.y 13933 }; 13934 } 13935 function usePopupContentKey(activeTriggerId, payload) { 13936 const [contentKey, setContentKey] = React97.useState(0); 13937 const previousActiveTriggerIdRef = React97.useRef(activeTriggerId); 13938 const previousPayloadRef = React97.useRef(payload); 13939 const pendingPayloadUpdateRef = React97.useRef(false); 13940 useIsoLayoutEffect(() => { 13941 const previousActiveTriggerId = previousActiveTriggerIdRef.current; 13942 const previousPayload = previousPayloadRef.current; 13943 const triggerIdChanged = activeTriggerId !== previousActiveTriggerId; 13944 const payloadChanged = payload !== previousPayload; 13945 if (triggerIdChanged) { 13946 setContentKey((value) => value + 1); 13947 pendingPayloadUpdateRef.current = !payloadChanged; 13948 } else if (pendingPayloadUpdateRef.current && payloadChanged) { 13949 setContentKey((value) => value + 1); 13950 pendingPayloadUpdateRef.current = false; 13951 } 13952 previousActiveTriggerIdRef.current = activeTriggerId; 13953 previousPayloadRef.current = payload; 13954 }, [activeTriggerId, payload]); 13955 return `$activeTriggerId ?? "current"}-$contentKey}`; 13956 } 13957 13958 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/viewport/MenuViewport.mjs 13959 var MenuViewport = /* @__PURE__ */ React98.forwardRef(function MenuViewport2(componentProps, forwardedRef) { 13960 const { 13961 render, 13962 className, 13963 style, 13964 children, 13965 ...elementProps 13966 } = componentProps; 13967 const { 13968 store 13969 } = useMenuRootContext(); 13970 const { 13971 side 13972 } = useMenuPositionerContext(); 13973 const instantType = store.useState("instantType"); 13974 const { 13975 children: childrenToRender, 13976 state: viewportState 13977 } = usePopupViewport({ 13978 store, 13979 side, 13980 children 13981 }); 13982 const state = { 13983 activationDirection: viewportState.activationDirection, 13984 transitioning: viewportState.transitioning, 13985 instant: instantType 13986 }; 13987 return useRenderElement("div", componentProps, { 13988 state, 13989 ref: forwardedRef, 13990 props: [elementProps, { 13991 children: childrenToRender 13992 }], 13993 stateAttributesMapping: popupViewportStateMapping 13994 }); 13995 }); 13996 if (true) MenuViewport.displayName = "MenuViewport"; 13997 13998 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/separator/Separator.mjs 13999 var React99 = __toESM(require_react(), 1); 14000 var Separator = /* @__PURE__ */ React99.forwardRef(function SeparatorComponent(componentProps, forwardedRef) { 14001 const { 14002 className, 14003 render, 14004 orientation = "horizontal", 14005 style, 14006 ...elementProps 14007 } = componentProps; 14008 const state = { 14009 orientation 14010 }; 14011 const element = useRenderElement("div", componentProps, { 14012 state, 14013 ref: forwardedRef, 14014 props: [{ 14015 role: "separator", 14016 "aria-orientation": orientation 14017 }, elementProps] 14018 }); 14019 return element; 14020 }); 14021 if (true) Separator.displayName = "Separator"; 14022 14023 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/submenu-trigger/MenuSubmenuTrigger.mjs 14024 var React100 = __toESM(require_react(), 1); 14025 14026 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/isElementDisabled.mjs 14027 function isElementDisabled(element) { 14028 return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true"; 14029 } 14030 14031 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/submenu-trigger/MenuSubmenuTrigger.mjs 14032 var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1); 14033 var VOICE_OVER_EXPANDED_PROPS = { 14034 "aria-expanded": void 0 14035 }; 14036 var MenuSubmenuTriggerPlain = /* @__PURE__ */ React100.forwardRef(function MenuSubmenuTriggerPlain2(componentProps, forwardedRef) { 14037 const { 14038 render, 14039 className, 14040 style, 14041 label, 14042 id: idProp, 14043 nativeButton = false, 14044 openOnHover = true, 14045 delay = 100, 14046 closeDelay = 0, 14047 disabled: disabledProp = false, 14048 ...elementProps 14049 } = componentProps; 14050 const context = useMenuRootContext(true); 14051 if (context?.parent.type !== "menu") { 14052 throw new Error(true ? "Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>." : formatErrorMessage_default(37)); 14053 } 14054 const menuPositionerContext = useMenuPositionerContext(); 14055 const submenuRootContext = useMenuSubmenuRootContext(); 14056 const { 14057 store, 14058 parentVirtualFocus 14059 } = context; 14060 const parentMenuStore = context.parent.store; 14061 const listItem = useCompositeListItem({ 14062 guess: true, 14063 label 14064 }); 14065 const thisTriggerId = useBaseUiId(idProp); 14066 const open2 = store.useState("open"); 14067 const focusReturnedThroughGuardRef = React100.useRef(false); 14068 const positionerElement = store.useState("positionerElement"); 14069 const floatingRootContext = store.useState("floatingRootContext"); 14070 const floatingTreeRoot = store.useState("floatingTreeRoot"); 14071 const popupId = store.useState("triggerPopupId", thisTriggerId); 14072 const baseRegisterTrigger = useTriggerRegistration(thisTriggerId, store); 14073 const registerTrigger = useStableCallback((element2) => { 14074 baseRegisterTrigger(element2); 14075 const activeTriggerElement = store.select("activeTriggerElement"); 14076 if (element2 !== null && store.select("open") && (activeTriggerElement === element2 || store.select("activeTriggerId") == null)) { 14077 store.update({ 14078 activeTriggerId: thisTriggerId ?? null, 14079 activeTriggerElement: element2, 14080 closeDelay 14081 }); 14082 } 14083 }); 14084 const triggerElementRef = React100.useRef(null); 14085 const handleTriggerElementRef = React100.useCallback((el) => { 14086 triggerElementRef.current = el; 14087 store.set("activeTriggerElement", el); 14088 }, [store]); 14089 useIsoLayoutEffect(() => { 14090 registerTrigger(triggerElementRef.current); 14091 return () => registerTrigger(null); 14092 }, [registerTrigger, thisTriggerId, store]); 14093 useIsoLayoutEffect(() => { 14094 if (!open2 || !positionerElement) { 14095 return void 0; 14096 } 14097 function handleGuardFocusOut(event) { 14098 if (getTarget(event) === store.context.beforeContentFocusGuardRef.current) { 14099 focusReturnedThroughGuardRef.current = event.relatedTarget === triggerElementRef.current; 14100 } 14101 } 14102 positionerElement.addEventListener("focusout", handleGuardFocusOut, true); 14103 return () => { 14104 focusReturnedThroughGuardRef.current = false; 14105 positionerElement.removeEventListener("focusout", handleGuardFocusOut, true); 14106 }; 14107 }, [open2, positionerElement, store]); 14108 store.useSyncedValue("closeDelay", closeDelay); 14109 const rootDisabled = store.useState("disabled"); 14110 const parentDisabled = parentMenuStore.useState("disabled"); 14111 const disabled2 = disabledProp || rootDisabled || parentDisabled; 14112 if (true) { 14113 React100.useEffect(() => { 14114 const element2 = triggerElementRef.current; 14115 if (element2 && isElementDisabled(element2) && !disabled2) { 14116 const ownerStackMessage = SafeReact.captureOwnerStack?.() || ""; 14117 warn(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \`disabled\` prop on the component instead of setting it on the rendered element.$ownerStackMessage}`); 14118 } 14119 }); 14120 } 14121 const itemProps = parentMenuStore.useState("itemProps"); 14122 const highlighted = parentMenuStore.useState("isActive", listItem.index); 14123 const itemMetadata = React100.useMemo(() => ({ 14124 type: "submenu-trigger", 14125 setActive(event) { 14126 if (parentMenuStore.select("highlightItemOnHover")) { 14127 parentMenuStore.setActiveIndex(listItem.index, reason_parts_exports.pointer, event); 14128 } 14129 } 14130 }), [parentMenuStore, listItem.index]); 14131 const { 14132 getItemProps, 14133 itemRef 14134 } = useMenuItem({ 14135 closeOnClick: false, 14136 disabled: disabled2, 14137 highlighted, 14138 id: thisTriggerId, 14139 store, 14140 typingRef: parentMenuStore.context.typingRef, 14141 nativeButton, 14142 itemMetadata, 14143 nodeId: menuPositionerContext?.context.nodeId 14144 }); 14145 const hoverEnabled = store.useState("hoverEnabled"); 14146 const hoverProps = useHoverReferenceInteraction(floatingRootContext, { 14147 enabled: hoverEnabled && openOnHover && !disabled2, 14148 handleClose: safePolygon({ 14149 blockPointerEvents: true 14150 }), 14151 mouseOnly: true, 14152 move: true, 14153 restMs: delay, 14154 delay: { 14155 open: delay, 14156 close: closeDelay 14157 }, 14158 shouldOpen: delay > 0 ? () => parentMenuStore.select("allowMouseEnter") : void 0, 14159 triggerElementRef, 14160 externalTree: floatingTreeRoot, 14161 isClosing: () => store.select("transitionStatus") === "ending", 14162 // Chrome can drop the trigger's `mouseleave` during a fast pointer sweep, 14163 // leaving a stale submenu open (see #5152) — cancel from `mouseout` too. 14164 guardStaleOpen: true 14165 }); 14166 const click = useClick(floatingRootContext, { 14167 enabled: !disabled2, 14168 event: "mousedown", 14169 // Without toggling, TalkBack users cannot close the submenu to reach the next parent menu 14170 // item: moving the virtual cursor outside does not close it, and moving forward again 14171 // re-enters the still-open submenu. Keep toggling enabled so activating its trigger closes it. 14172 // Toggling applies to touch and keyboard activation. In hover mode, mouse presses are 14173 // ignored and the first activation after hover-opening keeps the submenu open. 14174 toggle: true, 14175 ignoreMouse: openOnHover, 14176 stickIfOpen: openOnHover 14177 }); 14178 const localInteractionProps = click.reference ?? EMPTY_OBJECT; 14179 const rootTriggerProps = store.useState("triggerProps", true); 14180 delete rootTriggerProps.id; 14181 const state = { 14182 disabled: disabled2, 14183 highlighted, 14184 open: open2 14185 }; 14186 const openMethod = store.useState("openMethod"); 14187 const lastOpenChangeReason = store.useState("lastOpenChangeReason"); 14188 const openedByKeyboard = lastOpenChangeReason === reason_parts_exports.listNavigation || openMethod === "keyboard"; 14189 const shouldOmitExpanded = open2 && openedByKeyboard && parts_exports.screenReader.voiceOver; 14190 const submenuKeyDownProps = submenuRootContext?.onTriggerKeyDown ? { 14191 onKeyDown: submenuRootContext.onTriggerKeyDown 14192 } : void 0; 14193 const element = useRenderElement("div", componentProps, { 14194 state, 14195 stateAttributesMapping: triggerOpenStateMapping, 14196 props: [ 14197 localInteractionProps, 14198 hoverProps, 14199 rootTriggerProps, 14200 // MenuFilterSubmenuRoot overrides the generic trigger handler because entry and exit 14201 // depend on both the parent and child menu orientations. 14202 submenuKeyDownProps, 14203 itemProps, 14204 // Opening a submenu changes the trigger's expanded state while the trigger still holds 14205 // focus, and VoiceOver announces that state change instead of the submenu item that focus 14206 // moves to a moment later, so the first item is never announced. Dropping the state while 14207 // the submenu is open avoids the announcement without claiming the submenu is collapsed; 14208 // `aria-haspopup` still conveys that the item opens a submenu. 14209 shouldOmitExpanded ? VOICE_OVER_EXPANDED_PROPS : void 0, 14210 { 14211 "aria-controls": popupId, 14212 // A virtually focused parent keeps real focus on its input, so the trigger must stay out 14213 // of the tab order. 14214 tabIndex: parentVirtualFocus || !(open2 || highlighted) ? -1 : 0, 14215 onFocus(event) { 14216 if (store.select("open") && focusReturnedThroughGuardRef.current) { 14217 focusReturnedThroughGuardRef.current = false; 14218 store.setOpen(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent)); 14219 } 14220 }, 14221 onBlur() { 14222 if (highlighted) { 14223 parentMenuStore.setActiveIndex(null, reason_parts_exports.none); 14224 } 14225 } 14226 }, 14227 elementProps, 14228 // `getItemProps` stays last so `useButton` keeps gating consumer handlers while disabled. 14229 getItemProps 14230 ], 14231 ref: [forwardedRef, listItem.ref, itemRef, registerTrigger, handleTriggerElementRef] 14232 }); 14233 return element; 14234 }); 14235 if (true) MenuSubmenuTriggerPlain.displayName = "MenuSubmenuTriggerPlain"; 14236 var MenuSubmenuTrigger = /* @__PURE__ */ React100.forwardRef(function MenuSubmenuTrigger2(props, forwardedRef) { 14237 const filterItem = useMenuFilterItem(props, forwardedRef, "submenu-trigger"); 14238 if (!filterItem.visible) { 14239 return null; 14240 } 14241 const mergedProps = filterItem.props ? mergeProps(filterItem.props, props) : props; 14242 return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MenuSubmenuTriggerPlain, { 14243 ...mergedProps, 14244 ref: filterItem.ref 14245 }); 14246 }); 14247 if (true) MenuSubmenuTrigger.displayName = "MenuSubmenuTrigger"; 14248 14249 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/store/MenuHandle.mjs 14250 var MenuHandle = class extends BasePopupHandle { 14251 constructor() { 14252 super(createNullMenuStore(), "Menu"); 14253 } 14254 /** 14255 * Opens the menu and associates it with the trigger with the given id. 14256 * 14257 * This method should only be called in an event handler or an effect (not during rendering). 14258 * 14259 * @param triggerId ID of the trigger to associate with the menu. The trigger must be a matching 14260 * `Menu.Trigger` with this handle passed as a prop. 14261 */ 14262 open(triggerId) { 14263 this.openByTrigger(triggerId); 14264 } 14265 /** 14266 * Closes the menu. 14267 * 14268 * This method should only be called in an event handler or an effect (not during rendering). 14269 */ 14270 close() { 14271 this.closePopup(); 14272 } 14273 /** 14274 * Whether the menu is currently open. Returns `false` while no root is attached to the handle. 14275 */ 14276 get isOpen() { 14277 return this.attachedStore?.select("open") ?? false; 14278 } 14279 }; 14280 function createMenuHandle() { 14281 return new MenuHandle(); 14282 } 14283 14284 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-provider/MenuFilterProvider.mjs 14285 var React117 = __toESM(require_react(), 1); 14286 14287 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterRoot.mjs 14288 var React115 = __toESM(require_react(), 1); 14289 14290 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterDropdown.mjs 14291 var React113 = __toESM(require_react(), 1); 14292 14293 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/root/FilterDropdownRoot.mjs 14294 var React103 = __toESM(require_react(), 1); 14295 14296 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useItemRegistry.mjs 14297 var React101 = __toESM(require_react(), 1); 14298 function useItemRegistry() { 14299 const itemRegistry = useRefWithInit(() => /* @__PURE__ */ new Map()).current; 14300 const [registryVersion, setRegistryVersion] = React101.useState(0); 14301 const isUpdateScheduledRef = React101.useRef(false); 14302 const scheduleRegistryUpdate = useStableCallback(() => { 14303 if (isUpdateScheduledRef.current) { 14304 return; 14305 } 14306 isUpdateScheduledRef.current = true; 14307 setRegistryVersion((version2) => version2 + 1); 14308 }); 14309 const registerItem = useStableCallback((key, item) => { 14310 itemRegistry.set(key, item); 14311 scheduleRegistryUpdate(); 14312 return () => { 14313 itemRegistry.delete(key); 14314 scheduleRegistryUpdate(); 14315 }; 14316 }); 14317 const registeredItems = React101.useMemo( 14318 () => new Map(itemRegistry), 14319 // The mutable registry is stable. Its version explicitly controls when to publish a copy. 14320 // eslint-disable-next-line react-hooks/exhaustive-deps 14321 [registryVersion] 14322 ); 14323 useIsoLayoutEffect(() => { 14324 isUpdateScheduledRef.current = false; 14325 }, [registryVersion]); 14326 return { 14327 items: registeredItems, 14328 registerItem, 14329 liveItems: itemRegistry 14330 }; 14331 } 14332 14333 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/root/FilterDropdownRootContext.mjs 14334 var React102 = __toESM(require_react(), 1); 14335 function throwMissingFilterRoot() { 14336 throw new Error(true ? "Base UI: Filter parts are missing their filter context and cannot access the query or items. Wrap the component root in its filter provider." : formatErrorMessage_default(103)); 14337 } 14338 var FilterDropdownItemContext = /* @__PURE__ */ React102.createContext(null); 14339 if (true) FilterDropdownItemContext.displayName = "FilterDropdownItemContext"; 14340 function useFilterDropdownItemContext(optional = false) { 14341 const context = React102.useContext(FilterDropdownItemContext); 14342 if (context === null && !optional) { 14343 throwMissingFilterRoot(); 14344 } 14345 return context; 14346 } 14347 var FilterDropdownRootContext = /* @__PURE__ */ React102.createContext(null); 14348 if (true) FilterDropdownRootContext.displayName = "FilterDropdownRootContext"; 14349 function useFilterDropdownRootContext(optional = false) { 14350 const context = React102.useContext(FilterDropdownRootContext); 14351 if (context === null && !optional) { 14352 throwMissingFilterRoot(); 14353 } 14354 return context; 14355 } 14356 function useFilterContextForList(listRef) { 14357 let context = React102.useContext(FilterDropdownItemContext); 14358 if (listRef === null) { 14359 return null; 14360 } 14361 while (context !== null && context.listRef !== listRef) { 14362 context = context.parent; 14363 } 14364 return context; 14365 } 14366 var FilterDropdownValueContext = /* @__PURE__ */ React102.createContext(""); 14367 if (true) FilterDropdownValueContext.displayName = "FilterDropdownValueContext"; 14368 function useFilterDropdownValueContext() { 14369 return React102.useContext(FilterDropdownValueContext); 14370 } 14371 14372 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/store.mjs 14373 var selectors3 = { 14374 // A null `visibleItemIds` means no query, so fall back to whether anything registered. 14375 isEmpty: (state) => state.visibleItemIds === null ? state.registeredItemCount === 0 : state.visibleItemIds.size === 0, 14376 isItemVisible: (state, id) => state.visibleItemIds === null || state.visibleItemIds.has(id) 14377 }; 14378 var FilterDropdownStore = class extends ReactStore { 14379 constructor() { 14380 super({ 14381 visibleItemIds: null, 14382 registeredItemCount: 0 14383 }, EMPTY_OBJECT, selectors3); 14384 } 14385 }; 14386 var DETACHED_OWNER = { 14387 registerItem: () => NOOP, 14388 store: new FilterDropdownStore() 14389 }; 14390 14391 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/root/FilterDropdownRoot.mjs 14392 var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1); 14393 function FilterDropdownRoot(props) { 14394 const { 14395 children, 14396 open: open2, 14397 disabled: disabled2 = false, 14398 openedByKeyboard = false, 14399 locale, 14400 value, 14401 query, 14402 onValueChange, 14403 filter, 14404 autoHighlight = false, 14405 triggerId: triggerIdProp, 14406 listRef, 14407 getActiveIndex, 14408 setActiveIndex, 14409 focusOwnerRef: focusOwnerRefProp 14410 } = props; 14411 const parentItemContext = React103.useContext(FilterDropdownItemContext); 14412 const [renderedListId, setRenderedListId] = React103.useState(void 0); 14413 const [inputFocusVisible, setInputFocusVisible] = React103.useState(openedByKeyboard); 14414 const [keyboardModality, setKeyboardModality] = React103.useState(openedByKeyboard); 14415 const [previousOpenedByKeyboard, setPreviousOpenedByKeyboard] = React103.useState(openedByKeyboard); 14416 if (openedByKeyboard !== previousOpenedByKeyboard) { 14417 setPreviousOpenedByKeyboard(openedByKeyboard); 14418 setInputFocusVisible(openedByKeyboard); 14419 setKeyboardModality(openedByKeyboard); 14420 } 14421 const { 14422 items: registeredItems, 14423 registerItem: registerInRegistry, 14424 liveItems 14425 } = useItemRegistry(); 14426 const defaultId = useBaseUiId(); 14427 const store = useRefWithInit(() => new FilterDropdownStore()).current; 14428 const registerItem = useStableCallback((id, item) => { 14429 const unregister = registerInRegistry(id, item); 14430 store.set("registeredItemCount", liveItems.size); 14431 return () => { 14432 unregister(); 14433 store.set("registeredItemCount", liveItems.size); 14434 }; 14435 }); 14436 const fallbackFocusOwnerRef = React103.useRef(null); 14437 const lastFilterQueryRef = React103.useRef(null); 14438 const defaultMatchItem = React103.useMemo(() => getFilter({ 14439 locale 14440 }).contains, [locale]); 14441 const focusOwnerRef = focusOwnerRefProp ?? fallbackFocusOwnerRef; 14442 const filterQuery = (query ?? value).trim(); 14443 const matchItem = filterQuery === "" || filter === null ? null : filter ?? defaultMatchItem; 14444 const autoHighlightEnabled = open2 && (autoHighlight === "always" || autoHighlight && filterQuery !== ""); 14445 const defaultListId = defaultId ? `$defaultId}-list` : void 0; 14446 const listId = (renderedListId ?? defaultListId) || void 0; 14447 const triggerId = triggerIdProp || void 0; 14448 const handleValueChange = useStableCallback((nextValue, eventDetails) => { 14449 onValueChange?.(nextValue, eventDetails); 14450 if (!eventDetails.isCanceled && !autoHighlight) { 14451 setActiveIndex(null); 14452 } 14453 }); 14454 const handleItemsChange = useStableCallback((previousItems) => { 14455 const items = listRef.current; 14456 const activeIndex = getActiveIndex(); 14457 if (activeIndex != null && items[activeIndex] != null && items[activeIndex] === previousItems[activeIndex]) { 14458 return; 14459 } 14460 setActiveIndex(autoHighlightEnabled && items.length > 0 ? 0 : null); 14461 }); 14462 useIsoLayoutEffect(() => { 14463 if (!open2 && query === void 0) { 14464 return; 14465 } 14466 const queryChanged = lastFilterQueryRef.current !== null && lastFilterQueryRef.current !== filterQuery; 14467 lastFilterQueryRef.current = filterQuery; 14468 if (matchItem === null) { 14469 store.set("visibleItemIds", null); 14470 if (autoHighlightEnabled && liveItems.size > 0) { 14471 if (queryChanged || getActiveIndex() == null) { 14472 setActiveIndex(0); 14473 } 14474 } else if (filterQuery === "" && queryChanged) { 14475 setActiveIndex(null); 14476 } 14477 return; 14478 } 14479 const currentIds = store.state.visibleItemIds; 14480 if (currentIds === null && liveItems.size === 0) { 14481 return; 14482 } 14483 const nextIds = /* @__PURE__ */ new Set(); 14484 let hasNewMatch = currentIds === null; 14485 liveItems.forEach(({ 14486 getText 14487 }, id) => { 14488 const text = getText(); 14489 if (text != null && matchItem(text, filterQuery)) { 14490 nextIds.add(id); 14491 hasNewMatch ||= !currentIds?.has(id); 14492 } 14493 }); 14494 if (hasNewMatch || currentIds?.size !== nextIds.size) { 14495 if (autoHighlightEnabled && nextIds.size > 0) { 14496 setActiveIndex(0); 14497 } else if (currentIds !== null || queryChanged) { 14498 setActiveIndex(null); 14499 } 14500 store.set("visibleItemIds", nextIds); 14501 } else if (autoHighlightEnabled && queryChanged && nextIds.size > 0) { 14502 setActiveIndex(0); 14503 } 14504 }, [open2, query, filterQuery, registeredItems, liveItems, matchItem, autoHighlightEnabled, store, setActiveIndex, getActiveIndex]); 14505 const contextValue = React103.useMemo(() => ({ 14506 open: open2, 14507 disabled: disabled2, 14508 inputFocusVisible, 14509 setInputFocusVisible, 14510 keyboardModality, 14511 setKeyboardModality, 14512 autoHighlight, 14513 triggerId, 14514 defaultListId, 14515 listId, 14516 setRenderedListId, 14517 focusOwnerRef, 14518 setActiveIndex, 14519 onItemsChange: handleItemsChange, 14520 onValueChange: handleValueChange 14521 }), [open2, disabled2, inputFocusVisible, keyboardModality, autoHighlight, triggerId, defaultListId, listId, focusOwnerRef, setActiveIndex, handleItemsChange, handleValueChange]); 14522 const itemContextValue = React103.useMemo(() => ({ 14523 parent: parentItemContext, 14524 store, 14525 registerItem, 14526 listRef 14527 }), [parentItemContext, store, registerItem, listRef]); 14528 return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FilterDropdownItemContext.Provider, { 14529 value: itemContextValue, 14530 children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FilterDropdownRootContext.Provider, { 14531 value: contextValue, 14532 children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(FilterDropdownValueContext.Provider, { 14533 value: query ?? value, 14534 children 14535 }) 14536 }) 14537 }); 14538 } 14539 14540 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/root/useFilterDropdownCloseQuery.mjs 14541 var React104 = __toESM(require_react(), 1); 14542 function useFilterDropdownCloseQuery(parameters) { 14543 const { 14544 open: open2, 14545 mounted, 14546 value, 14547 onValueChange 14548 } = parameters; 14549 const [closeQuery, setCloseQuery] = React104.useState(null); 14550 const previousOpenRef = React104.useRef(open2); 14551 useIsoLayoutEffect(() => { 14552 const wasOpen = previousOpenRef.current; 14553 previousOpenRef.current = open2; 14554 if (wasOpen && !open2 && value !== "") { 14555 setCloseQuery(value); 14556 onValueChange("", createChangeEventDetails(reason_parts_exports.popupClose)); 14557 } else if ((open2 || !mounted) && closeQuery !== null) { 14558 setCloseQuery(null); 14559 } 14560 }, [open2, mounted, value, closeQuery, onValueChange]); 14561 return !open2 && closeQuery !== null ? closeQuery : value; 14562 } 14563 14564 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterPopup.mjs 14565 var React106 = __toESM(require_react(), 1); 14566 14567 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/useMenuFilterPopup.mjs 14568 var React105 = __toESM(require_react(), 1); 14569 14570 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/utils/refocusOwner.mjs 14571 var refocusing = false; 14572 function refocusOwner(owner) { 14573 refocusing = true; 14574 try { 14575 owner.focus({ 14576 preventScroll: true 14577 }); 14578 } finally { 14579 refocusing = false; 14580 } 14581 } 14582 function isRefocusingOwner() { 14583 return refocusing; 14584 } 14585 14586 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/useMenuFilterPopup.mjs 14587 function useMenuFilterPopup(orientation) { 14588 const context = useFilterDropdownRootContext(); 14589 const direction = useDirection(); 14590 const { 14591 focusOwnerRef 14592 } = context; 14593 const nestedFocusRef = React105.useRef(null); 14594 const pointerTypeRef = React105.useRef("mouse"); 14595 function trackPointerType(event) { 14596 pointerTypeRef.current = event.pointerType || "mouse"; 14597 } 14598 if (true) { 14599 React105.useEffect(() => { 14600 if (context.open && focusOwnerRef.current === null) { 14601 warn("A filterable menu opened without a <Menu.Input>. Render the input inside <Menu.Popup>, or drop <Menu.FilterProvider> for a menu that does not filter."); 14602 } 14603 }, [context.open, focusOwnerRef]); 14604 } 14605 function restoreInputFocus(event, enteredTrigger) { 14606 const focusOwner = focusOwnerRef.current; 14607 if (!context.open || !focusOwner) { 14608 return; 14609 } 14610 const activeEl = activeElement(ownerDocument(event.currentTarget)); 14611 if (activeEl === focusOwner || contains(event.currentTarget, activeEl)) { 14612 return; 14613 } 14614 let submenuTrigger = null; 14615 const nearestPopup = event.nativeEvent.composedPath().find((node) => { 14616 if (!isHTMLElement(node)) { 14617 return false; 14618 } 14619 if (node.getAttribute("role") === "dialog" || node.hasAttribute("data-rootownerid")) { 14620 return true; 14621 } 14622 if (node.hasAttribute("aria-haspopup")) { 14623 submenuTrigger = node; 14624 } 14625 return false; 14626 }); 14627 if (nearestPopup !== event.currentTarget) { 14628 return; 14629 } 14630 if (nestedFocusRef.current && !(enteredTrigger && submenuTrigger)) { 14631 return; 14632 } 14633 if (enteredTrigger && submenuTrigger && isElement(event.relatedTarget) && contains(submenuTrigger, event.relatedTarget)) { 14634 return; 14635 } 14636 refocusOwner(focusOwner); 14637 } 14638 return { 14639 // The input owns virtual focus. 14640 "aria-activedescendant": void 0, 14641 // Not valid on a dialog; the list's implicit orientation is already vertical. 14642 "aria-orientation": void 0, 14643 onMouseDown(event) { 14644 if (getTarget(event.nativeEvent) === event.currentTarget) { 14645 event.preventDefault(); 14646 } 14647 }, 14648 onPointerDown: trackPointerType, 14649 // `pointerover` precedes the compatibility `mouseover`, so a mouse entering right after a tap 14650 // is recognized before the handoff below. 14651 onPointerOver: trackPointerType, 14652 onPointerMove: trackPointerType, 14653 onMouseMove(event) { 14654 if (pointerTypeRef.current === "mouse") { 14655 restoreInputFocus(event, false); 14656 } 14657 }, 14658 onMouseOver(event) { 14659 if (pointerTypeRef.current === "mouse" && nestedFocusRef.current) { 14660 restoreInputFocus(event, true); 14661 } 14662 }, 14663 onFocus(event) { 14664 const target = getTarget(event.nativeEvent); 14665 if (target === focusOwnerRef.current) { 14666 nestedFocusRef.current = null; 14667 } else if (isHTMLElement(target) && !contains(event.currentTarget, target) && !isRefocusingOwner()) { 14668 nestedFocusRef.current = target; 14669 } 14670 if (context.open && target === event.currentTarget) { 14671 focusOwnerRef.current?.focus({ 14672 preventScroll: true 14673 }); 14674 } 14675 }, 14676 onKeyDown(event) { 14677 const target = getTarget(event.nativeEvent); 14678 if (target === focusOwnerRef.current || isTypeableElement(target)) { 14679 return; 14680 } 14681 if (isCrossOrientationCloseKey(event.key, orientation, direction === "rtl", false)) { 14682 focusOwnerRef.current?.focus({ 14683 preventScroll: true 14684 }); 14685 event.stopPropagation(); 14686 } 14687 } 14688 }; 14689 } 14690 14691 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterPopup.mjs 14692 var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1); 14693 var MenuFilterPopup = /* @__PURE__ */ React106.forwardRef(function MenuFilterPopup2(props, forwardedRef) { 14694 const { 14695 store, 14696 orientation 14697 } = useMenuRootContext(); 14698 const open2 = store.useState("open"); 14699 const parent = store.useState("parent"); 14700 const openMethod = store.useState("openMethod"); 14701 const lastOpenChangeReason = store.useState("lastOpenChangeReason"); 14702 const interactionProps = useMenuFilterPopup(orientation); 14703 const openedByHover = open2 && lastOpenChangeReason === reason_parts_exports.triggerHover; 14704 const mayFocusInput = parent.type !== "menu" || open2 && (openMethod === "keyboard" || lastOpenChangeReason === reason_parts_exports.listNavigation || lastOpenChangeReason === reason_parts_exports.triggerHover || lastOpenChangeReason === reason_parts_exports.triggerPress); 14705 let initialFocus = false; 14706 if (mayFocusInput) { 14707 initialFocus = () => { 14708 const touchOpen = (openMethod === "touch" || openMethod === "pen") && !store.context.virtualPress; 14709 if (openedByHover || touchOpen) { 14710 return false; 14711 } 14712 return store.context.virtualFocusRef?.current ?? false; 14713 }; 14714 } 14715 const popupProps = mergeProps(interactionProps, props); 14716 return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MenuPopupPlain, { 14717 ...popupProps, 14718 role: "dialog", 14719 initialFocus, 14720 ref: forwardedRef 14721 }); 14722 }); 14723 if (true) MenuFilterPopup.displayName = "MenuFilterPopup"; 14724 14725 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterList.mjs 14726 var React109 = __toESM(require_react(), 1); 14727 14728 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/list/FilterDropdownList.mjs 14729 var React108 = __toESM(require_react(), 1); 14730 14731 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/group/FilterDropdownGroupContext.mjs 14732 var React107 = __toESM(require_react(), 1); 14733 var FilterDropdownGroupContext = /* @__PURE__ */ React107.createContext(null); 14734 if (true) FilterDropdownGroupContext.displayName = "FilterDropdownGroupContext"; 14735 function useFilterDropdownGroupContext() { 14736 return React107.useContext(FilterDropdownGroupContext); 14737 } 14738 14739 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/list/FilterDropdownList.mjs 14740 var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1); 14741 var FilterDropdownList = /* @__PURE__ */ React108.forwardRef(function FilterDropdownList2(componentProps, forwardedRef) { 14742 const { 14743 render, 14744 className, 14745 style, 14746 id: idProp, 14747 ...elementProps 14748 } = componentProps; 14749 const context = useFilterDropdownRootContext(); 14750 const [id, registerIdRef] = useRenderedId(componentProps, context.defaultListId, context.setRenderedListId); 14751 const defaultProps = { 14752 // Chromium includes scrollable elements in sequential focus navigation by default. 14753 tabIndex: -1, 14754 id, 14755 onFocus(event) { 14756 const owner = context.focusOwnerRef.current; 14757 if (owner && event.relatedTarget === owner && getTarget(event.nativeEvent) === event.currentTarget) { 14758 refocusOwner(owner); 14759 } 14760 }, 14761 onPointerMove() { 14762 context.setKeyboardModality(false); 14763 }, 14764 onPointerDown() { 14765 context.setKeyboardModality(false); 14766 } 14767 }; 14768 return useRenderElement("div", componentProps, { 14769 ref: [forwardedRef, registerIdRef], 14770 props: [defaultProps, elementProps, { 14771 // The list's groups and items belong to this root's query. A nested root's list renders 14772 // inside an enclosing group, which must not count them as its own members. 14773 children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FilterDropdownGroupContext.Provider, { 14774 value: null, 14775 children: elementProps.children 14776 }) 14777 }] 14778 }); 14779 }); 14780 if (true) FilterDropdownList.displayName = "FilterDropdownList"; 14781 14782 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/useMenuFilterKeyDown.mjs 14783 function getMenuFilterKeyAction(event, context) { 14784 const { 14785 orientation, 14786 rtl, 14787 hasActiveItem, 14788 activeItemOpensSubmenu, 14789 hasValue 14790 } = context; 14791 const { 14792 key 14793 } = event; 14794 if (event.which === 229) { 14795 return "ignore"; 14796 } 14797 if (key === "Tab") { 14798 return event.shiftKey ? "close" : "ignore"; 14799 } 14800 if (key === "Enter") { 14801 return hasActiveItem ? "activate" : "navigate"; 14802 } 14803 const isArrow = key.startsWith("Arrow"); 14804 const isBoundary = key === "Home" || key === "End"; 14805 if (event.shiftKey || event.ctrlKey || event.altKey || event.metaKey) { 14806 return isArrow || isBoundary || key.length === 1 ? "edit" : "navigate"; 14807 } 14808 if (key.length === 1) { 14809 return "edit"; 14810 } 14811 if (isBoundary) { 14812 return hasActiveItem && !hasValue ? "navigate" : "edit"; 14813 } 14814 if (!isArrow) { 14815 return "navigate"; 14816 } 14817 if (isMainOrientationKey(key, orientation)) { 14818 return orientation === "horizontal" && !hasActiveItem && hasValue ? "edit" : "navigate"; 14819 } 14820 if (activeItemOpensSubmenu && (isCrossOrientationOpenKey(key, orientation, rtl) || isCrossOrientationCloseKey(key, orientation, rtl, false))) { 14821 return "submenu"; 14822 } 14823 if (orientation === "horizontal" && !hasActiveItem) { 14824 return "enter-list"; 14825 } 14826 return hasValue ? "edit" : "navigate"; 14827 } 14828 function useMenuFilterKeyDown(hasValue) { 14829 const { 14830 orientation, 14831 store 14832 } = useMenuRootContext(); 14833 const submenuContext = useMenuSubmenuRootContext(); 14834 const direction = useDirection(); 14835 return useStableCallback((event) => { 14836 if (!store.select("open")) { 14837 return; 14838 } 14839 const activeItem = store.state.highlightedItem; 14840 const action = getMenuFilterKeyAction(event, { 14841 orientation, 14842 rtl: direction === "rtl", 14843 hasActiveItem: activeItem != null, 14844 activeItemOpensSubmenu: activeItem?.hasAttribute("aria-haspopup") ?? false, 14845 hasValue 14846 }); 14847 switch (action) { 14848 case "edit": 14849 event.stopPropagation(); 14850 if (event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) { 14851 store.state.inputProps.onKeyDown?.(event); 14852 } 14853 break; 14854 case "navigate": { 14855 if (isMainOrientationKey(event.key, orientation)) { 14856 event.stopPropagation(); 14857 } 14858 store.state.inputProps.onKeyDown?.(event); 14859 break; 14860 } 14861 case "enter-list": { 14862 event.stopPropagation(); 14863 const listRef = store.context.itemDomElements; 14864 const index2 = event.key === "ArrowDown" ? getMinListIndex(listRef, EMPTY_ARRAY) : getMaxListIndex(listRef, EMPTY_ARRAY); 14865 if (listRef.current[index2]) { 14866 event.preventDefault(); 14867 store.setActiveIndex(index2, reason_parts_exports.keyboard, event.nativeEvent); 14868 } 14869 break; 14870 } 14871 case "submenu": { 14872 stopEvent(event); 14873 const KeyboardEventConstructor = getWindow(activeItem).KeyboardEvent; 14874 activeItem.dispatchEvent(new KeyboardEventConstructor(event.type, event.nativeEvent)); 14875 break; 14876 } 14877 case "activate": 14878 event.preventDefault(); 14879 dispatchClickWithModifiers(activeItem, event); 14880 break; 14881 case "close": { 14882 stopEvent(event); 14883 const returnElement = store.state.parent.type === "menu" && submenuContext?.getReturnElement?.() || store.state.activeTriggerElement; 14884 const details = createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent); 14885 store.setOpen(false, details); 14886 if (!details.isCanceled && isHTMLElement(returnElement)) { 14887 returnElement.focus(); 14888 } 14889 break; 14890 } 14891 default: 14892 break; 14893 } 14894 }); 14895 } 14896 14897 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/moveHighlightFrom.mjs 14898 function moveHighlightFrom(store, item, event, options) { 14899 const { 14900 orientation, 14901 rtl, 14902 loopFocus, 14903 allowEscape 14904 } = options; 14905 const listRef = store.context.itemDomElements; 14906 const items = listRef.current; 14907 const { 14908 index: index2 14909 } = getNextListIndex(items, items.indexOf(item), { 14910 decrement: !isMainOrientationToEndKey(event.key, orientation, rtl), 14911 loopFocus, 14912 allowEscape, 14913 // Match the menu's list navigation: `aria-disabled` items stay reachable. 14914 disabledIndices: EMPTY_ARRAY, 14915 minIndex: getMinListIndex(listRef, EMPTY_ARRAY), 14916 maxIndex: getMaxListIndex(listRef, EMPTY_ARRAY) 14917 }); 14918 const next = items[index2]; 14919 if (next) { 14920 store.setActiveIndex(index2, reason_parts_exports.keyboard, event.nativeEvent); 14921 next.scrollIntoView?.({ 14922 block: "nearest", 14923 inline: "nearest" 14924 }); 14925 } 14926 return next ?? void 0; 14927 } 14928 14929 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterList.mjs 14930 var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1); 14931 var MenuFilterList = /* @__PURE__ */ React109.forwardRef(function MenuFilterList2(componentProps, forwardedRef) { 14932 const { 14933 store, 14934 orientation, 14935 loopFocus, 14936 allowEscape 14937 } = useMenuRootContext(); 14938 const direction = useDirection(); 14939 const { 14940 onItemsChange, 14941 focusOwnerRef, 14942 triggerId 14943 } = useFilterDropdownRootContext(); 14944 const { 14945 listRef 14946 } = useFilterDropdownItemContext(); 14947 const { 14948 subscribeMapChange 14949 } = useCompositeListContext(); 14950 const value = useFilterDropdownValueContext(); 14951 const handleInputKeyDown = useMenuFilterKeyDown(value !== ""); 14952 const handleKeyDown = useStableCallback((event) => { 14953 const owner = focusOwnerRef.current; 14954 const target = getTarget(event.nativeEvent); 14955 const ownerFocused = owner != null && activeElement(ownerDocument(owner)) === owner; 14956 const fromNestedPopup = !contains(event.currentTarget, target); 14957 if (owner == null || ownerFocused || fromNestedPopup) { 14958 if (event.which !== 229 && !event.shiftKey && !event.ctrlKey && !event.metaKey && !event.altKey && isMainOrientationKey(event.key, orientation)) { 14959 event.stopPropagation(); 14960 const trigger = fromNestedPopup && ownerFocused ? getNestedPopupTrigger(target) : void 0; 14961 if (trigger) { 14962 moveHighlightFrom(store, trigger, event, { 14963 orientation, 14964 rtl: direction === "rtl", 14965 loopFocus, 14966 allowEscape 14967 }); 14968 } 14969 } 14970 return; 14971 } 14972 if (event.defaultPrevented) { 14973 return; 14974 } 14975 refocusOwner(owner); 14976 handleInputKeyDown(event); 14977 }); 14978 function getNestedPopupTrigger(target) { 14979 const root = target.getRootNode(); 14980 return listRef.current.find((item) => { 14981 const popupId = item?.getAttribute("aria-controls"); 14982 return popupId != null && isHTMLElement(item) && contains(root.getElementById(popupId), target); 14983 }); 14984 } 14985 const previousItemsRef = React109.useRef(null); 14986 const handleItemMapChange = useStableCallback(() => { 14987 const items = [...listRef.current]; 14988 const previousItems = previousItemsRef.current; 14989 const changed = previousItems === null || previousItems.length !== items.length || items.some((item, index2) => item !== previousItems[index2]); 14990 if (changed && previousItems !== null) { 14991 onItemsChange(previousItems); 14992 } 14993 previousItemsRef.current = items; 14994 }); 14995 useIsoLayoutEffect(() => { 14996 return subscribeMapChange(handleItemMapChange); 14997 }, [subscribeMapChange, handleItemMapChange]); 14998 const ariaLabelledBy = resolvePopupLabel(componentProps, null, triggerId ?? null); 14999 const listProps = mergeProps({ 15000 role: "menu", 15001 "aria-labelledby": ariaLabelledBy, 15002 "aria-orientation": orientation === "horizontal" ? "horizontal" : void 0, 15003 onKeyDown: handleKeyDown 15004 }, componentProps); 15005 return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FilterDropdownList, { 15006 ...listProps, 15007 ref: forwardedRef 15008 }); 15009 }); 15010 if (true) MenuFilterList.displayName = "MenuFilterList"; 15011 15012 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterGroup.mjs 15013 var React111 = __toESM(require_react(), 1); 15014 15015 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/group/useFilterDropdownGroup.mjs 15016 var React110 = __toESM(require_react(), 1); 15017 function isGroupHidden(state, items) { 15018 if (state.visibleItemIds === null || items.size === 0) { 15019 return false; 15020 } 15021 for (const [id, retained] of items) { 15022 if (retained || state.visibleItemIds.has(id)) { 15023 return false; 15024 } 15025 } 15026 return true; 15027 } 15028 function useFilterDropdownGroup() { 15029 const { 15030 store 15031 } = useFilterDropdownItemContext(); 15032 const parentContext = useFilterDropdownGroupContext(); 15033 const { 15034 items, 15035 registerItem 15036 } = useItemRegistry(); 15037 const hidden = useStore(store, isGroupHidden, items); 15038 const groupId = useRefWithInit(() => /* @__PURE__ */ Symbol("filter-dropdown-group")).current; 15039 const registerInParent = parentContext?.registerItem; 15040 useIsoLayoutEffect(() => registerInParent?.(groupId, !hidden), [registerInParent, groupId, hidden]); 15041 const context = React110.useMemo(() => ({ 15042 registerItem 15043 }), [registerItem]); 15044 return { 15045 hidden, 15046 context 15047 }; 15048 } 15049 15050 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterGroup.mjs 15051 var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1); 15052 var MenuFilterGroup = /* @__PURE__ */ React111.forwardRef(function MenuFilterGroup2(props, forwardedRef) { 15053 const { 15054 hidden, 15055 context 15056 } = useFilterDropdownGroup(); 15057 return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FilterDropdownGroupContext.Provider, { 15058 value: context, 15059 children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(MenuGroupPlain, { 15060 ...props, 15061 hidden: hidden || props.hidden || void 0, 15062 ref: forwardedRef 15063 }) 15064 }); 15065 }); 15066 if (true) MenuFilterGroup.displayName = "MenuFilterGroup"; 15067 var MenuFilterRadioGroup = /* @__PURE__ */ React111.forwardRef(function MenuFilterRadioGroup2(props, forwardedRef) { 15068 const { 15069 hidden, 15070 context 15071 } = useFilterDropdownGroup(); 15072 return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FilterDropdownGroupContext.Provider, { 15073 value: context, 15074 children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(MenuRadioGroupPlain, { 15075 ...props, 15076 hidden: hidden || props.hidden || void 0, 15077 ref: forwardedRef 15078 }) 15079 }); 15080 }); 15081 if (true) MenuFilterRadioGroup.displayName = "MenuFilterRadioGroup"; 15082 15083 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/item/useFilterDropdownItem.mjs 15084 var React112 = __toESM(require_react(), 1); 15085 function childrenText(children) { 15086 if (typeof children === "string" || typeof children === "number") { 15087 return String(children); 15088 } 15089 if (Array.isArray(children)) { 15090 return children.map(childrenText).join(""); 15091 } 15092 if (/* @__PURE__ */ React112.isValidElement(children)) { 15093 return childrenText(children.props.children); 15094 } 15095 return ""; 15096 } 15097 function useFilterDropdownItem(params) { 15098 const { 15099 label, 15100 retainGroup = false, 15101 children, 15102 render, 15103 context 15104 } = params; 15105 const nearestContext = useFilterDropdownItemContext(context !== void 0); 15106 const groupContext = useFilterDropdownGroupContext(); 15107 const owner = context === void 0 ? nearestContext : context; 15108 const { 15109 registerItem, 15110 store 15111 } = owner ?? DETACHED_OWNER; 15112 const registerGroupItem = groupContext?.registerItem; 15113 const itemId = useRefWithInit(() => /* @__PURE__ */ Symbol("filter-dropdown-item")).current; 15114 const ref = React112.useRef(null); 15115 const registeredTextRef = React112.useRef(void 0); 15116 const matched = useStore(store, selectors3.isItemVisible, itemId); 15117 const [registered, setRegistered] = React112.useState(matched); 15118 const childrenRef = useValueAsRef(children); 15119 const renderRef = useValueAsRef(render); 15120 const childrenTextRef = React112.useRef(void 0); 15121 const resolveText = React112.useCallback(() => { 15122 if (label != null) { 15123 return label; 15124 } 15125 const fromChildren = childrenText(childrenRef.current ?? unwrapLazyRenderProp(renderRef.current)); 15126 const previousChildrenText = childrenTextRef.current; 15127 childrenTextRef.current = fromChildren; 15128 if (ref.current !== null) { 15129 return ref.current.textContent ?? ""; 15130 } 15131 if (registeredTextRef.current !== void 0 && fromChildren === previousChildrenText) { 15132 return registeredTextRef.current; 15133 } 15134 return fromChildren; 15135 }, [label, childrenRef, renderRef]); 15136 const register2 = React112.useCallback((resolvedText) => { 15137 const text = resolvedText ?? resolveText(); 15138 if (text) { 15139 registeredTextRef.current = text; 15140 } 15141 return registerItem(itemId, { 15142 getText() { 15143 if (label == null && ref.current) { 15144 registeredTextRef.current = ref.current.textContent ?? ""; 15145 } 15146 return registeredTextRef.current; 15147 } 15148 }); 15149 }, [itemId, label, registerItem, resolveText]); 15150 useIsoLayoutEffect(() => { 15151 const unregister = register2(); 15152 setRegistered(true); 15153 return unregister; 15154 }, [register2]); 15155 useIsoLayoutEffect(() => registerGroupItem?.(itemId, retainGroup), [registerGroupItem, itemId, retainGroup]); 15156 useIsoLayoutEffect(() => { 15157 const text = resolveText(); 15158 if (text !== registeredTextRef.current) { 15159 registeredTextRef.current = text; 15160 void register2(text); 15161 } 15162 }, [register2, resolveText, children, render, label]); 15163 return { 15164 visible: !registered || matched, 15165 ref 15166 }; 15167 } 15168 15169 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/useMenuFilterSubmenuTrigger.mjs 15170 function useMenuFilterSubmenuTrigger(params) { 15171 const { 15172 store, 15173 virtualFocus 15174 } = useMenuRootContext(); 15175 const open2 = store.useState("open"); 15176 const mounted = store.useState("mounted"); 15177 const parent = store.useState("parent"); 15178 const parentListRef = parent.type === "menu" ? parent.store.context.itemDomElements : null; 15179 const parentContext = useFilterContextForList(parentListRef); 15180 const { 15181 visible, 15182 ref 15183 } = useFilterDropdownItem({ 15184 ...params, 15185 context: parentContext, 15186 retainGroup: mounted 15187 }); 15188 useIsoLayoutEffect(() => { 15189 if (visible || !open2) { 15190 return; 15191 } 15192 store.setOpen(false, createChangeEventDetails(reason_parts_exports.none)); 15193 }, [visible, open2, store]); 15194 const clickProps = useEnhancedClickHandler((event, interactionType) => { 15195 if (event.type === "click" && store.select("open") && (interactionType === "keyboard" || interactionType === "mouse" && store.select("lastOpenChangeReason") === reason_parts_exports.triggerPress)) { 15196 store.context.virtualFocusRef?.current?.focus({ 15197 preventScroll: true 15198 }); 15199 } 15200 }); 15201 const props = { 15202 // Omitted rather than `undefined`, which would clear the `'menu'` the root puts on every 15203 // trigger. 15204 ...virtualFocus ? { 15205 "aria-haspopup": "dialog" 15206 } : void 0, 15207 ...clickProps, 15208 onPointerDown(event) { 15209 clickProps.onPointerDown(event); 15210 store.context.virtualPress = isVirtualPointerEvent(event.nativeEvent); 15211 }, 15212 onFocus(event) { 15213 const focusOwner = store.context.virtualFocusRef?.current; 15214 if (focusOwner && store.select("open") && event.relatedTarget === focusOwner) { 15215 event.preventBaseUIHandler(); 15216 focusOwner.focus({ 15217 preventScroll: true 15218 }); 15219 } 15220 } 15221 }; 15222 if (parentContext === null) { 15223 return { 15224 visible: true, 15225 ref: null, 15226 props 15227 }; 15228 } 15229 return { 15230 visible: visible || mounted, 15231 ref, 15232 props 15233 }; 15234 } 15235 15236 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/useVirtualFocusParentHandoff.mjs 15237 function useVirtualFocusParentHandoff(store, parent, open2, virtualFocus) { 15238 const parentStore = parent.type === "menu" ? parent.store : null; 15239 const parentVirtualFocusRef = parentStore?.context.virtualFocusRef; 15240 const returnToParent = useStableCallback((trigger, reason) => { 15241 const focusOwner = parentVirtualFocusRef?.current; 15242 if (virtualFocus || store.select("open") || !parentStore?.select("open") || !focusOwner) { 15243 return; 15244 } 15245 if (contains(store.context.popupRef.current, activeElement(ownerDocument(focusOwner)))) { 15246 focusOwner.focus({ 15247 preventScroll: true 15248 }); 15249 } 15250 if ((reason === reason_parts_exports.listNavigation || reason === reason_parts_exports.escapeKey) && parentStore.state.activeIndex == null) { 15251 parentStore.highlightItem(trigger, reason_parts_exports.none); 15252 } 15253 }); 15254 useIsoLayoutEffect(() => { 15255 if (!open2) { 15256 const trigger = store.state.activeTriggerElement; 15257 const reason = store.select("lastOpenChangeReason"); 15258 queueMicrotask(() => returnToParent(trigger, reason)); 15259 } 15260 }, [open2, store, returnToParent]); 15261 function handleFocus() { 15262 if (!virtualFocus && parentVirtualFocusRef && parentStore?.state.activeIndex != null) { 15263 parentStore.setActiveIndex(null, reason_parts_exports.none); 15264 } 15265 } 15266 return { 15267 parentVirtualFocusRef, 15268 handleFocus 15269 }; 15270 } 15271 15272 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterImpl.mjs 15273 var MENU_FILTER_IMPL = { 15274 Popup: MenuFilterPopup, 15275 List: MenuFilterList, 15276 Group: MenuFilterGroup, 15277 RadioGroup: MenuFilterRadioGroup, 15278 useItem: useFilterDropdownItem, 15279 useSubmenuTrigger: useMenuFilterSubmenuTrigger, 15280 useParentHandoff: useVirtualFocusParentHandoff 15281 }; 15282 15283 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterDropdown.mjs 15284 var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1); 15285 function MenuFilterDropdown(props) { 15286 const { 15287 value: valueProp, 15288 defaultValue = "", 15289 onValueChange, 15290 ...dropdownProps 15291 } = props; 15292 const { 15293 store 15294 } = useMenuRootContext(); 15295 const open2 = store.useState("open"); 15296 const mounted = store.useState("mounted"); 15297 const keyboardOpen = store.useState("keyboardOpen"); 15298 const activeTriggerId = store.useState("activeTriggerId"); 15299 const activeTriggerElement = store.useState("activeTriggerElement"); 15300 const disabled2 = store.useState("disabled"); 15301 const [value, setValue] = useControlled({ 15302 controlled: valueProp, 15303 default: defaultValue, 15304 name: "MenuFilterProvider", 15305 state: "value" 15306 }); 15307 const handleValueChange = useStableCallback((nextValue, eventDetails) => { 15308 onValueChange?.(nextValue, eventDetails); 15309 if (!eventDetails.isCanceled) { 15310 setValue(nextValue); 15311 } 15312 }); 15313 const getActiveIndex = useStableCallback(() => store.state.activeIndex); 15314 const setActiveIndex = useStableCallback((index2) => { 15315 store.setActiveIndex(index2, reason_parts_exports.none); 15316 }); 15317 const query = useFilterDropdownCloseQuery({ 15318 open: open2, 15319 mounted, 15320 value, 15321 onValueChange: handleValueChange 15322 }); 15323 const filterTriggerProps = useFilterTriggerProps(value !== ""); 15324 useRefWithInit(() => { 15325 store.set("filterTriggerProps", filterTriggerProps); 15326 return null; 15327 }); 15328 store.useSyncedValue("filterTriggerProps", filterTriggerProps); 15329 useIsoLayoutEffect(() => { 15330 if (!open2) { 15331 store.set("keyboardOpen", false); 15332 } 15333 }, [open2, store]); 15334 const triggerId = activeTriggerElement ? activeTriggerElement.id || null : activeTriggerId; 15335 return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(MenuFilterImplContext.Provider, { 15336 value: MENU_FILTER_IMPL, 15337 children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FilterDropdownRoot, { 15338 ...dropdownProps, 15339 open: open2, 15340 openedByKeyboard: keyboardOpen, 15341 disabled: disabled2, 15342 value, 15343 query, 15344 onValueChange: handleValueChange, 15345 triggerId, 15346 listRef: store.context.itemDomElements, 15347 getActiveIndex, 15348 setActiveIndex, 15349 focusOwnerRef: store.context.virtualFocusRef 15350 }) 15351 }); 15352 } 15353 function useFilterTriggerProps(hasValue) { 15354 const { 15355 store 15356 } = useMenuRootContext(); 15357 const isInMenubar = useMenubarContext(true) != null; 15358 const handleInputKeyDown = useMenuFilterKeyDown(hasValue); 15359 return React113.useMemo(() => ({ 15360 "aria-haspopup": "dialog", 15361 onPointerDown(event) { 15362 store.context.virtualPress = isVirtualPointerEvent(event.nativeEvent); 15363 }, 15364 onKeyDown(event) { 15365 const focusOwner = store.context.virtualFocusRef?.current; 15366 if (!store.select("open") || !focusOwner || isInMenubar) { 15367 return; 15368 } 15369 if (event.key === "ArrowUp" || event.key === "ArrowDown") { 15370 focusOwner.focus({ 15371 preventScroll: true 15372 }); 15373 handleInputKeyDown(event); 15374 event.preventDefault(); 15375 event.preventBaseUIHandler(); 15376 } else if (event.key === "ArrowLeft" || event.key === "ArrowRight") { 15377 event.preventBaseUIHandler(); 15378 } else if (isTypeaheadKey(event)) { 15379 focusOwner.focus({ 15380 preventScroll: true 15381 }); 15382 } 15383 } 15384 }), [store, isInMenubar, handleInputKeyDown]); 15385 } 15386 function isTypeaheadKey(event) { 15387 return event.key.length === 1 && event.key !== " " && !event.ctrlKey && !event.metaKey && !event.altKey; 15388 } 15389 15390 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/useMenuFilterRoot.mjs 15391 var React114 = __toESM(require_react(), 1); 15392 function useMenuFilterRoot(props) { 15393 const { 15394 children, 15395 value, 15396 defaultValue, 15397 onValueChange, 15398 filter, 15399 autoHighlight = false, 15400 locale, 15401 ...otherProps 15402 } = props; 15403 const virtualFocusRef = React114.useRef(null); 15404 return { 15405 children, 15406 rootProps: { 15407 ...otherProps, 15408 virtualFocus: true, 15409 virtualFocusRef, 15410 allowEscape: !autoHighlight, 15411 resetOnPointerLeave: autoHighlight !== "always" 15412 }, 15413 dropdownProps: { 15414 value, 15415 defaultValue, 15416 onValueChange, 15417 filter, 15418 autoHighlight, 15419 locale 15420 } 15421 }; 15422 } 15423 15424 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-root/MenuFilterRoot.mjs 15425 var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1); 15426 function MenuFilterRoot(props) { 15427 const { 15428 children, 15429 rootProps, 15430 dropdownProps 15431 } = useMenuFilterRoot(props); 15432 return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MenuRootInternal, { 15433 ...rootProps, 15434 children: (payload) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MenuFilterDropdown, { 15435 ...dropdownProps, 15436 children: typeof children === "function" ? children(payload) : children 15437 }) 15438 }); 15439 } 15440 15441 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-submenu-root/MenuFilterSubmenuRoot.mjs 15442 var React116 = __toESM(require_react(), 1); 15443 var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1); 15444 function MenuFilterSubmenuRoot(props) { 15445 const parent = useMenuRootContext(); 15446 const parentStore = parent.store; 15447 const parentDisabled = parentStore.useState("disabled"); 15448 const { 15449 rootProps, 15450 dropdownProps 15451 } = useMenuFilterRoot(props); 15452 const parentReferenceRef = React116.useRef(null); 15453 function handleSubmenuEnter(trigger, event) { 15454 const focusedElement = parent.virtualFocus ? parentStore.context.virtualFocusRef?.current : activeElement(ownerDocument(trigger)); 15455 if (isHTMLElement(focusedElement)) { 15456 parentReferenceRef.current = { 15457 reference: focusedElement, 15458 trigger 15459 }; 15460 parentStore.setActiveIndex(null, event ? reason_parts_exports.keyboard : reason_parts_exports.none, event); 15461 } 15462 } 15463 function highlightTrigger(trigger, event) { 15464 parentStore.highlightItem(trigger, reason_parts_exports.keyboard, event); 15465 } 15466 function handleSubmenuExit(event) { 15467 const parentReference = parentReferenceRef.current; 15468 if (!parentReference) { 15469 return; 15470 } 15471 parentReference.reference.focus({ 15472 preventScroll: true 15473 }); 15474 highlightTrigger(parentReference.trigger, event); 15475 } 15476 function handleOpenChange(nextOpen, details) { 15477 rootProps.onOpenChange?.(nextOpen, details); 15478 if (details.isCanceled) { 15479 return; 15480 } 15481 if (!nextOpen) { 15482 if (details.reason === reason_parts_exports.escapeKey && isHTMLElement(details.trigger)) { 15483 highlightTrigger(details.trigger, details.event); 15484 parentReferenceRef.current = { 15485 reference: parent.virtualFocus ? parentStore.context.virtualFocusRef?.current ?? details.trigger : details.trigger, 15486 trigger: details.trigger 15487 }; 15488 } 15489 return; 15490 } 15491 parentReferenceRef.current = null; 15492 if (isHTMLElement(details.trigger) && isKeyboardOpen(details.reason, details.event)) { 15493 handleSubmenuEnter(details.trigger, details.reason === reason_parts_exports.listNavigation ? details.event : void 0); 15494 } 15495 } 15496 return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MenuRootInternal, { 15497 ...rootProps, 15498 isSubmenu: true, 15499 disabled: parentDisabled || props.disabled, 15500 onOpenChange: handleOpenChange, 15501 children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MenuFilterSubmenuNavigation, { 15502 parentStore, 15503 parentVirtualFocus: parent.virtualFocus, 15504 parentAllowEscape: parent.virtualFocus && parent.allowEscape, 15505 parentOrientation: parent.orientation, 15506 parentLoopFocus: parent.loopFocus, 15507 getReturnElement: () => parentReferenceRef.current?.reference ?? (parent.virtualFocus ? parentStore.context.virtualFocusRef?.current : null) ?? null, 15508 onSubmenuEnter: handleSubmenuEnter, 15509 onSubmenuExit: handleSubmenuExit, 15510 children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MenuFilterDropdown, { 15511 ...dropdownProps, 15512 children: props.children 15513 }) 15514 }) 15515 }); 15516 } 15517 function MenuFilterSubmenuNavigation(props) { 15518 const { 15519 children, 15520 parentStore, 15521 parentVirtualFocus, 15522 parentAllowEscape, 15523 parentOrientation, 15524 parentLoopFocus, 15525 onSubmenuEnter, 15526 onSubmenuExit, 15527 getReturnElement 15528 } = props; 15529 const { 15530 store, 15531 orientation 15532 } = useMenuRootContext(); 15533 const direction = useDirection(); 15534 const mounted = store.useState("mounted"); 15535 const wasMountedRef = React116.useRef(false); 15536 const handleReturnFocus = useStableCallback(() => { 15537 const [ownTrigger] = store.context.triggerElements.elements(); 15538 return getReturnElement() ?? (isHTMLElement(ownTrigger) ? ownTrigger : null); 15539 }); 15540 useIsoLayoutEffect(() => { 15541 const wasMounted = wasMountedRef.current; 15542 wasMountedRef.current = mounted; 15543 if (mounted || !wasMounted) { 15544 return; 15545 } 15546 const returnElement = handleReturnFocus(); 15547 if (!returnElement || !parentStore.select("open")) { 15548 return; 15549 } 15550 const doc = ownerDocument(returnElement); 15551 const activeEl = activeElement(doc); 15552 if (activeEl === doc.body || contains(store.select("popupElement"), activeEl)) { 15553 returnElement.focus({ 15554 preventScroll: true 15555 }); 15556 } 15557 }, [mounted, store, parentStore, handleReturnFocus]); 15558 function moveInParent(from, event) { 15559 const item = moveHighlightFrom(parentStore, from, event, { 15560 orientation: parentOrientation, 15561 rtl: direction === "rtl", 15562 loopFocus: parentLoopFocus, 15563 allowEscape: parentAllowEscape 15564 }); 15565 if (!parentVirtualFocus) { 15566 item?.focus({ 15567 preventScroll: true 15568 }); 15569 } 15570 } 15571 function close(event) { 15572 if (!store.select("open")) { 15573 return; 15574 } 15575 stopEvent(event); 15576 const trigger = store.select("activeTriggerElement"); 15577 const eventDetails = createChangeEventDetails(reason_parts_exports.listNavigation, event.nativeEvent); 15578 store.setOpen(false, eventDetails); 15579 if (!eventDetails.isCanceled) { 15580 onSubmenuExit(event.nativeEvent); 15581 } 15582 const returnElement = getReturnElement() ?? store.select("activeTriggerElement"); 15583 if (!store.select("open") && isHTMLElement(returnElement) && activeElement(ownerDocument(returnElement)) !== returnElement) { 15584 returnElement.focus(); 15585 } 15586 if (!store.select("open") && isHTMLElement(trigger) && isMainOrientationKey(event.key, parentOrientation)) { 15587 moveInParent(trigger, event); 15588 } 15589 } 15590 const handleTriggerKeyDown = useStableCallback((event) => { 15591 if (isMainOrientationKey(event.key, parentOrientation)) { 15592 moveInParent(event.currentTarget, event); 15593 event.preventBaseUIHandler(); 15594 stopEvent(event); 15595 return; 15596 } 15597 const open2 = store.select("open"); 15598 const isRtl = direction === "rtl"; 15599 const isCloseKey = isCrossOrientationCloseKey(event.key, orientation, isRtl, false); 15600 if (open2 && isCloseKey) { 15601 close(event); 15602 return; 15603 } 15604 const isOpenKey = isCrossOrientationOpenKey(event.key, parentOrientation, isRtl); 15605 if (!isOpenKey) { 15606 return; 15607 } 15608 stopEvent(event); 15609 if (open2) { 15610 onSubmenuEnter(event.currentTarget, event.nativeEvent); 15611 store.context.virtualFocusRef?.current?.focus({ 15612 preventScroll: true 15613 }); 15614 return; 15615 } 15616 store.setOpen(true, createChangeEventDetails(reason_parts_exports.listNavigation, event.nativeEvent, event.currentTarget)); 15617 }); 15618 const handlePopupKeyDown = useStableCallback((event) => { 15619 if (event.which === 229) { 15620 return; 15621 } 15622 const isCloseKey = isCrossOrientationCloseKey(event.key, orientation, direction === "rtl", false); 15623 if (isCloseKey) { 15624 close(event); 15625 } 15626 }); 15627 const contextValue = React116.useMemo(() => ({ 15628 getReturnElement: handleReturnFocus, 15629 onTriggerKeyDown: handleTriggerKeyDown, 15630 onPopupKeyDown: handlePopupKeyDown 15631 }), [handleReturnFocus, handleTriggerKeyDown, handlePopupKeyDown]); 15632 return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(MenuSubmenuRootContext.Provider, { 15633 value: contextValue, 15634 children 15635 }); 15636 } 15637 15638 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/filter-provider/MenuFilterProvider.mjs 15639 var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1); 15640 function MenuFilterProvider(props) { 15641 const { 15642 children, 15643 filter, 15644 value, 15645 defaultValue, 15646 onValueChange, 15647 autoHighlight, 15648 locale 15649 } = props; 15650 const contextValue = React117.useMemo(() => ({ 15651 Root: MenuFilterRoot, 15652 SubmenuRoot: MenuFilterSubmenuRoot, 15653 options: { 15654 filter, 15655 value, 15656 defaultValue, 15657 onValueChange, 15658 autoHighlight, 15659 locale 15660 } 15661 }), [filter, value, defaultValue, onValueChange, autoHighlight, locale]); 15662 return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MenuFilterProviderContext.Provider, { 15663 value: contextValue, 15664 children 15665 }); 15666 } 15667 15668 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/input/MenuInput.mjs 15669 var React119 = __toESM(require_react(), 1); 15670 15671 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/input/FilterDropdownInput.mjs 15672 var React118 = __toESM(require_react(), 1); 15673 var FilterDropdownInput = /* @__PURE__ */ React118.forwardRef(function FilterDropdownInput2(componentProps, forwardedRef) { 15674 const { 15675 render, 15676 className, 15677 style, 15678 id: idProp, 15679 disabled: disabled2, 15680 activeItemId, 15681 navigationProps, 15682 ...elementProps 15683 } = componentProps; 15684 const id = useBaseUiId(idProp); 15685 const context = useFilterDropdownRootContext(); 15686 const { 15687 listRef 15688 } = useFilterDropdownItemContext(); 15689 const value = useFilterDropdownValueContext(); 15690 const [composingValue, setComposingValue] = React118.useState(null); 15691 const isComposingRef = React118.useRef(false); 15692 function commitValue(nextValue, nativeEvent) { 15693 if (!context.open) { 15694 return; 15695 } 15696 const reason = nextValue === "" ? reason_parts_exports.inputClear : reason_parts_exports.inputChange; 15697 context.onValueChange(nextValue, createChangeEventDetails(reason, nativeEvent)); 15698 } 15699 const state = { 15700 highlighted: context.inputFocusVisible && (!context.keyboardModality || activeItemId == null) 15701 }; 15702 return useRenderElement("input", componentProps, { 15703 state, 15704 ref: [forwardedRef, context.focusOwnerRef], 15705 props: [navigationProps, { 15706 id, 15707 type: "text", 15708 disabled: context.disabled || disabled2, 15709 "aria-activedescendant": activeItemId, 15710 role: "searchbox", 15711 inputMode: "search", 15712 autoComplete: "off", 15713 spellCheck: "false", 15714 autoCorrect: "off", 15715 autoCapitalize: "none", 15716 // The aria-autocomplete 'list' value is only valid with `aria-haspopup` so we depend 15717 // on the searchbox role to communicate affordance, with an input label as fallback 15718 // https://w3c.github.io/aria/#aria-autocomplete 15719 "aria-autocomplete": void 0, 15720 "aria-controls": context.listId, 15721 value: composingValue ?? value, 15722 onCompositionStart(event) { 15723 if (parts_exports.os.android) { 15724 return; 15725 } 15726 isComposingRef.current = true; 15727 setComposingValue(event.currentTarget.value); 15728 }, 15729 onCompositionEnd(event) { 15730 if (!isComposingRef.current) { 15731 return; 15732 } 15733 isComposingRef.current = false; 15734 setComposingValue(null); 15735 commitValue(event.currentTarget.value, event.nativeEvent); 15736 }, 15737 onChange(event) { 15738 if (isComposingRef.current) { 15739 setComposingValue(event.currentTarget.value); 15740 return; 15741 } 15742 commitValue(event.currentTarget.value, event.nativeEvent); 15743 }, 15744 onKeyDown() { 15745 context.setKeyboardModality(true); 15746 }, 15747 onPointerDown() { 15748 context.setKeyboardModality(false); 15749 }, 15750 onMouseEnter(event) { 15751 context.setKeyboardModality(false); 15752 if (context.open) { 15753 refocusOwner(event.currentTarget); 15754 } 15755 }, 15756 onFocus(event) { 15757 context.setInputFocusVisible(true); 15758 if (context.autoHighlight === "always" || isRefocusingOwner()) { 15759 return; 15760 } 15761 const from = event.relatedTarget; 15762 if (from !== null && listRef.current.includes(from)) { 15763 context.setActiveIndex(null); 15764 } 15765 }, 15766 onBlur() { 15767 context.setInputFocusVisible(false); 15768 } 15769 }, elementProps] 15770 }); 15771 }); 15772 if (true) FilterDropdownInput.displayName = "FilterDropdownInput"; 15773 15774 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/input/MenuInput.mjs 15775 var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1); 15776 var MenuInput = /* @__PURE__ */ React119.forwardRef(function MenuInput2(componentProps, forwardedRef) { 15777 useMenuFilterPart("Input"); 15778 const { 15779 store 15780 } = useMenuRootContext(); 15781 const value = useFilterDropdownValueContext(); 15782 const { 15783 onKeyDown, 15784 ...navigationProps 15785 } = store.useState("inputProps"); 15786 const activeItemId = store.useState("highlightedItemId"); 15787 const handleKeyDown = useMenuFilterKeyDown(value !== ""); 15788 const handleInputRef = React119.useCallback((input) => { 15789 store.set("inputFocused", input !== null && activeElement(ownerDocument(input)) === input); 15790 }, [store]); 15791 const mergedRefs = useMergedRefs(forwardedRef, handleInputRef); 15792 const inputProps = mergeProps({ 15793 onKeyDown: handleKeyDown, 15794 onFocus() { 15795 store.set("inputFocused", true); 15796 }, 15797 onBlur() { 15798 store.set("inputFocused", false); 15799 } 15800 }, componentProps); 15801 return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FilterDropdownInput, { 15802 ...inputProps, 15803 activeItemId, 15804 navigationProps, 15805 ref: mergedRefs 15806 }); 15807 }); 15808 if (true) MenuInput.displayName = "MenuInput"; 15809 15810 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/list/MenuList.mjs 15811 var React120 = __toESM(require_react(), 1); 15812 var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1); 15813 var MenuListPlain = /* @__PURE__ */ React120.forwardRef(function MenuListPlain2(componentProps, forwardedRef) { 15814 const { 15815 render, 15816 className, 15817 style, 15818 id: idProp, 15819 ...elementProps 15820 } = componentProps; 15821 const { 15822 store, 15823 orientation 15824 } = useMenuRootContext(); 15825 const activeTriggerId = store.useState("activeTriggerId"); 15826 const activeTriggerElement = store.useState("activeTriggerElement"); 15827 const setListElement = store.useStateSetter("listElement"); 15828 const id = useBaseUiId(idProp); 15829 const renderedIdRef = React120.useRef(id); 15830 useIsoLayoutEffect(() => { 15831 if (renderedIdRef.current !== id) { 15832 renderedIdRef.current = id; 15833 store.notifyAll(); 15834 } 15835 }, [id, store]); 15836 const ariaLabelledBy = resolvePopupLabel(componentProps, activeTriggerElement, activeTriggerId); 15837 return useRenderElement("div", componentProps, { 15838 ref: [forwardedRef, setListElement], 15839 props: [{ 15840 id, 15841 role: "menu", 15842 // The popup focuses the list on a pointer open in place of itself. 15843 tabIndex: -1, 15844 // `menu` is implicitly vertical, so only the non-default value needs to be rendered. 15845 "aria-orientation": orientation === "horizontal" ? "horizontal" : void 0, 15846 "aria-labelledby": ariaLabelledBy 15847 }, elementProps] 15848 }); 15849 }); 15850 if (true) MenuListPlain.displayName = "MenuListPlain"; 15851 var MenuList = /* @__PURE__ */ React120.forwardRef(function MenuList2(props, forwardedRef) { 15852 const List = useMenuFilterImpl()?.List ?? MenuListPlain; 15853 return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(List, { 15854 ...props, 15855 ref: forwardedRef 15856 }); 15857 }); 15858 if (true) MenuList.displayName = "MenuList"; 15859 15860 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/clear/MenuClear.mjs 15861 var React122 = __toESM(require_react(), 1); 15862 15863 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/clear/FilterDropdownClear.mjs 15864 var React121 = __toESM(require_react(), 1); 15865 var FilterDropdownClear = /* @__PURE__ */ React121.forwardRef(function FilterDropdownClear2(componentProps, forwardedRef) { 15866 const { 15867 render, 15868 className, 15869 style, 15870 disabled: disabledProp = false, 15871 nativeButton = true, 15872 ...elementProps 15873 } = componentProps; 15874 const context = useFilterDropdownRootContext(); 15875 const value = useFilterDropdownValueContext(); 15876 const disabled2 = context.disabled || disabledProp; 15877 const visible = value !== ""; 15878 const { 15879 buttonRef, 15880 getButtonProps 15881 } = useButton({ 15882 disabled: disabled2, 15883 native: nativeButton 15884 }); 15885 const state = { 15886 disabled: disabled2 15887 }; 15888 return useRenderElement("button", componentProps, { 15889 enabled: visible, 15890 state, 15891 ref: [forwardedRef, buttonRef], 15892 props: [{ 15893 tabIndex: -1, 15894 "aria-hidden": true, 15895 onMouseDown(event) { 15896 event.preventDefault(); 15897 }, 15898 onClick(event) { 15899 const eventDetails = createChangeEventDetails(reason_parts_exports.clearPress, event.nativeEvent); 15900 context.onValueChange("", eventDetails); 15901 context.focusOwnerRef.current?.focus({ 15902 preventScroll: true 15903 }); 15904 } 15905 }, elementProps, getButtonProps] 15906 }); 15907 }); 15908 if (true) FilterDropdownClear.displayName = "FilterDropdownClear"; 15909 15910 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/clear/MenuClear.mjs 15911 var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1); 15912 var MenuClear = /* @__PURE__ */ React122.forwardRef(function MenuClear2(props, forwardedRef) { 15913 useMenuFilterPart("Clear"); 15914 return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(FilterDropdownClear, { 15915 ...props, 15916 ref: forwardedRef 15917 }); 15918 }); 15919 if (true) MenuClear.displayName = "MenuClear"; 15920 15921 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/empty/MenuEmpty.mjs 15922 var React124 = __toESM(require_react(), 1); 15923 15924 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/filter-dropdown/empty/FilterDropdownEmpty.mjs 15925 var React123 = __toESM(require_react(), 1); 15926 var FilterDropdownEmpty = /* @__PURE__ */ React123.forwardRef(function FilterDropdownEmpty2(componentProps, forwardedRef) { 15927 const { 15928 render, 15929 className, 15930 style, 15931 ...elementProps 15932 } = componentProps; 15933 const { 15934 store 15935 } = useFilterDropdownItemContext(); 15936 const isEmpty = useStore(store, selectors3.isEmpty); 15937 const [ready, setReady] = React123.useState(false); 15938 useIsoLayoutEffect(() => { 15939 setReady(true); 15940 }, []); 15941 const visible = ready && isEmpty; 15942 const emptyRef = useInitialLiveRegionTextMutation(visible); 15943 return useRenderElement("div", componentProps, { 15944 enabled: visible, 15945 ref: [forwardedRef, emptyRef], 15946 props: [{ 15947 role: "status", 15948 "aria-live": "polite", 15949 "aria-atomic": true 15950 }, elementProps] 15951 }); 15952 }); 15953 if (true) FilterDropdownEmpty.displayName = "FilterDropdownEmpty"; 15954 15955 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/menu/empty/MenuEmpty.mjs 15956 var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1); 15957 var MenuEmpty = /* @__PURE__ */ React124.forwardRef(function MenuEmpty2(props, forwardedRef) { 15958 useMenuFilterPart("Empty"); 15959 return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FilterDropdownEmpty, { 15960 ...props, 15961 ref: forwardedRef 15962 }); 15963 }); 15964 if (true) MenuEmpty.displayName = "MenuEmpty"; 15965 15966 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/csp-context/CSPContext.mjs 15967 var React125 = __toESM(require_react(), 1); 15968 var CSPContext = /* @__PURE__ */ React125.createContext(void 0); 15969 if (true) CSPContext.displayName = "CSPContext"; 15970 var DEFAULT_CSP_CONTEXT_VALUE = { 15971 disableStyleElements: false 15972 }; 15973 function useCSPContext() { 15974 return React125.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE; 15975 } 15976 15977 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/clamp.mjs 15978 function clamp2(val, min2 = Number.MIN_SAFE_INTEGER, max2 = Number.MAX_SAFE_INTEGER) { 15979 return Math.max(min2, Math.min(val, max2)); 15980 } 15981 15982 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/formatNumber.mjs 15983 var cache = /* @__PURE__ */ new Map(); 15984 function getFormatter(locale, options) { 15985 const optionsString = JSON.stringify({ 15986 locale: stringifyLocale(locale), 15987 options 15988 }); 15989 const cachedFormatter = cache.get(optionsString); 15990 if (cachedFormatter) { 15991 return cachedFormatter; 15992 } 15993 const formatter = new Intl.NumberFormat(locale, options); 15994 cache.set(optionsString, formatter); 15995 return formatter; 15996 } 15997 function formatNumber(value, locale, options) { 15998 if (value == null) { 15999 return ""; 16000 } 16001 return getFormatter(locale, options).format(value); 16002 } 16003 16004 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/valueToPercent.mjs 16005 function valueToPercent(value, min2, max2) { 16006 return (value - min2) * 100 / (max2 - min2); 16007 } 16008 16009 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/FloatingPortalLite.mjs 16010 var React126 = __toESM(require_react(), 1); 16011 var ReactDOM8 = __toESM(require_react_dom(), 1); 16012 var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1); 16013 var FloatingPortalLite = /* @__PURE__ */ React126.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) { 16014 const { 16015 children, 16016 container, 16017 className, 16018 render, 16019 style, 16020 ...elementProps 16021 } = componentProps; 16022 const { 16023 node: portalNode, 16024 subtree: portalSubtree 16025 } = useFloatingPortalNode({ 16026 container, 16027 ref: forwardedRef, 16028 componentProps, 16029 elementProps 16030 }); 16031 if (!portalSubtree && !portalNode) { 16032 return null; 16033 } 16034 return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(React126.Fragment, { 16035 children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM8.createPortal(children, portalNode)] 16036 }); 16037 }); 16038 if (true) FloatingPortalLite.displayName = "FloatingPortalLite"; 16039 16040 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/progress/index.parts.mjs 16041 var index_parts_exports2 = {}; 16042 __export(index_parts_exports2, { 16043 Indicator: () => ProgressIndicator, 16044 Label: () => ProgressLabel, 16045 Root: () => ProgressRoot, 16046 Track: () => ProgressTrack, 16047 Value: () => ProgressValue 16048 }); 16049 16050 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/progress/root/ProgressRoot.mjs 16051 var React128 = __toESM(require_react(), 1); 16052 16053 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/progress/root/ProgressRootContext.mjs 16054 var React127 = __toESM(require_react(), 1); 16055 var ProgressRootContext = /* @__PURE__ */ React127.createContext(void 0); 16056 if (true) ProgressRootContext.displayName = "ProgressRootContext"; 16057 function useProgressRootContext() { 16058 const context = React127.useContext(ProgressRootContext); 16059 if (context === void 0) { 16060 throw new Error(true ? "Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>." : formatErrorMessage_default(51)); 16061 } 16062 return context; 16063 } 16064 16065 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/progress/root/ProgressRootDataAttributes.mjs 16066 var complete = "data-complete"; 16067 var indeterminate = "data-indeterminate"; 16068 var progressing = "data-progressing"; 16069 16070 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/progress/root/stateAttributesMapping.mjs 16071 var progressStateAttributesMapping = { 16072 status(value) { 16073 if (value === "progressing") { 16074 return { 16075 [progressing]: "" 16076 }; 16077 } 16078 if (value === "complete") { 16079 return { 16080 [complete]: "" 16081 }; 16082 } 16083 if (value === "indeterminate") { 16084 return { 16085 [indeterminate]: "" 16086 }; 16087 } 16088 return null; 16089 } 16090 }; 16091 16092 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/progress/root/ProgressRoot.mjs 16093 var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1); 16094 var ProgressRoot = /* @__PURE__ */ React128.forwardRef(function ProgressRoot2(componentProps, forwardedRef) { 16095 const { 16096 format, 16097 getAriaValueText, 16098 locale, 16099 max: max2 = 100, 16100 min: min2 = 0, 16101 value, 16102 render, 16103 className, 16104 children, 16105 style, 16106 ...elementProps 16107 } = componentProps; 16108 const [labelId, setLabelId] = React128.useState(); 16109 let status = "indeterminate"; 16110 let percentageValue = null; 16111 let clampedValue = null; 16112 let formattedValue = ""; 16113 let defaultAriaValueText = "indeterminate progress"; 16114 if (value != null && Number.isFinite(value)) { 16115 const rawPercentage = valueToPercent(value, min2, max2); 16116 percentageValue = clamp2(Number.isNaN(rawPercentage) ? 0 : rawPercentage, 0, 100); 16117 clampedValue = clamp2(value, min2, max2); 16118 status = clampedValue === max2 ? "complete" : "progressing"; 16119 formattedValue = format ? formatNumber(clampedValue, locale, format) : formatNumber(percentageValue / 100, locale, { 16120 style: "percent" 16121 }); 16122 defaultAriaValueText = formattedValue; 16123 } 16124 const state = React128.useMemo(() => ({ 16125 status 16126 }), [status]); 16127 const defaultProps = { 16128 "aria-labelledby": labelId, 16129 "aria-valuemax": max2, 16130 "aria-valuemin": min2, 16131 "aria-valuenow": clampedValue ?? void 0, 16132 "aria-valuetext": getAriaValueText ? getAriaValueText(formattedValue, value) : defaultAriaValueText, 16133 role: "progressbar", 16134 children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(React128.Fragment, { 16135 children: [children, /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { 16136 role: "presentation", 16137 style: visuallyHidden, 16138 children: "x" 16139 })] 16140 }) 16141 }; 16142 const contextValue = React128.useMemo(() => ({ 16143 formattedValue, 16144 percentageValue, 16145 setLabelId, 16146 state, 16147 value 16148 }), [formattedValue, percentageValue, setLabelId, state, value]); 16149 const element = useRenderElement("div", componentProps, { 16150 state, 16151 ref: forwardedRef, 16152 props: [defaultProps, elementProps], 16153 stateAttributesMapping: progressStateAttributesMapping 16154 }); 16155 return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ProgressRootContext.Provider, { 16156 value: contextValue, 16157 children: element 16158 }); 16159 }); 16160 if (true) ProgressRoot.displayName = "ProgressRoot"; 16161 16162 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/progress/track/ProgressTrack.mjs 16163 var React129 = __toESM(require_react(), 1); 16164 var ProgressTrack = /* @__PURE__ */ React129.forwardRef(function ProgressTrack2(componentProps, forwardedRef) { 16165 const { 16166 render, 16167 className, 16168 style, 16169 ...elementProps 16170 } = componentProps; 16171 const { 16172 state 16173 } = useProgressRootContext(); 16174 const element = useRenderElement("div", componentProps, { 16175 state, 16176 ref: forwardedRef, 16177 props: elementProps, 16178 stateAttributesMapping: progressStateAttributesMapping 16179 }); 16180 return element; 16181 }); 16182 if (true) ProgressTrack.displayName = "ProgressTrack"; 16183 16184 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/progress/indicator/ProgressIndicator.mjs 16185 var React130 = __toESM(require_react(), 1); 16186 var ProgressIndicator = /* @__PURE__ */ React130.forwardRef(function ProgressIndicator2(componentProps, forwardedRef) { 16187 const { 16188 render, 16189 className, 16190 style, 16191 ...elementProps 16192 } = componentProps; 16193 const { 16194 percentageValue, 16195 state 16196 } = useProgressRootContext(); 16197 const indicatorStyle = percentageValue == null ? {} : { 16198 insetInlineStart: 0, 16199 height: "inherit", 16200 width: `$percentageValue}%` 16201 }; 16202 const element = useRenderElement("div", componentProps, { 16203 state, 16204 ref: forwardedRef, 16205 props: [{ 16206 style: indicatorStyle 16207 }, elementProps], 16208 stateAttributesMapping: progressStateAttributesMapping 16209 }); 16210 return element; 16211 }); 16212 if (true) ProgressIndicator.displayName = "ProgressIndicator"; 16213 16214 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/progress/value/ProgressValue.mjs 16215 var React131 = __toESM(require_react(), 1); 16216 var ProgressValue = /* @__PURE__ */ React131.forwardRef(function ProgressValue2(componentProps, forwardedRef) { 16217 const { 16218 className, 16219 render, 16220 children, 16221 style, 16222 ...elementProps 16223 } = componentProps; 16224 const { 16225 value, 16226 formattedValue, 16227 state 16228 } = useProgressRootContext(); 16229 const indeterminate2 = state.status === "indeterminate"; 16230 const formattedValueArg = indeterminate2 ? "indeterminate" : formattedValue; 16231 const formattedValueDisplay = indeterminate2 ? null : formattedValue; 16232 const element = useRenderElement("span", componentProps, { 16233 state, 16234 ref: forwardedRef, 16235 props: [{ 16236 "aria-hidden": true, 16237 children: typeof children === "function" ? children(formattedValueArg, value) : formattedValueDisplay 16238 }, elementProps], 16239 stateAttributesMapping: progressStateAttributesMapping 16240 }); 16241 return element; 16242 }); 16243 if (true) ProgressValue.displayName = "ProgressValue"; 16244 16245 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/progress/label/ProgressLabel.mjs 16246 var React132 = __toESM(require_react(), 1); 16247 var ProgressLabel = /* @__PURE__ */ React132.forwardRef(function ProgressLabel2(componentProps, forwardedRef) { 16248 const { 16249 render, 16250 className, 16251 style, 16252 id: idProp, 16253 ...elementProps 16254 } = componentProps; 16255 const { 16256 setLabelId, 16257 state 16258 } = useProgressRootContext(); 16259 const id = useRegisteredLabelId(idProp, setLabelId); 16260 const element = useRenderElement("span", componentProps, { 16261 state, 16262 ref: forwardedRef, 16263 props: [{ 16264 id, 16265 role: "presentation" 16266 }, elementProps], 16267 stateAttributesMapping: progressStateAttributesMapping 16268 }); 16269 return element; 16270 }); 16271 if (true) ProgressLabel.displayName = "ProgressLabel"; 16272 16273 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/styles.mjs 16274 var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1); 16275 var DISABLE_SCROLLBAR_CLASS_NAME = "base-ui-disable-scrollbar"; 16276 var styleDisableScrollbar = { 16277 className: DISABLE_SCROLLBAR_CLASS_NAME, 16278 getElement(nonce) { 16279 return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("style", { 16280 nonce, 16281 href: DISABLE_SCROLLBAR_CLASS_NAME, 16282 precedence: "base-ui:low", 16283 children: `.$DISABLE_SCROLLBAR_CLASS_NAME}{scrollbar-width:none}.$DISABLE_SCROLLBAR_CLASS_NAME}::-webkit-scrollbar{display:none}` 16284 }); 16285 } 16286 }; 16287 if (true) styleDisableScrollbar.getElement.displayName = "styleDisableScrollbar.getElement"; 16288 16289 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/scrollEdges.mjs 16290 var SCROLL_EDGE_TOLERANCE_PX = 1; 16291 function getMaxScrollOffset(scrollSize, clientSize) { 16292 return Math.max(0, scrollSize - clientSize); 16293 } 16294 function normalizeScrollOffset(value, max2) { 16295 if (max2 <= 0) { 16296 return 0; 16297 } 16298 const clamped = clamp2(value, 0, max2); 16299 const startDistance = clamped; 16300 const endDistance = max2 - clamped; 16301 const withinStartTolerance = startDistance <= SCROLL_EDGE_TOLERANCE_PX; 16302 const withinEndTolerance = endDistance <= SCROLL_EDGE_TOLERANCE_PX; 16303 if (withinStartTolerance && withinEndTolerance) { 16304 return startDistance <= endDistance ? 0 : max2; 16305 } 16306 if (withinStartTolerance) { 16307 return 0; 16308 } 16309 if (withinEndTolerance) { 16310 return max2; 16311 } 16312 return clamped; 16313 } 16314 16315 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/index.parts.mjs 16316 var index_parts_exports3 = {}; 16317 __export(index_parts_exports3, { 16318 Arrow: () => SelectArrow, 16319 Backdrop: () => SelectBackdrop, 16320 Group: () => SelectGroup, 16321 GroupLabel: () => SelectGroupLabel, 16322 Icon: () => SelectIcon, 16323 Item: () => SelectItem, 16324 ItemIndicator: () => SelectItemIndicator, 16325 ItemText: () => SelectItemText, 16326 Label: () => SelectLabel, 16327 List: () => SelectList, 16328 Popup: () => SelectPopup, 16329 Portal: () => SelectPortal, 16330 Positioner: () => SelectPositioner, 16331 Root: () => SelectRoot, 16332 ScrollDownArrow: () => SelectScrollDownArrow, 16333 ScrollUpArrow: () => SelectScrollUpArrow, 16334 Separator: () => SelectSeparator, 16335 Trigger: () => SelectTrigger, 16336 Value: () => SelectValue 16337 }); 16338 16339 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/root/SelectRoot.mjs 16340 var React134 = __toESM(require_react(), 1); 16341 16342 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/root/SelectRootContext.mjs 16343 var React133 = __toESM(require_react(), 1); 16344 var SelectRootContext = /* @__PURE__ */ React133.createContext(void 0); 16345 if (true) SelectRootContext.displayName = "SelectRootContext"; 16346 var SelectFloatingContext = /* @__PURE__ */ React133.createContext(void 0); 16347 if (true) SelectFloatingContext.displayName = "SelectFloatingContext"; 16348 function useSelectRootContext() { 16349 const store = React133.useContext(SelectRootContext); 16350 if (store === void 0) { 16351 throw new Error(true ? "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>." : formatErrorMessage_default(60)); 16352 } 16353 return store; 16354 } 16355 function useSelectFloatingContext() { 16356 const context = React133.useContext(SelectFloatingContext); 16357 if (context === void 0) { 16358 throw new Error(true ? "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>." : formatErrorMessage_default(61)); 16359 } 16360 return context; 16361 } 16362 16363 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/store.mjs 16364 var selectors4 = { 16365 id: (state) => state.id, 16366 labelId: (state) => state.labelId, 16367 modal: (state) => state.modal, 16368 multiple: (state) => state.multiple, 16369 disabled: (state) => state.disabled, 16370 readOnly: (state) => state.readOnly, 16371 required: (state) => state.required, 16372 highlightItemOnHover: (state) => state.highlightItemOnHover, 16373 items: (state) => state.items, 16374 itemToStringLabel: (state) => state.itemToStringLabel, 16375 isItemEqualToValue: (state) => state.isItemEqualToValue, 16376 value: (state) => state.value, 16377 hasSelectedValue: (state) => { 16378 const { 16379 value, 16380 multiple, 16381 itemToStringValue 16382 } = state; 16383 if (value == null) { 16384 return false; 16385 } 16386 if (multiple && Array.isArray(value)) { 16387 return value.length > 0; 16388 } 16389 return stringifyAsValue(value, itemToStringValue) !== ""; 16390 }, 16391 hasNullItemLabel: (state, enabled) => { 16392 return enabled ? hasNullItemLabel(state.items) : false; 16393 }, 16394 open: (state) => state.open, 16395 mounted: (state) => state.mounted, 16396 forceMount: (state) => state.forceMount, 16397 transitionStatus: (state) => state.transitionStatus, 16398 openMethod: (state) => state.openMethod, 16399 activeIndex: (state) => state.activeIndex, 16400 selectedIndex: (state) => state.selectedIndex, 16401 isActive: (state, index2) => state.activeIndex === index2, 16402 isSelected: (state, itemValue) => { 16403 const comparer = state.isItemEqualToValue; 16404 const storeValue = state.value; 16405 if (state.multiple) { 16406 return Array.isArray(storeValue) && storeValue.some((selectedItem) => compareItemEquality(itemValue, selectedItem, comparer)); 16407 } 16408 return compareItemEquality(itemValue, storeValue, comparer); 16409 }, 16410 isSelectedByFocus: (state, index2) => { 16411 return state.selectedIndex === index2; 16412 }, 16413 popupProps: (state) => state.popupProps, 16414 triggerProps: (state) => state.triggerProps, 16415 itemRoot: (state) => state.itemRoot, 16416 triggerElement: (state) => state.triggerElement, 16417 positionerElement: (state) => state.positionerElement, 16418 listElement: (state) => state.listElement, 16419 popupSide: (state) => state.popupSide, 16420 scrollUpArrowVisible: (state) => state.scrollUpArrowVisible, 16421 scrollDownArrowVisible: (state) => state.scrollDownArrowVisible, 16422 hasScrollArrows: (state) => state.hasScrollArrows 16423 }; 16424 16425 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/root/SelectRoot.mjs 16426 var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1); 16427 function SelectRoot(props) { 16428 const { 16429 id, 16430 value: valueProp, 16431 defaultValue = null, 16432 onValueChange, 16433 open: openProp, 16434 defaultOpen = false, 16435 onOpenChange, 16436 name: nameProp, 16437 form, 16438 autoComplete, 16439 disabled: disabledProp = false, 16440 readOnly = false, 16441 required = false, 16442 modal = true, 16443 actionsRef, 16444 inputRef, 16445 onOpenChangeComplete, 16446 items, 16447 multiple = false, 16448 itemToStringLabel, 16449 itemToStringValue, 16450 isItemEqualToValue = defaultItemEquality, 16451 highlightItemOnHover = true, 16452 children 16453 } = props; 16454 const { 16455 clearErrors 16456 } = useFormContext(); 16457 const { 16458 setDirty, 16459 setTouched, 16460 setFocused, 16461 validityData, 16462 setFilled, 16463 name: fieldName, 16464 disabled: fieldDisabled, 16465 validation, 16466 validationMode 16467 } = useFieldRootContext(); 16468 const generatedId = useLabelableId({ 16469 id 16470 }); 16471 const disabled2 = fieldDisabled || disabledProp; 16472 const name2 = fieldName ?? nameProp; 16473 const [value, setValueUnwrapped] = useControlled({ 16474 controlled: valueProp, 16475 default: multiple ? defaultValue ?? EMPTY_ARRAY : defaultValue, 16476 name: "Select", 16477 state: "value" 16478 }); 16479 const [open2, setOpenUnwrapped] = useControlled({ 16480 controlled: openProp, 16481 default: defaultOpen, 16482 name: "Select", 16483 state: "open" 16484 }); 16485 const listRef = React134.useRef([]); 16486 const labelsRef = React134.useRef([]); 16487 const popupRef = React134.useRef(null); 16488 const scrollHandlerRef = React134.useRef(null); 16489 const scrollArrowsMountedCountRef = React134.useRef(0); 16490 const valueRef = React134.useRef(null); 16491 const valuesRef = React134.useRef([]); 16492 const typingRef = React134.useRef(false); 16493 const firstItemTextRef = React134.useRef(null); 16494 const selectedItemTextRef = React134.useRef(null); 16495 const selectionRef = React134.useRef({ 16496 allowSelectedMouseUp: false, 16497 allowUnselectedMouseUp: false, 16498 dragY: 0 16499 }); 16500 const alignItemWithTriggerActiveRef = React134.useRef(false); 16501 const initialValueRef = React134.useRef(value); 16502 const { 16503 openMethod, 16504 triggerProps: interactionTypeProps 16505 } = useOpenInteractionType(open2); 16506 const store = useRefWithInit(() => new ReactStore({ 16507 id: generatedId, 16508 labelId: void 0, 16509 modal, 16510 multiple, 16511 disabled: disabled2, 16512 readOnly, 16513 required, 16514 highlightItemOnHover, 16515 itemToStringLabel, 16516 itemToStringValue, 16517 isItemEqualToValue, 16518 value, 16519 open: open2, 16520 // Seeded with the initial values of `useUnmountAfterClose`, which is called after the 16521 // store because its unmount cleanup writes to it. `useSyncedValues` keeps them in sync. 16522 mounted: open2, 16523 transitionStatus: void 0, 16524 items, 16525 forceMount: false, 16526 openMethod: null, 16527 activeIndex: null, 16528 selectedIndex: null, 16529 popupProps: EMPTY_OBJECT, 16530 triggerProps: EMPTY_OBJECT, 16531 itemRoot: { 16532 props: EMPTY_OBJECT, 16533 multiple, 16534 disabled: disabled2, 16535 readOnly, 16536 isItemEqualToValue 16537 }, 16538 triggerElement: null, 16539 positionerElement: null, 16540 listElement: null, 16541 popupSide: null, 16542 scrollUpArrowVisible: false, 16543 scrollDownArrowVisible: false, 16544 hasScrollArrows: false 16545 }, { 16546 setValue: NOOP, 16547 setOpen: NOOP, 16548 handleScrollArrowVisibility: NOOP, 16549 onOpenChangeComplete: NOOP, 16550 listRef, 16551 popupRef, 16552 scrollHandlerRef, 16553 scrollArrowsMountedCountRef, 16554 valueRef, 16555 valuesRef, 16556 labelsRef, 16557 typingRef, 16558 selectionRef, 16559 firstItemTextRef, 16560 selectedItemTextRef, 16561 alignItemWithTriggerActiveRef, 16562 initialValueRef 16563 }, selectors4)).current; 16564 const [preventUnmountOnClose, setPreventUnmountOnClose] = React134.useState(false); 16565 const { 16566 mounted, 16567 transitionStatus, 16568 forceUnmount: handleUnmount 16569 } = useUnmountAfterClose({ 16570 open: open2, 16571 ref: popupRef, 16572 preventUnmountOnClose, 16573 setPreventUnmountOnClose, 16574 onUnmount() { 16575 store.update({ 16576 activeIndex: null, 16577 openMethod: null, 16578 scrollUpArrowVisible: false, 16579 scrollDownArrowVisible: false 16580 }); 16581 onOpenChangeComplete?.(false); 16582 } 16583 }); 16584 const activeIndex = store.useState("activeIndex"); 16585 const selectedIndex = store.useState("selectedIndex"); 16586 const triggerElement = store.useState("triggerElement"); 16587 const positionerElement = store.useState("positionerElement"); 16588 const previousOpenMethod = usePreviousValue(openMethod); 16589 const renderedOpenMethod = openMethod ?? previousOpenMethod; 16590 const serializedValue = React134.useMemo(() => { 16591 if (multiple) { 16592 return ""; 16593 } 16594 return stringifyAsValue(value, itemToStringValue); 16595 }, [multiple, value, itemToStringValue]); 16596 const fieldStringValue = React134.useMemo(() => { 16597 if (multiple && Array.isArray(value)) { 16598 return value.map((currentValue) => stringifyAsValue(currentValue, itemToStringValue)); 16599 } 16600 return stringifyAsValue(value, itemToStringValue); 16601 }, [multiple, value, itemToStringValue]); 16602 const controlRef = useValueAsRef(triggerElement); 16603 const getStringifiedValueForForm = useStableCallback(() => fieldStringValue); 16604 useRegisterFieldControl(controlRef, generatedId, value, getStringifiedValueForForm, !disabled2, nameProp); 16605 const hasSelectedValue = multiple ? Array.isArray(value) && value.length > 0 : value != null && serializedValue !== ""; 16606 useIsoLayoutEffect(() => { 16607 setFilled(hasSelectedValue); 16608 }, [hasSelectedValue, setFilled]); 16609 useIsoLayoutEffect(function syncSelectedIndex() { 16610 const nextIndex = findSelectionIndex(valuesRef.current, value, isItemEqualToValue, multiple); 16611 if (nextIndex === null) { 16612 selectedItemTextRef.current = null; 16613 } 16614 if (open2) { 16615 return; 16616 } 16617 store.set("selectedIndex", nextIndex); 16618 }, [multiple, open2, value, isItemEqualToValue, store]); 16619 useValueChanged(value, () => { 16620 clearErrors(name2); 16621 setDirty(isSelectedValueDirty(value, validityData.initialValue, isItemEqualToValue)); 16622 validation.change(value); 16623 }); 16624 const setOpen = useStableCallback((nextOpen, eventDetails) => { 16625 const openEventDetails = eventDetails; 16626 const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(openEventDetails); 16627 onOpenChange?.(nextOpen, openEventDetails); 16628 if (eventDetails.isCanceled) { 16629 return; 16630 } 16631 if (!nextOpen) { 16632 setPreventUnmountOnClose(shouldPreventUnmountOnClose()); 16633 } 16634 setOpenUnwrapped(nextOpen); 16635 if (!nextOpen && (eventDetails.reason === reason_parts_exports.focusOut || eventDetails.reason === reason_parts_exports.outsidePress)) { 16636 setTouched(true); 16637 setFocused(false); 16638 if (validationMode === "onBlur") { 16639 validation.commit(value); 16640 } 16641 } 16642 }); 16643 React134.useImperativeHandle(actionsRef, () => ({ 16644 unmount: handleUnmount, 16645 close: () => { 16646 if (store.state.open) { 16647 setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction)); 16648 } 16649 } 16650 }), [handleUnmount, setOpen, store]); 16651 const setValue = useStableCallback((nextValue, eventDetails) => { 16652 onValueChange?.(nextValue, eventDetails); 16653 if (eventDetails.isCanceled) { 16654 return; 16655 } 16656 setValueUnwrapped(nextValue); 16657 }); 16658 const handleScrollArrowVisibility = useStableCallback((scroller) => { 16659 const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight); 16660 const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop); 16661 const shouldShowUp = scrollTop > 0; 16662 const shouldShowDown = scrollTop < maxScrollTop; 16663 store.set("scrollUpArrowVisible", shouldShowUp); 16664 store.set("scrollDownArrowVisible", shouldShowDown); 16665 }); 16666 const floatingContext = useFloatingRootContext({ 16667 open: open2, 16668 onOpenChange: setOpen, 16669 elements: { 16670 reference: triggerElement, 16671 floating: positionerElement 16672 } 16673 }); 16674 const click = useClick(floatingContext, { 16675 enabled: !disabled2, 16676 event: "mousedown" 16677 }); 16678 const dismiss = useDismiss(floatingContext); 16679 const listNavigation2 = useListNavigation(floatingContext, { 16680 enabled: !disabled2, 16681 listRef, 16682 activeIndex, 16683 selectedIndex, 16684 disabledIndices: EMPTY_ARRAY, 16685 onNavigate(nextActiveIndex) { 16686 if (nextActiveIndex === null && !open2) { 16687 return; 16688 } 16689 store.set("activeIndex", nextActiveIndex); 16690 }, 16691 focusItemOnHover: highlightItemOnHover 16692 }); 16693 const typeahead = useTypeahead(floatingContext, { 16694 // Typeahead on an open popup only moves the highlight, so it remains available while 16695 // `readOnly`. The closed-trigger variant commits a value instead, so it doesn't. 16696 enabled: !disabled2 && (open2 || !readOnly && !multiple), 16697 listRef: labelsRef, 16698 activeIndex, 16699 selectedIndex, 16700 // Skip disabled items while matching so typeahead advances to the next selectable item 16701 // (a click can never select a disabled item and native `<select>` skips them too). Resolve 16702 // the disabled state from the element via the attribute-only `isElementDisabled` so the 16703 // hidden, force-mounted items used for closed-trigger typeahead aren't dropped by the 16704 // `elementsRef`/visibility filter that `disabledIndices` deliberately sidesteps. 16705 disabledIndices: (index2) => isElementDisabled(listRef.current[index2]), 16706 onMatch(index2) { 16707 if (open2) { 16708 store.set("activeIndex", index2); 16709 } else { 16710 setValue(valuesRef.current[index2], createChangeEventDetails(reason_parts_exports.none)); 16711 } 16712 }, 16713 onTyping(typing) { 16714 typingRef.current = typing; 16715 } 16716 }); 16717 const mergedTriggerProps = React134.useMemo(() => mergeProps(typeahead.reference, listNavigation2.reference, dismiss.reference, click.reference, interactionTypeProps), [click.reference, typeahead.reference, listNavigation2.reference, dismiss.reference, interactionTypeProps]); 16718 const popupProps = React134.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, typeahead.floating, listNavigation2.floating, dismiss.floating), [typeahead.floating, listNavigation2.floating, dismiss.floating]); 16719 const itemProps = listNavigation2.item ?? EMPTY_OBJECT; 16720 const itemRoot = React134.useMemo(() => ({ 16721 props: itemProps, 16722 multiple, 16723 disabled: disabled2, 16724 readOnly, 16725 isItemEqualToValue 16726 }), [itemProps, multiple, disabled2, readOnly, isItemEqualToValue]); 16727 store.useContextCallback("setValue", setValue); 16728 store.useContextCallback("setOpen", setOpen); 16729 store.useContextCallback("handleScrollArrowVisibility", handleScrollArrowVisibility); 16730 store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete); 16731 useOnFirstRender(() => { 16732 store.update({ 16733 popupProps, 16734 triggerProps: mergedTriggerProps, 16735 itemRoot 16736 }); 16737 }); 16738 store.useSyncedValues({ 16739 id: generatedId, 16740 modal, 16741 multiple, 16742 disabled: disabled2, 16743 readOnly, 16744 required, 16745 highlightItemOnHover, 16746 value, 16747 open: open2, 16748 mounted, 16749 transitionStatus, 16750 popupProps, 16751 triggerProps: mergedTriggerProps, 16752 itemRoot, 16753 items, 16754 itemToStringLabel, 16755 itemToStringValue, 16756 isItemEqualToValue, 16757 openMethod: renderedOpenMethod 16758 }); 16759 const ref = useMergedRefs(inputRef, validation.inputRef); 16760 const hiddenInputName = multiple ? void 0 : name2; 16761 const hiddenInputs = React134.useMemo(() => { 16762 if (!multiple || !Array.isArray(value) || !name2) { 16763 return null; 16764 } 16765 return value.map((v2) => { 16766 const currentSerializedValue = stringifyAsValue(v2, itemToStringValue); 16767 return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("input", { 16768 type: "hidden", 16769 form, 16770 name: name2, 16771 value: currentSerializedValue, 16772 disabled: disabled2 16773 }, currentSerializedValue); 16774 }); 16775 }, [multiple, value, form, name2, itemToStringValue, disabled2]); 16776 return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(SelectRootContext.Provider, { 16777 value: store, 16778 children: [/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectFloatingContext.Provider, { 16779 value: floatingContext, 16780 children 16781 }), /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("input", { 16782 ...validation.getValidationProps(disabled2, { 16783 onFocus() { 16784 store.state.triggerElement?.focus({ 16785 // Supported in Chrome from 144 (January 2026) 16786 focusVisible: true 16787 }); 16788 }, 16789 // Handle browser autofill. 16790 onChange(event) { 16791 if (event.nativeEvent.defaultPrevented || disabled2 || readOnly) { 16792 return; 16793 } 16794 const nextValue = event.currentTarget.value; 16795 const details = createChangeEventDetails(reason_parts_exports.none, event.nativeEvent); 16796 function handleChange() { 16797 if (multiple) { 16798 return; 16799 } 16800 const nextValueLower = nextValue.toLowerCase(); 16801 let matchingIndex = valuesRef.current.findIndex((candidate) => stringifyAsValue(candidate, itemToStringValue).toLowerCase() === nextValueLower || stringifyAsLabel(candidate, itemToStringLabel).toLowerCase() === nextValueLower); 16802 if (matchingIndex === -1) { 16803 matchingIndex = valuesRef.current.findIndex((_, index2) => { 16804 const renderedLabel = labelsRef.current[index2]; 16805 return renderedLabel != null && renderedLabel.toLowerCase() === nextValueLower; 16806 }); 16807 } 16808 const matchingValue = valuesRef.current[matchingIndex]; 16809 if (matchingValue != null) { 16810 setValue(matchingValue, details); 16811 } 16812 } 16813 store.set("forceMount", true); 16814 queueMicrotask(handleChange); 16815 } 16816 }), 16817 id: generatedId && hiddenInputName == null ? `$generatedId}-hidden-input` : void 0, 16818 form, 16819 name: hiddenInputName, 16820 autoComplete, 16821 value: serializedValue, 16822 disabled: disabled2, 16823 required: required && !(multiple && hasSelectedValue), 16824 readOnly, 16825 ref, 16826 style: name2 ? visuallyHiddenInput : visuallyHidden, 16827 tabIndex: -1, 16828 "aria-hidden": true, 16829 suppressHydrationWarning: true 16830 }), hiddenInputs] 16831 }); 16832 } 16833 16834 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/label/SelectLabel.mjs 16835 var React135 = __toESM(require_react(), 1); 16836 var SelectLabel = /* @__PURE__ */ React135.forwardRef(function SelectLabel2(componentProps, forwardedRef) { 16837 const { 16838 render, 16839 className, 16840 style, 16841 ...elementProps 16842 } = componentProps; 16843 const elementPropsWithoutId = elementProps; 16844 delete elementPropsWithoutId.id; 16845 const fieldRootContext = useFieldRootContext(); 16846 const store = useSelectRootContext(); 16847 const triggerElement = store.useState("triggerElement"); 16848 const rootId = store.useState("id"); 16849 const defaultLabelId = getDefaultLabelId(rootId); 16850 const labelProps = useLabel({ 16851 id: defaultLabelId, 16852 fallbackControlId: triggerElement?.id ?? rootId, 16853 setLabelId(nextLabelId) { 16854 const resolvedLabelId = typeof nextLabelId === "function" ? nextLabelId(store.state.labelId) : nextLabelId; 16855 store.set("labelId", resolvedLabelId); 16856 } 16857 }); 16858 return useRenderElement("div", componentProps, { 16859 ref: forwardedRef, 16860 state: fieldRootContext.state, 16861 props: [labelProps, elementProps], 16862 stateAttributesMapping: fieldValidityMapping 16863 }); 16864 }); 16865 if (true) SelectLabel.displayName = "SelectLabel"; 16866 16867 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs 16868 var React136 = __toESM(require_react(), 1); 16869 16870 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/trigger/SelectTriggerDataAttributes.mjs 16871 var popupOpen3 = CommonTriggerDataAttributes_exports.popupOpen; 16872 var pressed2 = CommonTriggerDataAttributes_exports.pressed; 16873 var popupSide = "data-popup-side"; 16874 16875 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/trigger/SelectTrigger.mjs 16876 var SELECTED_DELAY = 400; 16877 var stateAttributesMapping = { 16878 ...pressableTriggerOpenStateMapping, 16879 ...fieldValidityMapping, 16880 popupSide: (side) => side ? { 16881 [popupSide]: side 16882 } : null, 16883 value: () => null 16884 }; 16885 var SelectTrigger = /* @__PURE__ */ React136.forwardRef(function SelectTrigger2(componentProps, forwardedRef) { 16886 const { 16887 render, 16888 className, 16889 id: idProp, 16890 disabled: disabledProp = false, 16891 nativeButton = true, 16892 style, 16893 ...elementProps 16894 } = componentProps; 16895 const { 16896 setTouched, 16897 validationMode, 16898 validation, 16899 state: fieldState, 16900 disabled: fieldDisabled 16901 } = useFieldRootContext(); 16902 const { 16903 labelId: fieldLabelId 16904 } = useLabelableContext(); 16905 const store = useSelectRootContext(); 16906 const readOnly = store.useState("readOnly"); 16907 const required = store.useState("required"); 16908 const selectDisabled = store.useState("disabled"); 16909 const disabled2 = fieldDisabled || selectDisabled || disabledProp; 16910 const open2 = store.useState("open"); 16911 const mounted = store.useState("mounted"); 16912 const value = store.useState("value"); 16913 const triggerProps = store.useState("triggerProps"); 16914 const positionerElement = store.useState("positionerElement"); 16915 const listElement = store.useState("listElement"); 16916 const popupSideValue = store.useState("popupSide"); 16917 const rootId = store.useState("id"); 16918 const selectLabelId = store.useState("labelId"); 16919 const hasSelectedValue = store.useState("hasSelectedValue"); 16920 const popupSide2 = mounted && positionerElement ? popupSideValue : null; 16921 const id = idProp ?? rootId; 16922 const ariaLabelledBy = resolveAriaLabelledBy(fieldLabelId, selectLabelId); 16923 useLabelableId({ 16924 id: idProp 16925 }); 16926 const positionerRef = useValueAsRef(positionerElement); 16927 const triggerRef = React136.useRef(null); 16928 const setFocused = useSetFieldFocused(disabled2, triggerRef); 16929 const { 16930 getButtonProps, 16931 buttonRef 16932 } = useButton({ 16933 disabled: disabled2, 16934 native: nativeButton 16935 }); 16936 const setTriggerElement = store.useStateSetter("triggerElement"); 16937 const timeoutFocus = useTimeout(); 16938 const timeoutMouseDown = useTimeout(); 16939 const selectedDelayTimeout = useTimeout(); 16940 React136.useEffect(() => { 16941 if (open2) { 16942 selectedDelayTimeout.start(SELECTED_DELAY, () => { 16943 store.context.selectionRef.current.allowUnselectedMouseUp = true; 16944 store.context.selectionRef.current.allowSelectedMouseUp = true; 16945 }); 16946 return () => { 16947 selectedDelayTimeout.clear(); 16948 }; 16949 } 16950 store.context.selectionRef.current = { 16951 allowSelectedMouseUp: false, 16952 allowUnselectedMouseUp: false, 16953 dragY: 0 16954 }; 16955 timeoutMouseDown.clear(); 16956 return void 0; 16957 }, [open2, store, timeoutMouseDown, selectedDelayTimeout]); 16958 const mergedProps = mergeProps(triggerProps, { 16959 id, 16960 role: "combobox", 16961 "aria-expanded": open2, 16962 "aria-haspopup": "listbox", 16963 "aria-controls": open2 ? listElement?.id ?? getFloatingFocusElement(positionerElement)?.id : void 0, 16964 "aria-labelledby": ariaLabelledBy, 16965 "aria-readonly": readOnly || void 0, 16966 "aria-required": required || void 0, 16967 tabIndex: disabled2 ? -1 : 0, 16968 onFocus(event) { 16969 setFocused(true); 16970 if (open2 && store.context.alignItemWithTriggerActiveRef.current) { 16971 store.context.setOpen(false, createChangeEventDetails(reason_parts_exports.none, event.nativeEvent)); 16972 } 16973 timeoutFocus.start(0, () => { 16974 store.set("forceMount", true); 16975 }); 16976 }, 16977 onBlur(event) { 16978 if (contains(positionerElement, event.relatedTarget)) { 16979 return; 16980 } 16981 setTouched(true); 16982 setFocused(false); 16983 if (validationMode === "onBlur") { 16984 validation.commit(value); 16985 } 16986 }, 16987 onMouseDown(event) { 16988 if (open2) { 16989 return; 16990 } 16991 const doc = ownerDocument(event.currentTarget); 16992 function handleMouseUp(mouseEvent) { 16993 if (!triggerRef.current) { 16994 return; 16995 } 16996 const mouseUpTarget = mouseEvent.target; 16997 if (contains(triggerRef.current, mouseUpTarget) || contains(positionerRef.current, mouseUpTarget)) { 16998 return; 16999 } 17000 if (isMouseWithinBounds(mouseEvent, triggerRef.current)) { 17001 return; 17002 } 17003 store.context.setOpen(false, createChangeEventDetails(reason_parts_exports.cancelOpen, mouseEvent)); 17004 } 17005 timeoutMouseDown.start(0, () => { 17006 doc.addEventListener("mouseup", handleMouseUp, { 17007 once: true 17008 }); 17009 }); 17010 } 17011 }, elementProps, getButtonProps); 17012 const props = validation.getValidationProps(disabled2, mergedProps); 17013 props.role = "combobox"; 17014 const state = { 17015 ...fieldState, 17016 open: open2, 17017 disabled: disabled2, 17018 value, 17019 readOnly, 17020 popupSide: popupSide2, 17021 placeholder: !hasSelectedValue 17022 }; 17023 return useRenderElement("button", componentProps, { 17024 ref: [forwardedRef, triggerRef, buttonRef, setTriggerElement], 17025 state, 17026 stateAttributesMapping, 17027 props 17028 }); 17029 }); 17030 if (true) SelectTrigger.displayName = "SelectTrigger"; 17031 17032 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/value/SelectValue.mjs 17033 var React137 = __toESM(require_react(), 1); 17034 var stateAttributesMapping2 = { 17035 value: () => null 17036 }; 17037 var SelectValue = /* @__PURE__ */ React137.forwardRef(function SelectValue2(componentProps, forwardedRef) { 17038 const { 17039 className, 17040 render, 17041 children: childrenProp, 17042 placeholder, 17043 style, 17044 ...elementProps 17045 } = componentProps; 17046 const store = useSelectRootContext(); 17047 const value = store.useState("value"); 17048 const items = store.useState("items"); 17049 const itemToStringLabel = store.useState("itemToStringLabel"); 17050 const hasSelectedValue = store.useState("hasSelectedValue"); 17051 const shouldCheckNullItemLabel = !hasSelectedValue && placeholder != null && childrenProp == null; 17052 const hasNullLabel = store.useState("hasNullItemLabel", shouldCheckNullItemLabel); 17053 const state = { 17054 value, 17055 placeholder: !hasSelectedValue 17056 }; 17057 let children = null; 17058 if (typeof childrenProp === "function") { 17059 children = childrenProp(value); 17060 } else if (childrenProp != null) { 17061 children = childrenProp; 17062 } else if (shouldCheckNullItemLabel && !hasNullLabel) { 17063 children = placeholder; 17064 } else if (Array.isArray(value)) { 17065 children = resolveMultipleLabels(value, items, itemToStringLabel); 17066 } else { 17067 children = resolveSelectedLabel(value, items, itemToStringLabel); 17068 } 17069 const element = useRenderElement("span", componentProps, { 17070 state, 17071 ref: [forwardedRef, store.context.valueRef], 17072 props: [{ 17073 children 17074 }, elementProps], 17075 stateAttributesMapping: stateAttributesMapping2 17076 }); 17077 return element; 17078 }); 17079 if (true) SelectValue.displayName = "SelectValue"; 17080 17081 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/icon/SelectIcon.mjs 17082 var React138 = __toESM(require_react(), 1); 17083 var SelectIcon = /* @__PURE__ */ React138.forwardRef(function SelectIcon2(componentProps, forwardedRef) { 17084 const { 17085 render, 17086 className, 17087 style, 17088 ...elementProps 17089 } = componentProps; 17090 const store = useSelectRootContext(); 17091 const open2 = store.useState("open"); 17092 const state = { 17093 open: open2 17094 }; 17095 const element = useRenderElement("span", componentProps, { 17096 state, 17097 ref: forwardedRef, 17098 props: [{ 17099 "aria-hidden": true, 17100 children: "\u25BC" 17101 }, elementProps], 17102 stateAttributesMapping: triggerOpenStateMapping 17103 }); 17104 return element; 17105 }); 17106 if (true) SelectIcon.displayName = "SelectIcon"; 17107 17108 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/portal/SelectPortal.mjs 17109 var React139 = __toESM(require_react(), 1); 17110 var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1); 17111 var SelectPortal = /* @__PURE__ */ React139.forwardRef(function SelectPortal2(portalProps, forwardedRef) { 17112 const store = useSelectRootContext(); 17113 const mounted = store.useState("mounted"); 17114 const forceMount = store.useState("forceMount"); 17115 const shouldRender = mounted || forceMount; 17116 if (!shouldRender) { 17117 return null; 17118 } 17119 return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FloatingPortal, { 17120 ref: forwardedRef, 17121 ...portalProps 17122 }); 17123 }); 17124 if (true) SelectPortal.displayName = "SelectPortal"; 17125 17126 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/backdrop/SelectBackdrop.mjs 17127 var React140 = __toESM(require_react(), 1); 17128 var stateAttributesMapping3 = { 17129 ...popupStateMapping, 17130 ...transitionStatusMapping 17131 }; 17132 var SelectBackdrop = /* @__PURE__ */ React140.forwardRef(function SelectBackdrop2(componentProps, forwardedRef) { 17133 const { 17134 render, 17135 className, 17136 style, 17137 ...elementProps 17138 } = componentProps; 17139 const store = useSelectRootContext(); 17140 const open2 = store.useState("open"); 17141 const mounted = store.useState("mounted"); 17142 const transitionStatus = store.useState("transitionStatus"); 17143 const state = { 17144 open: open2, 17145 transitionStatus 17146 }; 17147 const element = useRenderElement("div", componentProps, { 17148 state, 17149 ref: forwardedRef, 17150 props: [{ 17151 role: "presentation", 17152 hidden: !mounted, 17153 style: { 17154 userSelect: "none", 17155 WebkitUserSelect: "none" 17156 } 17157 }, elementProps], 17158 stateAttributesMapping: stateAttributesMapping3 17159 }); 17160 return element; 17161 }); 17162 if (true) SelectBackdrop.displayName = "SelectBackdrop"; 17163 17164 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/positioner/SelectPositioner.mjs 17165 var React142 = __toESM(require_react(), 1); 17166 17167 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/positioner/SelectPositionerContext.mjs 17168 var React141 = __toESM(require_react(), 1); 17169 var SelectPositionerContext = /* @__PURE__ */ React141.createContext(void 0); 17170 if (true) SelectPositionerContext.displayName = "SelectPositionerContext"; 17171 function useSelectPositionerContext() { 17172 const context = React141.useContext(SelectPositionerContext); 17173 if (!context) { 17174 throw new Error(true ? "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>." : formatErrorMessage_default(59)); 17175 } 17176 return context; 17177 } 17178 17179 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/popup/utils.mjs 17180 function clearStyles(element, originalStyles) { 17181 if (element) { 17182 Object.assign(element.style, originalStyles); 17183 } 17184 } 17185 var LIST_FUNCTIONAL_STYLES = { 17186 position: "relative", 17187 maxHeight: "100%", 17188 overflowX: "hidden", 17189 overflowY: "auto" 17190 }; 17191 17192 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/positioner/SelectPositioner.mjs 17193 var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1); 17194 var FIXED = { 17195 position: "fixed" 17196 }; 17197 var SelectPositioner = /* @__PURE__ */ React142.forwardRef(function SelectPositioner2(componentProps, forwardedRef) { 17198 const { 17199 anchor, 17200 className, 17201 render, 17202 // `useAnchorPositioning` applies the same defaults to the undefined values; the names 17203 // remain destructured to exclude the props from `elementProps`. 17204 positionMethod, 17205 side, 17206 align, 17207 sideOffset, 17208 alignOffset, 17209 collisionBoundary = "clipping-ancestors", 17210 collisionPadding, 17211 arrowPadding, 17212 sticky, 17213 disableAnchorTracking, 17214 alignItemWithTrigger = true, 17215 collisionAvoidance = DROPDOWN_COLLISION_AVOIDANCE, 17216 style, 17217 ...elementProps 17218 } = componentProps; 17219 const store = useSelectRootContext(); 17220 const floatingRootContext = useSelectFloatingContext(); 17221 const open2 = store.useState("open"); 17222 const mounted = store.useState("mounted"); 17223 const modal = store.useState("modal"); 17224 const value = store.useState("value"); 17225 const openMethod = store.useState("openMethod"); 17226 const positionerElement = store.useState("positionerElement"); 17227 const triggerElement = store.useState("triggerElement"); 17228 const isItemEqualToValue = store.useState("isItemEqualToValue"); 17229 const transitionStatus = store.useState("transitionStatus"); 17230 const scrollUpArrowRef = React142.useRef(null); 17231 const scrollDownArrowRef = React142.useRef(null); 17232 const [controlledAlignItemWithTrigger, setControlledAlignItemWithTrigger] = React142.useState(alignItemWithTrigger); 17233 const alignItemWithTriggerActive = mounted && controlledAlignItemWithTrigger && openMethod !== "touch"; 17234 if (!mounted && controlledAlignItemWithTrigger !== alignItemWithTrigger) { 17235 setControlledAlignItemWithTrigger(alignItemWithTrigger); 17236 } 17237 React142.useImperativeHandle(store.context.alignItemWithTriggerActiveRef, () => alignItemWithTriggerActive); 17238 useAnchoredPopupScrollLock((alignItemWithTriggerActive || modal) && open2, openMethod === "touch", positionerElement, triggerElement); 17239 const positioning = useAnchorPositioning({ 17240 anchor, 17241 floatingRootContext, 17242 positionMethod, 17243 mounted, 17244 side, 17245 sideOffset, 17246 align, 17247 alignOffset, 17248 arrowPadding, 17249 collisionBoundary, 17250 collisionPadding, 17251 sticky, 17252 disableAnchorTracking: disableAnchorTracking ?? alignItemWithTriggerActive, 17253 collisionAvoidance, 17254 keepMounted: true 17255 }); 17256 const renderedSide = alignItemWithTriggerActive ? "none" : positioning.side; 17257 const positionerStyles = alignItemWithTriggerActive ? FIXED : positioning.positionerStyles; 17258 const state = { 17259 open: open2, 17260 side: renderedSide, 17261 align: positioning.align, 17262 anchorHidden: positioning.anchorHidden 17263 }; 17264 useIsoLayoutEffect(() => { 17265 store.set("popupSide", positioning.side); 17266 }, [store, positioning.side]); 17267 const setPositionerElement = store.useStateSetter("positionerElement"); 17268 const element = usePositioner(componentProps, state, { 17269 styles: positionerStyles, 17270 transitionStatus, 17271 props: elementProps, 17272 refs: [forwardedRef, setPositionerElement], 17273 hidden: !mounted, 17274 inert: !open2 17275 }); 17276 const prevMapSizeRef = React142.useRef(0); 17277 const onMapChange = useStableCallback((map) => { 17278 if (store.context.valuesRef.current.length === 0) { 17279 return; 17280 } 17281 const prevSize = prevMapSizeRef.current; 17282 prevMapSizeRef.current = map.size; 17283 const eventDetails = createChangeEventDetails(reason_parts_exports.none); 17284 if (prevSize !== 0 && !store.state.multiple && value !== null) { 17285 const selectedValueIndex = findItemIndex(store.context.valuesRef.current, value, isItemEqualToValue); 17286 if (selectedValueIndex === -1) { 17287 const initialSelectedValue = store.context.initialValueRef.current; 17288 const hasInitial = initialSelectedValue != null && findItemIndex(store.context.valuesRef.current, initialSelectedValue, isItemEqualToValue) !== -1; 17289 const nextValue = hasInitial ? initialSelectedValue : null; 17290 store.context.setValue(nextValue, eventDetails); 17291 if (nextValue === null) { 17292 store.set("selectedIndex", null); 17293 store.context.selectedItemTextRef.current = null; 17294 } 17295 } 17296 } 17297 if (prevSize !== 0 && store.state.multiple && Array.isArray(value)) { 17298 const nextValue = value.filter((selectedItemValue) => findItemIndex(store.context.valuesRef.current, selectedItemValue, isItemEqualToValue) !== -1); 17299 if (nextValue.length !== value.length) { 17300 store.context.setValue(nextValue, eventDetails); 17301 if (nextValue.length === 0) { 17302 store.set("selectedIndex", null); 17303 store.context.selectedItemTextRef.current = null; 17304 } 17305 } 17306 } 17307 if (open2 && alignItemWithTriggerActive) { 17308 store.update({ 17309 scrollUpArrowVisible: false, 17310 scrollDownArrowVisible: false 17311 }); 17312 const stylesToClear = { 17313 height: "" 17314 }; 17315 clearStyles(positionerElement, stylesToClear); 17316 clearStyles(store.context.popupRef.current, stylesToClear); 17317 } 17318 }); 17319 const contextValue = React142.useMemo(() => ({ 17320 ...positioning, 17321 side: renderedSide, 17322 alignItemWithTriggerActive, 17323 setControlledAlignItemWithTrigger, 17324 scrollUpArrowRef, 17325 scrollDownArrowRef 17326 }), [positioning, renderedSide, alignItemWithTriggerActive, setControlledAlignItemWithTrigger]); 17327 return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CompositeList, { 17328 elementsRef: store.context.listRef, 17329 labelsRef: store.context.labelsRef, 17330 onMapChange, 17331 children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(SelectPositionerContext.Provider, { 17332 value: contextValue, 17333 children: [mounted && modal && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(InternalBackdrop, { 17334 inert: inertValue(!open2), 17335 cutout: triggerElement 17336 }), element] 17337 }) 17338 }); 17339 }); 17340 if (true) SelectPositioner.displayName = "SelectPositioner"; 17341 17342 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/popup/SelectPopup.mjs 17343 var React143 = __toESM(require_react(), 1); 17344 17345 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/positioner/SelectPositionerCssVars.mjs 17346 var transformOrigin2 = "--transform-origin"; 17347 17348 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/popup/SelectPopup.mjs 17349 var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1); 17350 var stateAttributesMapping4 = { 17351 ...popupStateMapping, 17352 ...transitionStatusMapping 17353 }; 17354 var SelectPopup = /* @__PURE__ */ React143.forwardRef(function SelectPopup2(componentProps, forwardedRef) { 17355 const { 17356 render, 17357 className, 17358 style, 17359 finalFocus, 17360 ...elementProps 17361 } = componentProps; 17362 const store = useSelectRootContext(); 17363 const multiple = store.useState("multiple"); 17364 const readOnly = store.useState("readOnly"); 17365 const highlightItemOnHover = store.useState("highlightItemOnHover"); 17366 const floatingRootContext = useSelectFloatingContext(); 17367 const { 17368 side, 17369 align, 17370 alignItemWithTriggerActive, 17371 isPositioned, 17372 setControlledAlignItemWithTrigger 17373 } = useSelectPositionerContext(); 17374 const insideToolbar = useToolbarRootContext(true) != null; 17375 const direction = useDirection(); 17376 const { 17377 nonce, 17378 disableStyleElements 17379 } = useCSPContext(); 17380 const id = store.useState("id"); 17381 const open2 = store.useState("open"); 17382 const openMethod = store.useState("openMethod"); 17383 const mounted = store.useState("mounted"); 17384 const popupProps = store.useState("popupProps"); 17385 const transitionStatus = store.useState("transitionStatus"); 17386 const triggerElement = store.useState("triggerElement"); 17387 const positionerElement = store.useState("positionerElement"); 17388 const listElement = store.useState("listElement"); 17389 const reachedMaxHeightRef = React143.useRef(false); 17390 const initialPlacedRef = React143.useRef(false); 17391 const originalPositionerStylesRef = React143.useRef({}); 17392 const scrollArrowFrame = useAnimationFrame(); 17393 const handleScroll = useStableCallback((scroller) => { 17394 if (!positionerElement || !store.context.popupRef.current || !initialPlacedRef.current) { 17395 return; 17396 } 17397 const isTopPositioned = positionerElement.style.top === "0px"; 17398 const isBottomPositioned = positionerElement.style.bottom === "0px"; 17399 if (reachedMaxHeightRef.current || !alignItemWithTriggerActive || !isTopPositioned && !isBottomPositioned) { 17400 store.context.handleScrollArrowVisibility(scroller); 17401 return; 17402 } 17403 const scale = getScale2(positionerElement); 17404 const currentHeight = normalizeSize(positionerElement.getBoundingClientRect().height, "y", scale); 17405 const doc = ownerDocument(positionerElement); 17406 const win = getWindow(positionerElement); 17407 const positionerStyles = win.getComputedStyle(positionerElement); 17408 const marginTop = parseFloat(positionerStyles.marginTop); 17409 const marginBottom = parseFloat(positionerStyles.marginBottom); 17410 const maxPopupHeight = getMaxPopupHeight(win.getComputedStyle(store.context.popupRef.current)); 17411 const maxAvailableHeight = Math.min(doc.documentElement.clientHeight - marginTop - marginBottom, maxPopupHeight); 17412 const scrollTop = scroller.scrollTop; 17413 const maxScrollTop = getMaxScrollTop(scroller); 17414 let nextScrollTop = null; 17415 const setHeight = (height) => { 17416 positionerElement.style.height = `$height}px`; 17417 }; 17418 const diff = isTopPositioned ? maxScrollTop - scrollTop : scrollTop; 17419 const nextHeight = Math.min(currentHeight + diff, maxAvailableHeight); 17420 if (diff <= SCROLL_EDGE_TOLERANCE_PX) { 17421 const heightDelta = clamp2(diff, 0, maxAvailableHeight - currentHeight); 17422 if (heightDelta > 0) { 17423 setHeight(currentHeight + heightDelta); 17424 } 17425 scroller.scrollTop = isTopPositioned ? maxScrollTop : 0; 17426 if (maxAvailableHeight - (currentHeight + heightDelta) <= SCROLL_EDGE_TOLERANCE_PX) { 17427 reachedMaxHeightRef.current = true; 17428 } 17429 store.context.handleScrollArrowVisibility(scroller); 17430 return; 17431 } 17432 if (maxAvailableHeight - nextHeight > SCROLL_EDGE_TOLERANCE_PX) { 17433 nextScrollTop = isTopPositioned ? Infinity : 0; 17434 } else if (isBottomPositioned && scrollTop < maxScrollTop) { 17435 const overshoot = currentHeight + diff - maxAvailableHeight; 17436 nextScrollTop = scrollTop - (diff - overshoot); 17437 } 17438 const nextPositionerHeight = Math.ceil(nextHeight); 17439 if (nextPositionerHeight !== 0) { 17440 setHeight(nextPositionerHeight); 17441 } 17442 if (nextScrollTop != null) { 17443 const target = clamp2(nextScrollTop, 0, getMaxScrollTop(scroller)); 17444 if (Math.abs(scroller.scrollTop - target) > SCROLL_EDGE_TOLERANCE_PX) { 17445 scroller.scrollTop = target; 17446 } 17447 } 17448 if (nextPositionerHeight >= maxAvailableHeight - SCROLL_EDGE_TOLERANCE_PX) { 17449 reachedMaxHeightRef.current = true; 17450 } 17451 store.context.handleScrollArrowVisibility(scroller); 17452 }); 17453 React143.useImperativeHandle(store.context.scrollHandlerRef, () => handleScroll, [handleScroll]); 17454 useOpenChangeComplete({ 17455 open: open2, 17456 ref: store.context.popupRef, 17457 onComplete() { 17458 if (open2) { 17459 store.context.onOpenChangeComplete(true); 17460 } 17461 } 17462 }); 17463 const state = { 17464 open: open2, 17465 transitionStatus, 17466 side, 17467 align 17468 }; 17469 useIsoLayoutEffect(() => { 17470 if (!positionerElement || !store.context.popupRef.current || Object.keys(originalPositionerStylesRef.current).length) { 17471 return; 17472 } 17473 originalPositionerStylesRef.current = { 17474 top: positionerElement.style.top || "0", 17475 left: positionerElement.style.left || "0", 17476 right: positionerElement.style.right, 17477 height: positionerElement.style.height, 17478 bottom: positionerElement.style.bottom, 17479 minHeight: positionerElement.style.minHeight, 17480 maxHeight: positionerElement.style.maxHeight, 17481 marginTop: positionerElement.style.marginTop, 17482 marginBottom: positionerElement.style.marginBottom 17483 }; 17484 }, [store, positionerElement]); 17485 useIsoLayoutEffect(() => { 17486 if (open2 || alignItemWithTriggerActive) { 17487 return; 17488 } 17489 initialPlacedRef.current = false; 17490 reachedMaxHeightRef.current = false; 17491 clearStyles(positionerElement, originalPositionerStylesRef.current); 17492 }, [open2, alignItemWithTriggerActive, positionerElement]); 17493 useIsoLayoutEffect(() => { 17494 const popupElement = store.context.popupRef.current; 17495 if (!open2 || !triggerElement || !positionerElement || !popupElement || alignItemWithTriggerActive && !isPositioned || store.state.transitionStatus === "ending") { 17496 return; 17497 } 17498 initialPlacedRef.current = true; 17499 popupElement.style.removeProperty(transformOrigin2); 17500 if (!alignItemWithTriggerActive) { 17501 scrollArrowFrame.request(() => store.context.handleScrollArrowVisibility(listElement || popupElement)); 17502 return; 17503 } 17504 const restoreTransformStyles = unsetTransformStyles(popupElement); 17505 try { 17506 let textElement = store.context.selectedItemTextRef.current; 17507 if (!textElement?.isConnected) { 17508 const hasSelectedValue = store.select("hasSelectedValue"); 17509 textElement = !hasSelectedValue && store.context.firstItemTextRef.current?.isConnected ? store.context.firstItemTextRef.current : null; 17510 } 17511 const valueElement = store.context.valueRef.current; 17512 const win = getWindow(positionerElement); 17513 const positionerStyles = win.getComputedStyle(positionerElement); 17514 const popupStyles = win.getComputedStyle(popupElement); 17515 const doc = ownerDocument(triggerElement); 17516 const scale = getScale2(triggerElement); 17517 const triggerRect = normalizeRect(triggerElement.getBoundingClientRect(), scale); 17518 const positionerRect = normalizeRect(positionerElement.getBoundingClientRect(), scale); 17519 const triggerHeight = triggerRect.height; 17520 const scroller = listElement || popupElement; 17521 const scrollHeight = scroller.scrollHeight; 17522 const borderBottom = parseFloat(popupStyles.borderBottomWidth); 17523 const marginTop = parseFloat(positionerStyles.marginTop) || 10; 17524 const marginBottom = parseFloat(positionerStyles.marginBottom) || 10; 17525 const minHeight = parseFloat(positionerStyles.minHeight) || 100; 17526 const maxPopupHeight = getMaxPopupHeight(popupStyles); 17527 const paddingLeft = 5; 17528 const paddingRight = 5; 17529 const triggerCollisionThreshold = 20; 17530 const viewportHeight = doc.documentElement.clientHeight - marginTop - marginBottom; 17531 const viewportWidth = doc.documentElement.clientWidth; 17532 const availableSpaceBeneathTrigger = viewportHeight - triggerRect.bottom + triggerHeight; 17533 let textRect; 17534 let alignedLeft = direction === "rtl" ? triggerRect.right - positionerRect.width : triggerRect.left; 17535 let offsetY = 0; 17536 if (textElement && valueElement) { 17537 const valueRect = normalizeRect(valueElement.getBoundingClientRect(), scale); 17538 textRect = normalizeRect(textElement.getBoundingClientRect(), scale); 17539 alignedLeft = positionerRect.left + (direction === "rtl" ? valueRect.right - textRect.right : valueRect.left - textRect.left); 17540 const valueCenterFromTriggerTop = valueRect.top - triggerRect.top + valueRect.height / 2; 17541 const textCenterFromPositionerTop = textRect.top - positionerRect.top + textRect.height / 2; 17542 offsetY = textCenterFromPositionerTop - valueCenterFromTriggerTop; 17543 } 17544 const idealHeight = availableSpaceBeneathTrigger + offsetY + marginBottom + borderBottom; 17545 let height = Math.min(viewportHeight, idealHeight); 17546 const maxHeight = viewportHeight - marginTop - marginBottom; 17547 const scrollTop = idealHeight - height; 17548 const maxRight = viewportWidth - paddingRight; 17549 positionerElement.style.left = `$clamp2(alignedLeft, paddingLeft, maxRight - positionerRect.width)}px`; 17550 positionerElement.style.height = `$height}px`; 17551 positionerElement.style.maxHeight = "none"; 17552 positionerElement.style.marginTop = `$marginTop}px`; 17553 positionerElement.style.marginBottom = `$marginBottom}px`; 17554 popupElement.style.height = "100%"; 17555 const maxScrollTop = getMaxScrollTop(scroller); 17556 const isTopPositioned = scrollTop >= maxScrollTop - SCROLL_EDGE_TOLERANCE_PX; 17557 if (isTopPositioned) { 17558 height = Math.min(viewportHeight, positionerRect.height) - (scrollTop - maxScrollTop); 17559 } 17560 const fallbackToAlignPopupToTrigger = triggerRect.top < triggerCollisionThreshold || triggerRect.bottom > viewportHeight - triggerCollisionThreshold || Math.ceil(height) + SCROLL_EDGE_TOLERANCE_PX < Math.min(scrollHeight, minHeight); 17561 const isPinchZoomed = (win.visualViewport?.scale ?? 1) !== 1 && parts_exports.engine.webkit; 17562 if (fallbackToAlignPopupToTrigger || isPinchZoomed) { 17563 clearStyles(positionerElement, originalPositionerStylesRef.current); 17564 setControlledAlignItemWithTrigger(false); 17565 return; 17566 } 17567 const initialHeight = Math.max(minHeight, height); 17568 if (isTopPositioned) { 17569 const topOffset = Math.max(0, viewportHeight - idealHeight); 17570 positionerElement.style.top = positionerRect.height >= maxHeight ? "0" : `$topOffset}px`; 17571 positionerElement.style.height = `$height}px`; 17572 scroller.scrollTop = getMaxScrollTop(scroller); 17573 } else { 17574 positionerElement.style.bottom = "0"; 17575 scroller.scrollTop = scrollTop; 17576 } 17577 if (textRect) { 17578 const popupTop = positionerRect.top; 17579 const popupHeight2 = positionerRect.height; 17580 const textCenterY = textRect.top + textRect.height / 2; 17581 const clampedY = clamp2(popupHeight2 > 0 ? (textCenterY - popupTop) / popupHeight2 * 100 : 50, 0, 100); 17582 popupElement.style.setProperty(transformOrigin2, `50% $clampedY}%`); 17583 } 17584 if (initialHeight === viewportHeight || height >= maxPopupHeight) { 17585 reachedMaxHeightRef.current = true; 17586 } 17587 store.context.handleScrollArrowVisibility(scroller); 17588 if (highlightItemOnHover && store.state.selectedIndex === null && store.state.activeIndex === null && store.context.listRef.current[0] != null) { 17589 store.set("activeIndex", 0); 17590 } 17591 } finally { 17592 restoreTransformStyles(); 17593 } 17594 }, [store, open2, positionerElement, triggerElement, alignItemWithTriggerActive, setControlledAlignItemWithTrigger, scrollArrowFrame, listElement, highlightItemOnHover, direction, isPositioned]); 17595 React143.useEffect(() => { 17596 if (!alignItemWithTriggerActive || !positionerElement || !open2) { 17597 return void 0; 17598 } 17599 const win = getWindow(positionerElement); 17600 function handleResize(event) { 17601 store.context.setOpen(false, createChangeEventDetails(reason_parts_exports.windowResize, event)); 17602 } 17603 return addEventListener(win, "resize", handleResize); 17604 }, [store, alignItemWithTriggerActive, positionerElement, open2]); 17605 const defaultProps = { 17606 ...listElement ? { 17607 role: "presentation" 17608 } : { 17609 role: "listbox", 17610 "aria-multiselectable": multiple || void 0, 17611 "aria-readonly": readOnly || void 0, 17612 id: `$id}-list` 17613 }, 17614 onKeyDown(event) { 17615 if (insideToolbar && COMPOSITE_KEYS.has(event.key)) { 17616 event.stopPropagation(); 17617 } 17618 }, 17619 onScroll(event) { 17620 if (listElement) { 17621 return; 17622 } 17623 handleScroll(event.currentTarget); 17624 }, 17625 ...alignItemWithTriggerActive && { 17626 style: listElement ? { 17627 height: "100%" 17628 } : LIST_FUNCTIONAL_STYLES 17629 }, 17630 className: !listElement && alignItemWithTriggerActive ? styleDisableScrollbar.className : void 0 17631 }; 17632 const element = useRenderElement("div", componentProps, { 17633 ref: [forwardedRef, store.context.popupRef], 17634 state, 17635 stateAttributesMapping: stateAttributesMapping4, 17636 props: [popupProps, defaultProps, getDisabledMountTransitionStyles(transitionStatus), elementProps] 17637 }); 17638 return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(React143.Fragment, { 17639 children: [!disableStyleElements && styleDisableScrollbar.getElement(nonce), /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FloatingFocusManager, { 17640 context: floatingRootContext, 17641 modal: false, 17642 disabled: !mounted, 17643 openInteractionType: openMethod, 17644 returnFocus: finalFocus, 17645 restoreFocus: true, 17646 children: element 17647 })] 17648 }); 17649 }); 17650 if (true) SelectPopup.displayName = "SelectPopup"; 17651 function getMaxPopupHeight(popupStyles) { 17652 const maxHeightStyle = popupStyles.maxHeight; 17653 return maxHeightStyle.endsWith("px") ? parseFloat(maxHeightStyle) || Infinity : Infinity; 17654 } 17655 function getMaxScrollTop(scroller) { 17656 return getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight); 17657 } 17658 function getScale2(element) { 17659 return platform2.getScale(element); 17660 } 17661 function normalizeSize(size4, axis, scale) { 17662 return size4 / scale[axis]; 17663 } 17664 function normalizeRect(rect, scale) { 17665 return rectToClientRect({ 17666 x: normalizeSize(rect.x, "x", scale), 17667 y: normalizeSize(rect.y, "y", scale), 17668 width: normalizeSize(rect.width, "x", scale), 17669 height: normalizeSize(rect.height, "y", scale) 17670 }); 17671 } 17672 var TRANSFORM_STYLE_RESETS = [["transform", "none"], ["scale", "1"], ["translate", "0 0"]]; 17673 function unsetTransformStyles(popupElement) { 17674 const { 17675 style 17676 } = popupElement; 17677 const originalStyles = {}; 17678 for (const [property, value] of TRANSFORM_STYLE_RESETS) { 17679 originalStyles[property] = style.getPropertyValue(property); 17680 style.setProperty(property, value, "important"); 17681 } 17682 return () => { 17683 for (const [property] of TRANSFORM_STYLE_RESETS) { 17684 const originalValue = originalStyles[property]; 17685 if (originalValue) { 17686 style.setProperty(property, originalValue); 17687 } else { 17688 style.removeProperty(property); 17689 } 17690 } 17691 }; 17692 } 17693 17694 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/list/SelectList.mjs 17695 var React144 = __toESM(require_react(), 1); 17696 var SelectList = /* @__PURE__ */ React144.forwardRef(function SelectList2(componentProps, forwardedRef) { 17697 const { 17698 render, 17699 className, 17700 style, 17701 ...elementProps 17702 } = componentProps; 17703 const store = useSelectRootContext(); 17704 const multiple = store.useState("multiple"); 17705 const readOnly = store.useState("readOnly"); 17706 const { 17707 alignItemWithTriggerActive 17708 } = useSelectPositionerContext(); 17709 const hasScrollArrows = store.useState("hasScrollArrows"); 17710 const openMethod = store.useState("openMethod"); 17711 const id = store.useState("id"); 17712 const defaultProps = { 17713 id: `$id}-list`, 17714 role: "listbox", 17715 "aria-multiselectable": multiple || void 0, 17716 "aria-readonly": readOnly || void 0, 17717 onScroll(event) { 17718 store.context.scrollHandlerRef.current?.(event.currentTarget); 17719 }, 17720 ...alignItemWithTriggerActive && { 17721 style: LIST_FUNCTIONAL_STYLES 17722 }, 17723 className: hasScrollArrows && openMethod !== "touch" ? styleDisableScrollbar.className : void 0 17724 }; 17725 const setListElement = store.useStateSetter("listElement"); 17726 return useRenderElement("div", componentProps, { 17727 ref: [forwardedRef, setListElement], 17728 props: [defaultProps, elementProps] 17729 }); 17730 }); 17731 if (true) SelectList.displayName = "SelectList"; 17732 17733 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/item/SelectItem.mjs 17734 var React146 = __toESM(require_react(), 1); 17735 17736 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/item/SelectItemContext.mjs 17737 var React145 = __toESM(require_react(), 1); 17738 var SelectItemContext = /* @__PURE__ */ React145.createContext(void 0); 17739 if (true) SelectItemContext.displayName = "SelectItemContext"; 17740 function useSelectItemContext() { 17741 const context = React145.useContext(SelectItemContext); 17742 if (!context) { 17743 throw new Error(true ? "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>." : formatErrorMessage_default(57)); 17744 } 17745 return context; 17746 } 17747 17748 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/item/SelectItem.mjs 17749 var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1); 17750 var SelectItem = /* @__PURE__ */ React146.memo(/* @__PURE__ */ React146.forwardRef(function SelectItem2(componentProps, forwardedRef) { 17751 const { 17752 render, 17753 className, 17754 style, 17755 value: itemValue = null, 17756 label, 17757 disabled: disabledProp = false, 17758 nativeButton = false, 17759 ...elementProps 17760 } = componentProps; 17761 const textRef = React146.useRef(null); 17762 const listItem = useCompositeListItem({ 17763 guess: true, 17764 label, 17765 textRef 17766 }); 17767 const store = useSelectRootContext(); 17768 const { 17769 props: itemProps, 17770 multiple, 17771 disabled: selectDisabled, 17772 readOnly, 17773 isItemEqualToValue 17774 } = store.useState("itemRoot"); 17775 const disabled2 = selectDisabled || disabledProp; 17776 const highlighted = store.useState("isActive", listItem.index); 17777 const open2 = store.useState("open"); 17778 const selected = store.useState("isSelected", itemValue); 17779 const selectedByFocus = store.useState("isSelectedByFocus", listItem.index); 17780 const index2 = listItem.index; 17781 const itemRef = React146.useRef(null); 17782 useIsoLayoutEffect(() => { 17783 const values = store.context.valuesRef.current; 17784 values[index2] = itemValue; 17785 return () => { 17786 delete values[index2]; 17787 }; 17788 }, [index2, itemValue, store]); 17789 useIsoLayoutEffect(() => { 17790 const selectedValue = store.state.value; 17791 const currentIndex = store.state.selectedIndex; 17792 let nextIndex = currentIndex; 17793 let claims; 17794 if (multiple && Array.isArray(selectedValue)) { 17795 nextIndex = resolveSelectedIndex(index2, itemValue, store.context.valuesRef.current, selectedValue, isItemEqualToValue, currentIndex); 17796 claims = nextIndex === index2; 17797 if (index2 === currentIndex && !claims) { 17798 store.context.selectedItemTextRef.current = null; 17799 } 17800 } else { 17801 claims = selectedValue !== void 0 && compareItemEquality(itemValue, selectedValue, isItemEqualToValue); 17802 if (claims) { 17803 nextIndex = index2; 17804 } 17805 } 17806 store.set("selectedIndex", nextIndex); 17807 if (claims && textRef.current) { 17808 store.context.selectedItemTextRef.current = textRef.current; 17809 } 17810 }, [index2, multiple, isItemEqualToValue, store, itemValue]); 17811 const pointerTypeRef = React146.useRef("mouse"); 17812 const allowMouseSelectionRef = React146.useRef(false); 17813 const { 17814 getButtonProps, 17815 buttonRef 17816 } = useButton({ 17817 disabled: disabled2, 17818 focusableWhenDisabled: true, 17819 native: nativeButton, 17820 composite: true 17821 }); 17822 const state = { 17823 disabled: disabled2, 17824 selected, 17825 highlighted 17826 }; 17827 function commitSelection(event) { 17828 if (selectDisabled || readOnly) { 17829 return; 17830 } 17831 const selectedValue = store.state.value; 17832 if (multiple) { 17833 const currentValue = Array.isArray(selectedValue) ? selectedValue : []; 17834 const nextValue = selected ? removeItem(currentValue, itemValue, isItemEqualToValue) : [...currentValue, itemValue]; 17835 store.context.setValue(nextValue, createChangeEventDetails(reason_parts_exports.itemPress, event)); 17836 } else { 17837 store.context.setValue(itemValue, createChangeEventDetails(reason_parts_exports.itemPress, event)); 17838 store.context.setOpen(false, createChangeEventDetails(reason_parts_exports.itemPress, event)); 17839 } 17840 } 17841 function resetDragMovement() { 17842 store.context.selectionRef.current.dragY = 0; 17843 } 17844 const defaultProps = { 17845 role: "option", 17846 "aria-selected": selected, 17847 tabIndex: open2 && highlighted ? 0 : -1, 17848 onKeyDown(event) { 17849 store.set("activeIndex", index2); 17850 if (event.key === " " && store.context.typingRef.current) { 17851 event.preventDefault(); 17852 } 17853 }, 17854 onClick(event) { 17855 const isMouseClick = pointerTypeRef.current !== "touch"; 17856 const clickPointerType = event.nativeEvent.pointerType; 17857 const isVirtualMouseClick = isMouseClick && isVirtualClick(event.nativeEvent) && // Generic no-pointer `detail === 0` clicks stay tied to highlight state. Virtual 17858 // clicks that carry browser pointer data, including an empty string from assistive 17859 // technology, can activate unhighlighted items. 17860 (clickPointerType !== void 0 || highlighted); 17861 const isInvalidMouseClick = isMouseClick && !isVirtualMouseClick && !allowMouseSelectionRef.current; 17862 allowMouseSelectionRef.current = false; 17863 if (disabled2 || isInvalidMouseClick) { 17864 return; 17865 } 17866 commitSelection(event.nativeEvent); 17867 }, 17868 onPointerEnter(event) { 17869 pointerTypeRef.current = event.pointerType; 17870 }, 17871 onPointerMove(event) { 17872 if (event.pointerType === "mouse" && event.buttons === 1) { 17873 const selection = store.context.selectionRef.current; 17874 selection.dragY += event.movementY; 17875 if (selection.dragY ** 2 >= 64) { 17876 selection.allowUnselectedMouseUp = true; 17877 } 17878 } 17879 }, 17880 onPointerDown(event) { 17881 pointerTypeRef.current = event.pointerType; 17882 allowMouseSelectionRef.current = true; 17883 resetDragMovement(); 17884 }, 17885 onMouseUp() { 17886 resetDragMovement(); 17887 if (disabled2 || pointerTypeRef.current === "touch") { 17888 return; 17889 } 17890 if (allowMouseSelectionRef.current) { 17891 return; 17892 } 17893 const disallowSelectedMouseUp = !store.context.selectionRef.current.allowSelectedMouseUp && selected; 17894 const disallowUnselectedMouseUp = !store.context.selectionRef.current.allowUnselectedMouseUp && !selected; 17895 if (disallowSelectedMouseUp || disallowUnselectedMouseUp) { 17896 return; 17897 } 17898 allowMouseSelectionRef.current = true; 17899 itemRef.current?.click(); 17900 allowMouseSelectionRef.current = false; 17901 } 17902 }; 17903 const element = useRenderElement("div", componentProps, { 17904 ref: [buttonRef, forwardedRef, listItem.ref, itemRef], 17905 state, 17906 props: [itemProps, defaultProps, elementProps, getButtonProps] 17907 }); 17908 const contextValue = React146.useMemo(() => ({ 17909 selected, 17910 index: index2, 17911 textRef, 17912 selectedByFocus 17913 }), [selected, index2, textRef, selectedByFocus]); 17914 return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectItemContext.Provider, { 17915 value: contextValue, 17916 children: element 17917 }); 17918 })); 17919 if (true) SelectItem.displayName = "SelectItem"; 17920 17921 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/item-indicator/SelectItemIndicator.mjs 17922 var React147 = __toESM(require_react(), 1); 17923 var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1); 17924 var SelectItemIndicator = /* @__PURE__ */ React147.forwardRef(function SelectItemIndicator2(componentProps, forwardedRef) { 17925 const { 17926 selected 17927 } = useSelectItemContext(); 17928 const shouldRender = componentProps.keepMounted || selected; 17929 if (!shouldRender) { 17930 return null; 17931 } 17932 return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ItemIndicator, { 17933 ...componentProps, 17934 selected, 17935 ref: forwardedRef 17936 }); 17937 }); 17938 if (true) SelectItemIndicator.displayName = "SelectItemIndicator"; 17939 17940 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/item-text/SelectItemText.mjs 17941 var React148 = __toESM(require_react(), 1); 17942 var SelectItemText = /* @__PURE__ */ React148.memo(/* @__PURE__ */ React148.forwardRef(function SelectItemText2(componentProps, forwardedRef) { 17943 const { 17944 index: index2, 17945 textRef, 17946 selectedByFocus 17947 } = useSelectItemContext(); 17948 const store = useSelectRootContext(); 17949 const { 17950 render, 17951 className, 17952 style, 17953 ...elementProps 17954 } = componentProps; 17955 const localRef = React148.useCallback((node) => { 17956 if (!node) { 17957 return; 17958 } 17959 if (index2 === 0) { 17960 store.context.firstItemTextRef.current = node; 17961 } 17962 if (selectedByFocus) { 17963 store.context.selectedItemTextRef.current = node; 17964 } 17965 }, [store, index2, selectedByFocus]); 17966 const element = useRenderElement("div", componentProps, { 17967 ref: [localRef, forwardedRef, textRef], 17968 props: elementProps 17969 }); 17970 return element; 17971 })); 17972 if (true) SelectItemText.displayName = "SelectItemText"; 17973 17974 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/arrow/SelectArrow.mjs 17975 var React149 = __toESM(require_react(), 1); 17976 var SelectArrow = /* @__PURE__ */ React149.forwardRef(function SelectArrow2(componentProps, forwardedRef) { 17977 const { 17978 render, 17979 className, 17980 style, 17981 ...elementProps 17982 } = componentProps; 17983 const store = useSelectRootContext(); 17984 const { 17985 side, 17986 align, 17987 arrowRef, 17988 arrowStyles, 17989 arrowUncentered, 17990 alignItemWithTriggerActive 17991 } = useSelectPositionerContext(); 17992 const open2 = store.useState("open"); 17993 const state = { 17994 open: open2, 17995 side, 17996 align, 17997 uncentered: arrowUncentered 17998 }; 17999 const element = useRenderElement("div", componentProps, { 18000 state, 18001 ref: [arrowRef, forwardedRef], 18002 props: [{ 18003 style: arrowStyles, 18004 "aria-hidden": true 18005 }, elementProps], 18006 stateAttributesMapping: popupTransitionStateMapping 18007 }); 18008 if (alignItemWithTriggerActive) { 18009 return null; 18010 } 18011 return element; 18012 }); 18013 if (true) SelectArrow.displayName = "SelectArrow"; 18014 18015 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/scroll-down-arrow/SelectScrollDownArrow.mjs 18016 var React151 = __toESM(require_react(), 1); 18017 18018 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/scroll-arrow/SelectScrollArrow.mjs 18019 var React150 = __toESM(require_react(), 1); 18020 var SelectScrollArrow = /* @__PURE__ */ React150.forwardRef(function SelectScrollArrow2(componentProps, forwardedRef) { 18021 const { 18022 render, 18023 className, 18024 style, 18025 direction, 18026 keepMounted, 18027 ...elementProps 18028 } = componentProps; 18029 const isUp = direction === "up"; 18030 const store = useSelectRootContext(); 18031 const { 18032 side, 18033 scrollDownArrowRef, 18034 scrollUpArrowRef 18035 } = useSelectPositionerContext(); 18036 const visibleSelector = isUp ? "scrollUpArrowVisible" : "scrollDownArrowVisible"; 18037 const stateVisible = store.useState(visibleSelector); 18038 const openMethod = store.useState("openMethod"); 18039 const visible = stateVisible && openMethod !== "touch"; 18040 const timeout = useTimeout(); 18041 const scrollArrowRef = isUp ? scrollUpArrowRef : scrollDownArrowRef; 18042 const { 18043 mounted, 18044 transitionStatus, 18045 setMounted 18046 } = useTransitionStatus(visible); 18047 useIsoLayoutEffect(() => { 18048 store.context.scrollArrowsMountedCountRef.current += 1; 18049 store.set("hasScrollArrows", true); 18050 return () => { 18051 store.context.scrollArrowsMountedCountRef.current = Math.max(0, store.context.scrollArrowsMountedCountRef.current - 1); 18052 if (store.context.scrollArrowsMountedCountRef.current === 0) { 18053 store.set("hasScrollArrows", false); 18054 } 18055 }; 18056 }, [store]); 18057 useOpenChangeComplete({ 18058 open: visible, 18059 ref: scrollArrowRef, 18060 onComplete() { 18061 if (!visible) { 18062 setMounted(false); 18063 } 18064 } 18065 }); 18066 const state = { 18067 direction, 18068 visible, 18069 side, 18070 transitionStatus 18071 }; 18072 const defaultProps = { 18073 "aria-hidden": true, 18074 children: isUp ? "\u25B2" : "\u25BC", 18075 style: { 18076 position: "absolute" 18077 }, 18078 onMouseMove(event) { 18079 if (event.movementX === 0 && event.movementY === 0 || timeout.isStarted()) { 18080 return; 18081 } 18082 store.set("activeIndex", null); 18083 function scrollNextItem() { 18084 const scroller = store.state.listElement ?? store.context.popupRef.current; 18085 if (!scroller) { 18086 return; 18087 } 18088 store.set("activeIndex", null); 18089 store.context.handleScrollArrowVisibility(scroller); 18090 const maxScrollTop = getMaxScrollOffset(scroller.scrollHeight, scroller.clientHeight); 18091 const scrollTop = normalizeScrollOffset(scroller.scrollTop, maxScrollTop); 18092 const isScrolledToEdge = scrollTop === (isUp ? 0 : maxScrollTop); 18093 const items = store.context.listRef.current; 18094 if (scrollTop !== scroller.scrollTop) { 18095 scroller.scrollTop = scrollTop; 18096 } 18097 if (isScrolledToEdge) { 18098 timeout.clear(); 18099 return; 18100 } 18101 if (items.length > 0) { 18102 const scrollArrowHeight = scrollArrowRef.current?.offsetHeight || 0; 18103 scroller.scrollTop = getTargetScrollTop(items, isUp, scrollTop, scroller.clientHeight, scrollArrowHeight, maxScrollTop); 18104 } 18105 timeout.start(40, scrollNextItem); 18106 } 18107 timeout.start(40, scrollNextItem); 18108 }, 18109 onMouseLeave() { 18110 timeout.clear(); 18111 } 18112 }; 18113 const element = useRenderElement("div", componentProps, { 18114 ref: [forwardedRef, scrollArrowRef], 18115 state, 18116 props: [defaultProps, elementProps], 18117 stateAttributesMapping: transitionStatusMapping 18118 }); 18119 const shouldRender = mounted || keepMounted; 18120 if (!shouldRender) { 18121 return null; 18122 } 18123 return element; 18124 }); 18125 if (true) SelectScrollArrow.displayName = "SelectScrollArrow"; 18126 function getTargetScrollTop(items, isUp, scrollTop, clientHeight, scrollArrowHeight, maxScrollTop) { 18127 if (isUp) { 18128 let firstVisibleIndex = 0; 18129 const visibleTop = scrollTop + scrollArrowHeight - SCROLL_EDGE_TOLERANCE_PX; 18130 for (let i = 0; i < items.length; i += 1) { 18131 const item = items[i]; 18132 if (item && item.offsetTop >= visibleTop) { 18133 firstVisibleIndex = i; 18134 break; 18135 } 18136 } 18137 const targetIndex2 = Math.max(0, firstVisibleIndex - 1); 18138 const targetItem2 = items[targetIndex2]; 18139 return targetIndex2 < firstVisibleIndex && targetItem2 ? normalizeScrollOffset(targetItem2.offsetTop - scrollArrowHeight, maxScrollTop) : 0; 18140 } 18141 let lastVisibleIndex = items.length - 1; 18142 const visibleBottom = scrollTop + clientHeight - scrollArrowHeight + SCROLL_EDGE_TOLERANCE_PX; 18143 for (let i = 0; i < items.length; i += 1) { 18144 const item = items[i]; 18145 if (item && item.offsetTop + item.offsetHeight > visibleBottom) { 18146 lastVisibleIndex = Math.max(0, i - 1); 18147 break; 18148 } 18149 } 18150 const targetIndex = Math.min(items.length - 1, lastVisibleIndex + 1); 18151 const targetItem = items[targetIndex]; 18152 return targetIndex > lastVisibleIndex && targetItem ? normalizeScrollOffset(targetItem.offsetTop + targetItem.offsetHeight - clientHeight + scrollArrowHeight, maxScrollTop) : maxScrollTop; 18153 } 18154 18155 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/scroll-down-arrow/SelectScrollDownArrow.mjs 18156 var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1); 18157 var SelectScrollDownArrow = /* @__PURE__ */ React151.forwardRef(function SelectScrollDownArrow2(props, forwardedRef) { 18158 return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectScrollArrow, { 18159 ...props, 18160 ref: forwardedRef, 18161 direction: "down" 18162 }); 18163 }); 18164 if (true) SelectScrollDownArrow.displayName = "SelectScrollDownArrow"; 18165 18166 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/scroll-up-arrow/SelectScrollUpArrow.mjs 18167 var React152 = __toESM(require_react(), 1); 18168 var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1); 18169 var SelectScrollUpArrow = /* @__PURE__ */ React152.forwardRef(function SelectScrollUpArrow2(props, forwardedRef) { 18170 return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectScrollArrow, { 18171 ...props, 18172 ref: forwardedRef, 18173 direction: "up" 18174 }); 18175 }); 18176 if (true) SelectScrollUpArrow.displayName = "SelectScrollUpArrow"; 18177 18178 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/group/SelectGroup.mjs 18179 var React154 = __toESM(require_react(), 1); 18180 18181 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/group/SelectGroupContext.mjs 18182 var React153 = __toESM(require_react(), 1); 18183 var SelectGroupContext = /* @__PURE__ */ React153.createContext(void 0); 18184 if (true) SelectGroupContext.displayName = "SelectGroupContext"; 18185 function useSelectGroupContext() { 18186 const context = React153.useContext(SelectGroupContext); 18187 if (context === void 0) { 18188 throw new Error(true ? "Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>." : formatErrorMessage_default(56)); 18189 } 18190 return context; 18191 } 18192 18193 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/group/SelectGroup.mjs 18194 var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1); 18195 var SelectGroup = /* @__PURE__ */ React154.forwardRef(function SelectGroup2(componentProps, forwardedRef) { 18196 const { 18197 render, 18198 className, 18199 style, 18200 ...elementProps 18201 } = componentProps; 18202 const [labelId, setLabelId] = React154.useState(); 18203 const contextValue = React154.useMemo(() => ({ 18204 labelId, 18205 setLabelId 18206 }), [labelId, setLabelId]); 18207 const element = useRenderElement("div", componentProps, { 18208 ref: forwardedRef, 18209 props: [{ 18210 role: "group", 18211 "aria-labelledby": labelId 18212 }, elementProps] 18213 }); 18214 return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectGroupContext.Provider, { 18215 value: contextValue, 18216 children: element 18217 }); 18218 }); 18219 if (true) SelectGroup.displayName = "SelectGroup"; 18220 18221 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/group-label/SelectGroupLabel.mjs 18222 var React155 = __toESM(require_react(), 1); 18223 var SelectGroupLabel = /* @__PURE__ */ React155.forwardRef(function SelectGroupLabel2(componentProps, forwardedRef) { 18224 const { 18225 render, 18226 className, 18227 style, 18228 id: idProp, 18229 ...elementProps 18230 } = componentProps; 18231 const { 18232 setLabelId 18233 } = useSelectGroupContext(); 18234 const id = useBaseUiId(idProp); 18235 useIsoLayoutEffect(() => { 18236 setLabelId(id); 18237 return () => { 18238 setLabelId((currentId) => currentId === id ? void 0 : currentId); 18239 }; 18240 }, [id, setLabelId]); 18241 const element = useRenderElement("div", componentProps, { 18242 ref: forwardedRef, 18243 props: [{ 18244 id, 18245 "aria-hidden": true 18246 }, elementProps] 18247 }); 18248 return element; 18249 }); 18250 if (true) SelectGroupLabel.displayName = "SelectGroupLabel"; 18251 18252 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/select/separator/SelectSeparator.mjs 18253 var SelectSeparator = ListboxSeparator; 18254 18255 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/index.parts.mjs 18256 var index_parts_exports4 = {}; 18257 __export(index_parts_exports4, { 18258 Arrow: () => TooltipArrow, 18259 Handle: () => TooltipHandle, 18260 Popup: () => TooltipPopup, 18261 Portal: () => TooltipPortal, 18262 Positioner: () => TooltipPositioner, 18263 Provider: () => TooltipProvider, 18264 Root: () => TooltipRoot, 18265 Trigger: () => TooltipTrigger, 18266 Viewport: () => TooltipViewport, 18267 createHandle: () => createTooltipHandle 18268 }); 18269 18270 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs 18271 var React158 = __toESM(require_react(), 1); 18272 18273 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs 18274 var React156 = __toESM(require_react(), 1); 18275 var TooltipRootContext = /* @__PURE__ */ React156.createContext(void 0); 18276 if (true) TooltipRootContext.displayName = "TooltipRootContext"; 18277 function useTooltipRootContext(optional) { 18278 const context = React156.useContext(TooltipRootContext); 18279 if (context === void 0 && !optional) { 18280 throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72)); 18281 } 18282 return context; 18283 } 18284 18285 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs 18286 var React157 = __toESM(require_react(), 1); 18287 var selectors5 = { 18288 ...popupStoreSelectors, 18289 disabled: (state) => state.disabled, 18290 instantType: (state) => state.instantType, 18291 isInstantPhase: (state) => state.isInstantPhase, 18292 trackCursorAxis: (state) => state.trackCursorAxis, 18293 disableHoverablePopup: (state) => state.disableHoverablePopup, 18294 lastOpenChangeReason: (state) => state.openChangeReason, 18295 closeOnClick: (state) => state.closeOnClick, 18296 // Active and inactive trigger props are the same object, so a constant for triggers that discard 18297 // them keeps those triggers from re-rendering when the props change. 18298 appliedTriggerProps: (state, apply) => apply ? state.activeTriggerProps : void 0, 18299 closeDelay: (state) => state.closeDelay, 18300 adaptiveOrigin: (state) => state.adaptiveOrigin 18301 }; 18302 var TooltipStore = class extends ReactStore { 18303 constructor(initialState, floatingId, nested) { 18304 const triggerElements = new PopupTriggerMap(); 18305 super(createInitialState2(initialState, triggerElements, floatingId, nested), createInitialContext2(triggerElements), selectors5); 18306 } 18307 setOpen = (nextOpen, eventDetails) => { 18308 applyPopupOpenChange(this, nextOpen, eventDetails, { 18309 extraState: { 18310 openChangeReason: eventDetails.reason 18311 } 18312 }); 18313 }; 18314 // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change. 18315 cancelPendingOpen(event) { 18316 this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event)); 18317 } 18318 }; 18319 function createNullTooltipStore() { 18320 const triggerElements = new PopupTriggerMap(); 18321 const store = new NullStore(Object.freeze(createInitialState2(void 0, triggerElements)), Object.freeze(createInitialContext2(triggerElements)), selectors5); 18322 return Object.assign(store, { 18323 setOpen: NOOP, 18324 cancelPendingOpen: NOOP 18325 }); 18326 } 18327 function createInitialState2(initialState, triggerElements, floatingId, nested = false) { 18328 const state = { 18329 ...createInitialPopupStoreState(triggerElements, floatingId, nested), 18330 disabled: false, 18331 instantType: void 0, 18332 isInstantPhase: false, 18333 trackCursorAxis: "none", 18334 disableHoverablePopup: false, 18335 openChangeReason: null, 18336 closeOnClick: true, 18337 closeDelay: 0, 18338 adaptiveOrigin: void 0, 18339 ...initialState 18340 }; 18341 return state; 18342 } 18343 function createInitialContext2(triggerElements) { 18344 return { 18345 popupRef: /* @__PURE__ */ React157.createRef(), 18346 onOpenChange: void 0, 18347 onOpenChangeComplete: void 0, 18348 triggerElements 18349 }; 18350 } 18351 18352 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs 18353 var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1); 18354 var TooltipRoot = fastComponent(function TooltipRoot2(props) { 18355 const { 18356 disabled: disabled2 = false, 18357 defaultOpen = false, 18358 open: openProp, 18359 disableHoverablePopup = false, 18360 trackCursorAxis = "none", 18361 actionsRef, 18362 onOpenChange, 18363 onOpenChangeComplete, 18364 handle, 18365 triggerId: triggerIdProp, 18366 defaultTriggerId: defaultTriggerIdProp = null, 18367 children 18368 } = props; 18369 const store = usePopupRootStore((floatingId, nested) => new TooltipStore({ 18370 open: defaultOpen, 18371 openProp, 18372 activeTriggerId: defaultTriggerIdProp, 18373 triggerIdProp 18374 }, floatingId, nested)); 18375 store.useControlledProp("openProp", openProp); 18376 store.useControlledProp("triggerIdProp", triggerIdProp); 18377 store.useContextCallback("onOpenChange", onOpenChange); 18378 store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete); 18379 const openState = store.useState("open"); 18380 const open2 = !disabled2 && openState; 18381 const activeTriggerId = store.useState("activeTriggerId"); 18382 const mounted = store.useState("mounted"); 18383 const payload = store.useState("payload"); 18384 store.useSyncedValues({ 18385 trackCursorAxis, 18386 disableHoverablePopup, 18387 disabled: disabled2 18388 }); 18389 useImplicitActiveTrigger(store, { 18390 closeOnActiveTriggerUnmount: true 18391 }); 18392 const { 18393 forceUnmount, 18394 transitionStatus 18395 } = useOpenStateTransitions(open2, store); 18396 const isInstantPhase = store.useState("isInstantPhase"); 18397 const instantType = store.useState("instantType"); 18398 const lastOpenChangeReason = store.useState("lastOpenChangeReason"); 18399 const previousInstantTypeRef = React158.useRef(null); 18400 useIsoLayoutEffect(() => { 18401 if (openState && disabled2) { 18402 store.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled)); 18403 } 18404 }, [openState, disabled2, store]); 18405 useIsoLayoutEffect(() => { 18406 if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) { 18407 if (instantType !== "delay") { 18408 previousInstantTypeRef.current = instantType; 18409 } 18410 store.set("instantType", "delay"); 18411 } else if (previousInstantTypeRef.current !== null) { 18412 store.set("instantType", previousInstantTypeRef.current); 18413 previousInstantTypeRef.current = null; 18414 } 18415 }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store]); 18416 useIsoLayoutEffect(() => { 18417 if (open2) { 18418 if (activeTriggerId == null) { 18419 store.set("payload", void 0); 18420 } 18421 } 18422 }, [store, activeTriggerId, open2]); 18423 React158.useImperativeHandle(actionsRef, () => ({ 18424 unmount: forceUnmount, 18425 close: () => store.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction)) 18426 }), [forceUnmount, store]); 18427 const shouldRenderInteractions = open2 || mounted || !disabled2 && trackCursorAxis !== "none"; 18428 return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(TooltipRootContext.Provider, { 18429 value: store, 18430 children: [handle && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PopupHandleAttachment, { 18431 handle, 18432 store 18433 }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipInteractions, { 18434 store, 18435 disabled: disabled2, 18436 trackCursorAxis 18437 }), typeof children === "function" ? children({ 18438 payload 18439 }) : children] 18440 }); 18441 }); 18442 if (true) TooltipRoot.displayName = "TooltipRoot"; 18443 function TooltipInteractions({ 18444 store, 18445 disabled: disabled2, 18446 trackCursorAxis 18447 }) { 18448 const floatingRootContext = store.useState("floatingRootContext"); 18449 const dismiss = useDismiss(floatingRootContext, { 18450 enabled: !disabled2, 18451 referencePress: () => store.select("closeOnClick") 18452 }); 18453 const clientPoint = useClientPoint(floatingRootContext, { 18454 enabled: !disabled2 && trackCursorAxis !== "none", 18455 axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis 18456 }); 18457 const triggerProps = React158.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]); 18458 usePopupInteractionProps(store, { 18459 activeTriggerProps: triggerProps, 18460 inactiveTriggerProps: triggerProps, 18461 popupProps: dismiss.floating ?? EMPTY_OBJECT 18462 }); 18463 return null; 18464 } 18465 18466 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs 18467 var React160 = __toESM(require_react(), 1); 18468 18469 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs 18470 var React159 = __toESM(require_react(), 1); 18471 var TooltipProviderContext = /* @__PURE__ */ React159.createContext(void 0); 18472 if (true) TooltipProviderContext.displayName = "TooltipProviderContext"; 18473 function useTooltipProviderContext() { 18474 return React159.useContext(TooltipProviderContext); 18475 } 18476 18477 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/utils/constants.mjs 18478 var OPEN_DELAY = 600; 18479 18480 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs 18481 var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger"; 18482 function getTargetElement(event) { 18483 const target = getTarget(event); 18484 return isElement(target) ? target : null; 18485 } 18486 var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) { 18487 const { 18488 render, 18489 className, 18490 style, 18491 handle, 18492 payload, 18493 disabled: disabledProp, 18494 delay, 18495 closeOnClick = true, 18496 closeDelay, 18497 id: idProp, 18498 ...elementProps 18499 } = componentProps; 18500 const rootContext = useTooltipRootContext(true); 18501 const handleStore = usePopupHandleStore(handle); 18502 const store = handleStore ?? rootContext; 18503 if (!store) { 18504 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)); 18505 } 18506 const thisTriggerId = useBaseUiId(idProp); 18507 const isTriggerActive = store.useState("isTriggerActive", thisTriggerId); 18508 const isOpenedByThisTrigger = store.useState("isOpenedByTrigger", thisTriggerId); 18509 const floatingRootContext = store.useState("floatingRootContext"); 18510 const triggerElementRef = React160.useRef(null); 18511 const closeDelayWithDefault = closeDelay ?? 0; 18512 const { 18513 registerTrigger, 18514 isMountedByThisTrigger 18515 } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, { 18516 payload, 18517 closeOnClick, 18518 closeDelay: closeDelayWithDefault 18519 }); 18520 const providerDelay = useTooltipProviderContext(); 18521 const { 18522 activeIdRef, 18523 delayRef, 18524 isInstantPhase, 18525 hasProvider 18526 } = useDelayGroup(floatingRootContext, { 18527 open: isOpenedByThisTrigger 18528 }); 18529 const hoverInteraction = useHoverInteractionSharedState(floatingRootContext); 18530 store.useSyncedValue("isInstantPhase", isInstantPhase); 18531 const rootDisabled = store.useState("disabled"); 18532 const disabled2 = disabledProp ?? rootDisabled; 18533 const disabledRef = useValueAsRef(disabled2); 18534 const trackCursorAxis = store.useState("trackCursorAxis"); 18535 const disableHoverablePopup = store.useState("disableHoverablePopup"); 18536 const isNestedTriggerHoveredRef = React160.useRef(false); 18537 const nestedTriggerOpenTimeout = useTimeout(); 18538 const pointerTypeRef = React160.useRef(void 0); 18539 function getOpenDelay() { 18540 if (hasProvider && activeIdRef.current != null) { 18541 return 0; 18542 } 18543 return delay ?? providerDelay ?? OPEN_DELAY; 18544 } 18545 function isEnabledNestedTriggerTarget(target) { 18546 const triggerEl = triggerElementRef.current; 18547 if (!triggerEl || !target) { 18548 return false; 18549 } 18550 const nearestTrigger = closest(target, `[$TOOLTIP_TRIGGER_IDENTIFIER}]`); 18551 return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger); 18552 } 18553 function detectNestedTriggerHover(target) { 18554 const nestedTriggerHovered = isEnabledNestedTriggerTarget(target); 18555 isNestedTriggerHoveredRef.current = nestedTriggerHovered; 18556 if (nestedTriggerHovered) { 18557 hoverInteraction.openChangeTimeout.clear(); 18558 hoverInteraction.restTimeout.clear(); 18559 hoverInteraction.restTimeoutPending = false; 18560 nestedTriggerOpenTimeout.clear(); 18561 } 18562 return nestedTriggerHovered; 18563 } 18564 const hoverProps = useHoverReferenceInteraction(floatingRootContext, { 18565 enabled: !disabled2, 18566 mouseOnly: true, 18567 move: false, 18568 handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null, 18569 restMs: getOpenDelay, 18570 delay() { 18571 if (closeDelay == null && hasProvider) { 18572 return { 18573 close: getDelay(delayRef.current, "close") 18574 }; 18575 } 18576 return { 18577 close: closeDelayWithDefault 18578 }; 18579 }, 18580 triggerElementRef, 18581 isActiveTrigger: isTriggerActive, 18582 isClosing: () => store.select("transitionStatus") === "ending", 18583 shouldOpen() { 18584 return !isNestedTriggerHoveredRef.current; 18585 } 18586 }); 18587 const focusProps = useFocus(floatingRootContext, { 18588 enabled: !disabled2 18589 }).reference; 18590 const handleNestedTriggerHover = (event) => { 18591 const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current; 18592 const target = getTargetElement(event); 18593 const nestedTriggerHovered = detectNestedTriggerHover(target); 18594 const triggerEl = triggerElementRef.current; 18595 const targetInsideTrigger = triggerEl && target && contains(triggerEl, target); 18596 if (nestedTriggerHovered && store.select("open") && store.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) { 18597 store.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event)); 18598 return; 18599 } 18600 if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences. 18601 isMouseLikePointerType(pointerTypeRef.current)) { 18602 const open2 = () => { 18603 if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store.select("open")) { 18604 store.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl)); 18605 } 18606 }; 18607 const openDelay = getOpenDelay(); 18608 if (openDelay === 0) { 18609 nestedTriggerOpenTimeout.clear(); 18610 open2(); 18611 } else { 18612 nestedTriggerOpenTimeout.start(openDelay, open2); 18613 } 18614 } 18615 }; 18616 const rootTriggerProps = store.useState("appliedTriggerProps", isMountedByThisTrigger || trackCursorAxis !== "none"); 18617 const state = { 18618 open: isOpenedByThisTrigger 18619 }; 18620 const element = useRenderElement("button", componentProps, { 18621 state, 18622 ref: [forwardedRef, registerTrigger, triggerElementRef], 18623 props: [hoverProps, focusProps, rootTriggerProps, { 18624 onMouseOver(event) { 18625 handleNestedTriggerHover(event.nativeEvent); 18626 }, 18627 onFocus(event) { 18628 if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) { 18629 event.preventBaseUIHandler(); 18630 } 18631 }, 18632 onMouseLeave() { 18633 isNestedTriggerHoveredRef.current = false; 18634 nestedTriggerOpenTimeout.clear(); 18635 pointerTypeRef.current = void 0; 18636 }, 18637 onPointerEnter(event) { 18638 pointerTypeRef.current = event.pointerType; 18639 }, 18640 onPointerDown(event) { 18641 pointerTypeRef.current = event.pointerType; 18642 store.set("closeOnClick", closeOnClick); 18643 if (closeOnClick && !store.select("open")) { 18644 store.cancelPendingOpen(event.nativeEvent); 18645 } 18646 }, 18647 onClick(event) { 18648 if (closeOnClick && !store.select("open")) { 18649 store.cancelPendingOpen(event.nativeEvent); 18650 } 18651 }, 18652 id: thisTriggerId, 18653 [triggerDisabled]: disabled2 ? "" : void 0, 18654 [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : "" 18655 }, elementProps], 18656 stateAttributesMapping: triggerOpenStateMapping 18657 }); 18658 return element; 18659 }); 18660 if (true) TooltipTrigger.displayName = "TooltipTrigger"; 18661 18662 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs 18663 var React162 = __toESM(require_react(), 1); 18664 18665 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs 18666 var React161 = __toESM(require_react(), 1); 18667 var TooltipPortalContext = /* @__PURE__ */ React161.createContext(void 0); 18668 if (true) TooltipPortalContext.displayName = "TooltipPortalContext"; 18669 function useTooltipPortalContext() { 18670 const value = React161.useContext(TooltipPortalContext); 18671 if (value === void 0) { 18672 throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70)); 18673 } 18674 return value; 18675 } 18676 18677 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs 18678 var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1); 18679 var TooltipPortal = /* @__PURE__ */ React162.forwardRef(function TooltipPortal2(props, forwardedRef) { 18680 const { 18681 keepMounted = false, 18682 ...portalProps 18683 } = props; 18684 const store = useTooltipRootContext(); 18685 const mounted = store.useState("mounted"); 18686 const shouldRender = mounted || keepMounted; 18687 if (!shouldRender) { 18688 return null; 18689 } 18690 return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TooltipPortalContext.Provider, { 18691 value: keepMounted, 18692 children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FloatingPortalLite, { 18693 ref: forwardedRef, 18694 ...portalProps 18695 }) 18696 }); 18697 }); 18698 if (true) TooltipPortal.displayName = "TooltipPortal"; 18699 18700 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs 18701 var React164 = __toESM(require_react(), 1); 18702 18703 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs 18704 var React163 = __toESM(require_react(), 1); 18705 var TooltipPositionerContext = /* @__PURE__ */ React163.createContext(void 0); 18706 if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext"; 18707 function useTooltipPositionerContext() { 18708 const context = React163.useContext(TooltipPositionerContext); 18709 if (context === void 0) { 18710 throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71)); 18711 } 18712 return context; 18713 } 18714 18715 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs 18716 var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1); 18717 var TooltipPositioner = /* @__PURE__ */ React164.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) { 18718 const { 18719 render, 18720 className, 18721 anchor, 18722 positionMethod = "absolute", 18723 side = "top", 18724 align = "center", 18725 sideOffset = 0, 18726 alignOffset = 0, 18727 collisionBoundary = "clipping-ancestors", 18728 collisionPadding = 5, 18729 arrowPadding = 5, 18730 sticky = false, 18731 disableAnchorTracking = false, 18732 collisionAvoidance = POPUP_COLLISION_AVOIDANCE, 18733 style, 18734 ...elementProps 18735 } = componentProps; 18736 const store = useTooltipRootContext(); 18737 const keepMounted = useTooltipPortalContext(); 18738 const open2 = store.useState("open"); 18739 const mounted = store.useState("mounted"); 18740 const trackCursorAxis = store.useState("trackCursorAxis"); 18741 const disableHoverablePopup = store.useState("disableHoverablePopup"); 18742 const floatingRootContext = store.useState("floatingRootContext"); 18743 const instantType = store.useState("instantType"); 18744 const transitionStatus = store.useState("transitionStatus"); 18745 const adaptiveOrigin2 = store.useState("adaptiveOrigin"); 18746 const positioning = useAnchorPositioning({ 18747 anchor, 18748 positionMethod, 18749 floatingRootContext, 18750 mounted, 18751 side, 18752 sideOffset, 18753 align, 18754 alignOffset, 18755 collisionBoundary, 18756 collisionPadding, 18757 sticky, 18758 arrowPadding, 18759 disableAnchorTracking, 18760 keepMounted, 18761 collisionAvoidance, 18762 adaptiveOrigin: adaptiveOrigin2 18763 }); 18764 const state = React164.useMemo(() => ({ 18765 open: open2, 18766 side: positioning.side, 18767 align: positioning.align, 18768 anchorHidden: positioning.anchorHidden, 18769 instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType 18770 }), [open2, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]); 18771 const element = usePositioner(componentProps, state, { 18772 styles: positioning.positionerStyles, 18773 transitionStatus, 18774 props: elementProps, 18775 refs: [forwardedRef, store.useStateSetter("positionerElement")], 18776 hidden: !mounted, 18777 inert: !open2 || trackCursorAxis === "both" || disableHoverablePopup 18778 }); 18779 return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TooltipPositionerContext.Provider, { 18780 value: positioning, 18781 children: element 18782 }); 18783 }); 18784 if (true) TooltipPositioner.displayName = "TooltipPositioner"; 18785 18786 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs 18787 var React165 = __toESM(require_react(), 1); 18788 var TooltipPopup = /* @__PURE__ */ React165.forwardRef(function TooltipPopup2(componentProps, forwardedRef) { 18789 const { 18790 render, 18791 className, 18792 style, 18793 ...elementProps 18794 } = componentProps; 18795 const store = useTooltipRootContext(); 18796 const { 18797 side, 18798 align 18799 } = useTooltipPositionerContext(); 18800 const open2 = store.useState("open"); 18801 const instantType = store.useState("instantType"); 18802 const transitionStatus = store.useState("transitionStatus"); 18803 const popupProps = store.useState("popupProps"); 18804 const floatingContext = store.useState("floatingRootContext"); 18805 const disabled2 = store.useState("disabled"); 18806 const closeDelay = store.useState("closeDelay"); 18807 useOpenChangeComplete({ 18808 open: open2, 18809 ref: store.context.popupRef, 18810 onComplete() { 18811 if (open2) { 18812 store.context.onOpenChangeComplete?.(true); 18813 } 18814 } 18815 }); 18816 useHoverFloatingInteraction(floatingContext, { 18817 enabled: !disabled2, 18818 closeDelay 18819 }); 18820 const setPopupElement = store.useStateSetter("popupElement"); 18821 const state = { 18822 open: open2, 18823 side, 18824 align, 18825 instant: instantType, 18826 transitionStatus 18827 }; 18828 const element = useRenderElement("div", componentProps, { 18829 state, 18830 ref: [forwardedRef, store.context.popupRef, setPopupElement], 18831 props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps], 18832 stateAttributesMapping: popupTransitionStateMapping 18833 }); 18834 return element; 18835 }); 18836 if (true) TooltipPopup.displayName = "TooltipPopup"; 18837 18838 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs 18839 var React166 = __toESM(require_react(), 1); 18840 var TooltipArrow = /* @__PURE__ */ React166.forwardRef(function TooltipArrow2(componentProps, forwardedRef) { 18841 const { 18842 render, 18843 className, 18844 style, 18845 ...elementProps 18846 } = componentProps; 18847 const store = useTooltipRootContext(); 18848 const { 18849 arrowRef, 18850 side, 18851 align, 18852 arrowUncentered, 18853 arrowStyles 18854 } = useTooltipPositionerContext(); 18855 const open2 = store.useState("open"); 18856 const instantType = store.useState("instantType"); 18857 const state = { 18858 open: open2, 18859 side, 18860 align, 18861 uncentered: arrowUncentered, 18862 instant: instantType 18863 }; 18864 const element = useRenderElement("div", componentProps, { 18865 state, 18866 ref: [forwardedRef, arrowRef], 18867 props: [{ 18868 style: arrowStyles, 18869 "aria-hidden": true 18870 }, elementProps], 18871 stateAttributesMapping: popupStateMapping 18872 }); 18873 return element; 18874 }); 18875 if (true) TooltipArrow.displayName = "TooltipArrow"; 18876 18877 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs 18878 var React167 = __toESM(require_react(), 1); 18879 var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1); 18880 var TooltipProvider = function TooltipProvider2(props) { 18881 const { 18882 delay, 18883 closeDelay, 18884 timeout = 400 18885 } = props; 18886 const delayValue = React167.useMemo(() => ({ 18887 open: delay, 18888 close: closeDelay 18889 }), [delay, closeDelay]); 18890 return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipProviderContext.Provider, { 18891 value: delay, 18892 children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FloatingDelayGroup, { 18893 delay: delayValue, 18894 timeoutMs: timeout, 18895 children: props.children 18896 }) 18897 }); 18898 }; 18899 if (true) TooltipProvider.displayName = "TooltipProvider"; 18900 18901 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs 18902 var React168 = __toESM(require_react(), 1); 18903 var TooltipViewport = /* @__PURE__ */ React168.forwardRef(function TooltipViewport2(componentProps, forwardedRef) { 18904 const { 18905 render, 18906 className, 18907 style, 18908 children, 18909 ...elementProps 18910 } = componentProps; 18911 const store = useTooltipRootContext(); 18912 const positioner = useTooltipPositionerContext(); 18913 const instantType = store.useState("instantType"); 18914 const { 18915 children: childrenToRender, 18916 state: viewportState 18917 } = usePopupViewport({ 18918 store, 18919 side: positioner.side, 18920 children 18921 }); 18922 const state = { 18923 activationDirection: viewportState.activationDirection, 18924 transitioning: viewportState.transitioning, 18925 instant: instantType 18926 }; 18927 return useRenderElement("div", componentProps, { 18928 state, 18929 ref: forwardedRef, 18930 props: [elementProps, { 18931 children: childrenToRender 18932 }], 18933 stateAttributesMapping: popupViewportStateMapping 18934 }); 18935 }); 18936 if (true) TooltipViewport.displayName = "TooltipViewport"; 18937 18938 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs 18939 var TooltipHandle = class extends BasePopupHandle { 18940 constructor() { 18941 super(createNullTooltipStore(), "Tooltip"); 18942 } 18943 /** 18944 * Opens the tooltip and associates it with the trigger with the given id. 18945 * 18946 * This method should only be called in an event handler or an effect (not during rendering). 18947 * 18948 * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching 18949 * `Tooltip.Trigger` with this handle passed as a prop. 18950 */ 18951 open(triggerId) { 18952 this.openByTrigger(triggerId); 18953 } 18954 /** 18955 * Closes the tooltip. 18956 * 18957 * This method should only be called in an event handler or an effect (not during rendering). 18958 */ 18959 close() { 18960 this.closePopup(); 18961 } 18962 /** 18963 * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle. 18964 */ 18965 get isOpen() { 18966 return this.attachedStore?.select("open") ?? false; 18967 } 18968 }; 18969 function createTooltipHandle() { 18970 return new TooltipHandle(); 18971 } 18972 18973 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/use-render/useRender.mjs 18974 function useRender(params) { 18975 return useRenderElement(params.defaultTagName ?? "div", params, params); 18976 } 18977 18978 // packages/ui/build-module/text/text.mjs 18979 var import_element15 = __toESM(require_element(), 1); 18980 var STYLE_HASH_ATTRIBUTE = "data-wp-hash"; 18981 function getRuntime() { 18982 const globalScope = globalThis; 18983 if (globalScope.__wpStyleRuntime) { 18984 return globalScope.__wpStyleRuntime; 18985 } 18986 globalScope.__wpStyleRuntime = { 18987 documents: /* @__PURE__ */ new Map(), 18988 styles: /* @__PURE__ */ new Map(), 18989 injectedStyles: /* @__PURE__ */ new WeakMap() 18990 }; 18991 if (typeof document !== "undefined") { 18992 registerDocument(document); 18993 } 18994 return globalScope.__wpStyleRuntime; 18995 } 18996 function documentContainsStyleHash(targetDocument, hash) { 18997 if (!targetDocument.head) { 18998 return false; 18999 } 19000 for (const style of targetDocument.head.querySelectorAll( 19001 `style[$STYLE_HASH_ATTRIBUTE}]` 19002 )) { 19003 if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) { 19004 return true; 19005 } 19006 } 19007 return false; 19008 } 19009 function injectStyle(targetDocument, hash, css) { 19010 if (!targetDocument.head) { 19011 return; 19012 } 19013 const runtime = getRuntime(); 19014 let injectedStyles = runtime.injectedStyles.get(targetDocument); 19015 if (!injectedStyles) { 19016 injectedStyles = /* @__PURE__ */ new Set(); 19017 runtime.injectedStyles.set(targetDocument, injectedStyles); 19018 } 19019 if (injectedStyles.has(hash)) { 19020 return; 19021 } 19022 if (documentContainsStyleHash(targetDocument, hash)) { 19023 injectedStyles.add(hash); 19024 return; 19025 } 19026 const style = targetDocument.createElement("style"); 19027 style.setAttribute(STYLE_HASH_ATTRIBUTE, hash); 19028 style.appendChild(targetDocument.createTextNode(css)); 19029 targetDocument.head.appendChild(style); 19030 injectedStyles.add(hash); 19031 } 19032 function registerDocument(targetDocument) { 19033 const runtime = getRuntime(); 19034 runtime.documents.set( 19035 targetDocument, 19036 (runtime.documents.get(targetDocument) ?? 0) + 1 19037 ); 19038 for (const [hash, css] of runtime.styles) { 19039 injectStyle(targetDocument, hash, css); 19040 } 19041 return () => { 19042 const count = runtime.documents.get(targetDocument); 19043 if (count === void 0) { 19044 return; 19045 } 19046 if (count <= 1) { 19047 runtime.documents.delete(targetDocument); 19048 return; 19049 } 19050 runtime.documents.set(targetDocument, count - 1); 19051 }; 19052 } 19053 function registerStyle(hash, css) { 19054 const runtime = getRuntime(); 19055 runtime.styles.set(hash, css); 19056 for (const targetDocument of runtime.documents.keys()) { 19057 injectStyle(targetDocument, hash, css); 19058 } 19059 } 19060 if (typeof process === "undefined" || true) { 19061 registerStyle("09bae534ff", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._9745ffa515d864cf__text{text-wrap:pretty;margin:0}._8882b6a7feb4fd3d__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)}._664e3e7687c45603__heading-xl,._8882b6a7feb4fd3d__heading-2xl{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)}._664e3e7687c45603__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)}.dac661a5de0ed2bd__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)}._59c7f3f740e2f96e__heading-md,.dac661a5de0ed2bd__heading-lg{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)}._59c7f3f740e2f96e__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)}.cf052fbad8d93b7e__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}._212b9cfef57a0af4__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)}._07f57bc0aa36b2c6__body-lg,._212b9cfef57a0af4__body-xl{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)}._07f57bc0aa36b2c6__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)}._0c6da4457aec9e62__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)}._0c6da4457aec9e62__body-md,.b998f87ff17b7bec__body-sm{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)}.b998f87ff17b7bec__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)}}}'); 19062 } 19063 var style_default = { "text": "_9745ffa515d864cf__text", "heading-2xl": "_8882b6a7feb4fd3d__heading-2xl", "heading-xl": "_664e3e7687c45603__heading-xl", "heading-lg": "dac661a5de0ed2bd__heading-lg", "heading-md": "_59c7f3f740e2f96e__heading-md", "heading-sm": "cf052fbad8d93b7e__heading-sm", "body-xl": "_212b9cfef57a0af4__body-xl", "body-lg": "_07f57bc0aa36b2c6__body-lg", "body-md": "_0c6da4457aec9e62__body-md", "body-sm": "b998f87ff17b7bec__body-sm" }; 19064 if (typeof process === "undefined" || true) { 19065 registerStyle("726f348f3f", "._78c10a0773e51a91__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)}._5b33aa2d48624b4f__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)}}._980b3b4776ac8f81__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._43e478b4279a076c__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._698099e25b0fb1a6__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)._326aee4184d261fd__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)}.e9576240835601ba__a,.e9576240835601ba__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)}._3f05789653864a73__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)}._3c72ff72abe57859__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._79d16267c15d9eb2__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 19066 } 19067 var global_css_defense_default = { "button": "_78c10a0773e51a91__button", "input": "_5b33aa2d48624b4f__input", "textarea": "_980b3b4776ac8f81__textarea", "div": "_43e478b4279a076c__div", "p": "_698099e25b0fb1a6__p", "heading": "_326aee4184d261fd__heading", "a": "e9576240835601ba__a", "ol": "_3f05789653864a73__ol", "li": "_3c72ff72abe57859__li", "span": "_79d16267c15d9eb2__span" }; 19068 var Text = (0, import_element15.forwardRef)( 19069 function UnforwardedText({ variant = "body-md", render, className, ...props }, ref) { 19070 const element = useRender({ 19071 render, 19072 defaultTagName: "span", 19073 ref, 19074 props: mergeProps(props, { 19075 className: clsx_default( 19076 style_default.text, 19077 global_css_defense_default.heading, 19078 global_css_defense_default.p, 19079 style_default[variant], 19080 className 19081 ) 19082 }) 19083 }); 19084 return element; 19085 } 19086 ); 19087 19088 // packages/ui/build-module/menu/index.mjs 19089 var menu_exports = {}; 19090 __export(menu_exports, { 19091 CheckboxItem: () => CheckboxItem, 19092 Group: () => Group, 19093 GroupLabel: () => GroupLabel, 19094 Item: () => Item, 19095 ItemDescription: () => ItemDescription, 19096 ItemLabel: () => ItemLabel, 19097 LinkItem: () => LinkItem, 19098 Popup: () => Popup, 19099 Portal: () => Portal, 19100 Positioner: () => Positioner, 19101 PrefixIcon: () => PrefixIcon, 19102 RadioGroup: () => RadioGroup, 19103 RadioItem: () => RadioItem, 19104 Root: () => Root, 19105 Separator: () => Separator2, 19106 SubmenuRoot: () => SubmenuRoot, 19107 SubmenuTrigger: () => SubmenuTrigger, 19108 Trigger: () => Trigger 19109 }); 19110 19111 // packages/ui/build-module/menu/checkbox-item.mjs 19112 var import_element24 = __toESM(require_element(), 1); 19113 19114 // packages/icons/build-module/icon/index.mjs 19115 var import_element16 = __toESM(require_element(), 1); 19116 var icon_default = (0, import_element16.forwardRef)( 19117 ({ icon, size: size4 = 24, style, ...props }, ref) => { 19118 const intrinsicStyle = icon.props.style; 19119 const mergedStyle = intrinsicStyle || style ? { ...intrinsicStyle, ...style } : void 0; 19120 return (0, import_element16.cloneElement)(icon, { 19121 width: size4, 19122 height: size4, 19123 ...props, 19124 // Merge styles so the icon's intrinsic style (e.g. `fill: none` on 19125 // stroke-based icons) is preserved unless the consumer overrides 19126 // the same property explicitly. 19127 ...mergedStyle ? { style: mergedStyle } : {}, 19128 ref 19129 }); 19130 } 19131 ); 19132 19133 // packages/icons/build-module/library/button.mjs 19134 var import_primitives2 = __toESM(require_primitives(), 1); 19135 var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1); 19136 var button_default = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_primitives2.Path, { d: "M8 11.75H16M5 16.25H19C19.6904 16.25 20.25 15.6904 20.25 15V8.5C20.25 7.80964 19.6904 7.25 19 7.25H5C4.30964 7.25 3.75 7.80964 3.75 8.5V15C3.75 15.6904 4.30964 16.25 5 16.25Z" }) }); 19137 19138 // packages/icons/build-module/library/caption.mjs 19139 var import_primitives3 = __toESM(require_primitives(), 1); 19140 var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1); 19141 var caption_default = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_primitives3.Path, { d: "M8 15.25H10M11 15.25H13M14 15.25H16M6 19.25H18C18.6904 19.25 19.25 18.6904 19.25 18V6C19.25 5.30964 18.6904 4.75 18 4.75H6C5.30964 4.75 4.75 5.30964 4.75 6V18C4.75 18.6904 5.30964 19.25 6 19.25Z" }) }); 19142 19143 // packages/icons/build-module/library/check.mjs 19144 var import_primitives4 = __toESM(require_primitives(), 1); 19145 var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1); 19146 var check_default = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_primitives4.Path, { d: "M7 12L10 15L17 8" }) }); 19147 19148 // packages/icons/build-module/library/chevron-down.mjs 19149 var import_primitives5 = __toESM(require_primitives(), 1); 19150 var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1); 19151 var chevron_down_default = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_primitives5.Path, { d: "M7 11L12 15L17 11" }) }); 19152 19153 // packages/icons/build-module/library/chevron-left.mjs 19154 var import_primitives6 = __toESM(require_primitives(), 1); 19155 var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1); 19156 var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_primitives6.Path, { d: "M14 6.5L9 12L14 17.5" }) }); 19157 19158 // packages/icons/build-module/library/chevron-right-small.mjs 19159 var import_primitives7 = __toESM(require_primitives(), 1); 19160 var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1); 19161 var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_primitives7.Path, { d: "M10.5 8.5L13.5 12L10.5 15.5" }) }); 19162 19163 // packages/icons/build-module/library/chevron-right.mjs 19164 var import_primitives8 = __toESM(require_primitives(), 1); 19165 var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1); 19166 var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_primitives8.Path, { d: "M10 6.5L15 12L10 17.5" }) }); 19167 19168 // packages/icons/build-module/library/form-input.mjs 19169 var import_primitives9 = __toESM(require_primitives(), 1); 19170 var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1); 19171 var form_input_default = /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 19172 /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives9.Path, { d: "M3.75 8.5C3.75 7.80964 4.30964 7.25 5 7.25H19C19.6904 7.25 20.25 7.80964 20.25 8.5V15C20.25 15.6904 19.6904 16.25 19 16.25H5C4.30964 16.25 3.75 15.6904 3.75 15V8.5Z" }), 19173 /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_primitives9.Path, { d: "M6.75 14V9.5" }) 19174 ] }); 19175 19176 // packages/icons/build-module/library/form-select.mjs 19177 var import_primitives10 = __toESM(require_primitives(), 1); 19178 var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1); 19179 var form_select_default = /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 19180 /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives10.Path, { d: "M3.75 8.5C3.75 7.80964 4.30964 7.25 5 7.25H19C19.6904 7.25 20.25 7.80964 20.25 8.5V15C20.25 15.6904 19.6904 16.25 19 16.25H5C4.30964 16.25 3.75 15.6904 3.75 15V8.5Z" }), 19181 /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_primitives10.Path, { d: "M15 11L12 13L9 11" }) 19182 ] }); 19183 19184 // packages/icons/build-module/library/heading-level-1.mjs 19185 var import_primitives11 = __toESM(require_primitives(), 1); 19186 var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1); 19187 var heading_level_1_default = /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 19188 /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives11.Path, { d: "M18.75 18.75C18.75 17.9056 18.75 11.963 18.75 9.5L15.75 10.3056" }), 19189 /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_primitives11.Path, { d: "M3.75 12H11.75M3.75 12V6M3.75 12L3.75 18M11.75 12V6M11.75 12V18", strokeLinecap: "square" }) 19190 ] }); 19191 19192 // packages/icons/build-module/library/heading-level-2.mjs 19193 var import_primitives12 = __toESM(require_primitives(), 1); 19194 var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1); 19195 var heading_level_2_default = /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 19196 /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives12.Path, { d: "M3.75 12H11.75M3.75 12V6M3.75 12L3.75 18M11.75 12V6M11.75 12V18", strokeLinecap: "square" }), 19197 /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_primitives12.Path, { d: "M20.3915 17.9989H16C16 13.4611 20.5 14.6523 20.5 11.2489C20.5 9.54722 18.1957 8.04722 16 9.7489", strokeLinecap: "square" }) 19198 ] }); 19199 19200 // packages/icons/build-module/library/heading-level-3.mjs 19201 var import_primitives13 = __toESM(require_primitives(), 1); 19202 var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1); 19203 var heading_level_3_default = /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 19204 /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives13.Path, { d: "M3.75 12H11.75M3.75 12V6M3.75 12L3.75 18M11.75 12V6M11.75 12V18", strokeLinecap: "square" }), 19205 /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_primitives13.Path, { d: "M15.5 17.2434C18 18.9138 20.5 17.5775 20.5 15.573C20.5 14.9823 20.2366 14.4158 19.7678 13.9981C19.2989 13.5805 18.663 13.3458 18 13.3458M18 13.3458C18.663 13.3458 19.2989 13.1112 19.7678 12.6935C20.2366 12.2758 20.5 11.7093 20.5 11.1186C20.5 9.44825 18.125 8.33466 16 9.44825M18 13.3458H17.75", strokeLinecap: "square" }) 19206 ] }); 19207 19208 // packages/icons/build-module/library/heading-level-4.mjs 19209 var import_primitives14 = __toESM(require_primitives(), 1); 19210 var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1); 19211 var heading_level_4_default = /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 19212 /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives14.Path, { d: "M3.75 12H11.75M3.75 12V6M3.75 12L3.75 18M11.75 12V6M11.75 12V18", strokeLinecap: "square" }), 19213 /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_primitives14.Path, { d: "M20 18.75V14.5M20 10.75V14.5M16.25 8.74999V9L15 14.5L20 14.5" }) 19214 ] }); 19215 19216 // packages/icons/build-module/library/heading-level-5.mjs 19217 var import_primitives15 = __toESM(require_primitives(), 1); 19218 var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1); 19219 var heading_level_5_default = /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 19220 /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives15.Path, { d: "M3.75 12H11.75M3.75 12V6M3.75 12L3.75 18M11.75 12V6M11.75 12V18", strokeLinecap: "square" }), 19221 /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_primitives15.Path, { d: "M15 17.2434C17.5 18.9138 20 17.5775 20 15.573C20 14.9823 19.7366 14.4158 19.2678 13.9982C18.7989 13.5805 18.163 13.3458 17.5 13.3458H15.25L15.75 9.5H19", strokeLinecap: "square" }) 19222 ] }); 19223 19224 // packages/icons/build-module/library/heading-level-6.mjs 19225 var import_primitives16 = __toESM(require_primitives(), 1); 19226 var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1); 19227 var heading_level_6_default = /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 19228 /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives16.Path, { d: "M3.75 12H11.75M3.75 12V6M3.75 12L3.75 18M11.75 12V6M11.75 12V18", strokeLinecap: "square" }), 19229 /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_primitives16.Path, { d: "M19.9209 9.40551C18.0547 8.41126 16.4435 9.38777 15.7499 10.7952C15.0563 12.2026 14.8576 13.7372 15.0969 15.4097C15.1739 15.948 15.3815 16.7573 15.8882 17.2424C16.3948 17.7275 17.082 18 17.7985 18C18.515 18 19.2021 17.7275 19.7087 17.2424C20.2154 16.7573 20.5 16.0994 20.5 15.4134C20.5 14.7273 20.2154 14.0729 19.7087 13.5878C19.2021 13.1027 18.5149 12.8302 17.7984 12.8302C17.0819 12.8302 16.3948 13.1027 15.8882 13.5878C15.3815 14.0729 15.0969 14.7273 15.0969 15.4133" }) 19230 ] }); 19231 19232 // packages/icons/build-module/library/heading.mjs 19233 var import_primitives17 = __toESM(require_primitives(), 1); 19234 var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1); 19235 var heading_default = /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_primitives17.Path, { d: "M6.75 5.25H17.25V16.375L12 12L6.75 16.375V5.25Z", fill: "currentColor" }) }); 19236 19237 // packages/icons/build-module/library/link.mjs 19238 var import_primitives18 = __toESM(require_primitives(), 1); 19239 var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1); 19240 var link_default = /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_primitives18.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_runtime70.jsx)(import_primitives18.Path, { d: "M9.5 12L14.5 12M10 7.75H8.25C5.90279 7.75 4 9.65279 4 12C4 14.3472 5.90279 16.25 8.25 16.25H10M14 16.25H15.75C18.0972 16.25 20 14.3472 20 12C20 9.65279 18.0972 7.75 15.75 7.75L14 7.75" }) }); 19241 19242 // packages/icons/build-module/library/more-vertical.mjs 19243 var import_primitives19 = __toESM(require_primitives(), 1); 19244 var import_jsx_runtime71 = __toESM(require_jsx_runtime(), 1); 19245 var more_vertical_default = /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_primitives19.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 19246 /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives19.Path, { d: "M11.75 18.25L12.25 18.25L12.25 17.75L11.75 17.75L11.75 18.25Z", fill: "currentColor", stroke: "none" }), 19247 /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives19.Path, { d: "M11.75 12.25L12.25 12.25L12.25 11.75L11.75 11.75L11.75 12.25Z", fill: "currentColor", stroke: "none" }), 19248 /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives19.Path, { d: "M11.75 6.25L12.25 6.25L12.25 5.75L11.75 5.75L11.75 6.25Z", fill: "currentColor", stroke: "none" }), 19249 /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives19.Path, { d: "M11.75 18.25L12.25 18.25L12.25 17.75L11.75 17.75L11.75 18.25Z" }), 19250 /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives19.Path, { d: "M11.75 12.25L12.25 12.25L12.25 11.75L11.75 11.75L11.75 12.25Z" }), 19251 /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_primitives19.Path, { d: "M11.75 6.25L12.25 6.25L12.25 5.75L11.75 5.75L11.75 6.25Z" }) 19252 ] }); 19253 19254 // packages/icons/build-module/library/next.mjs 19255 var import_primitives20 = __toESM(require_primitives(), 1); 19256 var import_jsx_runtime72 = __toESM(require_jsx_runtime(), 1); 19257 var next_default = /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_primitives20.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_runtime72.jsx)(import_primitives20.Path, { d: "M7 17.5L12 12L7 6.5M13 17.5L18 12L13 6.5" }) }); 19258 19259 // packages/icons/build-module/library/previous.mjs 19260 var import_primitives21 = __toESM(require_primitives(), 1); 19261 var import_jsx_runtime73 = __toESM(require_jsx_runtime(), 1); 19262 var previous_default = /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_primitives21.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_runtime73.jsx)(import_primitives21.Path, { d: "M17 6.5L12 12L17 17.5M11 6.5L6 12L11 17.5" }) }); 19263 19264 // packages/ui/build-module/menu/context.mjs 19265 var import_element17 = __toESM(require_element(), 1); 19266 var MenuContext = (0, import_element17.createContext)({ 19267 isSubmenu: false 19268 }); 19269 var useMenuContext = () => (0, import_element17.useContext)(MenuContext); 19270 var MenuGroupContext2 = (0, import_element17.createContext)( 19271 null 19272 ); 19273 var useMenuGroupContext = () => (0, import_element17.useContext)(MenuGroupContext2); 19274 var MenuItemContentContext = (0, import_element17.createContext)(null); 19275 var useMenuItemContentContext = () => (0, import_element17.useContext)(MenuItemContentContext); 19276 19277 // packages/ui/build-module/menu/item.mjs 19278 var import_element23 = __toESM(require_element(), 1); 19279 19280 // packages/ui/build-module/utils/keyboard-shortcut.mjs 19281 var import_element19 = __toESM(require_element(), 1); 19282 var import_i18n = __toESM(require_i18n(), 1); 19283 19284 // packages/ui/build-module/visually-hidden/visually-hidden.mjs 19285 var import_element18 = __toESM(require_element(), 1); 19286 var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash"; 19287 function getRuntime2() { 19288 const globalScope = globalThis; 19289 if (globalScope.__wpStyleRuntime) { 19290 return globalScope.__wpStyleRuntime; 19291 } 19292 globalScope.__wpStyleRuntime = { 19293 documents: /* @__PURE__ */ new Map(), 19294 styles: /* @__PURE__ */ new Map(), 19295 injectedStyles: /* @__PURE__ */ new WeakMap() 19296 }; 19297 if (typeof document !== "undefined") { 19298 registerDocument2(document); 19299 } 19300 return globalScope.__wpStyleRuntime; 19301 } 19302 function documentContainsStyleHash2(targetDocument, hash) { 19303 if (!targetDocument.head) { 19304 return false; 19305 } 19306 for (const style of targetDocument.head.querySelectorAll( 19307 `style[$STYLE_HASH_ATTRIBUTE2}]` 19308 )) { 19309 if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) { 19310 return true; 19311 } 19312 } 19313 return false; 19314 } 19315 function injectStyle2(targetDocument, hash, css) { 19316 if (!targetDocument.head) { 19317 return; 19318 } 19319 const runtime = getRuntime2(); 19320 let injectedStyles = runtime.injectedStyles.get(targetDocument); 19321 if (!injectedStyles) { 19322 injectedStyles = /* @__PURE__ */ new Set(); 19323 runtime.injectedStyles.set(targetDocument, injectedStyles); 19324 } 19325 if (injectedStyles.has(hash)) { 19326 return; 19327 } 19328 if (documentContainsStyleHash2(targetDocument, hash)) { 19329 injectedStyles.add(hash); 19330 return; 19331 } 19332 const style = targetDocument.createElement("style"); 19333 style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash); 19334 style.appendChild(targetDocument.createTextNode(css)); 19335 targetDocument.head.appendChild(style); 19336 injectedStyles.add(hash); 19337 } 19338 function registerDocument2(targetDocument) { 19339 const runtime = getRuntime2(); 19340 runtime.documents.set( 19341 targetDocument, 19342 (runtime.documents.get(targetDocument) ?? 0) + 1 19343 ); 19344 for (const [hash, css] of runtime.styles) { 19345 injectStyle2(targetDocument, hash, css); 19346 } 19347 return () => { 19348 const count = runtime.documents.get(targetDocument); 19349 if (count === void 0) { 19350 return; 19351 } 19352 if (count <= 1) { 19353 runtime.documents.delete(targetDocument); 19354 return; 19355 } 19356 runtime.documents.set(targetDocument, count - 1); 19357 }; 19358 } 19359 function registerStyle2(hash, css) { 19360 const runtime = getRuntime2(); 19361 runtime.styles.set(hash, css); 19362 for (const targetDocument of runtime.documents.keys()) { 19363 injectStyle2(targetDocument, hash, css); 19364 } 19365 } 19366 if (typeof process === "undefined" || true) { 19367 registerStyle2("7caae29f9e", ".e2c3cbe6ada7d785__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}"); 19368 } 19369 var style_default2 = { "visually-hidden": "e2c3cbe6ada7d785__visually-hidden" }; 19370 var VisuallyHidden = (0, import_element18.forwardRef)( 19371 function UnforwardedVisuallyHidden({ render, ...restProps }, ref) { 19372 const element = useRender({ 19373 render, 19374 ref, 19375 props: mergeProps( 19376 { className: style_default2["visually-hidden"] }, 19377 restProps, 19378 { 19379 // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it. 19380 "data-visually-hidden": "" 19381 } 19382 ) 19383 }); 19384 return element; 19385 } 19386 ); 19387 19388 // packages/ui/build-module/utils/keyboard-shortcut.mjs 19389 var import_jsx_runtime74 = __toESM(require_jsx_runtime(), 1); 19390 function useKeyboardShortcutProps({ 19391 "aria-describedby": ariaDescribedBy, 19392 "aria-keyshortcuts": ariaKeyShortcuts, 19393 shortcut 19394 }) { 19395 const generatedDescriptionId = (0, import_element19.useId)(); 19396 const descriptionId = shortcut ? generatedDescriptionId : void 0; 19397 const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" "); 19398 return { 19399 descriptionId, 19400 targetProps: { 19401 "aria-describedby": describedBy || void 0, 19402 "aria-keyshortcuts": shortcut?.ariaKeyShortcut ?? ariaKeyShortcuts 19403 } 19404 }; 19405 } 19406 var KeyboardShortcutDescription = (0, import_element19.forwardRef)(function UnforwardedKeyboardShortcutDescription({ descriptionId, shortcut }, ref) { 19407 return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)( 19408 VisuallyHidden, 19409 { 19410 id: descriptionId, 19411 "aria-hidden": "true", 19412 render: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { ref }), 19413 children: (0, import_i18n.sprintf)( 19414 /* translators: %s: keyboard shortcut. */ 19415 (0, import_i18n.__)("Keyboard shortcut: %s"), 19416 shortcut.label ?? shortcut.ariaKeyShortcut 19417 ) 19418 } 19419 ); 19420 }); 19421 var KeyboardShortcutDisplay = (0, import_element19.forwardRef)(function UnforwardedKeyboardShortcutDisplay({ className, shortcut }, ref) { 19422 return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { ref, "aria-hidden": "true", className, dir: "ltr", children: shortcut.displayShortcut }); 19423 }); 19424 19425 // packages/ui/build-module/utils/item-popup/item-content.mjs 19426 var import_element20 = __toESM(require_element(), 1); 19427 var VALIDATION_ENABLED = true; 19428 function parseItemContent(children, { Label: Label2, Description, validationMessage }) { 19429 const childArray = import_element20.Children.toArray(children); 19430 const [label, ...descriptions] = childArray; 19431 const hasLabel = (0, import_element20.isValidElement)(label) && label.type === Label2; 19432 const descriptionElements = descriptions.filter( 19433 (description) => (0, import_element20.isValidElement)(description) && description.type === Description 19434 ); 19435 if (VALIDATION_ENABLED && (!hasLabel || descriptionElements.length !== descriptions.length)) { 19436 throw new Error(validationMessage); 19437 } 19438 return { 19439 descriptionIds: descriptionElements.map( 19440 (description) => description.props.id 19441 ), 19442 hasLabel, 19443 labelId: hasLabel ? label.props.id : void 0 19444 }; 19445 } 19446 function useItemContent(children, components, { 19447 "aria-describedby": ariaDescribedBy, 19448 "aria-label": ariaLabel, 19449 "aria-labelledby": ariaLabelledBy 19450 } = {}) { 19451 const generatedLabelId = (0, import_element20.useId)(); 19452 const generatedDescriptionId = (0, import_element20.useId)(); 19453 const { descriptionIds, hasLabel, labelId } = parseItemContent( 19454 children, 19455 components 19456 ); 19457 const resolvedLabelId = hasLabel ? labelId ?? generatedLabelId : void 0; 19458 const resolvedDescriptionIds = descriptionIds.map( 19459 (descriptionId, index2) => descriptionId ?? `$generatedDescriptionId}-$index2}` 19460 ); 19461 const itemDescribedBy = Array.from( 19462 /* @__PURE__ */ new Set([ 19463 ...ariaDescribedBy?.split(/\s+/).filter(Boolean) ?? [], 19464 ...resolvedDescriptionIds 19465 ]) 19466 ).join(" "); 19467 let descriptionIndex = 0; 19468 const { Label: Label2, Description, descriptionValidationToken } = components; 19469 const contentChildren = import_element20.Children.map(children, (child) => { 19470 if (!(0, import_element20.isValidElement)(child)) { 19471 return child; 19472 } 19473 if (child.type === Label2) { 19474 return child.props.id === resolvedLabelId ? child : (0, import_element20.cloneElement)(child, { id: resolvedLabelId }); 19475 } 19476 if (child.type !== Description) { 19477 return child; 19478 } 19479 const descriptionId = resolvedDescriptionIds[descriptionIndex++]; 19480 if (!descriptionValidationToken && child.props.id === descriptionId) { 19481 return child; 19482 } 19483 return (0, import_element20.cloneElement)(child, { 19484 id: descriptionId, 19485 ...descriptionValidationToken && { 19486 validationToken: descriptionValidationToken 19487 } 19488 }); 19489 }); 19490 const labelledBy = ariaLabelledBy ?? (ariaLabel ? void 0 : resolvedLabelId); 19491 return { 19492 contentChildren, 19493 resolvedLabelId, 19494 itemAriaProps: { 19495 "aria-describedby": itemDescribedBy || void 0, 19496 "aria-label": ariaLabel, 19497 "aria-labelledby": labelledBy 19498 } 19499 }; 19500 } 19501 19502 // packages/ui/build-module/menu/item-description.mjs 19503 var import_element21 = __toESM(require_element(), 1); 19504 var import_jsx_runtime75 = __toESM(require_jsx_runtime(), 1); 19505 var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash"; 19506 function getRuntime3() { 19507 const globalScope = globalThis; 19508 if (globalScope.__wpStyleRuntime) { 19509 return globalScope.__wpStyleRuntime; 19510 } 19511 globalScope.__wpStyleRuntime = { 19512 documents: /* @__PURE__ */ new Map(), 19513 styles: /* @__PURE__ */ new Map(), 19514 injectedStyles: /* @__PURE__ */ new WeakMap() 19515 }; 19516 if (typeof document !== "undefined") { 19517 registerDocument3(document); 19518 } 19519 return globalScope.__wpStyleRuntime; 19520 } 19521 function documentContainsStyleHash3(targetDocument, hash) { 19522 if (!targetDocument.head) { 19523 return false; 19524 } 19525 for (const style of targetDocument.head.querySelectorAll( 19526 `style[$STYLE_HASH_ATTRIBUTE3}]` 19527 )) { 19528 if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) { 19529 return true; 19530 } 19531 } 19532 return false; 19533 } 19534 function injectStyle3(targetDocument, hash, css) { 19535 if (!targetDocument.head) { 19536 return; 19537 } 19538 const runtime = getRuntime3(); 19539 let injectedStyles = runtime.injectedStyles.get(targetDocument); 19540 if (!injectedStyles) { 19541 injectedStyles = /* @__PURE__ */ new Set(); 19542 runtime.injectedStyles.set(targetDocument, injectedStyles); 19543 } 19544 if (injectedStyles.has(hash)) { 19545 return; 19546 } 19547 if (documentContainsStyleHash3(targetDocument, hash)) { 19548 injectedStyles.add(hash); 19549 return; 19550 } 19551 const style = targetDocument.createElement("style"); 19552 style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash); 19553 style.appendChild(targetDocument.createTextNode(css)); 19554 targetDocument.head.appendChild(style); 19555 injectedStyles.add(hash); 19556 } 19557 function registerDocument3(targetDocument) { 19558 const runtime = getRuntime3(); 19559 runtime.documents.set( 19560 targetDocument, 19561 (runtime.documents.get(targetDocument) ?? 0) + 1 19562 ); 19563 for (const [hash, css] of runtime.styles) { 19564 injectStyle3(targetDocument, hash, css); 19565 } 19566 return () => { 19567 const count = runtime.documents.get(targetDocument); 19568 if (count === void 0) { 19569 return; 19570 } 19571 if (count <= 1) { 19572 runtime.documents.delete(targetDocument); 19573 return; 19574 } 19575 runtime.documents.set(targetDocument, count - 1); 19576 }; 19577 } 19578 function registerStyle3(hash, css) { 19579 const runtime = getRuntime3(); 19580 runtime.styles.set(hash, css); 19581 for (const targetDocument of runtime.documents.keys()) { 19582 injectStyle3(targetDocument, hash, css); 19583 } 19584 } 19585 if (typeof process === "undefined" || true) { 19586 registerStyle3("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 19587 } 19588 var style_default3 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 19589 var ITEM_DESCRIPTION_DIRECT_CHILD = /* @__PURE__ */ Symbol(); 19590 var ItemDescription = (0, import_element21.forwardRef)( 19591 function MenuItemDescription(props, ref) { 19592 const { className, id, validationToken, ...restProps } = props; 19593 if (validationToken !== ITEM_DESCRIPTION_DIRECT_CHILD) { 19594 throw new Error( 19595 "Menu.ItemDescription: Missing direct menu item parent. Render <Menu.ItemDescription> as a direct child of a menu item." 19596 ); 19597 } 19598 return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)( 19599 Text, 19600 { 19601 ref, 19602 variant: "body-sm", 19603 ...restProps, 19604 id, 19605 className: clsx_default(style_default3["item-description"], className) 19606 } 19607 ); 19608 } 19609 ); 19610 19611 // packages/ui/build-module/menu/item-label.mjs 19612 var import_element22 = __toESM(require_element(), 1); 19613 var import_jsx_runtime76 = __toESM(require_jsx_runtime(), 1); 19614 var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash"; 19615 function getRuntime4() { 19616 const globalScope = globalThis; 19617 if (globalScope.__wpStyleRuntime) { 19618 return globalScope.__wpStyleRuntime; 19619 } 19620 globalScope.__wpStyleRuntime = { 19621 documents: /* @__PURE__ */ new Map(), 19622 styles: /* @__PURE__ */ new Map(), 19623 injectedStyles: /* @__PURE__ */ new WeakMap() 19624 }; 19625 if (typeof document !== "undefined") { 19626 registerDocument4(document); 19627 } 19628 return globalScope.__wpStyleRuntime; 19629 } 19630 function documentContainsStyleHash4(targetDocument, hash) { 19631 if (!targetDocument.head) { 19632 return false; 19633 } 19634 for (const style of targetDocument.head.querySelectorAll( 19635 `style[$STYLE_HASH_ATTRIBUTE4}]` 19636 )) { 19637 if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) { 19638 return true; 19639 } 19640 } 19641 return false; 19642 } 19643 function injectStyle4(targetDocument, hash, css) { 19644 if (!targetDocument.head) { 19645 return; 19646 } 19647 const runtime = getRuntime4(); 19648 let injectedStyles = runtime.injectedStyles.get(targetDocument); 19649 if (!injectedStyles) { 19650 injectedStyles = /* @__PURE__ */ new Set(); 19651 runtime.injectedStyles.set(targetDocument, injectedStyles); 19652 } 19653 if (injectedStyles.has(hash)) { 19654 return; 19655 } 19656 if (documentContainsStyleHash4(targetDocument, hash)) { 19657 injectedStyles.add(hash); 19658 return; 19659 } 19660 const style = targetDocument.createElement("style"); 19661 style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash); 19662 style.appendChild(targetDocument.createTextNode(css)); 19663 targetDocument.head.appendChild(style); 19664 injectedStyles.add(hash); 19665 } 19666 function registerDocument4(targetDocument) { 19667 const runtime = getRuntime4(); 19668 runtime.documents.set( 19669 targetDocument, 19670 (runtime.documents.get(targetDocument) ?? 0) + 1 19671 ); 19672 for (const [hash, css] of runtime.styles) { 19673 injectStyle4(targetDocument, hash, css); 19674 } 19675 return () => { 19676 const count = runtime.documents.get(targetDocument); 19677 if (count === void 0) { 19678 return; 19679 } 19680 if (count <= 1) { 19681 runtime.documents.delete(targetDocument); 19682 return; 19683 } 19684 runtime.documents.set(targetDocument, count - 1); 19685 }; 19686 } 19687 function registerStyle4(hash, css) { 19688 const runtime = getRuntime4(); 19689 runtime.styles.set(hash, css); 19690 for (const targetDocument of runtime.documents.keys()) { 19691 injectStyle4(targetDocument, hash, css); 19692 } 19693 } 19694 if (typeof process === "undefined" || true) { 19695 registerStyle4("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 19696 } 19697 var style_default4 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 19698 var ItemLabel = (0, import_element22.forwardRef)( 19699 function MenuItemLabel({ children, className, id, ...props }, ref) { 19700 const itemContentContext = useMenuItemContentContext(); 19701 return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)( 19702 Text, 19703 { 19704 ref, 19705 variant: "body-md", 19706 ...props, 19707 id: id ?? itemContentContext?.labelId, 19708 className: clsx_default(style_default4["item-label"], className), 19709 children: [ 19710 children, 19711 itemContentContext?.labelTrailing 19712 ] 19713 } 19714 ); 19715 } 19716 ); 19717 19718 // packages/ui/build-module/menu/item.mjs 19719 var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1); 19720 var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash"; 19721 function getRuntime5() { 19722 const globalScope = globalThis; 19723 if (globalScope.__wpStyleRuntime) { 19724 return globalScope.__wpStyleRuntime; 19725 } 19726 globalScope.__wpStyleRuntime = { 19727 documents: /* @__PURE__ */ new Map(), 19728 styles: /* @__PURE__ */ new Map(), 19729 injectedStyles: /* @__PURE__ */ new WeakMap() 19730 }; 19731 if (typeof document !== "undefined") { 19732 registerDocument5(document); 19733 } 19734 return globalScope.__wpStyleRuntime; 19735 } 19736 function documentContainsStyleHash5(targetDocument, hash) { 19737 if (!targetDocument.head) { 19738 return false; 19739 } 19740 for (const style of targetDocument.head.querySelectorAll( 19741 `style[$STYLE_HASH_ATTRIBUTE5}]` 19742 )) { 19743 if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) { 19744 return true; 19745 } 19746 } 19747 return false; 19748 } 19749 function injectStyle5(targetDocument, hash, css) { 19750 if (!targetDocument.head) { 19751 return; 19752 } 19753 const runtime = getRuntime5(); 19754 let injectedStyles = runtime.injectedStyles.get(targetDocument); 19755 if (!injectedStyles) { 19756 injectedStyles = /* @__PURE__ */ new Set(); 19757 runtime.injectedStyles.set(targetDocument, injectedStyles); 19758 } 19759 if (injectedStyles.has(hash)) { 19760 return; 19761 } 19762 if (documentContainsStyleHash5(targetDocument, hash)) { 19763 injectedStyles.add(hash); 19764 return; 19765 } 19766 const style = targetDocument.createElement("style"); 19767 style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash); 19768 style.appendChild(targetDocument.createTextNode(css)); 19769 targetDocument.head.appendChild(style); 19770 injectedStyles.add(hash); 19771 } 19772 function registerDocument5(targetDocument) { 19773 const runtime = getRuntime5(); 19774 runtime.documents.set( 19775 targetDocument, 19776 (runtime.documents.get(targetDocument) ?? 0) + 1 19777 ); 19778 for (const [hash, css] of runtime.styles) { 19779 injectStyle5(targetDocument, hash, css); 19780 } 19781 return () => { 19782 const count = runtime.documents.get(targetDocument); 19783 if (count === void 0) { 19784 return; 19785 } 19786 if (count <= 1) { 19787 runtime.documents.delete(targetDocument); 19788 return; 19789 } 19790 runtime.documents.set(targetDocument, count - 1); 19791 }; 19792 } 19793 function registerStyle5(hash, css) { 19794 const runtime = getRuntime5(); 19795 runtime.styles.set(hash, css); 19796 for (const targetDocument of runtime.documents.keys()) { 19797 injectStyle5(targetDocument, hash, css); 19798 } 19799 } 19800 if (typeof process === "undefined" || true) { 19801 registerStyle5("726f348f3f", "._78c10a0773e51a91__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)}._5b33aa2d48624b4f__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)}}._980b3b4776ac8f81__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._43e478b4279a076c__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._698099e25b0fb1a6__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)._326aee4184d261fd__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)}.e9576240835601ba__a,.e9576240835601ba__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)}._3f05789653864a73__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)}._3c72ff72abe57859__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._79d16267c15d9eb2__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 19802 } 19803 var global_css_defense_default2 = { "button": "_78c10a0773e51a91__button", "input": "_5b33aa2d48624b4f__input", "textarea": "_980b3b4776ac8f81__textarea", "div": "_43e478b4279a076c__div", "p": "_698099e25b0fb1a6__p", "heading": "_326aee4184d261fd__heading", "a": "e9576240835601ba__a", "ol": "_3f05789653864a73__ol", "li": "_3c72ff72abe57859__li", "span": "_79d16267c15d9eb2__span" }; 19804 if (typeof process === "undefined" || true) { 19805 registerStyle5("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 19806 } 19807 var resets_default = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 19808 if (typeof process === "undefined" || true) { 19809 registerStyle5("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 19810 } 19811 var style_default5 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 19812 var ITEM_CONTENT_COMPONENTS = { 19813 Label: ItemLabel, 19814 Description: ItemDescription, 19815 validationMessage: "Menu.ItemLabel must be the first direct child of every menu item, followed only by Menu.ItemDescription components.", 19816 descriptionValidationToken: ITEM_DESCRIPTION_DIRECT_CHILD 19817 }; 19818 function useItemContent2(children, { 19819 "aria-describedby": ariaDescribedBy, 19820 "aria-keyshortcuts": ariaKeyShortcuts, 19821 "aria-label": ariaLabel, 19822 "aria-labelledby": ariaLabelledBy, 19823 labelTrailing, 19824 shortcut 19825 }) { 19826 const { contentChildren, resolvedLabelId, itemAriaProps } = useItemContent(children, ITEM_CONTENT_COMPONENTS, { 19827 "aria-describedby": ariaDescribedBy, 19828 "aria-label": ariaLabel, 19829 "aria-labelledby": ariaLabelledBy 19830 }); 19831 const { 19832 descriptionId: shortcutDescriptionId, 19833 targetProps: shortcutAriaProps 19834 } = useKeyboardShortcutProps({ 19835 "aria-describedby": itemAriaProps["aria-describedby"], 19836 "aria-keyshortcuts": ariaKeyShortcuts, 19837 shortcut 19838 }); 19839 return { 19840 // React widens the tuple while mapping; validation preserves the item-child 19841 // contract and cloning changes only generated description IDs. 19842 contentChildren, 19843 contentContextValue: { 19844 labelId: resolvedLabelId, 19845 labelTrailing 19846 }, 19847 itemAriaProps: { 19848 ...shortcutAriaProps, 19849 "aria-label": itemAriaProps["aria-label"], 19850 "aria-labelledby": itemAriaProps["aria-labelledby"] 19851 }, 19852 shortcutDescriptionId 19853 }; 19854 } 19855 function ItemContent({ 19856 children, 19857 prefix, 19858 shortcut, 19859 shortcutDescriptionId, 19860 suffix, 19861 trailing 19862 }) { 19863 const hasPrefix = import_element23.Children.toArray(prefix).some( 19864 (child) => child !== "" 19865 ); 19866 const hasSuffix = import_element23.Children.toArray(suffix).some( 19867 (child) => child !== "" 19868 ); 19869 const hasTrailing = import_element23.Children.toArray(trailing).some( 19870 (child) => child !== "" 19871 ); 19872 const [label, ...descriptions] = import_element23.Children.toArray(children); 19873 return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [ 19874 /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)( 19875 "span", 19876 { 19877 className: clsx_default( 19878 style_default5["item-content"], 19879 hasPrefix && style_default5["has-prefix"] 19880 ), 19881 children: [ 19882 label, 19883 hasSuffix && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)( 19884 Text, 19885 { 19886 variant: "body-sm", 19887 className: style_default5["item-suffix"], 19888 children: suffix 19889 } 19890 ), 19891 shortcut && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)( 19892 Text, 19893 { 19894 variant: "body-sm", 19895 className: style_default5["item-shortcut"], 19896 children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(KeyboardShortcutDisplay, { shortcut }) 19897 } 19898 ), 19899 hasTrailing && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: style_default5["item-trailing"], children: trailing }) 19900 ] 19901 } 19902 ), 19903 descriptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: style_default5["item-descriptions"], children: descriptions }), 19904 hasPrefix && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { "aria-hidden": "true", className: style_default5["item-prefix"], children: prefix }), 19905 shortcut && shortcutDescriptionId && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)( 19906 KeyboardShortcutDescription, 19907 { 19908 descriptionId: shortcutDescriptionId, 19909 shortcut 19910 } 19911 ) 19912 ] }); 19913 } 19914 var Item = (0, import_element23.forwardRef)(function MenuItem3({ 19915 children, 19916 className, 19917 prefix, 19918 shortcut, 19919 suffix, 19920 "aria-describedby": ariaDescribedBy, 19921 "aria-keyshortcuts": ariaKeyShortcuts, 19922 "aria-label": ariaLabel, 19923 "aria-labelledby": ariaLabelledBy, 19924 ...props 19925 }, ref) { 19926 const { 19927 contentChildren, 19928 contentContextValue, 19929 itemAriaProps, 19930 shortcutDescriptionId 19931 } = useItemContent2(children, { 19932 "aria-describedby": ariaDescribedBy, 19933 "aria-keyshortcuts": ariaKeyShortcuts, 19934 "aria-label": ariaLabel, 19935 "aria-labelledby": ariaLabelledBy, 19936 shortcut 19937 }); 19938 return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)( 19939 index_parts_exports.Item, 19940 { 19941 ref, 19942 ...itemAriaProps, 19943 className: clsx_default( 19944 global_css_defense_default2.div, 19945 resets_default["box-sizing"], 19946 style_default5.item, 19947 className 19948 ), 19949 ...props, 19950 children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(MenuItemContentContext.Provider, { value: contentContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)( 19951 ItemContent, 19952 { 19953 prefix, 19954 shortcut, 19955 shortcutDescriptionId, 19956 suffix, 19957 children: contentChildren 19958 } 19959 ) }) 19960 } 19961 ); 19962 }); 19963 19964 // packages/ui/build-module/menu/checkbox-item.mjs 19965 var import_jsx_runtime78 = __toESM(require_jsx_runtime(), 1); 19966 var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash"; 19967 function getRuntime6() { 19968 const globalScope = globalThis; 19969 if (globalScope.__wpStyleRuntime) { 19970 return globalScope.__wpStyleRuntime; 19971 } 19972 globalScope.__wpStyleRuntime = { 19973 documents: /* @__PURE__ */ new Map(), 19974 styles: /* @__PURE__ */ new Map(), 19975 injectedStyles: /* @__PURE__ */ new WeakMap() 19976 }; 19977 if (typeof document !== "undefined") { 19978 registerDocument6(document); 19979 } 19980 return globalScope.__wpStyleRuntime; 19981 } 19982 function documentContainsStyleHash6(targetDocument, hash) { 19983 if (!targetDocument.head) { 19984 return false; 19985 } 19986 for (const style of targetDocument.head.querySelectorAll( 19987 `style[$STYLE_HASH_ATTRIBUTE6}]` 19988 )) { 19989 if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) { 19990 return true; 19991 } 19992 } 19993 return false; 19994 } 19995 function injectStyle6(targetDocument, hash, css) { 19996 if (!targetDocument.head) { 19997 return; 19998 } 19999 const runtime = getRuntime6(); 20000 let injectedStyles = runtime.injectedStyles.get(targetDocument); 20001 if (!injectedStyles) { 20002 injectedStyles = /* @__PURE__ */ new Set(); 20003 runtime.injectedStyles.set(targetDocument, injectedStyles); 20004 } 20005 if (injectedStyles.has(hash)) { 20006 return; 20007 } 20008 if (documentContainsStyleHash6(targetDocument, hash)) { 20009 injectedStyles.add(hash); 20010 return; 20011 } 20012 const style = targetDocument.createElement("style"); 20013 style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash); 20014 style.appendChild(targetDocument.createTextNode(css)); 20015 targetDocument.head.appendChild(style); 20016 injectedStyles.add(hash); 20017 } 20018 function registerDocument6(targetDocument) { 20019 const runtime = getRuntime6(); 20020 runtime.documents.set( 20021 targetDocument, 20022 (runtime.documents.get(targetDocument) ?? 0) + 1 20023 ); 20024 for (const [hash, css] of runtime.styles) { 20025 injectStyle6(targetDocument, hash, css); 20026 } 20027 return () => { 20028 const count = runtime.documents.get(targetDocument); 20029 if (count === void 0) { 20030 return; 20031 } 20032 if (count <= 1) { 20033 runtime.documents.delete(targetDocument); 20034 return; 20035 } 20036 runtime.documents.set(targetDocument, count - 1); 20037 }; 20038 } 20039 function registerStyle6(hash, css) { 20040 const runtime = getRuntime6(); 20041 runtime.styles.set(hash, css); 20042 for (const targetDocument of runtime.documents.keys()) { 20043 injectStyle6(targetDocument, hash, css); 20044 } 20045 } 20046 if (typeof process === "undefined" || true) { 20047 registerStyle6("726f348f3f", "._78c10a0773e51a91__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)}._5b33aa2d48624b4f__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)}}._980b3b4776ac8f81__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._43e478b4279a076c__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._698099e25b0fb1a6__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)._326aee4184d261fd__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)}.e9576240835601ba__a,.e9576240835601ba__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)}._3f05789653864a73__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)}._3c72ff72abe57859__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._79d16267c15d9eb2__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 20048 } 20049 var global_css_defense_default3 = { "button": "_78c10a0773e51a91__button", "input": "_5b33aa2d48624b4f__input", "textarea": "_980b3b4776ac8f81__textarea", "div": "_43e478b4279a076c__div", "p": "_698099e25b0fb1a6__p", "heading": "_326aee4184d261fd__heading", "a": "e9576240835601ba__a", "ol": "_3f05789653864a73__ol", "li": "_3c72ff72abe57859__li", "span": "_79d16267c15d9eb2__span" }; 20050 if (typeof process === "undefined" || true) { 20051 registerStyle6("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 20052 } 20053 var resets_default2 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 20054 if (typeof process === "undefined" || true) { 20055 registerStyle6("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 20056 } 20057 var style_default6 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 20058 var CheckboxItem = (0, import_element24.forwardRef)( 20059 function MenuCheckboxItem3({ 20060 children, 20061 className, 20062 prefix, 20063 shortcut, 20064 suffix, 20065 "aria-describedby": ariaDescribedBy, 20066 "aria-keyshortcuts": ariaKeyShortcuts, 20067 "aria-label": ariaLabel, 20068 "aria-labelledby": ariaLabelledBy, 20069 ...props 20070 }, ref) { 20071 const { 20072 contentChildren, 20073 contentContextValue, 20074 itemAriaProps, 20075 shortcutDescriptionId 20076 } = useItemContent2(children, { 20077 "aria-describedby": ariaDescribedBy, 20078 "aria-keyshortcuts": ariaKeyShortcuts, 20079 "aria-label": ariaLabel, 20080 "aria-labelledby": ariaLabelledBy, 20081 shortcut 20082 }); 20083 return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)( 20084 index_parts_exports.CheckboxItem, 20085 { 20086 ref, 20087 ...itemAriaProps, 20088 className: clsx_default( 20089 global_css_defense_default3.div, 20090 resets_default2["box-sizing"], 20091 style_default6.item, 20092 className 20093 ), 20094 ...props, 20095 children: [ 20096 /* @__PURE__ */ (0, import_jsx_runtime78.jsx)( 20097 index_parts_exports.CheckboxItemIndicator, 20098 { 20099 keepMounted: true, 20100 className: style_default6["item-selection-indicator"], 20101 children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)( 20102 Icon, 20103 { 20104 icon: check_default, 20105 size: 16, 20106 className: style_default6["checkbox-selection-icon"], 20107 "aria-hidden": "true" 20108 } 20109 ) 20110 } 20111 ), 20112 /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(MenuItemContentContext.Provider, { value: contentContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)( 20113 ItemContent, 20114 { 20115 prefix, 20116 shortcut, 20117 shortcutDescriptionId, 20118 suffix, 20119 children: contentChildren 20120 } 20121 ) }) 20122 ] 20123 } 20124 ); 20125 } 20126 ); 20127 20128 // packages/ui/build-module/menu/group.mjs 20129 var import_element25 = __toESM(require_element(), 1); 20130 var import_jsx_runtime79 = __toESM(require_jsx_runtime(), 1); 20131 var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash"; 20132 function getRuntime7() { 20133 const globalScope = globalThis; 20134 if (globalScope.__wpStyleRuntime) { 20135 return globalScope.__wpStyleRuntime; 20136 } 20137 globalScope.__wpStyleRuntime = { 20138 documents: /* @__PURE__ */ new Map(), 20139 styles: /* @__PURE__ */ new Map(), 20140 injectedStyles: /* @__PURE__ */ new WeakMap() 20141 }; 20142 if (typeof document !== "undefined") { 20143 registerDocument7(document); 20144 } 20145 return globalScope.__wpStyleRuntime; 20146 } 20147 function documentContainsStyleHash7(targetDocument, hash) { 20148 if (!targetDocument.head) { 20149 return false; 20150 } 20151 for (const style of targetDocument.head.querySelectorAll( 20152 `style[$STYLE_HASH_ATTRIBUTE7}]` 20153 )) { 20154 if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) { 20155 return true; 20156 } 20157 } 20158 return false; 20159 } 20160 function injectStyle7(targetDocument, hash, css) { 20161 if (!targetDocument.head) { 20162 return; 20163 } 20164 const runtime = getRuntime7(); 20165 let injectedStyles = runtime.injectedStyles.get(targetDocument); 20166 if (!injectedStyles) { 20167 injectedStyles = /* @__PURE__ */ new Set(); 20168 runtime.injectedStyles.set(targetDocument, injectedStyles); 20169 } 20170 if (injectedStyles.has(hash)) { 20171 return; 20172 } 20173 if (documentContainsStyleHash7(targetDocument, hash)) { 20174 injectedStyles.add(hash); 20175 return; 20176 } 20177 const style = targetDocument.createElement("style"); 20178 style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash); 20179 style.appendChild(targetDocument.createTextNode(css)); 20180 targetDocument.head.appendChild(style); 20181 injectedStyles.add(hash); 20182 } 20183 function registerDocument7(targetDocument) { 20184 const runtime = getRuntime7(); 20185 runtime.documents.set( 20186 targetDocument, 20187 (runtime.documents.get(targetDocument) ?? 0) + 1 20188 ); 20189 for (const [hash, css] of runtime.styles) { 20190 injectStyle7(targetDocument, hash, css); 20191 } 20192 return () => { 20193 const count = runtime.documents.get(targetDocument); 20194 if (count === void 0) { 20195 return; 20196 } 20197 if (count <= 1) { 20198 runtime.documents.delete(targetDocument); 20199 return; 20200 } 20201 runtime.documents.set(targetDocument, count - 1); 20202 }; 20203 } 20204 function registerStyle7(hash, css) { 20205 const runtime = getRuntime7(); 20206 runtime.styles.set(hash, css); 20207 for (const targetDocument of runtime.documents.keys()) { 20208 injectStyle7(targetDocument, hash, css); 20209 } 20210 } 20211 if (typeof process === "undefined" || true) { 20212 registerStyle7("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 20213 } 20214 var style_default7 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 20215 var Group = (0, import_element25.forwardRef)(function MenuGroup3({ className, ...props }, ref) { 20216 const parentGroup = useMenuGroupContext(); 20217 if (parentGroup === "radio-group") { 20218 throw new Error( 20219 "Menu.Group: Cannot be nested inside Menu.RadioGroup. Remove Menu.Group and put Menu.GroupLabel and Menu.RadioItem directly inside Menu.RadioGroup." 20220 ); 20221 } 20222 return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(MenuGroupContext2.Provider, { value: "group", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)( 20223 index_parts_exports.Group, 20224 { 20225 ref, 20226 className: clsx_default(style_default7.group, className), 20227 ...props 20228 } 20229 ) }); 20230 }); 20231 20232 // packages/ui/build-module/menu/group-label.mjs 20233 var import_element26 = __toESM(require_element(), 1); 20234 var import_jsx_runtime80 = __toESM(require_jsx_runtime(), 1); 20235 var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash"; 20236 function getRuntime8() { 20237 const globalScope = globalThis; 20238 if (globalScope.__wpStyleRuntime) { 20239 return globalScope.__wpStyleRuntime; 20240 } 20241 globalScope.__wpStyleRuntime = { 20242 documents: /* @__PURE__ */ new Map(), 20243 styles: /* @__PURE__ */ new Map(), 20244 injectedStyles: /* @__PURE__ */ new WeakMap() 20245 }; 20246 if (typeof document !== "undefined") { 20247 registerDocument8(document); 20248 } 20249 return globalScope.__wpStyleRuntime; 20250 } 20251 function documentContainsStyleHash8(targetDocument, hash) { 20252 if (!targetDocument.head) { 20253 return false; 20254 } 20255 for (const style of targetDocument.head.querySelectorAll( 20256 `style[$STYLE_HASH_ATTRIBUTE8}]` 20257 )) { 20258 if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) { 20259 return true; 20260 } 20261 } 20262 return false; 20263 } 20264 function injectStyle8(targetDocument, hash, css) { 20265 if (!targetDocument.head) { 20266 return; 20267 } 20268 const runtime = getRuntime8(); 20269 let injectedStyles = runtime.injectedStyles.get(targetDocument); 20270 if (!injectedStyles) { 20271 injectedStyles = /* @__PURE__ */ new Set(); 20272 runtime.injectedStyles.set(targetDocument, injectedStyles); 20273 } 20274 if (injectedStyles.has(hash)) { 20275 return; 20276 } 20277 if (documentContainsStyleHash8(targetDocument, hash)) { 20278 injectedStyles.add(hash); 20279 return; 20280 } 20281 const style = targetDocument.createElement("style"); 20282 style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash); 20283 style.appendChild(targetDocument.createTextNode(css)); 20284 targetDocument.head.appendChild(style); 20285 injectedStyles.add(hash); 20286 } 20287 function registerDocument8(targetDocument) { 20288 const runtime = getRuntime8(); 20289 runtime.documents.set( 20290 targetDocument, 20291 (runtime.documents.get(targetDocument) ?? 0) + 1 20292 ); 20293 for (const [hash, css] of runtime.styles) { 20294 injectStyle8(targetDocument, hash, css); 20295 } 20296 return () => { 20297 const count = runtime.documents.get(targetDocument); 20298 if (count === void 0) { 20299 return; 20300 } 20301 if (count <= 1) { 20302 runtime.documents.delete(targetDocument); 20303 return; 20304 } 20305 runtime.documents.set(targetDocument, count - 1); 20306 }; 20307 } 20308 function registerStyle8(hash, css) { 20309 const runtime = getRuntime8(); 20310 runtime.styles.set(hash, css); 20311 for (const targetDocument of runtime.documents.keys()) { 20312 injectStyle8(targetDocument, hash, css); 20313 } 20314 } 20315 if (typeof process === "undefined" || true) { 20316 registerStyle8("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 20317 } 20318 var style_default8 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 20319 var GroupLabel = (0, import_element26.forwardRef)( 20320 function MenuGroupLabel3({ className, ...props }, ref) { 20321 return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)( 20322 index_parts_exports.GroupLabel, 20323 { 20324 ref, 20325 className: clsx_default(style_default8["group-label"], className), 20326 ...props 20327 } 20328 ); 20329 } 20330 ); 20331 20332 // packages/ui/build-module/menu/link-item.mjs 20333 var import_element27 = __toESM(require_element(), 1); 20334 var import_i18n2 = __toESM(require_i18n(), 1); 20335 var import_jsx_runtime81 = __toESM(require_jsx_runtime(), 1); 20336 var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash"; 20337 function getRuntime9() { 20338 const globalScope = globalThis; 20339 if (globalScope.__wpStyleRuntime) { 20340 return globalScope.__wpStyleRuntime; 20341 } 20342 globalScope.__wpStyleRuntime = { 20343 documents: /* @__PURE__ */ new Map(), 20344 styles: /* @__PURE__ */ new Map(), 20345 injectedStyles: /* @__PURE__ */ new WeakMap() 20346 }; 20347 if (typeof document !== "undefined") { 20348 registerDocument9(document); 20349 } 20350 return globalScope.__wpStyleRuntime; 20351 } 20352 function documentContainsStyleHash9(targetDocument, hash) { 20353 if (!targetDocument.head) { 20354 return false; 20355 } 20356 for (const style of targetDocument.head.querySelectorAll( 20357 `style[$STYLE_HASH_ATTRIBUTE9}]` 20358 )) { 20359 if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) { 20360 return true; 20361 } 20362 } 20363 return false; 20364 } 20365 function injectStyle9(targetDocument, hash, css) { 20366 if (!targetDocument.head) { 20367 return; 20368 } 20369 const runtime = getRuntime9(); 20370 let injectedStyles = runtime.injectedStyles.get(targetDocument); 20371 if (!injectedStyles) { 20372 injectedStyles = /* @__PURE__ */ new Set(); 20373 runtime.injectedStyles.set(targetDocument, injectedStyles); 20374 } 20375 if (injectedStyles.has(hash)) { 20376 return; 20377 } 20378 if (documentContainsStyleHash9(targetDocument, hash)) { 20379 injectedStyles.add(hash); 20380 return; 20381 } 20382 const style = targetDocument.createElement("style"); 20383 style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash); 20384 style.appendChild(targetDocument.createTextNode(css)); 20385 targetDocument.head.appendChild(style); 20386 injectedStyles.add(hash); 20387 } 20388 function registerDocument9(targetDocument) { 20389 const runtime = getRuntime9(); 20390 runtime.documents.set( 20391 targetDocument, 20392 (runtime.documents.get(targetDocument) ?? 0) + 1 20393 ); 20394 for (const [hash, css] of runtime.styles) { 20395 injectStyle9(targetDocument, hash, css); 20396 } 20397 return () => { 20398 const count = runtime.documents.get(targetDocument); 20399 if (count === void 0) { 20400 return; 20401 } 20402 if (count <= 1) { 20403 runtime.documents.delete(targetDocument); 20404 return; 20405 } 20406 runtime.documents.set(targetDocument, count - 1); 20407 }; 20408 } 20409 function registerStyle9(hash, css) { 20410 const runtime = getRuntime9(); 20411 runtime.styles.set(hash, css); 20412 for (const targetDocument of runtime.documents.keys()) { 20413 injectStyle9(targetDocument, hash, css); 20414 } 20415 } 20416 if (typeof process === "undefined" || true) { 20417 registerStyle9("726f348f3f", "._78c10a0773e51a91__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)}._5b33aa2d48624b4f__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)}}._980b3b4776ac8f81__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._43e478b4279a076c__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._698099e25b0fb1a6__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)._326aee4184d261fd__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)}.e9576240835601ba__a,.e9576240835601ba__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)}._3f05789653864a73__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)}._3c72ff72abe57859__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._79d16267c15d9eb2__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 20418 } 20419 var global_css_defense_default4 = { "button": "_78c10a0773e51a91__button", "input": "_5b33aa2d48624b4f__input", "textarea": "_980b3b4776ac8f81__textarea", "div": "_43e478b4279a076c__div", "p": "_698099e25b0fb1a6__p", "heading": "_326aee4184d261fd__heading", "a": "e9576240835601ba__a", "ol": "_3f05789653864a73__ol", "li": "_3c72ff72abe57859__li", "span": "_79d16267c15d9eb2__span" }; 20420 if (typeof process === "undefined" || true) { 20421 registerStyle9("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 20422 } 20423 var resets_default3 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 20424 if (typeof process === "undefined" || true) { 20425 registerStyle9("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 20426 } 20427 var style_default9 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 20428 var LinkItem = (0, import_element27.forwardRef)(function MenuLinkItem3({ 20429 children, 20430 className, 20431 openInNewTab = false, 20432 target, 20433 prefix, 20434 shortcut, 20435 suffix, 20436 "aria-describedby": ariaDescribedBy, 20437 "aria-keyshortcuts": ariaKeyShortcuts, 20438 "aria-label": ariaLabel, 20439 "aria-labelledby": ariaLabelledBy, 20440 rel, 20441 ...props 20442 }, ref) { 20443 const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? ""); 20444 const externalLinkIndicator = shouldShowNewTabIndicator ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)( 20445 "span", 20446 { 20447 className: style_default9["external-link-indicator"], 20448 role: "img", 20449 "aria-label": ( 20450 /* translators: accessibility text appended to link text */ 20451 (0, import_i18n2.__)("(opens in a new tab)") 20452 ) 20453 } 20454 ) : null; 20455 const { 20456 contentChildren, 20457 contentContextValue, 20458 itemAriaProps, 20459 shortcutDescriptionId 20460 } = useItemContent2(children, { 20461 "aria-describedby": ariaDescribedBy, 20462 "aria-keyshortcuts": ariaKeyShortcuts, 20463 "aria-label": ariaLabel, 20464 "aria-labelledby": ariaLabelledBy, 20465 labelTrailing: externalLinkIndicator, 20466 shortcut 20467 }); 20468 return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)( 20469 index_parts_exports.LinkItem, 20470 { 20471 ref, 20472 ...props, 20473 ...itemAriaProps, 20474 rel, 20475 target: target ?? (openInNewTab ? "_blank" : void 0), 20476 className: clsx_default( 20477 global_css_defense_default4.a, 20478 resets_default3["box-sizing"], 20479 style_default9.item, 20480 className 20481 ), 20482 children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(MenuItemContentContext.Provider, { value: contentContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)( 20483 ItemContent, 20484 { 20485 prefix, 20486 shortcut, 20487 shortcutDescriptionId, 20488 suffix, 20489 children: contentChildren 20490 } 20491 ) }) 20492 } 20493 ); 20494 }); 20495 20496 // packages/ui/build-module/menu/popup.mjs 20497 var import_element31 = __toESM(require_element(), 1); 20498 20499 // packages/ui/build-module/utils/render-slot-with-children.mjs 20500 var import_element28 = __toESM(require_element(), 1); 20501 function renderSlotWithChildren(slot, defaultSlot, children) { 20502 return (0, import_element28.cloneElement)( 20503 slot ?? defaultSlot, 20504 { children } 20505 ); 20506 } 20507 20508 // packages/ui/build-module/menu/portal.mjs 20509 var import_element29 = __toESM(require_element(), 1); 20510 20511 // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs 20512 var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash"; 20513 function getRuntime10() { 20514 const globalScope = globalThis; 20515 if (globalScope.__wpStyleRuntime) { 20516 return globalScope.__wpStyleRuntime; 20517 } 20518 globalScope.__wpStyleRuntime = { 20519 documents: /* @__PURE__ */ new Map(), 20520 styles: /* @__PURE__ */ new Map(), 20521 injectedStyles: /* @__PURE__ */ new WeakMap() 20522 }; 20523 if (typeof document !== "undefined") { 20524 registerDocument10(document); 20525 } 20526 return globalScope.__wpStyleRuntime; 20527 } 20528 function documentContainsStyleHash10(targetDocument, hash) { 20529 if (!targetDocument.head) { 20530 return false; 20531 } 20532 for (const style of targetDocument.head.querySelectorAll( 20533 `style[$STYLE_HASH_ATTRIBUTE10}]` 20534 )) { 20535 if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) { 20536 return true; 20537 } 20538 } 20539 return false; 20540 } 20541 function injectStyle10(targetDocument, hash, css) { 20542 if (!targetDocument.head) { 20543 return; 20544 } 20545 const runtime = getRuntime10(); 20546 let injectedStyles = runtime.injectedStyles.get(targetDocument); 20547 if (!injectedStyles) { 20548 injectedStyles = /* @__PURE__ */ new Set(); 20549 runtime.injectedStyles.set(targetDocument, injectedStyles); 20550 } 20551 if (injectedStyles.has(hash)) { 20552 return; 20553 } 20554 if (documentContainsStyleHash10(targetDocument, hash)) { 20555 injectedStyles.add(hash); 20556 return; 20557 } 20558 const style = targetDocument.createElement("style"); 20559 style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash); 20560 style.appendChild(targetDocument.createTextNode(css)); 20561 targetDocument.head.appendChild(style); 20562 injectedStyles.add(hash); 20563 } 20564 function registerDocument10(targetDocument) { 20565 const runtime = getRuntime10(); 20566 runtime.documents.set( 20567 targetDocument, 20568 (runtime.documents.get(targetDocument) ?? 0) + 1 20569 ); 20570 for (const [hash, css] of runtime.styles) { 20571 injectStyle10(targetDocument, hash, css); 20572 } 20573 return () => { 20574 const count = runtime.documents.get(targetDocument); 20575 if (count === void 0) { 20576 return; 20577 } 20578 if (count <= 1) { 20579 runtime.documents.delete(targetDocument); 20580 return; 20581 } 20582 runtime.documents.set(targetDocument, count - 1); 20583 }; 20584 } 20585 function registerStyle10(hash, css) { 20586 const runtime = getRuntime10(); 20587 runtime.styles.set(hash, css); 20588 for (const targetDocument of runtime.documents.keys()) { 20589 injectStyle10(targetDocument, hash, css); 20590 } 20591 } 20592 if (typeof process === "undefined" || true) { 20593 registerStyle10("40df669685", "._9e7887c25dedb459__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._9e7887c25dedb459__slot>*{pointer-events:auto}}}"); 20594 } 20595 var wp_compat_overlay_slot_default = { "slot": "_9e7887c25dedb459__slot" }; 20596 var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot"; 20597 function resolveOwnerDocument() { 20598 return typeof document === "undefined" ? null : document; 20599 } 20600 function isInWordPressEnvironment() { 20601 let topWp; 20602 try { 20603 topWp = window.top?.wp; 20604 } catch { 20605 } 20606 const wp = topWp ?? window.wp; 20607 return typeof wp?.components === "object" && wp.components !== null; 20608 } 20609 var cachedSlot = null; 20610 function ensureSlotIsAccessible(element) { 20611 element.setAttribute("aria-hidden", "false"); 20612 return element; 20613 } 20614 function createSlot(ownerDocument2) { 20615 const element = ownerDocument2.createElement("div"); 20616 element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, ""); 20617 if (wp_compat_overlay_slot_default.slot) { 20618 element.classList.add(wp_compat_overlay_slot_default.slot); 20619 } 20620 ownerDocument2.body.appendChild(element); 20621 return element; 20622 } 20623 function getWpCompatOverlaySlot() { 20624 if (typeof window === "undefined") { 20625 return void 0; 20626 } 20627 if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) { 20628 return void 0; 20629 } 20630 const ownerDocument2 = resolveOwnerDocument(); 20631 if (!ownerDocument2 || !ownerDocument2.body) { 20632 return void 0; 20633 } 20634 if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) { 20635 return ensureSlotIsAccessible(cachedSlot); 20636 } 20637 const existing = ownerDocument2.querySelector( 20638 `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]` 20639 ); 20640 if (existing instanceof HTMLDivElement) { 20641 cachedSlot = ensureSlotIsAccessible(existing); 20642 return cachedSlot; 20643 } 20644 if (cachedSlot?.isConnected) { 20645 cachedSlot.remove(); 20646 } 20647 cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2)); 20648 return cachedSlot; 20649 } 20650 20651 // packages/ui/build-module/menu/portal.mjs 20652 var import_jsx_runtime82 = __toESM(require_jsx_runtime(), 1); 20653 var Portal = (0, import_element29.forwardRef)(function MenuPortal3({ container, ...props }, ref) { 20654 return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)( 20655 index_parts_exports.Portal, 20656 { 20657 ref, 20658 container: container === void 0 ? getWpCompatOverlaySlot() : container, 20659 ...props 20660 } 20661 ); 20662 }); 20663 20664 // packages/ui/build-module/menu/positioner.mjs 20665 var import_element30 = __toESM(require_element(), 1); 20666 var import_compose = __toESM(require_compose(), 1); 20667 20668 // packages/ui/build-module/form/primitives/constants.mjs 20669 var ITEM_POPUP_POSITIONER_PROPS = { 20670 align: "start", 20671 sideOffset: 8, 20672 collisionPadding: 12 20673 }; 20674 20675 // packages/ui/build-module/menu/positioner.mjs 20676 var import_jsx_runtime83 = __toESM(require_jsx_runtime(), 1); 20677 var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash"; 20678 function getRuntime11() { 20679 const globalScope = globalThis; 20680 if (globalScope.__wpStyleRuntime) { 20681 return globalScope.__wpStyleRuntime; 20682 } 20683 globalScope.__wpStyleRuntime = { 20684 documents: /* @__PURE__ */ new Map(), 20685 styles: /* @__PURE__ */ new Map(), 20686 injectedStyles: /* @__PURE__ */ new WeakMap() 20687 }; 20688 if (typeof document !== "undefined") { 20689 registerDocument11(document); 20690 } 20691 return globalScope.__wpStyleRuntime; 20692 } 20693 function documentContainsStyleHash11(targetDocument, hash) { 20694 if (!targetDocument.head) { 20695 return false; 20696 } 20697 for (const style of targetDocument.head.querySelectorAll( 20698 `style[$STYLE_HASH_ATTRIBUTE11}]` 20699 )) { 20700 if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) { 20701 return true; 20702 } 20703 } 20704 return false; 20705 } 20706 function injectStyle11(targetDocument, hash, css) { 20707 if (!targetDocument.head) { 20708 return; 20709 } 20710 const runtime = getRuntime11(); 20711 let injectedStyles = runtime.injectedStyles.get(targetDocument); 20712 if (!injectedStyles) { 20713 injectedStyles = /* @__PURE__ */ new Set(); 20714 runtime.injectedStyles.set(targetDocument, injectedStyles); 20715 } 20716 if (injectedStyles.has(hash)) { 20717 return; 20718 } 20719 if (documentContainsStyleHash11(targetDocument, hash)) { 20720 injectedStyles.add(hash); 20721 return; 20722 } 20723 const style = targetDocument.createElement("style"); 20724 style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash); 20725 style.appendChild(targetDocument.createTextNode(css)); 20726 targetDocument.head.appendChild(style); 20727 injectedStyles.add(hash); 20728 } 20729 function registerDocument11(targetDocument) { 20730 const runtime = getRuntime11(); 20731 runtime.documents.set( 20732 targetDocument, 20733 (runtime.documents.get(targetDocument) ?? 0) + 1 20734 ); 20735 for (const [hash, css] of runtime.styles) { 20736 injectStyle11(targetDocument, hash, css); 20737 } 20738 return () => { 20739 const count = runtime.documents.get(targetDocument); 20740 if (count === void 0) { 20741 return; 20742 } 20743 if (count <= 1) { 20744 runtime.documents.delete(targetDocument); 20745 return; 20746 } 20747 runtime.documents.set(targetDocument, count - 1); 20748 }; 20749 } 20750 function registerStyle11(hash, css) { 20751 const runtime = getRuntime11(); 20752 runtime.styles.set(hash, css); 20753 for (const targetDocument of runtime.documents.keys()) { 20754 injectStyle11(targetDocument, hash, css); 20755 } 20756 } 20757 if (typeof process === "undefined" || true) { 20758 registerStyle11("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 20759 } 20760 var resets_default4 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 20761 if (typeof process === "undefined" || true) { 20762 registerStyle11("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 20763 } 20764 var style_default10 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 20765 var MENU_SUBMENU_POPUP_POSITIONER_PROPS = { 20766 side: "inline-end", 20767 align: "start", 20768 sideOffset: -4, 20769 collisionPadding: 12 20770 }; 20771 function getSubmenuLabelOffset(positioner, trigger) { 20772 const popup = positioner?.querySelector(`.$style_default10.popup}`); 20773 if (!positioner || !popup) { 20774 return 0; 20775 } 20776 const parentLabel = trigger?.querySelector( 20777 `.$style_default10["item-label"]}` 20778 ); 20779 const firstLabel = popup?.querySelector(`.$style_default10["item-label"]}`); 20780 if (!trigger || !parentLabel || !firstLabel) { 20781 const popupStyles = popup.ownerDocument.defaultView?.getComputedStyle(popup); 20782 if (!popupStyles) { 20783 return 0; 20784 } 20785 return -(parseFloat(popupStyles.paddingTop) + parseFloat(popupStyles.borderTopWidth)); 20786 } 20787 const parentInset = parentLabel.getBoundingClientRect().top - trigger.getBoundingClientRect().top; 20788 const submenuInset = firstLabel.getBoundingClientRect().top - positioner.getBoundingClientRect().top; 20789 return parentInset - submenuInset; 20790 } 20791 var Positioner = (0, import_element30.forwardRef)( 20792 function MenuPositioner3({ className, ...props }, ref) { 20793 const { isSubmenu, submenuTriggerRef } = useMenuContext(); 20794 const positionerRef = (0, import_element30.useRef)(null); 20795 const mergedRef = (0, import_compose.useMergeRefs)([ref, positionerRef]); 20796 const [measuredAnchor, setMeasuredAnchor] = (0, import_element30.useState)(); 20797 const lastOffsetRef = (0, import_element30.useRef)(0); 20798 const defaultProps = isSubmenu ? MENU_SUBMENU_POPUP_POSITIONER_PROPS : ITEM_POPUP_POSITIONER_PROPS; 20799 const alignOffset = (0, import_element30.useCallback)( 20800 (dimensions) => { 20801 const { side, align } = dimensions; 20802 if (side === "top" || side === "bottom" || align !== "start") { 20803 return 0; 20804 } 20805 const positioner = positionerRef.current; 20806 if (!positioner) { 20807 return 0; 20808 } 20809 if (positioner.hidden || positioner.hasAttribute("data-closed")) { 20810 return lastOffsetRef.current; 20811 } 20812 const trigger = props.anchor ? void 0 : submenuTriggerRef?.current; 20813 const offset4 = getSubmenuLabelOffset(positioner, trigger); 20814 lastOffsetRef.current = offset4; 20815 return offset4; 20816 }, 20817 [props.anchor, submenuTriggerRef] 20818 ); 20819 (0, import_compose.useIsomorphicLayoutEffect)(() => { 20820 if (!isSubmenu || props.anchor || props.alignOffset !== void 0 || props.disableAnchorTracking) { 20821 return; 20822 } 20823 const positioner = positionerRef.current; 20824 const trigger = submenuTriggerRef?.current; 20825 const popup = positioner?.querySelector(`.$style_default10.popup}`); 20826 const firstLabel = popup?.querySelector( 20827 `.$style_default10["item-label"]}` 20828 ); 20829 const ResizeObserverConstructor = positioner?.ownerDocument.defaultView?.ResizeObserver; 20830 if (!trigger || !firstLabel || !ResizeObserverConstructor) { 20831 return; 20832 } 20833 const observer = new ResizeObserverConstructor(() => { 20834 if (!positioner || positioner.hidden || positioner.hasAttribute("data-closed") || positioner.dataset.side === "top" || positioner.dataset.side === "bottom" || positioner.dataset.align !== "start") { 20835 return; 20836 } 20837 const nextOffset = getSubmenuLabelOffset(positioner, trigger); 20838 const previousOffset = lastOffsetRef.current; 20839 lastOffsetRef.current = nextOffset; 20840 if (previousOffset !== void 0 && Math.abs(nextOffset - previousOffset) < 0.01) { 20841 return; 20842 } 20843 setMeasuredAnchor({ 20844 contextElement: trigger, 20845 getBoundingClientRect: () => trigger.getBoundingClientRect() 20846 }); 20847 }); 20848 const observedElements = [ 20849 firstLabel, 20850 firstLabel.closest(`.$style_default10.item}`), 20851 popup?.querySelector(`.$style_default10.list}`), 20852 trigger.querySelector(`.$style_default10["item-label"]}`) 20853 ]; 20854 observedElements.forEach((element) => { 20855 if (element) { 20856 observer.observe(element); 20857 } 20858 }); 20859 return () => observer.disconnect(); 20860 }, [ 20861 isSubmenu, 20862 props.anchor, 20863 props.alignOffset, 20864 props.disableAnchorTracking, 20865 submenuTriggerRef 20866 ]); 20867 return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)( 20868 index_parts_exports.Positioner, 20869 { 20870 ...defaultProps, 20871 anchor: isSubmenu ? measuredAnchor : void 0, 20872 alignOffset: isSubmenu ? alignOffset : void 0, 20873 ...props, 20874 ref: mergedRef, 20875 className: clsx_default( 20876 resets_default4["box-sizing"], 20877 style_default10.positioner, 20878 className 20879 ) 20880 } 20881 ); 20882 } 20883 ); 20884 20885 // packages/ui/build-module/menu/popup.mjs 20886 var import_jsx_runtime84 = __toESM(require_jsx_runtime(), 1); 20887 var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash"; 20888 function getRuntime12() { 20889 const globalScope = globalThis; 20890 if (globalScope.__wpStyleRuntime) { 20891 return globalScope.__wpStyleRuntime; 20892 } 20893 globalScope.__wpStyleRuntime = { 20894 documents: /* @__PURE__ */ new Map(), 20895 styles: /* @__PURE__ */ new Map(), 20896 injectedStyles: /* @__PURE__ */ new WeakMap() 20897 }; 20898 if (typeof document !== "undefined") { 20899 registerDocument12(document); 20900 } 20901 return globalScope.__wpStyleRuntime; 20902 } 20903 function documentContainsStyleHash12(targetDocument, hash) { 20904 if (!targetDocument.head) { 20905 return false; 20906 } 20907 for (const style of targetDocument.head.querySelectorAll( 20908 `style[$STYLE_HASH_ATTRIBUTE12}]` 20909 )) { 20910 if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) { 20911 return true; 20912 } 20913 } 20914 return false; 20915 } 20916 function injectStyle12(targetDocument, hash, css) { 20917 if (!targetDocument.head) { 20918 return; 20919 } 20920 const runtime = getRuntime12(); 20921 let injectedStyles = runtime.injectedStyles.get(targetDocument); 20922 if (!injectedStyles) { 20923 injectedStyles = /* @__PURE__ */ new Set(); 20924 runtime.injectedStyles.set(targetDocument, injectedStyles); 20925 } 20926 if (injectedStyles.has(hash)) { 20927 return; 20928 } 20929 if (documentContainsStyleHash12(targetDocument, hash)) { 20930 injectedStyles.add(hash); 20931 return; 20932 } 20933 const style = targetDocument.createElement("style"); 20934 style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash); 20935 style.appendChild(targetDocument.createTextNode(css)); 20936 targetDocument.head.appendChild(style); 20937 injectedStyles.add(hash); 20938 } 20939 function registerDocument12(targetDocument) { 20940 const runtime = getRuntime12(); 20941 runtime.documents.set( 20942 targetDocument, 20943 (runtime.documents.get(targetDocument) ?? 0) + 1 20944 ); 20945 for (const [hash, css] of runtime.styles) { 20946 injectStyle12(targetDocument, hash, css); 20947 } 20948 return () => { 20949 const count = runtime.documents.get(targetDocument); 20950 if (count === void 0) { 20951 return; 20952 } 20953 if (count <= 1) { 20954 runtime.documents.delete(targetDocument); 20955 return; 20956 } 20957 runtime.documents.set(targetDocument, count - 1); 20958 }; 20959 } 20960 function registerStyle12(hash, css) { 20961 const runtime = getRuntime12(); 20962 runtime.styles.set(hash, css); 20963 for (const targetDocument of runtime.documents.keys()) { 20964 injectStyle12(targetDocument, hash, css); 20965 } 20966 } 20967 if (typeof process === "undefined" || true) { 20968 registerStyle12("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 20969 } 20970 var style_default11 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 20971 var Popup = (0, import_element31.forwardRef)(function MenuPopup3({ children, className, portal, positioner, ...props }, ref) { 20972 const { isSubmenu } = useMenuContext(); 20973 const popupContent = /* @__PURE__ */ (0, import_jsx_runtime84.jsx)( 20974 index_parts_exports.Popup, 20975 { 20976 ref, 20977 className: clsx_default( 20978 style_default11.popup, 20979 isSubmenu ? style_default11["is-submenu"] : style_default11["is-root"], 20980 className 20981 ), 20982 ...props, 20983 children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)( 20984 "div", 20985 { 20986 className: style_default11.list, 20987 children 20988 } 20989 ) 20990 } 20991 ); 20992 const positionedPopup = renderSlotWithChildren( 20993 positioner, 20994 /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Positioner, {}), 20995 popupContent 20996 ); 20997 return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Portal, {}), positionedPopup); 20998 }); 20999 21000 // packages/ui/build-module/menu/prefix-icon.mjs 21001 var import_element32 = __toESM(require_element(), 1); 21002 var import_jsx_runtime85 = __toESM(require_jsx_runtime(), 1); 21003 var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash"; 21004 function getRuntime13() { 21005 const globalScope = globalThis; 21006 if (globalScope.__wpStyleRuntime) { 21007 return globalScope.__wpStyleRuntime; 21008 } 21009 globalScope.__wpStyleRuntime = { 21010 documents: /* @__PURE__ */ new Map(), 21011 styles: /* @__PURE__ */ new Map(), 21012 injectedStyles: /* @__PURE__ */ new WeakMap() 21013 }; 21014 if (typeof document !== "undefined") { 21015 registerDocument13(document); 21016 } 21017 return globalScope.__wpStyleRuntime; 21018 } 21019 function documentContainsStyleHash13(targetDocument, hash) { 21020 if (!targetDocument.head) { 21021 return false; 21022 } 21023 for (const style of targetDocument.head.querySelectorAll( 21024 `style[$STYLE_HASH_ATTRIBUTE13}]` 21025 )) { 21026 if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) { 21027 return true; 21028 } 21029 } 21030 return false; 21031 } 21032 function injectStyle13(targetDocument, hash, css) { 21033 if (!targetDocument.head) { 21034 return; 21035 } 21036 const runtime = getRuntime13(); 21037 let injectedStyles = runtime.injectedStyles.get(targetDocument); 21038 if (!injectedStyles) { 21039 injectedStyles = /* @__PURE__ */ new Set(); 21040 runtime.injectedStyles.set(targetDocument, injectedStyles); 21041 } 21042 if (injectedStyles.has(hash)) { 21043 return; 21044 } 21045 if (documentContainsStyleHash13(targetDocument, hash)) { 21046 injectedStyles.add(hash); 21047 return; 21048 } 21049 const style = targetDocument.createElement("style"); 21050 style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash); 21051 style.appendChild(targetDocument.createTextNode(css)); 21052 targetDocument.head.appendChild(style); 21053 injectedStyles.add(hash); 21054 } 21055 function registerDocument13(targetDocument) { 21056 const runtime = getRuntime13(); 21057 runtime.documents.set( 21058 targetDocument, 21059 (runtime.documents.get(targetDocument) ?? 0) + 1 21060 ); 21061 for (const [hash, css] of runtime.styles) { 21062 injectStyle13(targetDocument, hash, css); 21063 } 21064 return () => { 21065 const count = runtime.documents.get(targetDocument); 21066 if (count === void 0) { 21067 return; 21068 } 21069 if (count <= 1) { 21070 runtime.documents.delete(targetDocument); 21071 return; 21072 } 21073 runtime.documents.set(targetDocument, count - 1); 21074 }; 21075 } 21076 function registerStyle13(hash, css) { 21077 const runtime = getRuntime13(); 21078 runtime.styles.set(hash, css); 21079 for (const targetDocument of runtime.documents.keys()) { 21080 injectStyle13(targetDocument, hash, css); 21081 } 21082 } 21083 if (typeof process === "undefined" || true) { 21084 registerStyle13("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 21085 } 21086 var style_default12 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 21087 var PrefixIcon = (0, import_element32.forwardRef)( 21088 function MenuPrefixIcon({ className, size: size4 = 16, style, ...props }, ref) { 21089 return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)( 21090 Icon, 21091 { 21092 ...props, 21093 ref, 21094 size: size4, 21095 className: clsx_default(style_default12["prefix-icon"], className), 21096 style: { 21097 ...style, 21098 "--_wp-ui-menu-prefix-icon-size": `$size4}px` 21099 } 21100 } 21101 ); 21102 } 21103 ); 21104 PrefixIcon.displayName = "Menu.PrefixIcon"; 21105 21106 // packages/ui/build-module/menu/radio-group.mjs 21107 var import_element33 = __toESM(require_element(), 1); 21108 var import_jsx_runtime86 = __toESM(require_jsx_runtime(), 1); 21109 var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash"; 21110 function getRuntime14() { 21111 const globalScope = globalThis; 21112 if (globalScope.__wpStyleRuntime) { 21113 return globalScope.__wpStyleRuntime; 21114 } 21115 globalScope.__wpStyleRuntime = { 21116 documents: /* @__PURE__ */ new Map(), 21117 styles: /* @__PURE__ */ new Map(), 21118 injectedStyles: /* @__PURE__ */ new WeakMap() 21119 }; 21120 if (typeof document !== "undefined") { 21121 registerDocument14(document); 21122 } 21123 return globalScope.__wpStyleRuntime; 21124 } 21125 function documentContainsStyleHash14(targetDocument, hash) { 21126 if (!targetDocument.head) { 21127 return false; 21128 } 21129 for (const style of targetDocument.head.querySelectorAll( 21130 `style[$STYLE_HASH_ATTRIBUTE14}]` 21131 )) { 21132 if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) { 21133 return true; 21134 } 21135 } 21136 return false; 21137 } 21138 function injectStyle14(targetDocument, hash, css) { 21139 if (!targetDocument.head) { 21140 return; 21141 } 21142 const runtime = getRuntime14(); 21143 let injectedStyles = runtime.injectedStyles.get(targetDocument); 21144 if (!injectedStyles) { 21145 injectedStyles = /* @__PURE__ */ new Set(); 21146 runtime.injectedStyles.set(targetDocument, injectedStyles); 21147 } 21148 if (injectedStyles.has(hash)) { 21149 return; 21150 } 21151 if (documentContainsStyleHash14(targetDocument, hash)) { 21152 injectedStyles.add(hash); 21153 return; 21154 } 21155 const style = targetDocument.createElement("style"); 21156 style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash); 21157 style.appendChild(targetDocument.createTextNode(css)); 21158 targetDocument.head.appendChild(style); 21159 injectedStyles.add(hash); 21160 } 21161 function registerDocument14(targetDocument) { 21162 const runtime = getRuntime14(); 21163 runtime.documents.set( 21164 targetDocument, 21165 (runtime.documents.get(targetDocument) ?? 0) + 1 21166 ); 21167 for (const [hash, css] of runtime.styles) { 21168 injectStyle14(targetDocument, hash, css); 21169 } 21170 return () => { 21171 const count = runtime.documents.get(targetDocument); 21172 if (count === void 0) { 21173 return; 21174 } 21175 if (count <= 1) { 21176 runtime.documents.delete(targetDocument); 21177 return; 21178 } 21179 runtime.documents.set(targetDocument, count - 1); 21180 }; 21181 } 21182 function registerStyle14(hash, css) { 21183 const runtime = getRuntime14(); 21184 runtime.styles.set(hash, css); 21185 for (const targetDocument of runtime.documents.keys()) { 21186 injectStyle14(targetDocument, hash, css); 21187 } 21188 } 21189 if (typeof process === "undefined" || true) { 21190 registerStyle14("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 21191 } 21192 var style_default13 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 21193 var RadioGroup = (0, import_element33.forwardRef)( 21194 function MenuRadioGroup3({ className, ...props }, ref) { 21195 const parentGroup = useMenuGroupContext(); 21196 if (parentGroup === "group") { 21197 throw new Error( 21198 "Menu.RadioGroup: Cannot be nested inside Menu.Group. Move Menu.RadioGroup outside Menu.Group and put its Menu.GroupLabel inside Menu.RadioGroup." 21199 ); 21200 } 21201 return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(MenuGroupContext2.Provider, { value: "radio-group", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)( 21202 index_parts_exports.RadioGroup, 21203 { 21204 ref, 21205 className: clsx_default(style_default13["radio-group"], className), 21206 ...props 21207 } 21208 ) }); 21209 } 21210 ); 21211 21212 // packages/ui/build-module/menu/radio-item.mjs 21213 var import_element34 = __toESM(require_element(), 1); 21214 var import_primitives22 = __toESM(require_primitives(), 1); 21215 var import_jsx_runtime87 = __toESM(require_jsx_runtime(), 1); 21216 var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash"; 21217 function getRuntime15() { 21218 const globalScope = globalThis; 21219 if (globalScope.__wpStyleRuntime) { 21220 return globalScope.__wpStyleRuntime; 21221 } 21222 globalScope.__wpStyleRuntime = { 21223 documents: /* @__PURE__ */ new Map(), 21224 styles: /* @__PURE__ */ new Map(), 21225 injectedStyles: /* @__PURE__ */ new WeakMap() 21226 }; 21227 if (typeof document !== "undefined") { 21228 registerDocument15(document); 21229 } 21230 return globalScope.__wpStyleRuntime; 21231 } 21232 function documentContainsStyleHash15(targetDocument, hash) { 21233 if (!targetDocument.head) { 21234 return false; 21235 } 21236 for (const style of targetDocument.head.querySelectorAll( 21237 `style[$STYLE_HASH_ATTRIBUTE15}]` 21238 )) { 21239 if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) { 21240 return true; 21241 } 21242 } 21243 return false; 21244 } 21245 function injectStyle15(targetDocument, hash, css) { 21246 if (!targetDocument.head) { 21247 return; 21248 } 21249 const runtime = getRuntime15(); 21250 let injectedStyles = runtime.injectedStyles.get(targetDocument); 21251 if (!injectedStyles) { 21252 injectedStyles = /* @__PURE__ */ new Set(); 21253 runtime.injectedStyles.set(targetDocument, injectedStyles); 21254 } 21255 if (injectedStyles.has(hash)) { 21256 return; 21257 } 21258 if (documentContainsStyleHash15(targetDocument, hash)) { 21259 injectedStyles.add(hash); 21260 return; 21261 } 21262 const style = targetDocument.createElement("style"); 21263 style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash); 21264 style.appendChild(targetDocument.createTextNode(css)); 21265 targetDocument.head.appendChild(style); 21266 injectedStyles.add(hash); 21267 } 21268 function registerDocument15(targetDocument) { 21269 const runtime = getRuntime15(); 21270 runtime.documents.set( 21271 targetDocument, 21272 (runtime.documents.get(targetDocument) ?? 0) + 1 21273 ); 21274 for (const [hash, css] of runtime.styles) { 21275 injectStyle15(targetDocument, hash, css); 21276 } 21277 return () => { 21278 const count = runtime.documents.get(targetDocument); 21279 if (count === void 0) { 21280 return; 21281 } 21282 if (count <= 1) { 21283 runtime.documents.delete(targetDocument); 21284 return; 21285 } 21286 runtime.documents.set(targetDocument, count - 1); 21287 }; 21288 } 21289 function registerStyle15(hash, css) { 21290 const runtime = getRuntime15(); 21291 runtime.styles.set(hash, css); 21292 for (const targetDocument of runtime.documents.keys()) { 21293 injectStyle15(targetDocument, hash, css); 21294 } 21295 } 21296 if (typeof process === "undefined" || true) { 21297 registerStyle15("726f348f3f", "._78c10a0773e51a91__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)}._5b33aa2d48624b4f__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)}}._980b3b4776ac8f81__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._43e478b4279a076c__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._698099e25b0fb1a6__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)._326aee4184d261fd__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)}.e9576240835601ba__a,.e9576240835601ba__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)}._3f05789653864a73__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)}._3c72ff72abe57859__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._79d16267c15d9eb2__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 21298 } 21299 var global_css_defense_default5 = { "button": "_78c10a0773e51a91__button", "input": "_5b33aa2d48624b4f__input", "textarea": "_980b3b4776ac8f81__textarea", "div": "_43e478b4279a076c__div", "p": "_698099e25b0fb1a6__p", "heading": "_326aee4184d261fd__heading", "a": "e9576240835601ba__a", "ol": "_3f05789653864a73__ol", "li": "_3c72ff72abe57859__li", "span": "_79d16267c15d9eb2__span" }; 21300 if (typeof process === "undefined" || true) { 21301 registerStyle15("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 21302 } 21303 var resets_default5 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 21304 if (typeof process === "undefined" || true) { 21305 registerStyle15("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 21306 } 21307 var style_default14 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 21308 var radioCheck = /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_primitives22.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_primitives22.Circle, { cx: 12, cy: 12, r: 3 }) }); 21309 var RadioItem = (0, import_element34.forwardRef)( 21310 function MenuRadioItem3({ 21311 children, 21312 className, 21313 prefix, 21314 shortcut, 21315 suffix, 21316 "aria-describedby": ariaDescribedBy, 21317 "aria-keyshortcuts": ariaKeyShortcuts, 21318 "aria-label": ariaLabel, 21319 "aria-labelledby": ariaLabelledBy, 21320 ...props 21321 }, ref) { 21322 const { 21323 contentChildren, 21324 contentContextValue, 21325 itemAriaProps, 21326 shortcutDescriptionId 21327 } = useItemContent2(children, { 21328 "aria-describedby": ariaDescribedBy, 21329 "aria-keyshortcuts": ariaKeyShortcuts, 21330 "aria-label": ariaLabel, 21331 "aria-labelledby": ariaLabelledBy, 21332 shortcut 21333 }); 21334 return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)( 21335 index_parts_exports.RadioItem, 21336 { 21337 ref, 21338 ...itemAriaProps, 21339 className: clsx_default( 21340 global_css_defense_default5.div, 21341 resets_default5["box-sizing"], 21342 style_default14.item, 21343 className 21344 ), 21345 ...props, 21346 children: [ 21347 /* @__PURE__ */ (0, import_jsx_runtime87.jsx)( 21348 index_parts_exports.RadioItemIndicator, 21349 { 21350 keepMounted: true, 21351 className: style_default14["item-selection-indicator"], 21352 children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)( 21353 Icon, 21354 { 21355 icon: radioCheck, 21356 className: style_default14["radio-selection-icon"], 21357 "aria-hidden": "true" 21358 } 21359 ) 21360 } 21361 ), 21362 /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(MenuItemContentContext.Provider, { value: contentContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)( 21363 ItemContent, 21364 { 21365 prefix, 21366 shortcut, 21367 shortcutDescriptionId, 21368 suffix, 21369 children: contentChildren 21370 } 21371 ) }) 21372 ] 21373 } 21374 ); 21375 } 21376 ); 21377 21378 // packages/ui/build-module/utils/direction-provider.mjs 21379 var import_i18n3 = __toESM(require_i18n(), 1); 21380 var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1); 21381 function DirectionProvider3({ children }) { 21382 return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DirectionProvider, { direction: (0, import_i18n3.isRTL)() ? "rtl" : "ltr", children }); 21383 } 21384 21385 // packages/ui/build-module/menu/root.mjs 21386 var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1); 21387 function Root(props) { 21388 const { onOpenChange } = props; 21389 const handleOpenChange = (nextOpen, eventDetails) => { 21390 const trigger = eventDetails.trigger; 21391 const TriggerElement = trigger?.ownerDocument.defaultView?.HTMLElement; 21392 const EventTargetElement = trigger?.ownerDocument.defaultView?.Element; 21393 const activeElementBeforeOpenChange = trigger?.ownerDocument.activeElement; 21394 const eventTarget = eventDetails.event.target; 21395 const menuElement = EventTargetElement && eventTarget instanceof EventTargetElement ? eventTarget.closest('[role="menu"]') : null; 21396 onOpenChange?.(nextOpen, eventDetails); 21397 if (!nextOpen && eventDetails.reason === "item-press" && !eventDetails.isCanceled && TriggerElement && trigger instanceof TriggerElement && menuElement?.contains(activeElementBeforeOpenChange ?? null) && trigger.ownerDocument.activeElement === activeElementBeforeOpenChange) { 21398 trigger.focus(); 21399 } 21400 }; 21401 return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(MenuContext.Provider, { value: { isSubmenu: false }, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(MenuGroupContext2.Provider, { value: null, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)( 21402 index_parts_exports.Root, 21403 { 21404 ...props, 21405 onOpenChange: handleOpenChange 21406 } 21407 ) }) }) }); 21408 } 21409 21410 // packages/ui/build-module/menu/separator.mjs 21411 var import_element35 = __toESM(require_element(), 1); 21412 var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1); 21413 var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash"; 21414 function getRuntime16() { 21415 const globalScope = globalThis; 21416 if (globalScope.__wpStyleRuntime) { 21417 return globalScope.__wpStyleRuntime; 21418 } 21419 globalScope.__wpStyleRuntime = { 21420 documents: /* @__PURE__ */ new Map(), 21421 styles: /* @__PURE__ */ new Map(), 21422 injectedStyles: /* @__PURE__ */ new WeakMap() 21423 }; 21424 if (typeof document !== "undefined") { 21425 registerDocument16(document); 21426 } 21427 return globalScope.__wpStyleRuntime; 21428 } 21429 function documentContainsStyleHash16(targetDocument, hash) { 21430 if (!targetDocument.head) { 21431 return false; 21432 } 21433 for (const style of targetDocument.head.querySelectorAll( 21434 `style[$STYLE_HASH_ATTRIBUTE16}]` 21435 )) { 21436 if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) { 21437 return true; 21438 } 21439 } 21440 return false; 21441 } 21442 function injectStyle16(targetDocument, hash, css) { 21443 if (!targetDocument.head) { 21444 return; 21445 } 21446 const runtime = getRuntime16(); 21447 let injectedStyles = runtime.injectedStyles.get(targetDocument); 21448 if (!injectedStyles) { 21449 injectedStyles = /* @__PURE__ */ new Set(); 21450 runtime.injectedStyles.set(targetDocument, injectedStyles); 21451 } 21452 if (injectedStyles.has(hash)) { 21453 return; 21454 } 21455 if (documentContainsStyleHash16(targetDocument, hash)) { 21456 injectedStyles.add(hash); 21457 return; 21458 } 21459 const style = targetDocument.createElement("style"); 21460 style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash); 21461 style.appendChild(targetDocument.createTextNode(css)); 21462 targetDocument.head.appendChild(style); 21463 injectedStyles.add(hash); 21464 } 21465 function registerDocument16(targetDocument) { 21466 const runtime = getRuntime16(); 21467 runtime.documents.set( 21468 targetDocument, 21469 (runtime.documents.get(targetDocument) ?? 0) + 1 21470 ); 21471 for (const [hash, css] of runtime.styles) { 21472 injectStyle16(targetDocument, hash, css); 21473 } 21474 return () => { 21475 const count = runtime.documents.get(targetDocument); 21476 if (count === void 0) { 21477 return; 21478 } 21479 if (count <= 1) { 21480 runtime.documents.delete(targetDocument); 21481 return; 21482 } 21483 runtime.documents.set(targetDocument, count - 1); 21484 }; 21485 } 21486 function registerStyle16(hash, css) { 21487 const runtime = getRuntime16(); 21488 runtime.styles.set(hash, css); 21489 for (const targetDocument of runtime.documents.keys()) { 21490 injectStyle16(targetDocument, hash, css); 21491 } 21492 } 21493 if (typeof process === "undefined" || true) { 21494 registerStyle16("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 21495 } 21496 var style_default15 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 21497 var Separator2 = (0, import_element35.forwardRef)( 21498 function MenuSeparator({ className, ...props }, ref) { 21499 return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)( 21500 index_parts_exports.Separator, 21501 { 21502 ref, 21503 className: clsx_default(style_default15.separator, className), 21504 ...props 21505 } 21506 ); 21507 } 21508 ); 21509 21510 // packages/ui/build-module/menu/submenu-root.mjs 21511 var import_element36 = __toESM(require_element(), 1); 21512 var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1); 21513 function SubmenuRoot(props) { 21514 const submenuTriggerRef = (0, import_element36.useRef)(null); 21515 return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(MenuContext.Provider, { value: { isSubmenu: true, submenuTriggerRef }, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(MenuGroupContext2.Provider, { value: null, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(index_parts_exports.SubmenuRoot, { ...props }) }) }); 21516 } 21517 21518 // packages/ui/build-module/menu/submenu-trigger.mjs 21519 var import_element37 = __toESM(require_element(), 1); 21520 var import_compose2 = __toESM(require_compose(), 1); 21521 var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1); 21522 var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash"; 21523 function getRuntime17() { 21524 const globalScope = globalThis; 21525 if (globalScope.__wpStyleRuntime) { 21526 return globalScope.__wpStyleRuntime; 21527 } 21528 globalScope.__wpStyleRuntime = { 21529 documents: /* @__PURE__ */ new Map(), 21530 styles: /* @__PURE__ */ new Map(), 21531 injectedStyles: /* @__PURE__ */ new WeakMap() 21532 }; 21533 if (typeof document !== "undefined") { 21534 registerDocument17(document); 21535 } 21536 return globalScope.__wpStyleRuntime; 21537 } 21538 function documentContainsStyleHash17(targetDocument, hash) { 21539 if (!targetDocument.head) { 21540 return false; 21541 } 21542 for (const style of targetDocument.head.querySelectorAll( 21543 `style[$STYLE_HASH_ATTRIBUTE17}]` 21544 )) { 21545 if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) { 21546 return true; 21547 } 21548 } 21549 return false; 21550 } 21551 function injectStyle17(targetDocument, hash, css) { 21552 if (!targetDocument.head) { 21553 return; 21554 } 21555 const runtime = getRuntime17(); 21556 let injectedStyles = runtime.injectedStyles.get(targetDocument); 21557 if (!injectedStyles) { 21558 injectedStyles = /* @__PURE__ */ new Set(); 21559 runtime.injectedStyles.set(targetDocument, injectedStyles); 21560 } 21561 if (injectedStyles.has(hash)) { 21562 return; 21563 } 21564 if (documentContainsStyleHash17(targetDocument, hash)) { 21565 injectedStyles.add(hash); 21566 return; 21567 } 21568 const style = targetDocument.createElement("style"); 21569 style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash); 21570 style.appendChild(targetDocument.createTextNode(css)); 21571 targetDocument.head.appendChild(style); 21572 injectedStyles.add(hash); 21573 } 21574 function registerDocument17(targetDocument) { 21575 const runtime = getRuntime17(); 21576 runtime.documents.set( 21577 targetDocument, 21578 (runtime.documents.get(targetDocument) ?? 0) + 1 21579 ); 21580 for (const [hash, css] of runtime.styles) { 21581 injectStyle17(targetDocument, hash, css); 21582 } 21583 return () => { 21584 const count = runtime.documents.get(targetDocument); 21585 if (count === void 0) { 21586 return; 21587 } 21588 if (count <= 1) { 21589 runtime.documents.delete(targetDocument); 21590 return; 21591 } 21592 runtime.documents.set(targetDocument, count - 1); 21593 }; 21594 } 21595 function registerStyle17(hash, css) { 21596 const runtime = getRuntime17(); 21597 runtime.styles.set(hash, css); 21598 for (const targetDocument of runtime.documents.keys()) { 21599 injectStyle17(targetDocument, hash, css); 21600 } 21601 } 21602 if (typeof process === "undefined" || true) { 21603 registerStyle17("726f348f3f", "._78c10a0773e51a91__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)}._5b33aa2d48624b4f__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)}}._980b3b4776ac8f81__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._43e478b4279a076c__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._698099e25b0fb1a6__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)._326aee4184d261fd__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)}.e9576240835601ba__a,.e9576240835601ba__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)}._3f05789653864a73__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)}._3c72ff72abe57859__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._79d16267c15d9eb2__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 21604 } 21605 var global_css_defense_default6 = { "button": "_78c10a0773e51a91__button", "input": "_5b33aa2d48624b4f__input", "textarea": "_980b3b4776ac8f81__textarea", "div": "_43e478b4279a076c__div", "p": "_698099e25b0fb1a6__p", "heading": "_326aee4184d261fd__heading", "a": "e9576240835601ba__a", "ol": "_3f05789653864a73__ol", "li": "_3c72ff72abe57859__li", "span": "_79d16267c15d9eb2__span" }; 21606 if (typeof process === "undefined" || true) { 21607 registerStyle17("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 21608 } 21609 var resets_default6 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 21610 if (typeof process === "undefined" || true) { 21611 registerStyle17("6ea01d6030", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._1094d29b1d68df17__positioner{z-index:var(--wp-ui-menu-z-index,initial)}.b0033b5034e8531c__popup{--wp-ui-menu-popup-padding:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-min-width:160px;--wp-ui-menu-max-width:var(--wpds-dimension-surface-width-sm,320px);--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-item-padding-inline-end:var(--wpds-dimension-padding-sm,8px);--_wp-ui-menu-group-head-padding-base:var(--wpds-dimension-padding-sm,8px);--wp-ui-menu-group-head-padding-inline:var(--_wp-ui-menu-group-head-padding-base);--wp-ui-menu-selection-indicator-track-size:0px;--wp-ui-menu-selection-indicator-size:var(--wpds-dimension-size-2xs,16px);--wp-ui-menu-selection-indicator-gap:0px;--_wp-ui-menu-elevation-md:0px 2px 3px 0px #0000000d,0px 4px 5px 0px #0000000a,0px 12px 12px 0px #00000008,0px 16px 16px 0px #00000005;background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-menu-elevation-md);max-height:min(var(--available-height),480px,60dvh);max-width:min(var(--available-width),var(--wp-ui-menu-max-width));min-width:min(var(--available-width),var(--wp-ui-menu-min-width));outline:none;overflow-block:auto;overscroll-behavior:none;padding:var(--wp-ui-menu-popup-padding);scroll-padding:var(--wp-ui-menu-popup-padding);&:has(._5d18178a87169fa7__item-selection-indicator){--_wp-ui-menu-item-padding-inline-start:var(--wpds-dimension-padding-xs,4px);--wp-ui-menu-selection-indicator-track-size:var(--wpds-dimension-size-2xs,16px)}}._435b87e9c9dec00c__list{--_wp-ui-menu-item-label-line-height:var(--wpds-typography-line-height-sm,20px);color:var(--wpds-color-foreground-interactive-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-md,13px);line-height:var(--_wp-ui-menu-item-label-line-height)}._1d722d53e1c1850b__radio-group,._435b87e9c9dec00c__list,._7c71af6b82649e7d__group{--wp-ui-menu-group-prefix-gap:0px;display:grid;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];min-width:0}._1d722d53e1c1850b__radio-group,._7c71af6b82649e7d__group{grid-column:1/-1}._1d722d53e1c1850b__radio-group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._435b87e9c9dec00c__list:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix),._7c71af6b82649e7d__group:has(>._5d75fdeb692cb443__item>._5614b29df27f39f4__item-prefix){--wp-ui-menu-group-prefix-gap:var(--wpds-dimension-gap-xs,4px)}._56eb3186457d1c36__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);grid-column:prefix-start/content-end;line-height:var(--wpds-typography-line-height-xs,16px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));min-height:var(--wpds-dimension-size-sm,24px);min-width:0;padding-block:var(--wpds-dimension-padding-xs,4px);text-transform:uppercase}.e3a98066a7a2267f__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);grid-column:prefix-start/content-end;height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline:calc(var(--wp-ui-menu-group-head-padding-inline) - var(--_wp-ui-menu-group-head-padding-base));@media (forced-colors:active){background-color:CanvasText}}._5d75fdeb692cb443__item{--wp-ui-menu-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-menu-item-padding-block:var(--wpds-dimension-padding-xs,4px);--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);align-content:center;align-items:start;border-radius:var(--wpds-border-radius-sm,2px);display:grid;gap:0;grid-column:1/-1;grid-template-columns:[item-padding-start] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-start)) [selection-start] var(--wp-ui-menu-selection-indicator-track-size) [selection-end] var(--wp-ui-menu-selection-indicator-gap) [prefix-start] max-content [prefix-end] var(--wp-ui-menu-group-prefix-gap) [content-start] minmax(0,1fr) [content-end] var(--wp-ui-menu-item-padding-inline,var(--_wp-ui-menu-item-padding-inline-end)) [item-padding-end];justify-content:stretch;min-height:var(--wp-ui-menu-item-height);min-width:0;padding-block:var(--wp-ui-menu-item-padding-block);scroll-margin:var(--wp-ui-menu-popup-padding);text-decoration:none;user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&[href]{cursor:pointer}@supports (grid-template-columns:subgrid){grid-template-columns:subgrid}&[data-popup-open]:not([data-highlighted],[data-disabled],[aria-disabled=true]){background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);@media (forced-colors:active){--_gcd-div-outline:var(--wpds-border-width-xs,1px) solid GrayText}}&[data-highlighted]:not([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){--_gcd-a-color:HighlightText;background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&:is([data-disabled],[aria-disabled=true]){--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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)));--_gcd-a-outline:var(--_gcd-div-outline)}@media (forced-colors:active){--_gcd-a-color:GrayText;color:GrayText}}}._5614b29df27f39f4__item-prefix,._5d18178a87169fa7__item-selection-indicator,._642c7e435a86580c__item-content{grid-row:1}._5d18178a87169fa7__item-selection-indicator{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;grid-column:selection-start/selection-end;height:var(--_wp-ui-menu-item-label-line-height);justify-content:center;justify-self:center;margin-inline-end:var(--wpds-dimension-gap-xs,4px);pointer-events:none;width:var(--wp-ui-menu-selection-indicator-size);&[data-unchecked]{opacity:0}}.f9262b3f40feb262__checkbox-selection-icon{translate:0 1px}._684ac045afdf4baf__radio-selection-icon{fill:currentColor;height:var(--wpds-dimension-size-2xs,16px);width:var(--wpds-dimension-size-2xs,16px)}._5614b29df27f39f4__item-prefix{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:prefix-start/prefix-end;justify-content:center;min-width:0}.d85300aa9fdb277c__prefix-icon{align-self:flex-start;flex-shrink:0;margin-block-start:calc((var(--_wp-ui-menu-item-label-line-height) - var(--_wp-ui-menu-prefix-icon-size))/2)}._642c7e435a86580c__item-content{align-items:center;align-self:stretch;box-sizing:border-box;display:grid;grid-column:prefix-start/content-end;grid-template-columns:[label-start] minmax(0,1fr) [label-end suffix-start] auto [suffix-end shortcut-start] auto [shortcut-end trailing-start] auto [trailing-end];min-width:0;pointer-events:none;&._1b342dc0d7e1d359__has-prefix{grid-column:content-start/content-end}}._8ad08abc200ee1d7__item-descriptions{display:flex;flex-direction:column;grid-column:prefix-start/content-end;grid-row:2;min-width:0;padding-block-end:var(--wpds-dimension-padding-xs,4px);pointer-events:none}._34ea63be597cb586__item-label{--_gcd-heading-color:currentColor;--_gcd-p-line-height:var(--_wp-ui-menu-item-label-line-height);color:inherit;grid-column:label-start/label-end;line-height:var(--_wp-ui-menu-item-label-line-height);min-width:0;overflow-wrap:anywhere}._00a2e202b2fd1f3f__item-description{--_gcd-heading-color:var(--wpds-color-foreground-content-neutral-weak,#707070);color:var(--wpds-color-foreground-content-neutral-weak,#707070);overflow-wrap:anywhere}._642c7e435a86580c__item-content>._890a7d4be00d4b75__item-suffix{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;gap:var(--wpds-dimension-gap-xs,4px);grid-column:suffix-start/suffix-end;margin-inline-start:var(--wpds-dimension-gap-md,12px)}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut{grid-column:shortcut-start/shortcut-end}._642c7e435a86580c__item-content>.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing{color:var(--wpds-color-foreground-content-neutral-weak,#707070);margin-inline-start:var(--wpds-dimension-gap-md,12px)}._93308f16bd1c5cad__item-trailing{align-items:center;display:flex;grid-column:trailing-start/trailing-end}._34ea63be597cb586__item-label+:is(._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){margin-inline-start:var(--wpds-dimension-gap-xl,24px)}.d06c0bfd8b23b345__item-shortcut+._93308f16bd1c5cad__item-trailing{margin-inline-start:var(--wpds-dimension-gap-xs,4px)}.ceed5efc4ab5e46f__submenu-chevron{margin-inline-end:calc(var(--wpds-dimension-gap-sm, 8px)*-1)}.ceed5efc4ab5e46f__submenu-chevron:dir(rtl){transform:rotate(180deg)}._3a3c062c80390ce9__external-link-indicator{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px);text-decoration:none}._3a3c062c80390ce9__external-link-indicator:after{content:"\\2197"}._3a3c062c80390ce9__external-link-indicator:dir(rtl):after{content:"\\2196"}._5d75fdeb692cb443__item:is([data-highlighted],[data-disabled],[aria-disabled=true]) ._5d18178a87169fa7__item-selection-indicator,._5d75fdeb692cb443__item:is([data-highlighted],[data-popup-open],[data-disabled],[aria-disabled=true]) :is(._00a2e202b2fd1f3f__item-description,._890a7d4be00d4b75__item-suffix,.d06c0bfd8b23b345__item-shortcut,._93308f16bd1c5cad__item-trailing){--_gcd-heading-color:currentColor;color:inherit}}}'); 21612 } 21613 var style_default16 = { "positioner": "_1094d29b1d68df17__positioner", "popup": "b0033b5034e8531c__popup", "item-selection-indicator": "_5d18178a87169fa7__item-selection-indicator", "is-root": "a3b87618ff461e0b__is-root _069972d5e326bada__dropdown-motion", "is-submenu": "f996099426988ae2__is-submenu _66136bf671f00b1f__dropdown-motion--fade-only", "list": "_435b87e9c9dec00c__list", "group": "_7c71af6b82649e7d__group", "radio-group": "_1d722d53e1c1850b__radio-group", "item": "_5d75fdeb692cb443__item", "item-prefix": "_5614b29df27f39f4__item-prefix", "group-label": "_56eb3186457d1c36__group-label", "separator": "e3a98066a7a2267f__separator", "item-content": "_642c7e435a86580c__item-content", "checkbox-selection-icon": "f9262b3f40feb262__checkbox-selection-icon", "radio-selection-icon": "_684ac045afdf4baf__radio-selection-icon", "prefix-icon": "d85300aa9fdb277c__prefix-icon", "has-prefix": "_1b342dc0d7e1d359__has-prefix", "item-descriptions": "_8ad08abc200ee1d7__item-descriptions", "item-label": "_34ea63be597cb586__item-label", "item-description": "_00a2e202b2fd1f3f__item-description", "item-suffix": "_890a7d4be00d4b75__item-suffix", "item-shortcut": "d06c0bfd8b23b345__item-shortcut", "item-trailing": "_93308f16bd1c5cad__item-trailing", "submenu-chevron": "ceed5efc4ab5e46f__submenu-chevron", "external-link-indicator": "_3a3c062c80390ce9__external-link-indicator" }; 21614 var SubmenuTrigger = (0, import_element37.forwardRef)( 21615 function MenuSubmenuTrigger3({ 21616 children, 21617 className, 21618 prefix, 21619 shortcut, 21620 suffix, 21621 "aria-describedby": ariaDescribedBy, 21622 "aria-keyshortcuts": ariaKeyShortcuts, 21623 "aria-label": ariaLabel, 21624 "aria-labelledby": ariaLabelledBy, 21625 ...props 21626 }, ref) { 21627 const { submenuTriggerRef } = useMenuContext(); 21628 const mergedRef = (0, import_compose2.useMergeRefs)([ref, submenuTriggerRef ?? null]); 21629 const { 21630 contentChildren, 21631 contentContextValue, 21632 itemAriaProps, 21633 shortcutDescriptionId 21634 } = useItemContent2(children, { 21635 "aria-describedby": ariaDescribedBy, 21636 "aria-keyshortcuts": ariaKeyShortcuts, 21637 "aria-label": ariaLabel, 21638 "aria-labelledby": ariaLabelledBy, 21639 shortcut 21640 }); 21641 return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)( 21642 index_parts_exports.SubmenuTrigger, 21643 { 21644 ref: mergedRef, 21645 ...itemAriaProps, 21646 className: clsx_default( 21647 global_css_defense_default6.div, 21648 resets_default6["box-sizing"], 21649 style_default16.item, 21650 className 21651 ), 21652 ...props, 21653 children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(MenuItemContentContext.Provider, { value: contentContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)( 21654 ItemContent, 21655 { 21656 prefix, 21657 shortcut, 21658 shortcutDescriptionId, 21659 suffix, 21660 trailing: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)( 21661 Icon, 21662 { 21663 className: style_default16["submenu-chevron"], 21664 icon: chevron_right_small_default, 21665 size: 24, 21666 "aria-hidden": "true" 21667 } 21668 ), 21669 children: contentChildren 21670 } 21671 ) }) 21672 } 21673 ); 21674 } 21675 ); 21676 21677 // packages/ui/build-module/menu/trigger.mjs 21678 var import_element38 = __toESM(require_element(), 1); 21679 var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1); 21680 var Trigger = (0, import_element38.forwardRef)( 21681 function MenuTrigger3(props, ref) { 21682 return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(index_parts_exports.Trigger, { ref, ...props }); 21683 } 21684 ); 21685 21686 // packages/ui/build-module/tooltip/index.mjs 21687 var tooltip_exports = {}; 21688 __export(tooltip_exports, { 21689 Popup: () => Popup2, 21690 Portal: () => Portal2, 21691 Positioner: () => Positioner2, 21692 Provider: () => Provider, 21693 Root: () => Root2, 21694 Trigger: () => Trigger2 21695 }); 21696 21697 // packages/ui/build-module/tooltip/popup.mjs 21698 var import_element41 = __toESM(require_element(), 1); 21699 21700 // packages/ui/build-module/tooltip/portal.mjs 21701 var import_element39 = __toESM(require_element(), 1); 21702 var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1); 21703 var Portal2 = (0, import_element39.forwardRef)( 21704 function TooltipPortal3({ container, ...restProps }, ref) { 21705 return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)( 21706 index_parts_exports4.Portal, 21707 { 21708 container: container === void 0 ? getWpCompatOverlaySlot() : container, 21709 ...restProps, 21710 ref 21711 } 21712 ); 21713 } 21714 ); 21715 21716 // packages/ui/build-module/tooltip/positioner.mjs 21717 var import_element40 = __toESM(require_element(), 1); 21718 var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1); 21719 var STYLE_HASH_ATTRIBUTE18 = "data-wp-hash"; 21720 function getRuntime18() { 21721 const globalScope = globalThis; 21722 if (globalScope.__wpStyleRuntime) { 21723 return globalScope.__wpStyleRuntime; 21724 } 21725 globalScope.__wpStyleRuntime = { 21726 documents: /* @__PURE__ */ new Map(), 21727 styles: /* @__PURE__ */ new Map(), 21728 injectedStyles: /* @__PURE__ */ new WeakMap() 21729 }; 21730 if (typeof document !== "undefined") { 21731 registerDocument18(document); 21732 } 21733 return globalScope.__wpStyleRuntime; 21734 } 21735 function documentContainsStyleHash18(targetDocument, hash) { 21736 if (!targetDocument.head) { 21737 return false; 21738 } 21739 for (const style of targetDocument.head.querySelectorAll( 21740 `style[$STYLE_HASH_ATTRIBUTE18}]` 21741 )) { 21742 if (style.getAttribute(STYLE_HASH_ATTRIBUTE18) === hash) { 21743 return true; 21744 } 21745 } 21746 return false; 21747 } 21748 function injectStyle18(targetDocument, hash, css) { 21749 if (!targetDocument.head) { 21750 return; 21751 } 21752 const runtime = getRuntime18(); 21753 let injectedStyles = runtime.injectedStyles.get(targetDocument); 21754 if (!injectedStyles) { 21755 injectedStyles = /* @__PURE__ */ new Set(); 21756 runtime.injectedStyles.set(targetDocument, injectedStyles); 21757 } 21758 if (injectedStyles.has(hash)) { 21759 return; 21760 } 21761 if (documentContainsStyleHash18(targetDocument, hash)) { 21762 injectedStyles.add(hash); 21763 return; 21764 } 21765 const style = targetDocument.createElement("style"); 21766 style.setAttribute(STYLE_HASH_ATTRIBUTE18, hash); 21767 style.appendChild(targetDocument.createTextNode(css)); 21768 targetDocument.head.appendChild(style); 21769 injectedStyles.add(hash); 21770 } 21771 function registerDocument18(targetDocument) { 21772 const runtime = getRuntime18(); 21773 runtime.documents.set( 21774 targetDocument, 21775 (runtime.documents.get(targetDocument) ?? 0) + 1 21776 ); 21777 for (const [hash, css] of runtime.styles) { 21778 injectStyle18(targetDocument, hash, css); 21779 } 21780 return () => { 21781 const count = runtime.documents.get(targetDocument); 21782 if (count === void 0) { 21783 return; 21784 } 21785 if (count <= 1) { 21786 runtime.documents.delete(targetDocument); 21787 return; 21788 } 21789 runtime.documents.set(targetDocument, count - 1); 21790 }; 21791 } 21792 function registerStyle18(hash, css) { 21793 const runtime = getRuntime18(); 21794 runtime.styles.set(hash, css); 21795 for (const targetDocument of runtime.documents.keys()) { 21796 injectStyle18(targetDocument, hash, css); 21797 } 21798 } 21799 if (typeof process === "undefined" || true) { 21800 registerStyle18("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 21801 } 21802 var resets_default7 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 21803 if (typeof process === "undefined" || true) { 21804 registerStyle18("aaf79ac691", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.b9266862d9435660__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._7bb3fd8a0810be6d__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}}}}'); 21805 } 21806 var style_default17 = { "positioner": "b9266862d9435660__positioner", "popup": "_7bb3fd8a0810be6d__popup" }; 21807 var Positioner2 = (0, import_element40.forwardRef)( 21808 function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) { 21809 return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)( 21810 index_parts_exports4.Positioner, 21811 { 21812 ref, 21813 align, 21814 side, 21815 sideOffset, 21816 ...props, 21817 className: clsx_default( 21818 resets_default7["box-sizing"], 21819 style_default17.positioner, 21820 className 21821 ) 21822 } 21823 ); 21824 } 21825 ); 21826 21827 // packages/ui/build-module/utils/theme-provider.mjs 21828 var theme = __toESM(require_theme(), 1); 21829 21830 // packages/ui/build-module/lock-unlock.mjs 21831 var import_private_apis = __toESM(require_private_apis(), 1); 21832 var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( 21833 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", 21834 "@wordpress/ui" 21835 ); 21836 21837 // packages/ui/build-module/utils/theme-provider.mjs 21838 function getThemeProvider() { 21839 const themePackage = theme; 21840 if (themePackage.ThemeProvider) { 21841 return themePackage.ThemeProvider; 21842 } 21843 if (!themePackage.privateApis) { 21844 throw new Error( 21845 "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`." 21846 ); 21847 } 21848 return unlock( 21849 themePackage.privateApis 21850 ).ThemeProvider; 21851 } 21852 var ThemeProvider = getThemeProvider(); 21853 21854 // packages/ui/build-module/tooltip/popup.mjs 21855 var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1); 21856 var STYLE_HASH_ATTRIBUTE19 = "data-wp-hash"; 21857 function getRuntime19() { 21858 const globalScope = globalThis; 21859 if (globalScope.__wpStyleRuntime) { 21860 return globalScope.__wpStyleRuntime; 21861 } 21862 globalScope.__wpStyleRuntime = { 21863 documents: /* @__PURE__ */ new Map(), 21864 styles: /* @__PURE__ */ new Map(), 21865 injectedStyles: /* @__PURE__ */ new WeakMap() 21866 }; 21867 if (typeof document !== "undefined") { 21868 registerDocument19(document); 21869 } 21870 return globalScope.__wpStyleRuntime; 21871 } 21872 function documentContainsStyleHash19(targetDocument, hash) { 21873 if (!targetDocument.head) { 21874 return false; 21875 } 21876 for (const style of targetDocument.head.querySelectorAll( 21877 `style[$STYLE_HASH_ATTRIBUTE19}]` 21878 )) { 21879 if (style.getAttribute(STYLE_HASH_ATTRIBUTE19) === hash) { 21880 return true; 21881 } 21882 } 21883 return false; 21884 } 21885 function injectStyle19(targetDocument, hash, css) { 21886 if (!targetDocument.head) { 21887 return; 21888 } 21889 const runtime = getRuntime19(); 21890 let injectedStyles = runtime.injectedStyles.get(targetDocument); 21891 if (!injectedStyles) { 21892 injectedStyles = /* @__PURE__ */ new Set(); 21893 runtime.injectedStyles.set(targetDocument, injectedStyles); 21894 } 21895 if (injectedStyles.has(hash)) { 21896 return; 21897 } 21898 if (documentContainsStyleHash19(targetDocument, hash)) { 21899 injectedStyles.add(hash); 21900 return; 21901 } 21902 const style = targetDocument.createElement("style"); 21903 style.setAttribute(STYLE_HASH_ATTRIBUTE19, hash); 21904 style.appendChild(targetDocument.createTextNode(css)); 21905 targetDocument.head.appendChild(style); 21906 injectedStyles.add(hash); 21907 } 21908 function registerDocument19(targetDocument) { 21909 const runtime = getRuntime19(); 21910 runtime.documents.set( 21911 targetDocument, 21912 (runtime.documents.get(targetDocument) ?? 0) + 1 21913 ); 21914 for (const [hash, css] of runtime.styles) { 21915 injectStyle19(targetDocument, hash, css); 21916 } 21917 return () => { 21918 const count = runtime.documents.get(targetDocument); 21919 if (count === void 0) { 21920 return; 21921 } 21922 if (count <= 1) { 21923 runtime.documents.delete(targetDocument); 21924 return; 21925 } 21926 runtime.documents.set(targetDocument, count - 1); 21927 }; 21928 } 21929 function registerStyle19(hash, css) { 21930 const runtime = getRuntime19(); 21931 runtime.styles.set(hash, css); 21932 for (const targetDocument of runtime.documents.keys()) { 21933 injectStyle19(targetDocument, hash, css); 21934 } 21935 } 21936 if (typeof process === "undefined" || true) { 21937 registerStyle19("aaf79ac691", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.b9266862d9435660__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._7bb3fd8a0810be6d__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}}}}'); 21938 } 21939 var style_default18 = { "positioner": "b9266862d9435660__positioner", "popup": "_7bb3fd8a0810be6d__popup" }; 21940 var POPUP_COLOR = { background: "#1e1e1e" }; 21941 var Popup2 = (0, import_element41.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) { 21942 const popupContent = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)( 21943 index_parts_exports4.Popup, 21944 { 21945 ref, 21946 className: clsx_default(style_default18.popup, className), 21947 ...props, 21948 children 21949 } 21950 ) }); 21951 const positionedPopup = renderSlotWithChildren( 21952 positioner, 21953 /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Positioner2, {}), 21954 popupContent 21955 ); 21956 return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Portal2, {}), positionedPopup); 21957 }); 21958 21959 // packages/ui/build-module/tooltip/trigger.mjs 21960 var import_element42 = __toESM(require_element(), 1); 21961 var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1); 21962 var Trigger2 = (0, import_element42.forwardRef)( 21963 function TooltipTrigger3(props, ref) { 21964 return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(index_parts_exports4.Trigger, { ref, ...props }); 21965 } 21966 ); 21967 21968 // packages/ui/build-module/tooltip/root.mjs 21969 var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1); 21970 function Root2(props) { 21971 return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(index_parts_exports4.Root, { ...props }) }); 21972 } 21973 21974 // packages/ui/build-module/tooltip/provider.mjs 21975 var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1); 21976 function Provider({ ...props }) { 21977 return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(index_parts_exports4.Provider, { ...props }); 21978 } 21979 21980 // packages/ui/build-module/link/link.mjs 21981 var import_element43 = __toESM(require_element(), 1); 21982 var import_i18n4 = __toESM(require_i18n(), 1); 21983 var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1); 21984 var STYLE_HASH_ATTRIBUTE20 = "data-wp-hash"; 21985 function getRuntime20() { 21986 const globalScope = globalThis; 21987 if (globalScope.__wpStyleRuntime) { 21988 return globalScope.__wpStyleRuntime; 21989 } 21990 globalScope.__wpStyleRuntime = { 21991 documents: /* @__PURE__ */ new Map(), 21992 styles: /* @__PURE__ */ new Map(), 21993 injectedStyles: /* @__PURE__ */ new WeakMap() 21994 }; 21995 if (typeof document !== "undefined") { 21996 registerDocument20(document); 21997 } 21998 return globalScope.__wpStyleRuntime; 21999 } 22000 function documentContainsStyleHash20(targetDocument, hash) { 22001 if (!targetDocument.head) { 22002 return false; 22003 } 22004 for (const style of targetDocument.head.querySelectorAll( 22005 `style[$STYLE_HASH_ATTRIBUTE20}]` 22006 )) { 22007 if (style.getAttribute(STYLE_HASH_ATTRIBUTE20) === hash) { 22008 return true; 22009 } 22010 } 22011 return false; 22012 } 22013 function injectStyle20(targetDocument, hash, css) { 22014 if (!targetDocument.head) { 22015 return; 22016 } 22017 const runtime = getRuntime20(); 22018 let injectedStyles = runtime.injectedStyles.get(targetDocument); 22019 if (!injectedStyles) { 22020 injectedStyles = /* @__PURE__ */ new Set(); 22021 runtime.injectedStyles.set(targetDocument, injectedStyles); 22022 } 22023 if (injectedStyles.has(hash)) { 22024 return; 22025 } 22026 if (documentContainsStyleHash20(targetDocument, hash)) { 22027 injectedStyles.add(hash); 22028 return; 22029 } 22030 const style = targetDocument.createElement("style"); 22031 style.setAttribute(STYLE_HASH_ATTRIBUTE20, hash); 22032 style.appendChild(targetDocument.createTextNode(css)); 22033 targetDocument.head.appendChild(style); 22034 injectedStyles.add(hash); 22035 } 22036 function registerDocument20(targetDocument) { 22037 const runtime = getRuntime20(); 22038 runtime.documents.set( 22039 targetDocument, 22040 (runtime.documents.get(targetDocument) ?? 0) + 1 22041 ); 22042 for (const [hash, css] of runtime.styles) { 22043 injectStyle20(targetDocument, hash, css); 22044 } 22045 return () => { 22046 const count = runtime.documents.get(targetDocument); 22047 if (count === void 0) { 22048 return; 22049 } 22050 if (count <= 1) { 22051 runtime.documents.delete(targetDocument); 22052 return; 22053 } 22054 runtime.documents.set(targetDocument, count - 1); 22055 }; 22056 } 22057 function registerStyle20(hash, css) { 22058 const runtime = getRuntime20(); 22059 runtime.styles.set(hash, css); 22060 for (const targetDocument of runtime.documents.keys()) { 22061 injectStyle20(targetDocument, hash, css); 22062 } 22063 } 22064 if (typeof process === "undefined" || true) { 22065 registerStyle20("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 22066 } 22067 var resets_default8 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 22068 if (typeof process === "undefined" || true) { 22069 registerStyle20("c13e206e92", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._0f52be5f1d4ce686__outset-ring--focus-within:focus-within,._8f922cee854f2408__outset-ring--focus-visible:focus-visible,.accedd6ae8fd878e__outset-ring--focus:focus{--_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))}._3ad2c88c126f2bdd__outset-ring--focus-within-except-active:focus-within,.c20f61b115485a7f__outset-ring--focus-except-active:focus{outline:none}._3ad2c88c126f2bdd__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c20f61b115485a7f__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))}}}"); 22070 } 22071 var focus_module_default = { "outset-ring--focus": "accedd6ae8fd878e__outset-ring--focus", "outset-ring--focus-visible": "_8f922cee854f2408__outset-ring--focus-visible", "outset-ring--focus-within": "_0f52be5f1d4ce686__outset-ring--focus-within", "outset-ring--focus-except-active": "c20f61b115485a7f__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3ad2c88c126f2bdd__outset-ring--focus-within-except-active" }; 22072 if (typeof process === "undefined" || true) { 22073 registerStyle20("c87d91cdf7", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.a574f9f242212d58__link{--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);border-radius:var(--wpds-border-radius-sm,2px);text-decoration-thickness:from-font;text-underline-offset:.2em}._2d2f0506e717a46c__link-with-icon{text-decoration-line:none}._92b7b6a03fbb27ac__link-contents{text-decoration:inherit;text-decoration-line:underline}._69f40d9212adc58d__is-brand,._69f40d9212adc58d__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))}._69f40d9212adc58d__is-brand:active,._69f40d9212adc58d__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))}._9a9c54c6e67b4c3c__is-neutral,._9a9c54c6e67b4c3c__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)}._9a9c54c6e67b4c3c__is-neutral:active,._9a9c54c6e67b4c3c__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}._93be0b747897baad__is-unstyled{--_gcd-a-border-radius:0;--_gcd-a-color:inherit;color:inherit;text-decoration:none}._9c39df40fdc09594__link-icon{font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._9c39df40fdc09594__link-icon:after{content:"\\2060\\2197"}._9c39df40fdc09594__link-icon:dir(rtl):after{content:"\\2060\\2196"}}}'); 22074 } 22075 var style_default19 = { "link": "a574f9f242212d58__link", "link-with-icon": "_2d2f0506e717a46c__link-with-icon", "link-contents": "_92b7b6a03fbb27ac__link-contents", "is-brand": "_69f40d9212adc58d__is-brand", "is-neutral": "_9a9c54c6e67b4c3c__is-neutral", "is-unstyled": "_93be0b747897baad__is-unstyled", "link-icon": "_9c39df40fdc09594__link-icon" }; 22076 if (typeof process === "undefined" || true) { 22077 registerStyle20("726f348f3f", "._78c10a0773e51a91__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)}._5b33aa2d48624b4f__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)}}._980b3b4776ac8f81__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._43e478b4279a076c__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._698099e25b0fb1a6__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)._326aee4184d261fd__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)}.e9576240835601ba__a,.e9576240835601ba__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)}._3f05789653864a73__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)}._3c72ff72abe57859__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._79d16267c15d9eb2__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 22078 } 22079 var global_css_defense_default7 = { "button": "_78c10a0773e51a91__button", "input": "_5b33aa2d48624b4f__input", "textarea": "_980b3b4776ac8f81__textarea", "div": "_43e478b4279a076c__div", "p": "_698099e25b0fb1a6__p", "heading": "_326aee4184d261fd__heading", "a": "e9576240835601ba__a", "ol": "_3f05789653864a73__ol", "li": "_3c72ff72abe57859__li", "span": "_79d16267c15d9eb2__span" }; 22080 var Link = (0, import_element43.forwardRef)( 22081 function UnforwardedLink({ 22082 children, 22083 variant = "default", 22084 tone = "brand", 22085 openInNewTab = false, 22086 target, 22087 render, 22088 className, 22089 ...props 22090 }, ref) { 22091 const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? ""); 22092 const element = useRender({ 22093 render, 22094 defaultTagName: "a", 22095 ref, 22096 props: mergeProps(props, { 22097 className: clsx_default( 22098 global_css_defense_default7.a, 22099 resets_default8["box-sizing"], 22100 focus_module_default["outset-ring--focus-except-active"], 22101 variant !== "unstyled" && style_default19.link, 22102 variant !== "unstyled" && shouldShowNewTabIndicator && style_default19["link-with-icon"], 22103 variant !== "unstyled" && style_default19[`is-$tone}`], 22104 variant === "unstyled" && style_default19["is-unstyled"], 22105 className 22106 ), 22107 target: target ?? (openInNewTab ? "_blank" : void 0), 22108 children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_jsx_runtime100.Fragment, { children: [ 22109 shouldShowNewTabIndicator && variant !== "unstyled" ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: style_default19["link-contents"], children }) : children, 22110 shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)( 22111 "span", 22112 { 22113 className: style_default19["link-icon"], 22114 role: "img", 22115 "aria-label": ( 22116 /* translators: accessibility text appended to link text */ 22117 (0, import_i18n4.__)("(opens in a new tab)") 22118 ) 22119 } 22120 ) 22121 ] }) 22122 }) 22123 }); 22124 return element; 22125 } 22126 ); 22127 22128 // packages/ui/build-module/stack/stack.mjs 22129 var import_element44 = __toESM(require_element(), 1); 22130 var STYLE_HASH_ATTRIBUTE21 = "data-wp-hash"; 22131 function getRuntime21() { 22132 const globalScope = globalThis; 22133 if (globalScope.__wpStyleRuntime) { 22134 return globalScope.__wpStyleRuntime; 22135 } 22136 globalScope.__wpStyleRuntime = { 22137 documents: /* @__PURE__ */ new Map(), 22138 styles: /* @__PURE__ */ new Map(), 22139 injectedStyles: /* @__PURE__ */ new WeakMap() 22140 }; 22141 if (typeof document !== "undefined") { 22142 registerDocument21(document); 22143 } 22144 return globalScope.__wpStyleRuntime; 22145 } 22146 function documentContainsStyleHash21(targetDocument, hash) { 22147 if (!targetDocument.head) { 22148 return false; 22149 } 22150 for (const style of targetDocument.head.querySelectorAll( 22151 `style[$STYLE_HASH_ATTRIBUTE21}]` 22152 )) { 22153 if (style.getAttribute(STYLE_HASH_ATTRIBUTE21) === hash) { 22154 return true; 22155 } 22156 } 22157 return false; 22158 } 22159 function injectStyle21(targetDocument, hash, css) { 22160 if (!targetDocument.head) { 22161 return; 22162 } 22163 const runtime = getRuntime21(); 22164 let injectedStyles = runtime.injectedStyles.get(targetDocument); 22165 if (!injectedStyles) { 22166 injectedStyles = /* @__PURE__ */ new Set(); 22167 runtime.injectedStyles.set(targetDocument, injectedStyles); 22168 } 22169 if (injectedStyles.has(hash)) { 22170 return; 22171 } 22172 if (documentContainsStyleHash21(targetDocument, hash)) { 22173 injectedStyles.add(hash); 22174 return; 22175 } 22176 const style = targetDocument.createElement("style"); 22177 style.setAttribute(STYLE_HASH_ATTRIBUTE21, hash); 22178 style.appendChild(targetDocument.createTextNode(css)); 22179 targetDocument.head.appendChild(style); 22180 injectedStyles.add(hash); 22181 } 22182 function registerDocument21(targetDocument) { 22183 const runtime = getRuntime21(); 22184 runtime.documents.set( 22185 targetDocument, 22186 (runtime.documents.get(targetDocument) ?? 0) + 1 22187 ); 22188 for (const [hash, css] of runtime.styles) { 22189 injectStyle21(targetDocument, hash, css); 22190 } 22191 return () => { 22192 const count = runtime.documents.get(targetDocument); 22193 if (count === void 0) { 22194 return; 22195 } 22196 if (count <= 1) { 22197 runtime.documents.delete(targetDocument); 22198 return; 22199 } 22200 runtime.documents.set(targetDocument, count - 1); 22201 }; 22202 } 22203 function registerStyle21(hash, css) { 22204 const runtime = getRuntime21(); 22205 runtime.styles.set(hash, css); 22206 for (const targetDocument of runtime.documents.keys()) { 22207 injectStyle21(targetDocument, hash, css); 22208 } 22209 } 22210 if (typeof process === "undefined" || true) { 22211 registerStyle21("67591fa198", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._8e8e79c1a2eec43b__stack{display:flex}}}"); 22212 } 22213 var style_default20 = { "stack": "_8e8e79c1a2eec43b__stack" }; 22214 var gapTokens = { 22215 xs: "var(--wpds-dimension-gap-xs, 4px)", 22216 sm: "var(--wpds-dimension-gap-sm, 8px)", 22217 md: "var(--wpds-dimension-gap-md, 12px)", 22218 lg: "var(--wpds-dimension-gap-lg, 16px)", 22219 xl: "var(--wpds-dimension-gap-xl, 24px)", 22220 "2xl": "var(--wpds-dimension-gap-2xl, 32px)", 22221 "3xl": "var(--wpds-dimension-gap-3xl, 40px)" 22222 }; 22223 var Stack = (0, import_element44.forwardRef)( 22224 function UnforwardedStack({ direction, gap, align, justify, wrap, render, ...props }, ref) { 22225 const style = { 22226 gap: gap && gapTokens[gap], 22227 alignItems: align, 22228 justifyContent: justify, 22229 flexDirection: direction, 22230 flexWrap: wrap 22231 }; 22232 const element = useRender({ 22233 render, 22234 ref, 22235 props: mergeProps(props, { 22236 style, 22237 className: style_default20.stack 22238 }) 22239 }); 22240 return element; 22241 } 22242 ); 22243 22244 // packages/ui/build-module/form/primitives/input-layout/input-layout.mjs 22245 var import_element45 = __toESM(require_element(), 1); 22246 var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1); 22247 var STYLE_HASH_ATTRIBUTE22 = "data-wp-hash"; 22248 function getRuntime22() { 22249 const globalScope = globalThis; 22250 if (globalScope.__wpStyleRuntime) { 22251 return globalScope.__wpStyleRuntime; 22252 } 22253 globalScope.__wpStyleRuntime = { 22254 documents: /* @__PURE__ */ new Map(), 22255 styles: /* @__PURE__ */ new Map(), 22256 injectedStyles: /* @__PURE__ */ new WeakMap() 22257 }; 22258 if (typeof document !== "undefined") { 22259 registerDocument22(document); 22260 } 22261 return globalScope.__wpStyleRuntime; 22262 } 22263 function documentContainsStyleHash22(targetDocument, hash) { 22264 if (!targetDocument.head) { 22265 return false; 22266 } 22267 for (const style of targetDocument.head.querySelectorAll( 22268 `style[$STYLE_HASH_ATTRIBUTE22}]` 22269 )) { 22270 if (style.getAttribute(STYLE_HASH_ATTRIBUTE22) === hash) { 22271 return true; 22272 } 22273 } 22274 return false; 22275 } 22276 function injectStyle22(targetDocument, hash, css) { 22277 if (!targetDocument.head) { 22278 return; 22279 } 22280 const runtime = getRuntime22(); 22281 let injectedStyles = runtime.injectedStyles.get(targetDocument); 22282 if (!injectedStyles) { 22283 injectedStyles = /* @__PURE__ */ new Set(); 22284 runtime.injectedStyles.set(targetDocument, injectedStyles); 22285 } 22286 if (injectedStyles.has(hash)) { 22287 return; 22288 } 22289 if (documentContainsStyleHash22(targetDocument, hash)) { 22290 injectedStyles.add(hash); 22291 return; 22292 } 22293 const style = targetDocument.createElement("style"); 22294 style.setAttribute(STYLE_HASH_ATTRIBUTE22, hash); 22295 style.appendChild(targetDocument.createTextNode(css)); 22296 targetDocument.head.appendChild(style); 22297 injectedStyles.add(hash); 22298 } 22299 function registerDocument22(targetDocument) { 22300 const runtime = getRuntime22(); 22301 runtime.documents.set( 22302 targetDocument, 22303 (runtime.documents.get(targetDocument) ?? 0) + 1 22304 ); 22305 for (const [hash, css] of runtime.styles) { 22306 injectStyle22(targetDocument, hash, css); 22307 } 22308 return () => { 22309 const count = runtime.documents.get(targetDocument); 22310 if (count === void 0) { 22311 return; 22312 } 22313 if (count <= 1) { 22314 runtime.documents.delete(targetDocument); 22315 return; 22316 } 22317 runtime.documents.set(targetDocument, count - 1); 22318 }; 22319 } 22320 function registerStyle22(hash, css) { 22321 const runtime = getRuntime22(); 22322 runtime.styles.set(hash, css); 22323 for (const targetDocument of runtime.documents.keys()) { 22324 injectStyle22(targetDocument, hash, css); 22325 } 22326 } 22327 if (typeof process === "undefined" || true) { 22328 registerStyle22("726f348f3f", "._78c10a0773e51a91__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)}._5b33aa2d48624b4f__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)}}._980b3b4776ac8f81__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._43e478b4279a076c__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._698099e25b0fb1a6__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)._326aee4184d261fd__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)}.e9576240835601ba__a,.e9576240835601ba__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)}._3f05789653864a73__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)}._3c72ff72abe57859__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._79d16267c15d9eb2__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 22329 } 22330 var global_css_defense_default8 = { "button": "_78c10a0773e51a91__button", "input": "_5b33aa2d48624b4f__input", "textarea": "_980b3b4776ac8f81__textarea", "div": "_43e478b4279a076c__div", "p": "_698099e25b0fb1a6__p", "heading": "_326aee4184d261fd__heading", "a": "e9576240835601ba__a", "ol": "_3f05789653864a73__ol", "li": "_3c72ff72abe57859__li", "span": "_79d16267c15d9eb2__span" }; 22331 if (typeof process === "undefined" || true) { 22332 registerStyle22("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 22333 } 22334 var resets_default9 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 22335 if (typeof process === "undefined" || true) { 22336 registerStyle22("a933c8f665", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.b58f09bec1a5dbde__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);height:var(--wpds-dimension-size-lg,40px);line-height:1;&.c6959524c70627d6__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&.aa52ad890a16cc91__is-size-small,&.c6959524c70627d6__is-size-compact{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.aa52ad890a16cc91__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._50a72abb47530e8a__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}&:not(._33a5f404fc55a9f2__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-disabled,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText}}}&._33a5f404fc55a9f2__is-borderless{background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:transparent}&:has(._7ef4bcd6bfde61ae__input-layout-slot:focus-within){--_gcd-div-outline:none;outline:none}&:hover:not(._50a72abb47530e8a__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._33a5f404fc55a9f2__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-active,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}&:has(:invalid[data-validity-visible]){--focus-color:var(--wpds-color-stroke-interactive-error,#cc1818);border-color:var(--wpds-color-stroke-interactive-error,#cc1818);&:hover{border-color:var(--wpds-color-stroke-interactive-error-active,#9d0000)}}}._7c0c0ce7b5c57b8f__slot-wrapper{display:contents}._7ef4bcd6bfde61ae__input-layout-slot{align-items:center;display:flex;&._50d0eced305893d5__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}'); 22337 } 22338 var style_default21 = { "input-layout": "b58f09bec1a5dbde__input-layout", "is-size-compact": "c6959524c70627d6__is-size-compact", "is-size-small": "aa52ad890a16cc91__is-size-small", "is-disabled": "_50a72abb47530e8a__is-disabled", "is-borderless": "_33a5f404fc55a9f2__is-borderless", "input-layout-slot": "_7ef4bcd6bfde61ae__input-layout-slot", "slot-wrapper": "_7c0c0ce7b5c57b8f__slot-wrapper", "is-padding-minimal": "_50d0eced305893d5__is-padding-minimal" }; 22339 var InputLayout = (0, import_element45.forwardRef)( 22340 function UnforwardedInputLayout({ 22341 className, 22342 children, 22343 visuallyDisabled, 22344 size: size4 = "default", 22345 isBorderless, 22346 prefix, 22347 suffix, 22348 ...restProps 22349 }, ref) { 22350 return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)( 22351 "div", 22352 { 22353 ref, 22354 className: clsx_default( 22355 global_css_defense_default8.div, 22356 resets_default9["box-sizing"], 22357 style_default21["input-layout"], 22358 style_default21[`is-size-$size4}`], 22359 visuallyDisabled && style_default21["is-disabled"], 22360 isBorderless && style_default21["is-borderless"], 22361 className 22362 ), 22363 ...restProps, 22364 children: [ 22365 import_element45.Children.count(prefix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)( 22366 "div", 22367 { 22368 className: style_default21["slot-wrapper"], 22369 "data-slot-type": "prefix", 22370 children: prefix 22371 } 22372 ), 22373 children, 22374 import_element45.Children.count(suffix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)( 22375 "div", 22376 { 22377 className: style_default21["slot-wrapper"], 22378 "data-slot-type": "suffix", 22379 children: suffix 22380 } 22381 ) 22382 ] 22383 } 22384 ); 22385 } 22386 ); 22387 22388 // packages/ui/build-module/form/primitives/input-layout/slot.mjs 22389 var import_element46 = __toESM(require_element(), 1); 22390 var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1); 22391 var STYLE_HASH_ATTRIBUTE23 = "data-wp-hash"; 22392 function getRuntime23() { 22393 const globalScope = globalThis; 22394 if (globalScope.__wpStyleRuntime) { 22395 return globalScope.__wpStyleRuntime; 22396 } 22397 globalScope.__wpStyleRuntime = { 22398 documents: /* @__PURE__ */ new Map(), 22399 styles: /* @__PURE__ */ new Map(), 22400 injectedStyles: /* @__PURE__ */ new WeakMap() 22401 }; 22402 if (typeof document !== "undefined") { 22403 registerDocument23(document); 22404 } 22405 return globalScope.__wpStyleRuntime; 22406 } 22407 function documentContainsStyleHash23(targetDocument, hash) { 22408 if (!targetDocument.head) { 22409 return false; 22410 } 22411 for (const style of targetDocument.head.querySelectorAll( 22412 `style[$STYLE_HASH_ATTRIBUTE23}]` 22413 )) { 22414 if (style.getAttribute(STYLE_HASH_ATTRIBUTE23) === hash) { 22415 return true; 22416 } 22417 } 22418 return false; 22419 } 22420 function injectStyle23(targetDocument, hash, css) { 22421 if (!targetDocument.head) { 22422 return; 22423 } 22424 const runtime = getRuntime23(); 22425 let injectedStyles = runtime.injectedStyles.get(targetDocument); 22426 if (!injectedStyles) { 22427 injectedStyles = /* @__PURE__ */ new Set(); 22428 runtime.injectedStyles.set(targetDocument, injectedStyles); 22429 } 22430 if (injectedStyles.has(hash)) { 22431 return; 22432 } 22433 if (documentContainsStyleHash23(targetDocument, hash)) { 22434 injectedStyles.add(hash); 22435 return; 22436 } 22437 const style = targetDocument.createElement("style"); 22438 style.setAttribute(STYLE_HASH_ATTRIBUTE23, hash); 22439 style.appendChild(targetDocument.createTextNode(css)); 22440 targetDocument.head.appendChild(style); 22441 injectedStyles.add(hash); 22442 } 22443 function registerDocument23(targetDocument) { 22444 const runtime = getRuntime23(); 22445 runtime.documents.set( 22446 targetDocument, 22447 (runtime.documents.get(targetDocument) ?? 0) + 1 22448 ); 22449 for (const [hash, css] of runtime.styles) { 22450 injectStyle23(targetDocument, hash, css); 22451 } 22452 return () => { 22453 const count = runtime.documents.get(targetDocument); 22454 if (count === void 0) { 22455 return; 22456 } 22457 if (count <= 1) { 22458 runtime.documents.delete(targetDocument); 22459 return; 22460 } 22461 runtime.documents.set(targetDocument, count - 1); 22462 }; 22463 } 22464 function registerStyle23(hash, css) { 22465 const runtime = getRuntime23(); 22466 runtime.styles.set(hash, css); 22467 for (const targetDocument of runtime.documents.keys()) { 22468 injectStyle23(targetDocument, hash, css); 22469 } 22470 } 22471 if (typeof process === "undefined" || true) { 22472 registerStyle23("a933c8f665", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.b58f09bec1a5dbde__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);height:var(--wpds-dimension-size-lg,40px);line-height:1;&.c6959524c70627d6__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&.aa52ad890a16cc91__is-size-small,&.c6959524c70627d6__is-size-compact{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.aa52ad890a16cc91__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._50a72abb47530e8a__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}&:not(._33a5f404fc55a9f2__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-disabled,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText}}}&._33a5f404fc55a9f2__is-borderless{background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:transparent}&:has(._7ef4bcd6bfde61ae__input-layout-slot:focus-within){--_gcd-div-outline:none;outline:none}&:hover:not(._50a72abb47530e8a__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._33a5f404fc55a9f2__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-active,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}&:has(:invalid[data-validity-visible]){--focus-color:var(--wpds-color-stroke-interactive-error,#cc1818);border-color:var(--wpds-color-stroke-interactive-error,#cc1818);&:hover{border-color:var(--wpds-color-stroke-interactive-error-active,#9d0000)}}}._7c0c0ce7b5c57b8f__slot-wrapper{display:contents}._7ef4bcd6bfde61ae__input-layout-slot{align-items:center;display:flex;&._50d0eced305893d5__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}'); 22473 } 22474 var style_default22 = { "input-layout": "b58f09bec1a5dbde__input-layout", "is-size-compact": "c6959524c70627d6__is-size-compact", "is-size-small": "aa52ad890a16cc91__is-size-small", "is-disabled": "_50a72abb47530e8a__is-disabled", "is-borderless": "_33a5f404fc55a9f2__is-borderless", "input-layout-slot": "_7ef4bcd6bfde61ae__input-layout-slot", "slot-wrapper": "_7c0c0ce7b5c57b8f__slot-wrapper", "is-padding-minimal": "_50d0eced305893d5__is-padding-minimal" }; 22475 var InputLayoutSlot = (0, import_element46.forwardRef)(function UnforwardedInputLayoutSlot({ padding = "default", className, ...restProps }, ref) { 22476 return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)( 22477 "div", 22478 { 22479 ref, 22480 className: clsx_default( 22481 style_default22["input-layout-slot"], 22482 style_default22[`is-padding-$padding}`], 22483 className 22484 ), 22485 ...restProps 22486 } 22487 ); 22488 }); 22489 InputLayoutSlot.displayName = "InputLayout.Slot"; 22490 22491 // packages/ui/build-module/form/primitives/input-layout/index.mjs 22492 var InputLayout2 = Object.assign(InputLayout, { 22493 Slot: InputLayoutSlot 22494 }); 22495 22496 // packages/ui/build-module/utils/css/item-popup.mjs 22497 var STYLE_HASH_ATTRIBUTE24 = "data-wp-hash"; 22498 function getRuntime24() { 22499 const globalScope = globalThis; 22500 if (globalScope.__wpStyleRuntime) { 22501 return globalScope.__wpStyleRuntime; 22502 } 22503 globalScope.__wpStyleRuntime = { 22504 documents: /* @__PURE__ */ new Map(), 22505 styles: /* @__PURE__ */ new Map(), 22506 injectedStyles: /* @__PURE__ */ new WeakMap() 22507 }; 22508 if (typeof document !== "undefined") { 22509 registerDocument24(document); 22510 } 22511 return globalScope.__wpStyleRuntime; 22512 } 22513 function documentContainsStyleHash24(targetDocument, hash) { 22514 if (!targetDocument.head) { 22515 return false; 22516 } 22517 for (const style of targetDocument.head.querySelectorAll( 22518 `style[$STYLE_HASH_ATTRIBUTE24}]` 22519 )) { 22520 if (style.getAttribute(STYLE_HASH_ATTRIBUTE24) === hash) { 22521 return true; 22522 } 22523 } 22524 return false; 22525 } 22526 function injectStyle24(targetDocument, hash, css) { 22527 if (!targetDocument.head) { 22528 return; 22529 } 22530 const runtime = getRuntime24(); 22531 let injectedStyles = runtime.injectedStyles.get(targetDocument); 22532 if (!injectedStyles) { 22533 injectedStyles = /* @__PURE__ */ new Set(); 22534 runtime.injectedStyles.set(targetDocument, injectedStyles); 22535 } 22536 if (injectedStyles.has(hash)) { 22537 return; 22538 } 22539 if (documentContainsStyleHash24(targetDocument, hash)) { 22540 injectedStyles.add(hash); 22541 return; 22542 } 22543 const style = targetDocument.createElement("style"); 22544 style.setAttribute(STYLE_HASH_ATTRIBUTE24, hash); 22545 style.appendChild(targetDocument.createTextNode(css)); 22546 targetDocument.head.appendChild(style); 22547 injectedStyles.add(hash); 22548 } 22549 function registerDocument24(targetDocument) { 22550 const runtime = getRuntime24(); 22551 runtime.documents.set( 22552 targetDocument, 22553 (runtime.documents.get(targetDocument) ?? 0) + 1 22554 ); 22555 for (const [hash, css] of runtime.styles) { 22556 injectStyle24(targetDocument, hash, css); 22557 } 22558 return () => { 22559 const count = runtime.documents.get(targetDocument); 22560 if (count === void 0) { 22561 return; 22562 } 22563 if (count <= 1) { 22564 runtime.documents.delete(targetDocument); 22565 return; 22566 } 22567 runtime.documents.set(targetDocument, count - 1); 22568 }; 22569 } 22570 function registerStyle24(hash, css) { 22571 const runtime = getRuntime24(); 22572 runtime.styles.set(hash, css); 22573 for (const targetDocument of runtime.documents.keys()) { 22574 injectStyle24(targetDocument, hash, css); 22575 } 22576 } 22577 if (typeof process === "undefined" || true) { 22578 registerStyle24("7ad1c0f17c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.db3b5361087077bf__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "status" "main";grid-template-rows:auto auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width);&._55f74d412c3e00e8__is-width-anchor{width:var(--anchor-width)}&._90e0b62205351f85__is-width-content{width:auto}&._30ba87899c0b11ce__is-width-sm{width:min(var(--available-width),var(--wpds-dimension-surface-width-sm,320px))}&._402d4db0488da324__is-width-md{width:min(var(--available-width),var(--wpds-dimension-surface-width-md,400px))}&._34ead52b2d60b21d__is-width-lg{width:min(var(--available-width),var(--wpds-dimension-surface-width-lg,560px))}&._3fec17b6dc9029c3__is-width-available{width:var(--available-width)}}._89cf8b0bb3319c7e__is-align-item-with-trigger[data-side=none] .db3b5361087077bf__popup{max-height:none}._66636b371582ead4__list-chrome{--_wp-ui-popup-selection-offset:0px;color:var(--wpds-color-foreground-interactive-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-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);&:has(.b6aeb640498fae5d__item-icon){--_wp-ui-popup-selection-offset:calc(var(--wpds-dimension-size-2xs, 16px) + var(--wpds-dimension-gap-xs, 4px) - var(--wpds-dimension-padding-xs, 4px))}}._325f1b7764907c29__list{display:grid;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto}._597ea43c6bec63d8__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}._5865110cf5678449__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._597ea43c6bec63d8__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}._09c9c50e605390ff__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._6361da5eb54e618d__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-sm,24px);padding-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));padding-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset))}._88cf016d20b4f2ef__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));margin-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset));@media (forced-colors:active){background-color:CanvasText}}.c466e5465a76d4f6__item-layout{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);min-width:0;overflow-wrap:anywhere;padding-block:var(--wp-ui-popup-item-padding-block);padding-inline:var(--wp-ui-popup-item-padding-inline);&:has(>.b6aeb640498fae5d__item-icon){align-content:center;align-items:start;display:grid;grid-template-columns:auto minmax(0,1fr);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}}.b9c803da5aae76d5__item{user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&._8931f3eb02e2e0ad__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._494b2a9f2e72b67f__item-indicator-icon{opacity:0}}&[data-highlighted]:not([data-disabled]){background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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:0}@media (forced-colors:active){color:GrayText}}}.b6aeb640498fae5d__item-icon{align-items:center;display:flex;height:var(--wpds-typography-line-height-sm,20px);justify-content:center;pointer-events:none;width:var(--wpds-dimension-size-2xs,16px)}._494b2a9f2e72b67f__item-indicator-icon{translate:0 1px}.b40c7d58965ce4a5__item-content{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);min-width:0}._3c629930ceb193c7__item-text{display:flex;flex-direction:column;min-width:0}._5c4aad98ed7a8382__item-label{--_gcd-heading-color:currentColor;min-width:0}.deb952050541c0e4__item-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.b9c803da5aae76d5__item[data-disabled] .deb952050541c0e4__item-description,.b9c803da5aae76d5__item[data-highlighted]:not([data-disabled]) .deb952050541c0e4__item-description{--_gcd-heading-color:currentColor;color:inherit}._5f8e4a2a04ecdade__loading-indicator{color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}.c1bf7c14e9600f0a__status{grid-area:status;&:has(._5f8e4a2a04ecdade__loading-indicator){padding-block:var(--wp-ui-popup-padding)}}._0850de87108c9441__empty:not(:empty){grid-area:main}._0850de87108c9441__empty:not(:empty),.c1bf7c14e9600f0a__status:not(:empty):not(:has([data-visually-hidden],._5f8e4a2a04ecdade__loading-indicator)){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}@layer compositions{.eaec70f7db4a63ef__loading-spinner{height:var(--wpds-dimension-size-3xs,12px);width:var(--wpds-dimension-size-3xs,12px)}}}'); 22579 } 22580 var item_popup_default = { "popup": "db3b5361087077bf__popup _069972d5e326bada__dropdown-motion", "is-width-anchor": "_55f74d412c3e00e8__is-width-anchor", "is-width-content": "_90e0b62205351f85__is-width-content", "is-width-sm": "_30ba87899c0b11ce__is-width-sm", "is-width-md": "_402d4db0488da324__is-width-md", "is-width-lg": "_34ead52b2d60b21d__is-width-lg", "is-width-available": "_3fec17b6dc9029c3__is-width-available", "is-align-item-with-trigger": "_89cf8b0bb3319c7e__is-align-item-with-trigger", "list-chrome": "_66636b371582ead4__list-chrome", "item-icon": "b6aeb640498fae5d__item-icon", "list": "_325f1b7764907c29__list _66636b371582ead4__list-chrome", "list-scrollable-container": "_597ea43c6bec63d8__list-scrollable-container", "list-footer": "_5865110cf5678449__list-footer", "group": "_09c9c50e605390ff__group", "group-label": "_6361da5eb54e618d__group-label", "separator": "_88cf016d20b4f2ef__separator", "item-layout": "c466e5465a76d4f6__item-layout", "item": "b9c803da5aae76d5__item c466e5465a76d4f6__item-layout", "is-size-small": "_8931f3eb02e2e0ad__is-size-small", "item-indicator-icon": "_494b2a9f2e72b67f__item-indicator-icon", "item-content": "b40c7d58965ce4a5__item-content", "item-text": "_3c629930ceb193c7__item-text", "item-label": "_5c4aad98ed7a8382__item-label", "item-description": "deb952050541c0e4__item-description", "loading-indicator": "_5f8e4a2a04ecdade__loading-indicator c466e5465a76d4f6__item-layout", "status": "c1bf7c14e9600f0a__status", "empty": "_0850de87108c9441__empty", "loading-spinner": "eaec70f7db4a63ef__loading-spinner" }; 22581 function getItemPopupWidthClassName(width = "anchor") { 22582 switch (width) { 22583 case "available": 22584 return item_popup_default["is-width-available"]; 22585 case "content": 22586 return item_popup_default["is-width-content"]; 22587 case "lg": 22588 return item_popup_default["is-width-lg"]; 22589 case "md": 22590 return item_popup_default["is-width-md"]; 22591 case "sm": 22592 return item_popup_default["is-width-sm"]; 22593 case "anchor": 22594 return item_popup_default["is-width-anchor"]; 22595 default: 22596 return false; 22597 } 22598 } 22599 22600 // packages/ui/build-module/form/primitives/select/index.mjs 22601 var select_exports = {}; 22602 __export(select_exports, { 22603 Group: () => Group2, 22604 GroupLabel: () => GroupLabel2, 22605 Item: () => Item2, 22606 ItemDescription: () => ItemDescription2, 22607 ItemLabel: () => ItemLabel2, 22608 Popup: () => Popup3, 22609 Portal: () => Portal3, 22610 Positioner: () => Positioner3, 22611 Root: () => Root3, 22612 Separator: () => Separator3, 22613 Trigger: () => Trigger3 22614 }); 22615 22616 // packages/ui/build-module/form/primitives/select/group.mjs 22617 var import_element47 = __toESM(require_element(), 1); 22618 var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1); 22619 var STYLE_HASH_ATTRIBUTE25 = "data-wp-hash"; 22620 function getRuntime25() { 22621 const globalScope = globalThis; 22622 if (globalScope.__wpStyleRuntime) { 22623 return globalScope.__wpStyleRuntime; 22624 } 22625 globalScope.__wpStyleRuntime = { 22626 documents: /* @__PURE__ */ new Map(), 22627 styles: /* @__PURE__ */ new Map(), 22628 injectedStyles: /* @__PURE__ */ new WeakMap() 22629 }; 22630 if (typeof document !== "undefined") { 22631 registerDocument25(document); 22632 } 22633 return globalScope.__wpStyleRuntime; 22634 } 22635 function documentContainsStyleHash25(targetDocument, hash) { 22636 if (!targetDocument.head) { 22637 return false; 22638 } 22639 for (const style of targetDocument.head.querySelectorAll( 22640 `style[$STYLE_HASH_ATTRIBUTE25}]` 22641 )) { 22642 if (style.getAttribute(STYLE_HASH_ATTRIBUTE25) === hash) { 22643 return true; 22644 } 22645 } 22646 return false; 22647 } 22648 function injectStyle25(targetDocument, hash, css) { 22649 if (!targetDocument.head) { 22650 return; 22651 } 22652 const runtime = getRuntime25(); 22653 let injectedStyles = runtime.injectedStyles.get(targetDocument); 22654 if (!injectedStyles) { 22655 injectedStyles = /* @__PURE__ */ new Set(); 22656 runtime.injectedStyles.set(targetDocument, injectedStyles); 22657 } 22658 if (injectedStyles.has(hash)) { 22659 return; 22660 } 22661 if (documentContainsStyleHash25(targetDocument, hash)) { 22662 injectedStyles.add(hash); 22663 return; 22664 } 22665 const style = targetDocument.createElement("style"); 22666 style.setAttribute(STYLE_HASH_ATTRIBUTE25, hash); 22667 style.appendChild(targetDocument.createTextNode(css)); 22668 targetDocument.head.appendChild(style); 22669 injectedStyles.add(hash); 22670 } 22671 function registerDocument25(targetDocument) { 22672 const runtime = getRuntime25(); 22673 runtime.documents.set( 22674 targetDocument, 22675 (runtime.documents.get(targetDocument) ?? 0) + 1 22676 ); 22677 for (const [hash, css] of runtime.styles) { 22678 injectStyle25(targetDocument, hash, css); 22679 } 22680 return () => { 22681 const count = runtime.documents.get(targetDocument); 22682 if (count === void 0) { 22683 return; 22684 } 22685 if (count <= 1) { 22686 runtime.documents.delete(targetDocument); 22687 return; 22688 } 22689 runtime.documents.set(targetDocument, count - 1); 22690 }; 22691 } 22692 function registerStyle25(hash, css) { 22693 const runtime = getRuntime25(); 22694 runtime.styles.set(hash, css); 22695 for (const targetDocument of runtime.documents.keys()) { 22696 injectStyle25(targetDocument, hash, css); 22697 } 22698 } 22699 if (typeof process === "undefined" || true) { 22700 registerStyle25("7ad1c0f17c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.db3b5361087077bf__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "status" "main";grid-template-rows:auto auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width);&._55f74d412c3e00e8__is-width-anchor{width:var(--anchor-width)}&._90e0b62205351f85__is-width-content{width:auto}&._30ba87899c0b11ce__is-width-sm{width:min(var(--available-width),var(--wpds-dimension-surface-width-sm,320px))}&._402d4db0488da324__is-width-md{width:min(var(--available-width),var(--wpds-dimension-surface-width-md,400px))}&._34ead52b2d60b21d__is-width-lg{width:min(var(--available-width),var(--wpds-dimension-surface-width-lg,560px))}&._3fec17b6dc9029c3__is-width-available{width:var(--available-width)}}._89cf8b0bb3319c7e__is-align-item-with-trigger[data-side=none] .db3b5361087077bf__popup{max-height:none}._66636b371582ead4__list-chrome{--_wp-ui-popup-selection-offset:0px;color:var(--wpds-color-foreground-interactive-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-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);&:has(.b6aeb640498fae5d__item-icon){--_wp-ui-popup-selection-offset:calc(var(--wpds-dimension-size-2xs, 16px) + var(--wpds-dimension-gap-xs, 4px) - var(--wpds-dimension-padding-xs, 4px))}}._325f1b7764907c29__list{display:grid;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto}._597ea43c6bec63d8__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}._5865110cf5678449__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._597ea43c6bec63d8__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}._09c9c50e605390ff__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._6361da5eb54e618d__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-sm,24px);padding-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));padding-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset))}._88cf016d20b4f2ef__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));margin-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset));@media (forced-colors:active){background-color:CanvasText}}.c466e5465a76d4f6__item-layout{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);min-width:0;overflow-wrap:anywhere;padding-block:var(--wp-ui-popup-item-padding-block);padding-inline:var(--wp-ui-popup-item-padding-inline);&:has(>.b6aeb640498fae5d__item-icon){align-content:center;align-items:start;display:grid;grid-template-columns:auto minmax(0,1fr);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}}.b9c803da5aae76d5__item{user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&._8931f3eb02e2e0ad__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._494b2a9f2e72b67f__item-indicator-icon{opacity:0}}&[data-highlighted]:not([data-disabled]){background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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:0}@media (forced-colors:active){color:GrayText}}}.b6aeb640498fae5d__item-icon{align-items:center;display:flex;height:var(--wpds-typography-line-height-sm,20px);justify-content:center;pointer-events:none;width:var(--wpds-dimension-size-2xs,16px)}._494b2a9f2e72b67f__item-indicator-icon{translate:0 1px}.b40c7d58965ce4a5__item-content{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);min-width:0}._3c629930ceb193c7__item-text{display:flex;flex-direction:column;min-width:0}._5c4aad98ed7a8382__item-label{--_gcd-heading-color:currentColor;min-width:0}.deb952050541c0e4__item-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.b9c803da5aae76d5__item[data-disabled] .deb952050541c0e4__item-description,.b9c803da5aae76d5__item[data-highlighted]:not([data-disabled]) .deb952050541c0e4__item-description{--_gcd-heading-color:currentColor;color:inherit}._5f8e4a2a04ecdade__loading-indicator{color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}.c1bf7c14e9600f0a__status{grid-area:status;&:has(._5f8e4a2a04ecdade__loading-indicator){padding-block:var(--wp-ui-popup-padding)}}._0850de87108c9441__empty:not(:empty){grid-area:main}._0850de87108c9441__empty:not(:empty),.c1bf7c14e9600f0a__status:not(:empty):not(:has([data-visually-hidden],._5f8e4a2a04ecdade__loading-indicator)){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}@layer compositions{.eaec70f7db4a63ef__loading-spinner{height:var(--wpds-dimension-size-3xs,12px);width:var(--wpds-dimension-size-3xs,12px)}}}'); 22701 } 22702 var item_popup_default2 = { "popup": "db3b5361087077bf__popup _069972d5e326bada__dropdown-motion", "is-width-anchor": "_55f74d412c3e00e8__is-width-anchor", "is-width-content": "_90e0b62205351f85__is-width-content", "is-width-sm": "_30ba87899c0b11ce__is-width-sm", "is-width-md": "_402d4db0488da324__is-width-md", "is-width-lg": "_34ead52b2d60b21d__is-width-lg", "is-width-available": "_3fec17b6dc9029c3__is-width-available", "is-align-item-with-trigger": "_89cf8b0bb3319c7e__is-align-item-with-trigger", "list-chrome": "_66636b371582ead4__list-chrome", "item-icon": "b6aeb640498fae5d__item-icon", "list": "_325f1b7764907c29__list _66636b371582ead4__list-chrome", "list-scrollable-container": "_597ea43c6bec63d8__list-scrollable-container", "list-footer": "_5865110cf5678449__list-footer", "group": "_09c9c50e605390ff__group", "group-label": "_6361da5eb54e618d__group-label", "separator": "_88cf016d20b4f2ef__separator", "item-layout": "c466e5465a76d4f6__item-layout", "item": "b9c803da5aae76d5__item c466e5465a76d4f6__item-layout", "is-size-small": "_8931f3eb02e2e0ad__is-size-small", "item-indicator-icon": "_494b2a9f2e72b67f__item-indicator-icon", "item-content": "b40c7d58965ce4a5__item-content", "item-text": "_3c629930ceb193c7__item-text", "item-label": "_5c4aad98ed7a8382__item-label", "item-description": "deb952050541c0e4__item-description", "loading-indicator": "_5f8e4a2a04ecdade__loading-indicator c466e5465a76d4f6__item-layout", "status": "c1bf7c14e9600f0a__status", "empty": "_0850de87108c9441__empty", "loading-spinner": "eaec70f7db4a63ef__loading-spinner" }; 22703 var Group2 = (0, import_element47.forwardRef)( 22704 function UnforwardedGroup({ className, children, ...restProps }, ref) { 22705 return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)( 22706 index_parts_exports3.Group, 22707 { 22708 className: clsx_default(item_popup_default2.group, className), 22709 ref, 22710 ...restProps, 22711 children 22712 } 22713 ); 22714 } 22715 ); 22716 22717 // packages/ui/build-module/form/primitives/select/group-label.mjs 22718 var import_element48 = __toESM(require_element(), 1); 22719 var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1); 22720 var STYLE_HASH_ATTRIBUTE26 = "data-wp-hash"; 22721 function getRuntime26() { 22722 const globalScope = globalThis; 22723 if (globalScope.__wpStyleRuntime) { 22724 return globalScope.__wpStyleRuntime; 22725 } 22726 globalScope.__wpStyleRuntime = { 22727 documents: /* @__PURE__ */ new Map(), 22728 styles: /* @__PURE__ */ new Map(), 22729 injectedStyles: /* @__PURE__ */ new WeakMap() 22730 }; 22731 if (typeof document !== "undefined") { 22732 registerDocument26(document); 22733 } 22734 return globalScope.__wpStyleRuntime; 22735 } 22736 function documentContainsStyleHash26(targetDocument, hash) { 22737 if (!targetDocument.head) { 22738 return false; 22739 } 22740 for (const style of targetDocument.head.querySelectorAll( 22741 `style[$STYLE_HASH_ATTRIBUTE26}]` 22742 )) { 22743 if (style.getAttribute(STYLE_HASH_ATTRIBUTE26) === hash) { 22744 return true; 22745 } 22746 } 22747 return false; 22748 } 22749 function injectStyle26(targetDocument, hash, css) { 22750 if (!targetDocument.head) { 22751 return; 22752 } 22753 const runtime = getRuntime26(); 22754 let injectedStyles = runtime.injectedStyles.get(targetDocument); 22755 if (!injectedStyles) { 22756 injectedStyles = /* @__PURE__ */ new Set(); 22757 runtime.injectedStyles.set(targetDocument, injectedStyles); 22758 } 22759 if (injectedStyles.has(hash)) { 22760 return; 22761 } 22762 if (documentContainsStyleHash26(targetDocument, hash)) { 22763 injectedStyles.add(hash); 22764 return; 22765 } 22766 const style = targetDocument.createElement("style"); 22767 style.setAttribute(STYLE_HASH_ATTRIBUTE26, hash); 22768 style.appendChild(targetDocument.createTextNode(css)); 22769 targetDocument.head.appendChild(style); 22770 injectedStyles.add(hash); 22771 } 22772 function registerDocument26(targetDocument) { 22773 const runtime = getRuntime26(); 22774 runtime.documents.set( 22775 targetDocument, 22776 (runtime.documents.get(targetDocument) ?? 0) + 1 22777 ); 22778 for (const [hash, css] of runtime.styles) { 22779 injectStyle26(targetDocument, hash, css); 22780 } 22781 return () => { 22782 const count = runtime.documents.get(targetDocument); 22783 if (count === void 0) { 22784 return; 22785 } 22786 if (count <= 1) { 22787 runtime.documents.delete(targetDocument); 22788 return; 22789 } 22790 runtime.documents.set(targetDocument, count - 1); 22791 }; 22792 } 22793 function registerStyle26(hash, css) { 22794 const runtime = getRuntime26(); 22795 runtime.styles.set(hash, css); 22796 for (const targetDocument of runtime.documents.keys()) { 22797 injectStyle26(targetDocument, hash, css); 22798 } 22799 } 22800 if (typeof process === "undefined" || true) { 22801 registerStyle26("7ad1c0f17c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.db3b5361087077bf__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "status" "main";grid-template-rows:auto auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width);&._55f74d412c3e00e8__is-width-anchor{width:var(--anchor-width)}&._90e0b62205351f85__is-width-content{width:auto}&._30ba87899c0b11ce__is-width-sm{width:min(var(--available-width),var(--wpds-dimension-surface-width-sm,320px))}&._402d4db0488da324__is-width-md{width:min(var(--available-width),var(--wpds-dimension-surface-width-md,400px))}&._34ead52b2d60b21d__is-width-lg{width:min(var(--available-width),var(--wpds-dimension-surface-width-lg,560px))}&._3fec17b6dc9029c3__is-width-available{width:var(--available-width)}}._89cf8b0bb3319c7e__is-align-item-with-trigger[data-side=none] .db3b5361087077bf__popup{max-height:none}._66636b371582ead4__list-chrome{--_wp-ui-popup-selection-offset:0px;color:var(--wpds-color-foreground-interactive-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-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);&:has(.b6aeb640498fae5d__item-icon){--_wp-ui-popup-selection-offset:calc(var(--wpds-dimension-size-2xs, 16px) + var(--wpds-dimension-gap-xs, 4px) - var(--wpds-dimension-padding-xs, 4px))}}._325f1b7764907c29__list{display:grid;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto}._597ea43c6bec63d8__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}._5865110cf5678449__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._597ea43c6bec63d8__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}._09c9c50e605390ff__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._6361da5eb54e618d__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-sm,24px);padding-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));padding-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset))}._88cf016d20b4f2ef__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));margin-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset));@media (forced-colors:active){background-color:CanvasText}}.c466e5465a76d4f6__item-layout{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);min-width:0;overflow-wrap:anywhere;padding-block:var(--wp-ui-popup-item-padding-block);padding-inline:var(--wp-ui-popup-item-padding-inline);&:has(>.b6aeb640498fae5d__item-icon){align-content:center;align-items:start;display:grid;grid-template-columns:auto minmax(0,1fr);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}}.b9c803da5aae76d5__item{user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&._8931f3eb02e2e0ad__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._494b2a9f2e72b67f__item-indicator-icon{opacity:0}}&[data-highlighted]:not([data-disabled]){background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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:0}@media (forced-colors:active){color:GrayText}}}.b6aeb640498fae5d__item-icon{align-items:center;display:flex;height:var(--wpds-typography-line-height-sm,20px);justify-content:center;pointer-events:none;width:var(--wpds-dimension-size-2xs,16px)}._494b2a9f2e72b67f__item-indicator-icon{translate:0 1px}.b40c7d58965ce4a5__item-content{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);min-width:0}._3c629930ceb193c7__item-text{display:flex;flex-direction:column;min-width:0}._5c4aad98ed7a8382__item-label{--_gcd-heading-color:currentColor;min-width:0}.deb952050541c0e4__item-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.b9c803da5aae76d5__item[data-disabled] .deb952050541c0e4__item-description,.b9c803da5aae76d5__item[data-highlighted]:not([data-disabled]) .deb952050541c0e4__item-description{--_gcd-heading-color:currentColor;color:inherit}._5f8e4a2a04ecdade__loading-indicator{color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}.c1bf7c14e9600f0a__status{grid-area:status;&:has(._5f8e4a2a04ecdade__loading-indicator){padding-block:var(--wp-ui-popup-padding)}}._0850de87108c9441__empty:not(:empty){grid-area:main}._0850de87108c9441__empty:not(:empty),.c1bf7c14e9600f0a__status:not(:empty):not(:has([data-visually-hidden],._5f8e4a2a04ecdade__loading-indicator)){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}@layer compositions{.eaec70f7db4a63ef__loading-spinner{height:var(--wpds-dimension-size-3xs,12px);width:var(--wpds-dimension-size-3xs,12px)}}}'); 22802 } 22803 var item_popup_default3 = { "popup": "db3b5361087077bf__popup _069972d5e326bada__dropdown-motion", "is-width-anchor": "_55f74d412c3e00e8__is-width-anchor", "is-width-content": "_90e0b62205351f85__is-width-content", "is-width-sm": "_30ba87899c0b11ce__is-width-sm", "is-width-md": "_402d4db0488da324__is-width-md", "is-width-lg": "_34ead52b2d60b21d__is-width-lg", "is-width-available": "_3fec17b6dc9029c3__is-width-available", "is-align-item-with-trigger": "_89cf8b0bb3319c7e__is-align-item-with-trigger", "list-chrome": "_66636b371582ead4__list-chrome", "item-icon": "b6aeb640498fae5d__item-icon", "list": "_325f1b7764907c29__list _66636b371582ead4__list-chrome", "list-scrollable-container": "_597ea43c6bec63d8__list-scrollable-container", "list-footer": "_5865110cf5678449__list-footer", "group": "_09c9c50e605390ff__group", "group-label": "_6361da5eb54e618d__group-label", "separator": "_88cf016d20b4f2ef__separator", "item-layout": "c466e5465a76d4f6__item-layout", "item": "b9c803da5aae76d5__item c466e5465a76d4f6__item-layout", "is-size-small": "_8931f3eb02e2e0ad__is-size-small", "item-indicator-icon": "_494b2a9f2e72b67f__item-indicator-icon", "item-content": "b40c7d58965ce4a5__item-content", "item-text": "_3c629930ceb193c7__item-text", "item-label": "_5c4aad98ed7a8382__item-label", "item-description": "deb952050541c0e4__item-description", "loading-indicator": "_5f8e4a2a04ecdade__loading-indicator c466e5465a76d4f6__item-layout", "status": "c1bf7c14e9600f0a__status", "empty": "_0850de87108c9441__empty", "loading-spinner": "eaec70f7db4a63ef__loading-spinner" }; 22804 var GroupLabel2 = (0, import_element48.forwardRef)( 22805 function UnforwardedGroupLabel({ className, children, ...restProps }, ref) { 22806 return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)( 22807 Text, 22808 { 22809 variant: "heading-sm", 22810 className: clsx_default( 22811 item_popup_default3["group-label"], 22812 className 22813 ), 22814 render: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(index_parts_exports3.GroupLabel, { ref, ...restProps }), 22815 children 22816 } 22817 ); 22818 } 22819 ); 22820 22821 // packages/ui/build-module/form/primitives/select/item.mjs 22822 var import_element51 = __toESM(require_element(), 1); 22823 22824 // packages/ui/build-module/form/primitives/select/item-description.mjs 22825 var import_element49 = __toESM(require_element(), 1); 22826 var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1); 22827 var STYLE_HASH_ATTRIBUTE27 = "data-wp-hash"; 22828 function getRuntime27() { 22829 const globalScope = globalThis; 22830 if (globalScope.__wpStyleRuntime) { 22831 return globalScope.__wpStyleRuntime; 22832 } 22833 globalScope.__wpStyleRuntime = { 22834 documents: /* @__PURE__ */ new Map(), 22835 styles: /* @__PURE__ */ new Map(), 22836 injectedStyles: /* @__PURE__ */ new WeakMap() 22837 }; 22838 if (typeof document !== "undefined") { 22839 registerDocument27(document); 22840 } 22841 return globalScope.__wpStyleRuntime; 22842 } 22843 function documentContainsStyleHash27(targetDocument, hash) { 22844 if (!targetDocument.head) { 22845 return false; 22846 } 22847 for (const style of targetDocument.head.querySelectorAll( 22848 `style[$STYLE_HASH_ATTRIBUTE27}]` 22849 )) { 22850 if (style.getAttribute(STYLE_HASH_ATTRIBUTE27) === hash) { 22851 return true; 22852 } 22853 } 22854 return false; 22855 } 22856 function injectStyle27(targetDocument, hash, css) { 22857 if (!targetDocument.head) { 22858 return; 22859 } 22860 const runtime = getRuntime27(); 22861 let injectedStyles = runtime.injectedStyles.get(targetDocument); 22862 if (!injectedStyles) { 22863 injectedStyles = /* @__PURE__ */ new Set(); 22864 runtime.injectedStyles.set(targetDocument, injectedStyles); 22865 } 22866 if (injectedStyles.has(hash)) { 22867 return; 22868 } 22869 if (documentContainsStyleHash27(targetDocument, hash)) { 22870 injectedStyles.add(hash); 22871 return; 22872 } 22873 const style = targetDocument.createElement("style"); 22874 style.setAttribute(STYLE_HASH_ATTRIBUTE27, hash); 22875 style.appendChild(targetDocument.createTextNode(css)); 22876 targetDocument.head.appendChild(style); 22877 injectedStyles.add(hash); 22878 } 22879 function registerDocument27(targetDocument) { 22880 const runtime = getRuntime27(); 22881 runtime.documents.set( 22882 targetDocument, 22883 (runtime.documents.get(targetDocument) ?? 0) + 1 22884 ); 22885 for (const [hash, css] of runtime.styles) { 22886 injectStyle27(targetDocument, hash, css); 22887 } 22888 return () => { 22889 const count = runtime.documents.get(targetDocument); 22890 if (count === void 0) { 22891 return; 22892 } 22893 if (count <= 1) { 22894 runtime.documents.delete(targetDocument); 22895 return; 22896 } 22897 runtime.documents.set(targetDocument, count - 1); 22898 }; 22899 } 22900 function registerStyle27(hash, css) { 22901 const runtime = getRuntime27(); 22902 runtime.styles.set(hash, css); 22903 for (const targetDocument of runtime.documents.keys()) { 22904 injectStyle27(targetDocument, hash, css); 22905 } 22906 } 22907 if (typeof process === "undefined" || true) { 22908 registerStyle27("7ad1c0f17c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.db3b5361087077bf__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "status" "main";grid-template-rows:auto auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width);&._55f74d412c3e00e8__is-width-anchor{width:var(--anchor-width)}&._90e0b62205351f85__is-width-content{width:auto}&._30ba87899c0b11ce__is-width-sm{width:min(var(--available-width),var(--wpds-dimension-surface-width-sm,320px))}&._402d4db0488da324__is-width-md{width:min(var(--available-width),var(--wpds-dimension-surface-width-md,400px))}&._34ead52b2d60b21d__is-width-lg{width:min(var(--available-width),var(--wpds-dimension-surface-width-lg,560px))}&._3fec17b6dc9029c3__is-width-available{width:var(--available-width)}}._89cf8b0bb3319c7e__is-align-item-with-trigger[data-side=none] .db3b5361087077bf__popup{max-height:none}._66636b371582ead4__list-chrome{--_wp-ui-popup-selection-offset:0px;color:var(--wpds-color-foreground-interactive-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-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);&:has(.b6aeb640498fae5d__item-icon){--_wp-ui-popup-selection-offset:calc(var(--wpds-dimension-size-2xs, 16px) + var(--wpds-dimension-gap-xs, 4px) - var(--wpds-dimension-padding-xs, 4px))}}._325f1b7764907c29__list{display:grid;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto}._597ea43c6bec63d8__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}._5865110cf5678449__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._597ea43c6bec63d8__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}._09c9c50e605390ff__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._6361da5eb54e618d__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-sm,24px);padding-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));padding-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset))}._88cf016d20b4f2ef__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));margin-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset));@media (forced-colors:active){background-color:CanvasText}}.c466e5465a76d4f6__item-layout{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);min-width:0;overflow-wrap:anywhere;padding-block:var(--wp-ui-popup-item-padding-block);padding-inline:var(--wp-ui-popup-item-padding-inline);&:has(>.b6aeb640498fae5d__item-icon){align-content:center;align-items:start;display:grid;grid-template-columns:auto minmax(0,1fr);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}}.b9c803da5aae76d5__item{user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&._8931f3eb02e2e0ad__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._494b2a9f2e72b67f__item-indicator-icon{opacity:0}}&[data-highlighted]:not([data-disabled]){background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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:0}@media (forced-colors:active){color:GrayText}}}.b6aeb640498fae5d__item-icon{align-items:center;display:flex;height:var(--wpds-typography-line-height-sm,20px);justify-content:center;pointer-events:none;width:var(--wpds-dimension-size-2xs,16px)}._494b2a9f2e72b67f__item-indicator-icon{translate:0 1px}.b40c7d58965ce4a5__item-content{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);min-width:0}._3c629930ceb193c7__item-text{display:flex;flex-direction:column;min-width:0}._5c4aad98ed7a8382__item-label{--_gcd-heading-color:currentColor;min-width:0}.deb952050541c0e4__item-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.b9c803da5aae76d5__item[data-disabled] .deb952050541c0e4__item-description,.b9c803da5aae76d5__item[data-highlighted]:not([data-disabled]) .deb952050541c0e4__item-description{--_gcd-heading-color:currentColor;color:inherit}._5f8e4a2a04ecdade__loading-indicator{color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}.c1bf7c14e9600f0a__status{grid-area:status;&:has(._5f8e4a2a04ecdade__loading-indicator){padding-block:var(--wp-ui-popup-padding)}}._0850de87108c9441__empty:not(:empty){grid-area:main}._0850de87108c9441__empty:not(:empty),.c1bf7c14e9600f0a__status:not(:empty):not(:has([data-visually-hidden],._5f8e4a2a04ecdade__loading-indicator)){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}@layer compositions{.eaec70f7db4a63ef__loading-spinner{height:var(--wpds-dimension-size-3xs,12px);width:var(--wpds-dimension-size-3xs,12px)}}}'); 22909 } 22910 var item_popup_default4 = { "popup": "db3b5361087077bf__popup _069972d5e326bada__dropdown-motion", "is-width-anchor": "_55f74d412c3e00e8__is-width-anchor", "is-width-content": "_90e0b62205351f85__is-width-content", "is-width-sm": "_30ba87899c0b11ce__is-width-sm", "is-width-md": "_402d4db0488da324__is-width-md", "is-width-lg": "_34ead52b2d60b21d__is-width-lg", "is-width-available": "_3fec17b6dc9029c3__is-width-available", "is-align-item-with-trigger": "_89cf8b0bb3319c7e__is-align-item-with-trigger", "list-chrome": "_66636b371582ead4__list-chrome", "item-icon": "b6aeb640498fae5d__item-icon", "list": "_325f1b7764907c29__list _66636b371582ead4__list-chrome", "list-scrollable-container": "_597ea43c6bec63d8__list-scrollable-container", "list-footer": "_5865110cf5678449__list-footer", "group": "_09c9c50e605390ff__group", "group-label": "_6361da5eb54e618d__group-label", "separator": "_88cf016d20b4f2ef__separator", "item-layout": "c466e5465a76d4f6__item-layout", "item": "b9c803da5aae76d5__item c466e5465a76d4f6__item-layout", "is-size-small": "_8931f3eb02e2e0ad__is-size-small", "item-indicator-icon": "_494b2a9f2e72b67f__item-indicator-icon", "item-content": "b40c7d58965ce4a5__item-content", "item-text": "_3c629930ceb193c7__item-text", "item-label": "_5c4aad98ed7a8382__item-label", "item-description": "deb952050541c0e4__item-description", "loading-indicator": "_5f8e4a2a04ecdade__loading-indicator c466e5465a76d4f6__item-layout", "status": "c1bf7c14e9600f0a__status", "empty": "_0850de87108c9441__empty", "loading-spinner": "eaec70f7db4a63ef__loading-spinner" }; 22911 var ITEM_DESCRIPTION_DIRECT_CHILD2 = /* @__PURE__ */ Symbol(); 22912 var ItemDescription2 = (0, import_element49.forwardRef)(function UnforwardedItemDescription(props, ref) { 22913 const { className, validationToken, ...restProps } = props; 22914 if (validationToken !== ITEM_DESCRIPTION_DIRECT_CHILD2) { 22915 throw new Error( 22916 "Select.ItemDescription: Missing direct select item parent. Render <Select.ItemDescription> as a direct child of <Select.Item>." 22917 ); 22918 } 22919 return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)( 22920 Text, 22921 { 22922 ref, 22923 variant: "body-sm", 22924 className: clsx_default( 22925 item_popup_default4["item-description"], 22926 className 22927 ), 22928 ...restProps 22929 } 22930 ); 22931 }); 22932 22933 // packages/ui/build-module/form/primitives/select/item-label.mjs 22934 var import_element50 = __toESM(require_element(), 1); 22935 var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1); 22936 var STYLE_HASH_ATTRIBUTE28 = "data-wp-hash"; 22937 function getRuntime28() { 22938 const globalScope = globalThis; 22939 if (globalScope.__wpStyleRuntime) { 22940 return globalScope.__wpStyleRuntime; 22941 } 22942 globalScope.__wpStyleRuntime = { 22943 documents: /* @__PURE__ */ new Map(), 22944 styles: /* @__PURE__ */ new Map(), 22945 injectedStyles: /* @__PURE__ */ new WeakMap() 22946 }; 22947 if (typeof document !== "undefined") { 22948 registerDocument28(document); 22949 } 22950 return globalScope.__wpStyleRuntime; 22951 } 22952 function documentContainsStyleHash28(targetDocument, hash) { 22953 if (!targetDocument.head) { 22954 return false; 22955 } 22956 for (const style of targetDocument.head.querySelectorAll( 22957 `style[$STYLE_HASH_ATTRIBUTE28}]` 22958 )) { 22959 if (style.getAttribute(STYLE_HASH_ATTRIBUTE28) === hash) { 22960 return true; 22961 } 22962 } 22963 return false; 22964 } 22965 function injectStyle28(targetDocument, hash, css) { 22966 if (!targetDocument.head) { 22967 return; 22968 } 22969 const runtime = getRuntime28(); 22970 let injectedStyles = runtime.injectedStyles.get(targetDocument); 22971 if (!injectedStyles) { 22972 injectedStyles = /* @__PURE__ */ new Set(); 22973 runtime.injectedStyles.set(targetDocument, injectedStyles); 22974 } 22975 if (injectedStyles.has(hash)) { 22976 return; 22977 } 22978 if (documentContainsStyleHash28(targetDocument, hash)) { 22979 injectedStyles.add(hash); 22980 return; 22981 } 22982 const style = targetDocument.createElement("style"); 22983 style.setAttribute(STYLE_HASH_ATTRIBUTE28, hash); 22984 style.appendChild(targetDocument.createTextNode(css)); 22985 targetDocument.head.appendChild(style); 22986 injectedStyles.add(hash); 22987 } 22988 function registerDocument28(targetDocument) { 22989 const runtime = getRuntime28(); 22990 runtime.documents.set( 22991 targetDocument, 22992 (runtime.documents.get(targetDocument) ?? 0) + 1 22993 ); 22994 for (const [hash, css] of runtime.styles) { 22995 injectStyle28(targetDocument, hash, css); 22996 } 22997 return () => { 22998 const count = runtime.documents.get(targetDocument); 22999 if (count === void 0) { 23000 return; 23001 } 23002 if (count <= 1) { 23003 runtime.documents.delete(targetDocument); 23004 return; 23005 } 23006 runtime.documents.set(targetDocument, count - 1); 23007 }; 23008 } 23009 function registerStyle28(hash, css) { 23010 const runtime = getRuntime28(); 23011 runtime.styles.set(hash, css); 23012 for (const targetDocument of runtime.documents.keys()) { 23013 injectStyle28(targetDocument, hash, css); 23014 } 23015 } 23016 if (typeof process === "undefined" || true) { 23017 registerStyle28("7ad1c0f17c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.db3b5361087077bf__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "status" "main";grid-template-rows:auto auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width);&._55f74d412c3e00e8__is-width-anchor{width:var(--anchor-width)}&._90e0b62205351f85__is-width-content{width:auto}&._30ba87899c0b11ce__is-width-sm{width:min(var(--available-width),var(--wpds-dimension-surface-width-sm,320px))}&._402d4db0488da324__is-width-md{width:min(var(--available-width),var(--wpds-dimension-surface-width-md,400px))}&._34ead52b2d60b21d__is-width-lg{width:min(var(--available-width),var(--wpds-dimension-surface-width-lg,560px))}&._3fec17b6dc9029c3__is-width-available{width:var(--available-width)}}._89cf8b0bb3319c7e__is-align-item-with-trigger[data-side=none] .db3b5361087077bf__popup{max-height:none}._66636b371582ead4__list-chrome{--_wp-ui-popup-selection-offset:0px;color:var(--wpds-color-foreground-interactive-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-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);&:has(.b6aeb640498fae5d__item-icon){--_wp-ui-popup-selection-offset:calc(var(--wpds-dimension-size-2xs, 16px) + var(--wpds-dimension-gap-xs, 4px) - var(--wpds-dimension-padding-xs, 4px))}}._325f1b7764907c29__list{display:grid;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto}._597ea43c6bec63d8__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}._5865110cf5678449__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._597ea43c6bec63d8__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}._09c9c50e605390ff__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._6361da5eb54e618d__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-sm,24px);padding-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));padding-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset))}._88cf016d20b4f2ef__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));margin-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset));@media (forced-colors:active){background-color:CanvasText}}.c466e5465a76d4f6__item-layout{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);min-width:0;overflow-wrap:anywhere;padding-block:var(--wp-ui-popup-item-padding-block);padding-inline:var(--wp-ui-popup-item-padding-inline);&:has(>.b6aeb640498fae5d__item-icon){align-content:center;align-items:start;display:grid;grid-template-columns:auto minmax(0,1fr);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}}.b9c803da5aae76d5__item{user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&._8931f3eb02e2e0ad__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._494b2a9f2e72b67f__item-indicator-icon{opacity:0}}&[data-highlighted]:not([data-disabled]){background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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:0}@media (forced-colors:active){color:GrayText}}}.b6aeb640498fae5d__item-icon{align-items:center;display:flex;height:var(--wpds-typography-line-height-sm,20px);justify-content:center;pointer-events:none;width:var(--wpds-dimension-size-2xs,16px)}._494b2a9f2e72b67f__item-indicator-icon{translate:0 1px}.b40c7d58965ce4a5__item-content{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);min-width:0}._3c629930ceb193c7__item-text{display:flex;flex-direction:column;min-width:0}._5c4aad98ed7a8382__item-label{--_gcd-heading-color:currentColor;min-width:0}.deb952050541c0e4__item-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.b9c803da5aae76d5__item[data-disabled] .deb952050541c0e4__item-description,.b9c803da5aae76d5__item[data-highlighted]:not([data-disabled]) .deb952050541c0e4__item-description{--_gcd-heading-color:currentColor;color:inherit}._5f8e4a2a04ecdade__loading-indicator{color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}.c1bf7c14e9600f0a__status{grid-area:status;&:has(._5f8e4a2a04ecdade__loading-indicator){padding-block:var(--wp-ui-popup-padding)}}._0850de87108c9441__empty:not(:empty){grid-area:main}._0850de87108c9441__empty:not(:empty),.c1bf7c14e9600f0a__status:not(:empty):not(:has([data-visually-hidden],._5f8e4a2a04ecdade__loading-indicator)){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}@layer compositions{.eaec70f7db4a63ef__loading-spinner{height:var(--wpds-dimension-size-3xs,12px);width:var(--wpds-dimension-size-3xs,12px)}}}'); 23018 } 23019 var item_popup_default5 = { "popup": "db3b5361087077bf__popup _069972d5e326bada__dropdown-motion", "is-width-anchor": "_55f74d412c3e00e8__is-width-anchor", "is-width-content": "_90e0b62205351f85__is-width-content", "is-width-sm": "_30ba87899c0b11ce__is-width-sm", "is-width-md": "_402d4db0488da324__is-width-md", "is-width-lg": "_34ead52b2d60b21d__is-width-lg", "is-width-available": "_3fec17b6dc9029c3__is-width-available", "is-align-item-with-trigger": "_89cf8b0bb3319c7e__is-align-item-with-trigger", "list-chrome": "_66636b371582ead4__list-chrome", "item-icon": "b6aeb640498fae5d__item-icon", "list": "_325f1b7764907c29__list _66636b371582ead4__list-chrome", "list-scrollable-container": "_597ea43c6bec63d8__list-scrollable-container", "list-footer": "_5865110cf5678449__list-footer", "group": "_09c9c50e605390ff__group", "group-label": "_6361da5eb54e618d__group-label", "separator": "_88cf016d20b4f2ef__separator", "item-layout": "c466e5465a76d4f6__item-layout", "item": "b9c803da5aae76d5__item c466e5465a76d4f6__item-layout", "is-size-small": "_8931f3eb02e2e0ad__is-size-small", "item-indicator-icon": "_494b2a9f2e72b67f__item-indicator-icon", "item-content": "b40c7d58965ce4a5__item-content", "item-text": "_3c629930ceb193c7__item-text", "item-label": "_5c4aad98ed7a8382__item-label", "item-description": "deb952050541c0e4__item-description", "loading-indicator": "_5f8e4a2a04ecdade__loading-indicator c466e5465a76d4f6__item-layout", "status": "c1bf7c14e9600f0a__status", "empty": "_0850de87108c9441__empty", "loading-spinner": "eaec70f7db4a63ef__loading-spinner" }; 23020 var ItemLabel2 = (0, import_element50.forwardRef)( 23021 function UnforwardedItemLabel({ children, className, render, ...restProps }, ref) { 23022 return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)( 23023 Text, 23024 { 23025 ref, 23026 variant: "body-md", 23027 render: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(index_parts_exports3.ItemText, { render }), 23028 className: clsx_default(item_popup_default5["item-label"], className), 23029 ...restProps, 23030 children 23031 } 23032 ); 23033 } 23034 ); 23035 23036 // packages/ui/build-module/form/primitives/select/item.mjs 23037 var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1); 23038 var STYLE_HASH_ATTRIBUTE29 = "data-wp-hash"; 23039 function getRuntime29() { 23040 const globalScope = globalThis; 23041 if (globalScope.__wpStyleRuntime) { 23042 return globalScope.__wpStyleRuntime; 23043 } 23044 globalScope.__wpStyleRuntime = { 23045 documents: /* @__PURE__ */ new Map(), 23046 styles: /* @__PURE__ */ new Map(), 23047 injectedStyles: /* @__PURE__ */ new WeakMap() 23048 }; 23049 if (typeof document !== "undefined") { 23050 registerDocument29(document); 23051 } 23052 return globalScope.__wpStyleRuntime; 23053 } 23054 function documentContainsStyleHash29(targetDocument, hash) { 23055 if (!targetDocument.head) { 23056 return false; 23057 } 23058 for (const style of targetDocument.head.querySelectorAll( 23059 `style[$STYLE_HASH_ATTRIBUTE29}]` 23060 )) { 23061 if (style.getAttribute(STYLE_HASH_ATTRIBUTE29) === hash) { 23062 return true; 23063 } 23064 } 23065 return false; 23066 } 23067 function injectStyle29(targetDocument, hash, css) { 23068 if (!targetDocument.head) { 23069 return; 23070 } 23071 const runtime = getRuntime29(); 23072 let injectedStyles = runtime.injectedStyles.get(targetDocument); 23073 if (!injectedStyles) { 23074 injectedStyles = /* @__PURE__ */ new Set(); 23075 runtime.injectedStyles.set(targetDocument, injectedStyles); 23076 } 23077 if (injectedStyles.has(hash)) { 23078 return; 23079 } 23080 if (documentContainsStyleHash29(targetDocument, hash)) { 23081 injectedStyles.add(hash); 23082 return; 23083 } 23084 const style = targetDocument.createElement("style"); 23085 style.setAttribute(STYLE_HASH_ATTRIBUTE29, hash); 23086 style.appendChild(targetDocument.createTextNode(css)); 23087 targetDocument.head.appendChild(style); 23088 injectedStyles.add(hash); 23089 } 23090 function registerDocument29(targetDocument) { 23091 const runtime = getRuntime29(); 23092 runtime.documents.set( 23093 targetDocument, 23094 (runtime.documents.get(targetDocument) ?? 0) + 1 23095 ); 23096 for (const [hash, css] of runtime.styles) { 23097 injectStyle29(targetDocument, hash, css); 23098 } 23099 return () => { 23100 const count = runtime.documents.get(targetDocument); 23101 if (count === void 0) { 23102 return; 23103 } 23104 if (count <= 1) { 23105 runtime.documents.delete(targetDocument); 23106 return; 23107 } 23108 runtime.documents.set(targetDocument, count - 1); 23109 }; 23110 } 23111 function registerStyle29(hash, css) { 23112 const runtime = getRuntime29(); 23113 runtime.styles.set(hash, css); 23114 for (const targetDocument of runtime.documents.keys()) { 23115 injectStyle29(targetDocument, hash, css); 23116 } 23117 } 23118 if (typeof process === "undefined" || true) { 23119 registerStyle29("726f348f3f", "._78c10a0773e51a91__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)}._5b33aa2d48624b4f__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)}}._980b3b4776ac8f81__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._43e478b4279a076c__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._698099e25b0fb1a6__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)._326aee4184d261fd__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)}.e9576240835601ba__a,.e9576240835601ba__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)}._3f05789653864a73__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)}._3c72ff72abe57859__li{margin:var(--_gcd-li-margin,0)}[role=treeitem] span._79d16267c15d9eb2__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 23120 } 23121 var global_css_defense_default9 = { "button": "_78c10a0773e51a91__button", "input": "_5b33aa2d48624b4f__input", "textarea": "_980b3b4776ac8f81__textarea", "div": "_43e478b4279a076c__div", "p": "_698099e25b0fb1a6__p", "heading": "_326aee4184d261fd__heading", "a": "e9576240835601ba__a", "ol": "_3f05789653864a73__ol", "li": "_3c72ff72abe57859__li", "span": "_79d16267c15d9eb2__span" }; 23122 if (typeof process === "undefined" || true) { 23123 registerStyle29("7ad1c0f17c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.db3b5361087077bf__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "status" "main";grid-template-rows:auto auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width);&._55f74d412c3e00e8__is-width-anchor{width:var(--anchor-width)}&._90e0b62205351f85__is-width-content{width:auto}&._30ba87899c0b11ce__is-width-sm{width:min(var(--available-width),var(--wpds-dimension-surface-width-sm,320px))}&._402d4db0488da324__is-width-md{width:min(var(--available-width),var(--wpds-dimension-surface-width-md,400px))}&._34ead52b2d60b21d__is-width-lg{width:min(var(--available-width),var(--wpds-dimension-surface-width-lg,560px))}&._3fec17b6dc9029c3__is-width-available{width:var(--available-width)}}._89cf8b0bb3319c7e__is-align-item-with-trigger[data-side=none] .db3b5361087077bf__popup{max-height:none}._66636b371582ead4__list-chrome{--_wp-ui-popup-selection-offset:0px;color:var(--wpds-color-foreground-interactive-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-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);&:has(.b6aeb640498fae5d__item-icon){--_wp-ui-popup-selection-offset:calc(var(--wpds-dimension-size-2xs, 16px) + var(--wpds-dimension-gap-xs, 4px) - var(--wpds-dimension-padding-xs, 4px))}}._325f1b7764907c29__list{display:grid;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto}._597ea43c6bec63d8__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}._5865110cf5678449__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._597ea43c6bec63d8__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}._09c9c50e605390ff__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._6361da5eb54e618d__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-sm,24px);padding-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));padding-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset))}._88cf016d20b4f2ef__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));margin-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset));@media (forced-colors:active){background-color:CanvasText}}.c466e5465a76d4f6__item-layout{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);min-width:0;overflow-wrap:anywhere;padding-block:var(--wp-ui-popup-item-padding-block);padding-inline:var(--wp-ui-popup-item-padding-inline);&:has(>.b6aeb640498fae5d__item-icon){align-content:center;align-items:start;display:grid;grid-template-columns:auto minmax(0,1fr);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}}.b9c803da5aae76d5__item{user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&._8931f3eb02e2e0ad__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._494b2a9f2e72b67f__item-indicator-icon{opacity:0}}&[data-highlighted]:not([data-disabled]){background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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:0}@media (forced-colors:active){color:GrayText}}}.b6aeb640498fae5d__item-icon{align-items:center;display:flex;height:var(--wpds-typography-line-height-sm,20px);justify-content:center;pointer-events:none;width:var(--wpds-dimension-size-2xs,16px)}._494b2a9f2e72b67f__item-indicator-icon{translate:0 1px}.b40c7d58965ce4a5__item-content{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);min-width:0}._3c629930ceb193c7__item-text{display:flex;flex-direction:column;min-width:0}._5c4aad98ed7a8382__item-label{--_gcd-heading-color:currentColor;min-width:0}.deb952050541c0e4__item-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.b9c803da5aae76d5__item[data-disabled] .deb952050541c0e4__item-description,.b9c803da5aae76d5__item[data-highlighted]:not([data-disabled]) .deb952050541c0e4__item-description{--_gcd-heading-color:currentColor;color:inherit}._5f8e4a2a04ecdade__loading-indicator{color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}.c1bf7c14e9600f0a__status{grid-area:status;&:has(._5f8e4a2a04ecdade__loading-indicator){padding-block:var(--wp-ui-popup-padding)}}._0850de87108c9441__empty:not(:empty){grid-area:main}._0850de87108c9441__empty:not(:empty),.c1bf7c14e9600f0a__status:not(:empty):not(:has([data-visually-hidden],._5f8e4a2a04ecdade__loading-indicator)){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}@layer compositions{.eaec70f7db4a63ef__loading-spinner{height:var(--wpds-dimension-size-3xs,12px);width:var(--wpds-dimension-size-3xs,12px)}}}'); 23124 } 23125 var item_popup_default6 = { "popup": "db3b5361087077bf__popup _069972d5e326bada__dropdown-motion", "is-width-anchor": "_55f74d412c3e00e8__is-width-anchor", "is-width-content": "_90e0b62205351f85__is-width-content", "is-width-sm": "_30ba87899c0b11ce__is-width-sm", "is-width-md": "_402d4db0488da324__is-width-md", "is-width-lg": "_34ead52b2d60b21d__is-width-lg", "is-width-available": "_3fec17b6dc9029c3__is-width-available", "is-align-item-with-trigger": "_89cf8b0bb3319c7e__is-align-item-with-trigger", "list-chrome": "_66636b371582ead4__list-chrome", "item-icon": "b6aeb640498fae5d__item-icon", "list": "_325f1b7764907c29__list _66636b371582ead4__list-chrome", "list-scrollable-container": "_597ea43c6bec63d8__list-scrollable-container", "list-footer": "_5865110cf5678449__list-footer", "group": "_09c9c50e605390ff__group", "group-label": "_6361da5eb54e618d__group-label", "separator": "_88cf016d20b4f2ef__separator", "item-layout": "c466e5465a76d4f6__item-layout", "item": "b9c803da5aae76d5__item c466e5465a76d4f6__item-layout", "is-size-small": "_8931f3eb02e2e0ad__is-size-small", "item-indicator-icon": "_494b2a9f2e72b67f__item-indicator-icon", "item-content": "b40c7d58965ce4a5__item-content", "item-text": "_3c629930ceb193c7__item-text", "item-label": "_5c4aad98ed7a8382__item-label", "item-description": "deb952050541c0e4__item-description", "loading-indicator": "_5f8e4a2a04ecdade__loading-indicator c466e5465a76d4f6__item-layout", "status": "c1bf7c14e9600f0a__status", "empty": "_0850de87108c9441__empty", "loading-spinner": "eaec70f7db4a63ef__loading-spinner" }; 23126 if (typeof process === "undefined" || true) { 23127 registerStyle29("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 23128 } 23129 var resets_default10 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 23130 var ITEM_CONTENT_COMPONENTS2 = { 23131 Label: ItemLabel2, 23132 Description: ItemDescription2, 23133 descriptionValidationToken: ITEM_DESCRIPTION_DIRECT_CHILD2, 23134 validationMessage: "Select.ItemLabel must be the first direct child of every select item, followed only by Select.ItemDescription components." 23135 }; 23136 var Item2 = (0, import_element51.forwardRef)( 23137 function UnforwardedItem({ 23138 className, 23139 value, 23140 size: size4 = "default", 23141 children, 23142 "aria-describedby": ariaDescribedBy, 23143 "aria-label": ariaLabel, 23144 "aria-labelledby": ariaLabelledBy, 23145 ...restProps 23146 }, ref) { 23147 const { contentChildren, itemAriaProps } = useItemContent( 23148 children, 23149 ITEM_CONTENT_COMPONENTS2, 23150 { 23151 "aria-describedby": ariaDescribedBy, 23152 "aria-label": ariaLabel, 23153 "aria-labelledby": ariaLabelledBy 23154 } 23155 ); 23156 return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)( 23157 index_parts_exports3.Item, 23158 { 23159 className: clsx_default( 23160 global_css_defense_default9.div, 23161 resets_default10["box-sizing"], 23162 item_popup_default6.item, 23163 size4 === "small" && item_popup_default6["is-size-small"], 23164 className 23165 ), 23166 value, 23167 ref, 23168 ...itemAriaProps, 23169 ...restProps, 23170 children: [ 23171 /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: item_popup_default6["item-icon"], children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)( 23172 Icon, 23173 { 23174 icon: check_default, 23175 className: item_popup_default6["item-indicator-icon"], 23176 size: 16 23177 } 23178 ) }), 23179 /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: item_popup_default6["item-text"], children: contentChildren }) 23180 ] 23181 } 23182 ); 23183 } 23184 ); 23185 23186 // packages/ui/build-module/form/primitives/select/popup.mjs 23187 var import_element54 = __toESM(require_element(), 1); 23188 23189 // packages/ui/build-module/form/primitives/select/portal.mjs 23190 var import_element52 = __toESM(require_element(), 1); 23191 var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1); 23192 var Portal3 = (0, import_element52.forwardRef)(function SelectPortal3({ container, ...restProps }, ref) { 23193 return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)( 23194 index_parts_exports3.Portal, 23195 { 23196 container: container === void 0 ? getWpCompatOverlaySlot() : container, 23197 ...restProps, 23198 ref 23199 } 23200 ); 23201 }); 23202 23203 // packages/ui/build-module/form/primitives/select/positioner.mjs 23204 var import_element53 = __toESM(require_element(), 1); 23205 var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1); 23206 var STYLE_HASH_ATTRIBUTE30 = "data-wp-hash"; 23207 function getRuntime30() { 23208 const globalScope = globalThis; 23209 if (globalScope.__wpStyleRuntime) { 23210 return globalScope.__wpStyleRuntime; 23211 } 23212 globalScope.__wpStyleRuntime = { 23213 documents: /* @__PURE__ */ new Map(), 23214 styles: /* @__PURE__ */ new Map(), 23215 injectedStyles: /* @__PURE__ */ new WeakMap() 23216 }; 23217 if (typeof document !== "undefined") { 23218 registerDocument30(document); 23219 } 23220 return globalScope.__wpStyleRuntime; 23221 } 23222 function documentContainsStyleHash30(targetDocument, hash) { 23223 if (!targetDocument.head) { 23224 return false; 23225 } 23226 for (const style of targetDocument.head.querySelectorAll( 23227 `style[$STYLE_HASH_ATTRIBUTE30}]` 23228 )) { 23229 if (style.getAttribute(STYLE_HASH_ATTRIBUTE30) === hash) { 23230 return true; 23231 } 23232 } 23233 return false; 23234 } 23235 function injectStyle30(targetDocument, hash, css) { 23236 if (!targetDocument.head) { 23237 return; 23238 } 23239 const runtime = getRuntime30(); 23240 let injectedStyles = runtime.injectedStyles.get(targetDocument); 23241 if (!injectedStyles) { 23242 injectedStyles = /* @__PURE__ */ new Set(); 23243 runtime.injectedStyles.set(targetDocument, injectedStyles); 23244 } 23245 if (injectedStyles.has(hash)) { 23246 return; 23247 } 23248 if (documentContainsStyleHash30(targetDocument, hash)) { 23249 injectedStyles.add(hash); 23250 return; 23251 } 23252 const style = targetDocument.createElement("style"); 23253 style.setAttribute(STYLE_HASH_ATTRIBUTE30, hash); 23254 style.appendChild(targetDocument.createTextNode(css)); 23255 targetDocument.head.appendChild(style); 23256 injectedStyles.add(hash); 23257 } 23258 function registerDocument30(targetDocument) { 23259 const runtime = getRuntime30(); 23260 runtime.documents.set( 23261 targetDocument, 23262 (runtime.documents.get(targetDocument) ?? 0) + 1 23263 ); 23264 for (const [hash, css] of runtime.styles) { 23265 injectStyle30(targetDocument, hash, css); 23266 } 23267 return () => { 23268 const count = runtime.documents.get(targetDocument); 23269 if (count === void 0) { 23270 return; 23271 } 23272 if (count <= 1) { 23273 runtime.documents.delete(targetDocument); 23274 return; 23275 } 23276 runtime.documents.set(targetDocument, count - 1); 23277 }; 23278 } 23279 function registerStyle30(hash, css) { 23280 const runtime = getRuntime30(); 23281 runtime.styles.set(hash, css); 23282 for (const targetDocument of runtime.documents.keys()) { 23283 injectStyle30(targetDocument, hash, css); 23284 } 23285 } 23286 if (typeof process === "undefined" || true) { 23287 registerStyle30("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 23288 } 23289 var resets_default11 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 23290 if (typeof process === "undefined" || true) { 23291 registerStyle30("7ad1c0f17c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.db3b5361087077bf__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "status" "main";grid-template-rows:auto auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width);&._55f74d412c3e00e8__is-width-anchor{width:var(--anchor-width)}&._90e0b62205351f85__is-width-content{width:auto}&._30ba87899c0b11ce__is-width-sm{width:min(var(--available-width),var(--wpds-dimension-surface-width-sm,320px))}&._402d4db0488da324__is-width-md{width:min(var(--available-width),var(--wpds-dimension-surface-width-md,400px))}&._34ead52b2d60b21d__is-width-lg{width:min(var(--available-width),var(--wpds-dimension-surface-width-lg,560px))}&._3fec17b6dc9029c3__is-width-available{width:var(--available-width)}}._89cf8b0bb3319c7e__is-align-item-with-trigger[data-side=none] .db3b5361087077bf__popup{max-height:none}._66636b371582ead4__list-chrome{--_wp-ui-popup-selection-offset:0px;color:var(--wpds-color-foreground-interactive-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-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);&:has(.b6aeb640498fae5d__item-icon){--_wp-ui-popup-selection-offset:calc(var(--wpds-dimension-size-2xs, 16px) + var(--wpds-dimension-gap-xs, 4px) - var(--wpds-dimension-padding-xs, 4px))}}._325f1b7764907c29__list{display:grid;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto}._597ea43c6bec63d8__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}._5865110cf5678449__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._597ea43c6bec63d8__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}._09c9c50e605390ff__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._6361da5eb54e618d__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-sm,24px);padding-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));padding-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset))}._88cf016d20b4f2ef__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));margin-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset));@media (forced-colors:active){background-color:CanvasText}}.c466e5465a76d4f6__item-layout{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);min-width:0;overflow-wrap:anywhere;padding-block:var(--wp-ui-popup-item-padding-block);padding-inline:var(--wp-ui-popup-item-padding-inline);&:has(>.b6aeb640498fae5d__item-icon){align-content:center;align-items:start;display:grid;grid-template-columns:auto minmax(0,1fr);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}}.b9c803da5aae76d5__item{user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&._8931f3eb02e2e0ad__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._494b2a9f2e72b67f__item-indicator-icon{opacity:0}}&[data-highlighted]:not([data-disabled]){background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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:0}@media (forced-colors:active){color:GrayText}}}.b6aeb640498fae5d__item-icon{align-items:center;display:flex;height:var(--wpds-typography-line-height-sm,20px);justify-content:center;pointer-events:none;width:var(--wpds-dimension-size-2xs,16px)}._494b2a9f2e72b67f__item-indicator-icon{translate:0 1px}.b40c7d58965ce4a5__item-content{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);min-width:0}._3c629930ceb193c7__item-text{display:flex;flex-direction:column;min-width:0}._5c4aad98ed7a8382__item-label{--_gcd-heading-color:currentColor;min-width:0}.deb952050541c0e4__item-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.b9c803da5aae76d5__item[data-disabled] .deb952050541c0e4__item-description,.b9c803da5aae76d5__item[data-highlighted]:not([data-disabled]) .deb952050541c0e4__item-description{--_gcd-heading-color:currentColor;color:inherit}._5f8e4a2a04ecdade__loading-indicator{color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}.c1bf7c14e9600f0a__status{grid-area:status;&:has(._5f8e4a2a04ecdade__loading-indicator){padding-block:var(--wp-ui-popup-padding)}}._0850de87108c9441__empty:not(:empty){grid-area:main}._0850de87108c9441__empty:not(:empty),.c1bf7c14e9600f0a__status:not(:empty):not(:has([data-visually-hidden],._5f8e4a2a04ecdade__loading-indicator)){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}@layer compositions{.eaec70f7db4a63ef__loading-spinner{height:var(--wpds-dimension-size-3xs,12px);width:var(--wpds-dimension-size-3xs,12px)}}}'); 23292 } 23293 var item_popup_default7 = { "popup": "db3b5361087077bf__popup _069972d5e326bada__dropdown-motion", "is-width-anchor": "_55f74d412c3e00e8__is-width-anchor", "is-width-content": "_90e0b62205351f85__is-width-content", "is-width-sm": "_30ba87899c0b11ce__is-width-sm", "is-width-md": "_402d4db0488da324__is-width-md", "is-width-lg": "_34ead52b2d60b21d__is-width-lg", "is-width-available": "_3fec17b6dc9029c3__is-width-available", "is-align-item-with-trigger": "_89cf8b0bb3319c7e__is-align-item-with-trigger", "list-chrome": "_66636b371582ead4__list-chrome", "item-icon": "b6aeb640498fae5d__item-icon", "list": "_325f1b7764907c29__list _66636b371582ead4__list-chrome", "list-scrollable-container": "_597ea43c6bec63d8__list-scrollable-container", "list-footer": "_5865110cf5678449__list-footer", "group": "_09c9c50e605390ff__group", "group-label": "_6361da5eb54e618d__group-label", "separator": "_88cf016d20b4f2ef__separator", "item-layout": "c466e5465a76d4f6__item-layout", "item": "b9c803da5aae76d5__item c466e5465a76d4f6__item-layout", "is-size-small": "_8931f3eb02e2e0ad__is-size-small", "item-indicator-icon": "_494b2a9f2e72b67f__item-indicator-icon", "item-content": "b40c7d58965ce4a5__item-content", "item-text": "_3c629930ceb193c7__item-text", "item-label": "_5c4aad98ed7a8382__item-label", "item-description": "deb952050541c0e4__item-description", "loading-indicator": "_5f8e4a2a04ecdade__loading-indicator c466e5465a76d4f6__item-layout", "status": "c1bf7c14e9600f0a__status", "empty": "_0850de87108c9441__empty", "loading-spinner": "eaec70f7db4a63ef__loading-spinner" }; 23294 if (typeof process === "undefined" || true) { 23295 registerStyle30("656946f66b", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cc0f09fba19eb669__positioner{z-index:var(--wp-ui-select-z-index,initial)}._3a3c25e09f4fd1ec__list{display:block;min-block-size:0;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}}}"); 23296 } 23297 var style_default23 = { "positioner": "cc0f09fba19eb669__positioner", "list": "_3a3c25e09f4fd1ec__list" }; 23298 var Positioner3 = (0, import_element53.forwardRef)( 23299 function SelectPositioner3({ className, alignItemWithTrigger = true, ...props }, ref) { 23300 return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)( 23301 index_parts_exports3.Positioner, 23302 { 23303 ...ITEM_POPUP_POSITIONER_PROPS, 23304 ...props, 23305 alignItemWithTrigger, 23306 ref, 23307 className: clsx_default( 23308 resets_default11["box-sizing"], 23309 style_default23.positioner, 23310 alignItemWithTrigger && item_popup_default7["is-align-item-with-trigger"], 23311 className 23312 ) 23313 } 23314 ); 23315 } 23316 ); 23317 23318 // packages/ui/build-module/form/primitives/select/popup.mjs 23319 var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1); 23320 var STYLE_HASH_ATTRIBUTE31 = "data-wp-hash"; 23321 function getRuntime31() { 23322 const globalScope = globalThis; 23323 if (globalScope.__wpStyleRuntime) { 23324 return globalScope.__wpStyleRuntime; 23325 } 23326 globalScope.__wpStyleRuntime = { 23327 documents: /* @__PURE__ */ new Map(), 23328 styles: /* @__PURE__ */ new Map(), 23329 injectedStyles: /* @__PURE__ */ new WeakMap() 23330 }; 23331 if (typeof document !== "undefined") { 23332 registerDocument31(document); 23333 } 23334 return globalScope.__wpStyleRuntime; 23335 } 23336 function documentContainsStyleHash31(targetDocument, hash) { 23337 if (!targetDocument.head) { 23338 return false; 23339 } 23340 for (const style of targetDocument.head.querySelectorAll( 23341 `style[$STYLE_HASH_ATTRIBUTE31}]` 23342 )) { 23343 if (style.getAttribute(STYLE_HASH_ATTRIBUTE31) === hash) { 23344 return true; 23345 } 23346 } 23347 return false; 23348 } 23349 function injectStyle31(targetDocument, hash, css) { 23350 if (!targetDocument.head) { 23351 return; 23352 } 23353 const runtime = getRuntime31(); 23354 let injectedStyles = runtime.injectedStyles.get(targetDocument); 23355 if (!injectedStyles) { 23356 injectedStyles = /* @__PURE__ */ new Set(); 23357 runtime.injectedStyles.set(targetDocument, injectedStyles); 23358 } 23359 if (injectedStyles.has(hash)) { 23360 return; 23361 } 23362 if (documentContainsStyleHash31(targetDocument, hash)) { 23363 injectedStyles.add(hash); 23364 return; 23365 } 23366 const style = targetDocument.createElement("style"); 23367 style.setAttribute(STYLE_HASH_ATTRIBUTE31, hash); 23368 style.appendChild(targetDocument.createTextNode(css)); 23369 targetDocument.head.appendChild(style); 23370 injectedStyles.add(hash); 23371 } 23372 function registerDocument31(targetDocument) { 23373 const runtime = getRuntime31(); 23374 runtime.documents.set( 23375 targetDocument, 23376 (runtime.documents.get(targetDocument) ?? 0) + 1 23377 ); 23378 for (const [hash, css] of runtime.styles) { 23379 injectStyle31(targetDocument, hash, css); 23380 } 23381 return () => { 23382 const count = runtime.documents.get(targetDocument); 23383 if (count === void 0) { 23384 return; 23385 } 23386 if (count <= 1) { 23387 runtime.documents.delete(targetDocument); 23388 return; 23389 } 23390 runtime.documents.set(targetDocument, count - 1); 23391 }; 23392 } 23393 function registerStyle31(hash, css) { 23394 const runtime = getRuntime31(); 23395 runtime.styles.set(hash, css); 23396 for (const targetDocument of runtime.documents.keys()) { 23397 injectStyle31(targetDocument, hash, css); 23398 } 23399 } 23400 if (typeof process === "undefined" || true) { 23401 registerStyle31("7ad1c0f17c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.db3b5361087077bf__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "status" "main";grid-template-rows:auto auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width);&._55f74d412c3e00e8__is-width-anchor{width:var(--anchor-width)}&._90e0b62205351f85__is-width-content{width:auto}&._30ba87899c0b11ce__is-width-sm{width:min(var(--available-width),var(--wpds-dimension-surface-width-sm,320px))}&._402d4db0488da324__is-width-md{width:min(var(--available-width),var(--wpds-dimension-surface-width-md,400px))}&._34ead52b2d60b21d__is-width-lg{width:min(var(--available-width),var(--wpds-dimension-surface-width-lg,560px))}&._3fec17b6dc9029c3__is-width-available{width:var(--available-width)}}._89cf8b0bb3319c7e__is-align-item-with-trigger[data-side=none] .db3b5361087077bf__popup{max-height:none}._66636b371582ead4__list-chrome{--_wp-ui-popup-selection-offset:0px;color:var(--wpds-color-foreground-interactive-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-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);&:has(.b6aeb640498fae5d__item-icon){--_wp-ui-popup-selection-offset:calc(var(--wpds-dimension-size-2xs, 16px) + var(--wpds-dimension-gap-xs, 4px) - var(--wpds-dimension-padding-xs, 4px))}}._325f1b7764907c29__list{display:grid;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto}._597ea43c6bec63d8__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}._5865110cf5678449__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._597ea43c6bec63d8__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}._09c9c50e605390ff__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._6361da5eb54e618d__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-sm,24px);padding-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));padding-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset))}._88cf016d20b4f2ef__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));margin-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset));@media (forced-colors:active){background-color:CanvasText}}.c466e5465a76d4f6__item-layout{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);min-width:0;overflow-wrap:anywhere;padding-block:var(--wp-ui-popup-item-padding-block);padding-inline:var(--wp-ui-popup-item-padding-inline);&:has(>.b6aeb640498fae5d__item-icon){align-content:center;align-items:start;display:grid;grid-template-columns:auto minmax(0,1fr);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}}.b9c803da5aae76d5__item{user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&._8931f3eb02e2e0ad__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._494b2a9f2e72b67f__item-indicator-icon{opacity:0}}&[data-highlighted]:not([data-disabled]){background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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:0}@media (forced-colors:active){color:GrayText}}}.b6aeb640498fae5d__item-icon{align-items:center;display:flex;height:var(--wpds-typography-line-height-sm,20px);justify-content:center;pointer-events:none;width:var(--wpds-dimension-size-2xs,16px)}._494b2a9f2e72b67f__item-indicator-icon{translate:0 1px}.b40c7d58965ce4a5__item-content{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);min-width:0}._3c629930ceb193c7__item-text{display:flex;flex-direction:column;min-width:0}._5c4aad98ed7a8382__item-label{--_gcd-heading-color:currentColor;min-width:0}.deb952050541c0e4__item-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.b9c803da5aae76d5__item[data-disabled] .deb952050541c0e4__item-description,.b9c803da5aae76d5__item[data-highlighted]:not([data-disabled]) .deb952050541c0e4__item-description{--_gcd-heading-color:currentColor;color:inherit}._5f8e4a2a04ecdade__loading-indicator{color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}.c1bf7c14e9600f0a__status{grid-area:status;&:has(._5f8e4a2a04ecdade__loading-indicator){padding-block:var(--wp-ui-popup-padding)}}._0850de87108c9441__empty:not(:empty){grid-area:main}._0850de87108c9441__empty:not(:empty),.c1bf7c14e9600f0a__status:not(:empty):not(:has([data-visually-hidden],._5f8e4a2a04ecdade__loading-indicator)){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}@layer compositions{.eaec70f7db4a63ef__loading-spinner{height:var(--wpds-dimension-size-3xs,12px);width:var(--wpds-dimension-size-3xs,12px)}}}'); 23402 } 23403 var item_popup_default8 = { "popup": "db3b5361087077bf__popup _069972d5e326bada__dropdown-motion", "is-width-anchor": "_55f74d412c3e00e8__is-width-anchor", "is-width-content": "_90e0b62205351f85__is-width-content", "is-width-sm": "_30ba87899c0b11ce__is-width-sm", "is-width-md": "_402d4db0488da324__is-width-md", "is-width-lg": "_34ead52b2d60b21d__is-width-lg", "is-width-available": "_3fec17b6dc9029c3__is-width-available", "is-align-item-with-trigger": "_89cf8b0bb3319c7e__is-align-item-with-trigger", "list-chrome": "_66636b371582ead4__list-chrome", "item-icon": "b6aeb640498fae5d__item-icon", "list": "_325f1b7764907c29__list _66636b371582ead4__list-chrome", "list-scrollable-container": "_597ea43c6bec63d8__list-scrollable-container", "list-footer": "_5865110cf5678449__list-footer", "group": "_09c9c50e605390ff__group", "group-label": "_6361da5eb54e618d__group-label", "separator": "_88cf016d20b4f2ef__separator", "item-layout": "c466e5465a76d4f6__item-layout", "item": "b9c803da5aae76d5__item c466e5465a76d4f6__item-layout", "is-size-small": "_8931f3eb02e2e0ad__is-size-small", "item-indicator-icon": "_494b2a9f2e72b67f__item-indicator-icon", "item-content": "b40c7d58965ce4a5__item-content", "item-text": "_3c629930ceb193c7__item-text", "item-label": "_5c4aad98ed7a8382__item-label", "item-description": "deb952050541c0e4__item-description", "loading-indicator": "_5f8e4a2a04ecdade__loading-indicator c466e5465a76d4f6__item-layout", "status": "c1bf7c14e9600f0a__status", "empty": "_0850de87108c9441__empty", "loading-spinner": "eaec70f7db4a63ef__loading-spinner" }; 23404 if (typeof process === "undefined" || true) { 23405 registerStyle31("656946f66b", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cc0f09fba19eb669__positioner{z-index:var(--wp-ui-select-z-index,initial)}._3a3c25e09f4fd1ec__list{display:block;min-block-size:0;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}}}"); 23406 } 23407 var style_default24 = { "positioner": "cc0f09fba19eb669__positioner", "list": "_3a3c25e09f4fd1ec__list" }; 23408 var Popup3 = (0, import_element54.forwardRef)( 23409 function UnforwardedPopup({ className, portal, positioner, width, children, ...restProps }, ref) { 23410 const popupContent = /* @__PURE__ */ (0, import_jsx_runtime110.jsx)( 23411 index_parts_exports3.Popup, 23412 { 23413 ref, 23414 className: clsx_default( 23415 item_popup_default8.popup, 23416 getItemPopupWidthClassName(width), 23417 className 23418 ), 23419 ...restProps, 23420 children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)( 23421 index_parts_exports3.List, 23422 { 23423 className: clsx_default( 23424 item_popup_default8["list-chrome"], 23425 style_default24.list 23426 ), 23427 children 23428 } 23429 ) 23430 } 23431 ); 23432 const positionedPopup = renderSlotWithChildren( 23433 positioner, 23434 /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Positioner3, {}), 23435 popupContent 23436 ); 23437 return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Portal3, {}), positionedPopup); 23438 } 23439 ); 23440 23441 // packages/ui/build-module/form/primitives/select/root.mjs 23442 var import_jsx_runtime111 = __toESM(require_jsx_runtime(), 1); 23443 function Root3(props) { 23444 return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(index_parts_exports3.Root, { ...props }) }); 23445 } 23446 23447 // packages/ui/build-module/form/primitives/select/separator.mjs 23448 var import_element55 = __toESM(require_element(), 1); 23449 var import_jsx_runtime112 = __toESM(require_jsx_runtime(), 1); 23450 var STYLE_HASH_ATTRIBUTE32 = "data-wp-hash"; 23451 function getRuntime32() { 23452 const globalScope = globalThis; 23453 if (globalScope.__wpStyleRuntime) { 23454 return globalScope.__wpStyleRuntime; 23455 } 23456 globalScope.__wpStyleRuntime = { 23457 documents: /* @__PURE__ */ new Map(), 23458 styles: /* @__PURE__ */ new Map(), 23459 injectedStyles: /* @__PURE__ */ new WeakMap() 23460 }; 23461 if (typeof document !== "undefined") { 23462 registerDocument32(document); 23463 } 23464 return globalScope.__wpStyleRuntime; 23465 } 23466 function documentContainsStyleHash32(targetDocument, hash) { 23467 if (!targetDocument.head) { 23468 return false; 23469 } 23470 for (const style of targetDocument.head.querySelectorAll( 23471 `style[$STYLE_HASH_ATTRIBUTE32}]` 23472 )) { 23473 if (style.getAttribute(STYLE_HASH_ATTRIBUTE32) === hash) { 23474 return true; 23475 } 23476 } 23477 return false; 23478 } 23479 function injectStyle32(targetDocument, hash, css) { 23480 if (!targetDocument.head) { 23481 return; 23482 } 23483 const runtime = getRuntime32(); 23484 let injectedStyles = runtime.injectedStyles.get(targetDocument); 23485 if (!injectedStyles) { 23486 injectedStyles = /* @__PURE__ */ new Set(); 23487 runtime.injectedStyles.set(targetDocument, injectedStyles); 23488 } 23489 if (injectedStyles.has(hash)) { 23490 return; 23491 } 23492 if (documentContainsStyleHash32(targetDocument, hash)) { 23493 injectedStyles.add(hash); 23494 return; 23495 } 23496 const style = targetDocument.createElement("style"); 23497 style.setAttribute(STYLE_HASH_ATTRIBUTE32, hash); 23498 style.appendChild(targetDocument.createTextNode(css)); 23499 targetDocument.head.appendChild(style); 23500 injectedStyles.add(hash); 23501 } 23502 function registerDocument32(targetDocument) { 23503 const runtime = getRuntime32(); 23504 runtime.documents.set( 23505 targetDocument, 23506 (runtime.documents.get(targetDocument) ?? 0) + 1 23507 ); 23508 for (const [hash, css] of runtime.styles) { 23509 injectStyle32(targetDocument, hash, css); 23510 } 23511 return () => { 23512 const count = runtime.documents.get(targetDocument); 23513 if (count === void 0) { 23514 return; 23515 } 23516 if (count <= 1) { 23517 runtime.documents.delete(targetDocument); 23518 return; 23519 } 23520 runtime.documents.set(targetDocument, count - 1); 23521 }; 23522 } 23523 function registerStyle32(hash, css) { 23524 const runtime = getRuntime32(); 23525 runtime.styles.set(hash, css); 23526 for (const targetDocument of runtime.documents.keys()) { 23527 injectStyle32(targetDocument, hash, css); 23528 } 23529 } 23530 if (typeof process === "undefined" || true) { 23531 registerStyle32("7ad1c0f17c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._069972d5e326bada__dropdown-motion,._66136bf671f00b1f__dropdown-motion--fade-only{--wp-ui-dropdown-slide-distance:4px;--wp-ui-dropdown-slide-duration:var(--wpds-motion-duration-md,200ms);--wp-ui-dropdown-slide-easing:var(--wpds-motion-easing-expressive,cubic-bezier(0.25,0,0,1));--wp-ui-dropdown-fade-duration:var(--wpds-motion-duration-sm,100ms);--wp-ui-dropdown-fade-easing:linear;@media not (prefers-reduced-motion){transition-duration:var(--wp-ui-dropdown-slide-duration),var(--wp-ui-dropdown-fade-duration);transition-property:transform,opacity;transition-timing-function:var(--wp-ui-dropdown-slide-easing),var(--wp-ui-dropdown-fade-easing);will-change:transform,opacity}opacity:1;&[data-instant]{transition:none}&[data-ending-style],&[data-starting-style]{opacity:0}}._069972d5e326bada__dropdown-motion{transform:translate(0);&[data-side=bottom][data-ending-style],&[data-side=bottom][data-starting-style]{transform:translateY(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=top][data-ending-style],&[data-side=top][data-starting-style]{transform:translateY(var(--wp-ui-dropdown-slide-distance))}&[data-side=left][data-ending-style],&[data-side=left][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=right][data-ending-style],&[data-side=right][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&[data-side=inline-start][data-ending-style],&[data-side=inline-start][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}&[data-side=inline-end][data-ending-style],&[data-side=inline-end][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-start][data-ending-style],&:dir(rtl)[data-side=inline-start][data-starting-style]{transform:translateX(calc(var(--wp-ui-dropdown-slide-distance)*-1))}&:dir(rtl)[data-side=inline-end][data-ending-style],&:dir(rtl)[data-side=inline-end][data-starting-style]{transform:translateX(var(--wp-ui-dropdown-slide-distance))}}}}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.db3b5361087077bf__popup{--wp-ui-popup-padding:var(--wpds-dimension-padding-xs,4px);--_wp-ui-elevation-md:0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-md);display:grid;grid-template-areas:"header" "status" "main";grid-template-rows:auto auto minmax(0,1fr);max-height:min(var(--available-height),480px,60dvh);max-width:var(--available-width);min-width:var(--anchor-width);&._55f74d412c3e00e8__is-width-anchor{width:var(--anchor-width)}&._90e0b62205351f85__is-width-content{width:auto}&._30ba87899c0b11ce__is-width-sm{width:min(var(--available-width),var(--wpds-dimension-surface-width-sm,320px))}&._402d4db0488da324__is-width-md{width:min(var(--available-width),var(--wpds-dimension-surface-width-md,400px))}&._34ead52b2d60b21d__is-width-lg{width:min(var(--available-width),var(--wpds-dimension-surface-width-lg,560px))}&._3fec17b6dc9029c3__is-width-available{width:var(--available-width)}}._89cf8b0bb3319c7e__is-align-item-with-trigger[data-side=none] .db3b5361087077bf__popup{max-height:none}._66636b371582ead4__list-chrome{--_wp-ui-popup-selection-offset:0px;color:var(--wpds-color-foreground-interactive-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-md,13px);grid-area:main;line-height:var(--wpds-typography-line-height-sm,20px);&:has(.b6aeb640498fae5d__item-icon){--_wp-ui-popup-selection-offset:calc(var(--wpds-dimension-size-2xs, 16px) + var(--wpds-dimension-gap-xs, 4px) - var(--wpds-dimension-padding-xs, 4px))}}._325f1b7764907c29__list{display:grid;grid-template-areas:"scrollable" "footer";grid-template-rows:minmax(0,1fr) auto}._597ea43c6bec63d8__list-scrollable-container{grid-area:scrollable;overflow-block:auto;overscroll-behavior:contain;scroll-padding-block:var(--wp-ui-popup-padding);&:not(:empty){padding-block:var(--wp-ui-popup-padding)}}._5865110cf5678449__list-footer{grid-area:footer;padding-block:var(--wp-ui-popup-padding);._597ea43c6bec63d8__list-scrollable-container:not(:empty)+&{border-block-start:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#dbdbdb)}}._09c9c50e605390ff__group:not(:first-child){margin-block-start:var(--wpds-dimension-gap-sm,8px)}._6361da5eb54e618d__group-label{align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;min-height:var(--wpds-dimension-size-sm,24px);padding-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));padding-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset))}._88cf016d20b4f2ef__separator{background-color:var(--wpds-color-stroke-surface-neutral-weak,#f0f0f0);height:var(--wpds-border-width-xs,1px);margin-block:var(--wpds-dimension-gap-xs,4px);margin-inline-end:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px));margin-inline-start:calc(var(--wp-ui-popup-padding) + var(--wpds-dimension-padding-sm, 8px) + var(--_wp-ui-popup-selection-offset));@media (forced-colors:active){background-color:CanvasText}}.c466e5465a76d4f6__item-layout{--wp-ui-popup-item-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:var(--wpds-dimension-padding-xs,4px);align-items:center;border-radius:var(--wpds-border-radius-sm,2px);display:flex;gap:var(--wpds-dimension-gap-xs,4px);justify-content:flex-start;margin-inline:var(--wp-ui-popup-padding);min-height:var(--wp-ui-popup-item-height);min-width:0;overflow-wrap:anywhere;padding-block:var(--wp-ui-popup-item-padding-block);padding-inline:var(--wp-ui-popup-item-padding-inline);&:has(>.b6aeb640498fae5d__item-icon){align-content:center;align-items:start;display:grid;grid-template-columns:auto minmax(0,1fr);padding-inline-start:calc(var(--wp-ui-popup-item-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}}.b9c803da5aae76d5__item{user-select:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&._8931f3eb02e2e0ad__is-size-small{--wp-ui-popup-item-height:var(--wpds-dimension-size-sm,24px);--wp-ui-popup-item-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-popup-item-padding-block:2px}&:not([data-selected]){._494b2a9f2e72b67f__item-indicator-icon{opacity:0}}&[data-highlighted]:not([data-disabled]){background-color:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));color:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);outline:none;@media (forced-colors:active){background-color:Highlight;color:HighlightText;forced-color-adjust:none}}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&:focus-visible{--_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:0}@media (forced-colors:active){color:GrayText}}}.b6aeb640498fae5d__item-icon{align-items:center;display:flex;height:var(--wpds-typography-line-height-sm,20px);justify-content:center;pointer-events:none;width:var(--wpds-dimension-size-2xs,16px)}._494b2a9f2e72b67f__item-indicator-icon{translate:0 1px}.b40c7d58965ce4a5__item-content{align-items:center;display:flex;gap:var(--wpds-dimension-gap-xs,4px);min-width:0}._3c629930ceb193c7__item-text{display:flex;flex-direction:column;min-width:0}._5c4aad98ed7a8382__item-label{--_gcd-heading-color:currentColor;min-width:0}.deb952050541c0e4__item-description{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.b9c803da5aae76d5__item[data-disabled] .deb952050541c0e4__item-description,.b9c803da5aae76d5__item[data-highlighted]:not([data-disabled]) .deb952050541c0e4__item-description{--_gcd-heading-color:currentColor;color:inherit}._5f8e4a2a04ecdade__loading-indicator{color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}.c1bf7c14e9600f0a__status{grid-area:status;&:has(._5f8e4a2a04ecdade__loading-indicator){padding-block:var(--wp-ui-popup-padding)}}._0850de87108c9441__empty:not(:empty){grid-area:main}._0850de87108c9441__empty:not(:empty),.c1bf7c14e9600f0a__status:not(:empty):not(:has([data-visually-hidden],._5f8e4a2a04ecdade__loading-indicator)){--wp-ui-popup-empty-min-height:var(--wpds-dimension-size-md,32px);--wp-ui-popup-empty-padding-inline:var(--wpds-dimension-padding-md,12px);align-items:center;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px);min-height:var(--wp-ui-popup-empty-min-height);padding-inline:var(--wp-ui-popup-empty-padding-inline)}}@layer compositions{.eaec70f7db4a63ef__loading-spinner{height:var(--wpds-dimension-size-3xs,12px);width:var(--wpds-dimension-size-3xs,12px)}}}'); 23532 } 23533 var item_popup_default9 = { "popup": "db3b5361087077bf__popup _069972d5e326bada__dropdown-motion", "is-width-anchor": "_55f74d412c3e00e8__is-width-anchor", "is-width-content": "_90e0b62205351f85__is-width-content", "is-width-sm": "_30ba87899c0b11ce__is-width-sm", "is-width-md": "_402d4db0488da324__is-width-md", "is-width-lg": "_34ead52b2d60b21d__is-width-lg", "is-width-available": "_3fec17b6dc9029c3__is-width-available", "is-align-item-with-trigger": "_89cf8b0bb3319c7e__is-align-item-with-trigger", "list-chrome": "_66636b371582ead4__list-chrome", "item-icon": "b6aeb640498fae5d__item-icon", "list": "_325f1b7764907c29__list _66636b371582ead4__list-chrome", "list-scrollable-container": "_597ea43c6bec63d8__list-scrollable-container", "list-footer": "_5865110cf5678449__list-footer", "group": "_09c9c50e605390ff__group", "group-label": "_6361da5eb54e618d__group-label", "separator": "_88cf016d20b4f2ef__separator", "item-layout": "c466e5465a76d4f6__item-layout", "item": "b9c803da5aae76d5__item c466e5465a76d4f6__item-layout", "is-size-small": "_8931f3eb02e2e0ad__is-size-small", "item-indicator-icon": "_494b2a9f2e72b67f__item-indicator-icon", "item-content": "b40c7d58965ce4a5__item-content", "item-text": "_3c629930ceb193c7__item-text", "item-label": "_5c4aad98ed7a8382__item-label", "item-description": "deb952050541c0e4__item-description", "loading-indicator": "_5f8e4a2a04ecdade__loading-indicator c466e5465a76d4f6__item-layout", "status": "c1bf7c14e9600f0a__status", "empty": "_0850de87108c9441__empty", "loading-spinner": "eaec70f7db4a63ef__loading-spinner" }; 23534 var Separator3 = (0, import_element55.forwardRef)( 23535 function SelectSeparator2({ 23536 className, 23537 orientation: _orientation, 23538 ...props 23539 }, ref) { 23540 return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)( 23541 index_parts_exports3.Separator, 23542 { 23543 ref, 23544 className: clsx_default(item_popup_default9.separator, className), 23545 ...props 23546 } 23547 ); 23548 } 23549 ); 23550 23551 // packages/ui/build-module/form/primitives/select/trigger.mjs 23552 var import_element56 = __toESM(require_element(), 1); 23553 var import_i18n5 = __toESM(require_i18n(), 1); 23554 var import_jsx_runtime113 = __toESM(require_jsx_runtime(), 1); 23555 var STYLE_HASH_ATTRIBUTE33 = "data-wp-hash"; 23556 function getRuntime33() { 23557 const globalScope = globalThis; 23558 if (globalScope.__wpStyleRuntime) { 23559 return globalScope.__wpStyleRuntime; 23560 } 23561 globalScope.__wpStyleRuntime = { 23562 documents: /* @__PURE__ */ new Map(), 23563 styles: /* @__PURE__ */ new Map(), 23564 injectedStyles: /* @__PURE__ */ new WeakMap() 23565 }; 23566 if (typeof document !== "undefined") { 23567 registerDocument33(document); 23568 } 23569 return globalScope.__wpStyleRuntime; 23570 } 23571 function documentContainsStyleHash33(targetDocument, hash) { 23572 if (!targetDocument.head) { 23573 return false; 23574 } 23575 for (const style of targetDocument.head.querySelectorAll( 23576 `style[$STYLE_HASH_ATTRIBUTE33}]` 23577 )) { 23578 if (style.getAttribute(STYLE_HASH_ATTRIBUTE33) === hash) { 23579 return true; 23580 } 23581 } 23582 return false; 23583 } 23584 function injectStyle33(targetDocument, hash, css) { 23585 if (!targetDocument.head) { 23586 return; 23587 } 23588 const runtime = getRuntime33(); 23589 let injectedStyles = runtime.injectedStyles.get(targetDocument); 23590 if (!injectedStyles) { 23591 injectedStyles = /* @__PURE__ */ new Set(); 23592 runtime.injectedStyles.set(targetDocument, injectedStyles); 23593 } 23594 if (injectedStyles.has(hash)) { 23595 return; 23596 } 23597 if (documentContainsStyleHash33(targetDocument, hash)) { 23598 injectedStyles.add(hash); 23599 return; 23600 } 23601 const style = targetDocument.createElement("style"); 23602 style.setAttribute(STYLE_HASH_ATTRIBUTE33, hash); 23603 style.appendChild(targetDocument.createTextNode(css)); 23604 targetDocument.head.appendChild(style); 23605 injectedStyles.add(hash); 23606 } 23607 function registerDocument33(targetDocument) { 23608 const runtime = getRuntime33(); 23609 runtime.documents.set( 23610 targetDocument, 23611 (runtime.documents.get(targetDocument) ?? 0) + 1 23612 ); 23613 for (const [hash, css] of runtime.styles) { 23614 injectStyle33(targetDocument, hash, css); 23615 } 23616 return () => { 23617 const count = runtime.documents.get(targetDocument); 23618 if (count === void 0) { 23619 return; 23620 } 23621 if (count <= 1) { 23622 runtime.documents.delete(targetDocument); 23623 return; 23624 } 23625 runtime.documents.set(targetDocument, count - 1); 23626 }; 23627 } 23628 function registerStyle33(hash, css) { 23629 const runtime = getRuntime33(); 23630 runtime.styles.set(hash, css); 23631 for (const targetDocument of runtime.documents.keys()) { 23632 injectStyle33(targetDocument, hash, css); 23633 } 23634 } 23635 if (typeof process === "undefined" || true) { 23636 registerStyle33("c13e206e92", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._0f52be5f1d4ce686__outset-ring--focus-within:focus-within,._8f922cee854f2408__outset-ring--focus-visible:focus-visible,.accedd6ae8fd878e__outset-ring--focus:focus{--_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))}._3ad2c88c126f2bdd__outset-ring--focus-within-except-active:focus-within,.c20f61b115485a7f__outset-ring--focus-except-active:focus{outline:none}._3ad2c88c126f2bdd__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c20f61b115485a7f__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))}}}"); 23637 } 23638 var focus_module_default2 = { "outset-ring--focus": "accedd6ae8fd878e__outset-ring--focus", "outset-ring--focus-visible": "_8f922cee854f2408__outset-ring--focus-visible", "outset-ring--focus-within": "_0f52be5f1d4ce686__outset-ring--focus-within", "outset-ring--focus-except-active": "c20f61b115485a7f__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3ad2c88c126f2bdd__outset-ring--focus-within-except-active" }; 23639 if (typeof process === "undefined" || true) { 23640 registerStyle33("56b0509c70", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.f19aaaa579fccf54__trigger-wrapper{&.bfac6d240be543bd__is-minimal{width:fit-content}}.e1f5987e5bdc9112__trigger{align-items:center;background-color:transparent;border:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:inherit;font-size:inherit;gap:var(--wpds-dimension-gap-xs,4px);justify-content:space-between;line-height:1.4;padding-block:4px;padding-inline-end:calc(var(--wp-ui-input-layout-padding-inline) - 4px);padding-inline-start:var(--wp-ui-input-layout-padding-inline);text-align:start;user-select:none;width:100%;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}&.bfac6d240be543bd__is-minimal{width:auto}&:focus{outline:none}&[data-disabled]{background-color:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}}.ba63264311039401__trigger-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;.e1f5987e5bdc9112__trigger[data-placeholder]:not([data-disabled]) &{color:var(--wpds-color-foreground-interactive-neutral-weak,#707070)}}.cb34834e4f533240__trigger-caret{flex:0 0 auto}}}"); 23641 } 23642 var select_trigger_default = { "trigger-wrapper": "f19aaaa579fccf54__trigger-wrapper", "is-minimal": "bfac6d240be543bd__is-minimal", "trigger": "e1f5987e5bdc9112__trigger", "trigger-value": "ba63264311039401__trigger-value", "trigger-caret": "cb34834e4f533240__trigger-caret" }; 23643 var Trigger3 = (0, import_element56.forwardRef)( 23644 function UnforwardedTrigger({ 23645 className, 23646 size: size4, 23647 variant, 23648 children, 23649 placeholder = (0, import_i18n5.__)("Select"), 23650 ...restProps 23651 }, ref) { 23652 return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)( 23653 InputLayout2, 23654 { 23655 className: clsx_default( 23656 focus_module_default2["outset-ring--focus-within-except-active"], 23657 select_trigger_default["trigger-wrapper"], 23658 variant === "minimal" && select_trigger_default["is-minimal"], 23659 className 23660 ), 23661 size: size4, 23662 isBorderless: variant === "minimal", 23663 children: /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)( 23664 index_parts_exports3.Trigger, 23665 { 23666 ...restProps, 23667 className: clsx_default( 23668 select_trigger_default.trigger, 23669 variant === "minimal" && select_trigger_default["is-minimal"] 23670 ), 23671 "data-can-disable-input-layout": true, 23672 ref, 23673 children: [ 23674 /* @__PURE__ */ (0, import_jsx_runtime113.jsx)( 23675 index_parts_exports3.Value, 23676 { 23677 placeholder, 23678 className: select_trigger_default["trigger-value"], 23679 children 23680 } 23681 ), 23682 /* @__PURE__ */ (0, import_jsx_runtime113.jsx)( 23683 Icon, 23684 { 23685 className: select_trigger_default["trigger-caret"], 23686 icon: chevron_down_default, 23687 size: 18 23688 } 23689 ) 23690 ] 23691 } 23692 ) 23693 } 23694 ); 23695 } 23696 ); 23697 23698 // packages/ui/build-module/progress/index.mjs 23699 var progress_exports = {}; 23700 __export(progress_exports, { 23701 Indicator: () => Indicator, 23702 Label: () => Label, 23703 Root: () => Root4, 23704 Track: () => Track, 23705 Value: () => Value 23706 }); 23707 23708 // packages/ui/build-module/progress/root.mjs 23709 var import_element57 = __toESM(require_element(), 1); 23710 var import_i18n6 = __toESM(require_i18n(), 1); 23711 var import_jsx_runtime114 = __toESM(require_jsx_runtime(), 1); 23712 var STYLE_HASH_ATTRIBUTE34 = "data-wp-hash"; 23713 function getRuntime34() { 23714 const globalScope = globalThis; 23715 if (globalScope.__wpStyleRuntime) { 23716 return globalScope.__wpStyleRuntime; 23717 } 23718 globalScope.__wpStyleRuntime = { 23719 documents: /* @__PURE__ */ new Map(), 23720 styles: /* @__PURE__ */ new Map(), 23721 injectedStyles: /* @__PURE__ */ new WeakMap() 23722 }; 23723 if (typeof document !== "undefined") { 23724 registerDocument34(document); 23725 } 23726 return globalScope.__wpStyleRuntime; 23727 } 23728 function documentContainsStyleHash34(targetDocument, hash) { 23729 if (!targetDocument.head) { 23730 return false; 23731 } 23732 for (const style of targetDocument.head.querySelectorAll( 23733 `style[$STYLE_HASH_ATTRIBUTE34}]` 23734 )) { 23735 if (style.getAttribute(STYLE_HASH_ATTRIBUTE34) === hash) { 23736 return true; 23737 } 23738 } 23739 return false; 23740 } 23741 function injectStyle34(targetDocument, hash, css) { 23742 if (!targetDocument.head) { 23743 return; 23744 } 23745 const runtime = getRuntime34(); 23746 let injectedStyles = runtime.injectedStyles.get(targetDocument); 23747 if (!injectedStyles) { 23748 injectedStyles = /* @__PURE__ */ new Set(); 23749 runtime.injectedStyles.set(targetDocument, injectedStyles); 23750 } 23751 if (injectedStyles.has(hash)) { 23752 return; 23753 } 23754 if (documentContainsStyleHash34(targetDocument, hash)) { 23755 injectedStyles.add(hash); 23756 return; 23757 } 23758 const style = targetDocument.createElement("style"); 23759 style.setAttribute(STYLE_HASH_ATTRIBUTE34, hash); 23760 style.appendChild(targetDocument.createTextNode(css)); 23761 targetDocument.head.appendChild(style); 23762 injectedStyles.add(hash); 23763 } 23764 function registerDocument34(targetDocument) { 23765 const runtime = getRuntime34(); 23766 runtime.documents.set( 23767 targetDocument, 23768 (runtime.documents.get(targetDocument) ?? 0) + 1 23769 ); 23770 for (const [hash, css] of runtime.styles) { 23771 injectStyle34(targetDocument, hash, css); 23772 } 23773 return () => { 23774 const count = runtime.documents.get(targetDocument); 23775 if (count === void 0) { 23776 return; 23777 } 23778 if (count <= 1) { 23779 runtime.documents.delete(targetDocument); 23780 return; 23781 } 23782 runtime.documents.set(targetDocument, count - 1); 23783 }; 23784 } 23785 function registerStyle34(hash, css) { 23786 const runtime = getRuntime34(); 23787 runtime.styles.set(hash, css); 23788 for (const targetDocument of runtime.documents.keys()) { 23789 injectStyle34(targetDocument, hash, css); 23790 } 23791 } 23792 if (typeof process === "undefined" || true) { 23793 registerStyle34("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 23794 } 23795 var resets_default12 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 23796 if (typeof process === "undefined" || true) { 23797 registerStyle34("5a1ea2cbcd", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._3cb9c0aed6c8b7ec__root{width:160px}.ae5d4aa78c910311__label,.d655885866a5bb4a__value{color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}.d655885866a5bb4a__value{font-variant-numeric:tabular-nums}._896754819c053b32__track{background-color:var(--wpds-color-background-track-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);height:1.5px;overflow:hidden;position:relative;width:100%;@media (forced-colors:active){outline:var(--wpds-border-width-xs,1px) solid CanvasText;outline-offset:var(--wpds-border-width-xs,1px)}}.e1b9027901cdcd11__indicator{background-color:currentColor;border-radius:inherit;color:var(--wpds-color-background-thumb-neutral,#1e1e1e);height:100%;inset-block-start:0;position:absolute;@media not (prefers-reduced-motion){transition:width var(--wpds-motion-duration-xl,.4s) ease-in-out}&[data-indeterminate]{animation:_59b0eff7ac881028__progress-slide 1.5s ease-in-out infinite;transition:none;width:50%;@media (prefers-reduced-motion:reduce){animation-duration:3s;animation-timing-function:steps(4)}}}@media (forced-colors:active){.e1b9027901cdcd11__indicator{background-color:CanvasText;forced-color-adjust:none}}@keyframes _59b0eff7ac881028__progress-slide{0%{inset-inline-start:-50%}to{inset-inline-start:100%}}}}"); 23798 } 23799 var style_default25 = { "root": "_3cb9c0aed6c8b7ec__root", "label": "ae5d4aa78c910311__label", "value": "d655885866a5bb4a__value", "track": "_896754819c053b32__track", "indicator": "e1b9027901cdcd11__indicator", "progress-slide": "_59b0eff7ac881028__progress-slide" }; 23800 var DEFAULT_RENDER = (props) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Stack, { ...props, direction: "column", gap: "sm" }); 23801 var Root4 = (0, import_element57.forwardRef)(function ProgressRoot3({ className, render = DEFAULT_RENDER, ...props }, ref) { 23802 return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)( 23803 index_parts_exports2.Root, 23804 { 23805 ref, 23806 render, 23807 getAriaValueText: (formattedValue) => formattedValue || (0, import_i18n6.__)("In progress"), 23808 className: clsx_default( 23809 resets_default12["box-sizing"], 23810 style_default25.root, 23811 className 23812 ), 23813 ...props 23814 } 23815 ); 23816 }); 23817 23818 // packages/ui/build-module/progress/track.mjs 23819 var import_element58 = __toESM(require_element(), 1); 23820 var import_jsx_runtime115 = __toESM(require_jsx_runtime(), 1); 23821 var STYLE_HASH_ATTRIBUTE35 = "data-wp-hash"; 23822 function getRuntime35() { 23823 const globalScope = globalThis; 23824 if (globalScope.__wpStyleRuntime) { 23825 return globalScope.__wpStyleRuntime; 23826 } 23827 globalScope.__wpStyleRuntime = { 23828 documents: /* @__PURE__ */ new Map(), 23829 styles: /* @__PURE__ */ new Map(), 23830 injectedStyles: /* @__PURE__ */ new WeakMap() 23831 }; 23832 if (typeof document !== "undefined") { 23833 registerDocument35(document); 23834 } 23835 return globalScope.__wpStyleRuntime; 23836 } 23837 function documentContainsStyleHash35(targetDocument, hash) { 23838 if (!targetDocument.head) { 23839 return false; 23840 } 23841 for (const style of targetDocument.head.querySelectorAll( 23842 `style[$STYLE_HASH_ATTRIBUTE35}]` 23843 )) { 23844 if (style.getAttribute(STYLE_HASH_ATTRIBUTE35) === hash) { 23845 return true; 23846 } 23847 } 23848 return false; 23849 } 23850 function injectStyle35(targetDocument, hash, css) { 23851 if (!targetDocument.head) { 23852 return; 23853 } 23854 const runtime = getRuntime35(); 23855 let injectedStyles = runtime.injectedStyles.get(targetDocument); 23856 if (!injectedStyles) { 23857 injectedStyles = /* @__PURE__ */ new Set(); 23858 runtime.injectedStyles.set(targetDocument, injectedStyles); 23859 } 23860 if (injectedStyles.has(hash)) { 23861 return; 23862 } 23863 if (documentContainsStyleHash35(targetDocument, hash)) { 23864 injectedStyles.add(hash); 23865 return; 23866 } 23867 const style = targetDocument.createElement("style"); 23868 style.setAttribute(STYLE_HASH_ATTRIBUTE35, hash); 23869 style.appendChild(targetDocument.createTextNode(css)); 23870 targetDocument.head.appendChild(style); 23871 injectedStyles.add(hash); 23872 } 23873 function registerDocument35(targetDocument) { 23874 const runtime = getRuntime35(); 23875 runtime.documents.set( 23876 targetDocument, 23877 (runtime.documents.get(targetDocument) ?? 0) + 1 23878 ); 23879 for (const [hash, css] of runtime.styles) { 23880 injectStyle35(targetDocument, hash, css); 23881 } 23882 return () => { 23883 const count = runtime.documents.get(targetDocument); 23884 if (count === void 0) { 23885 return; 23886 } 23887 if (count <= 1) { 23888 runtime.documents.delete(targetDocument); 23889 return; 23890 } 23891 runtime.documents.set(targetDocument, count - 1); 23892 }; 23893 } 23894 function registerStyle35(hash, css) { 23895 const runtime = getRuntime35(); 23896 runtime.styles.set(hash, css); 23897 for (const targetDocument of runtime.documents.keys()) { 23898 injectStyle35(targetDocument, hash, css); 23899 } 23900 } 23901 if (typeof process === "undefined" || true) { 23902 registerStyle35("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 23903 } 23904 var resets_default13 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 23905 if (typeof process === "undefined" || true) { 23906 registerStyle35("5a1ea2cbcd", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._3cb9c0aed6c8b7ec__root{width:160px}.ae5d4aa78c910311__label,.d655885866a5bb4a__value{color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}.d655885866a5bb4a__value{font-variant-numeric:tabular-nums}._896754819c053b32__track{background-color:var(--wpds-color-background-track-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);height:1.5px;overflow:hidden;position:relative;width:100%;@media (forced-colors:active){outline:var(--wpds-border-width-xs,1px) solid CanvasText;outline-offset:var(--wpds-border-width-xs,1px)}}.e1b9027901cdcd11__indicator{background-color:currentColor;border-radius:inherit;color:var(--wpds-color-background-thumb-neutral,#1e1e1e);height:100%;inset-block-start:0;position:absolute;@media not (prefers-reduced-motion){transition:width var(--wpds-motion-duration-xl,.4s) ease-in-out}&[data-indeterminate]{animation:_59b0eff7ac881028__progress-slide 1.5s ease-in-out infinite;transition:none;width:50%;@media (prefers-reduced-motion:reduce){animation-duration:3s;animation-timing-function:steps(4)}}}@media (forced-colors:active){.e1b9027901cdcd11__indicator{background-color:CanvasText;forced-color-adjust:none}}@keyframes _59b0eff7ac881028__progress-slide{0%{inset-inline-start:-50%}to{inset-inline-start:100%}}}}"); 23907 } 23908 var style_default26 = { "root": "_3cb9c0aed6c8b7ec__root", "label": "ae5d4aa78c910311__label", "value": "d655885866a5bb4a__value", "track": "_896754819c053b32__track", "indicator": "e1b9027901cdcd11__indicator", "progress-slide": "_59b0eff7ac881028__progress-slide" }; 23909 var Track = (0, import_element58.forwardRef)(function ProgressTrack3({ className, ...props }, ref) { 23910 return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)( 23911 index_parts_exports2.Track, 23912 { 23913 ref, 23914 className: clsx_default( 23915 resets_default13["box-sizing"], 23916 style_default26.track, 23917 className 23918 ), 23919 ...props 23920 } 23921 ); 23922 }); 23923 23924 // packages/ui/build-module/progress/indicator.mjs 23925 var import_element59 = __toESM(require_element(), 1); 23926 var import_jsx_runtime116 = __toESM(require_jsx_runtime(), 1); 23927 var STYLE_HASH_ATTRIBUTE36 = "data-wp-hash"; 23928 function getRuntime36() { 23929 const globalScope = globalThis; 23930 if (globalScope.__wpStyleRuntime) { 23931 return globalScope.__wpStyleRuntime; 23932 } 23933 globalScope.__wpStyleRuntime = { 23934 documents: /* @__PURE__ */ new Map(), 23935 styles: /* @__PURE__ */ new Map(), 23936 injectedStyles: /* @__PURE__ */ new WeakMap() 23937 }; 23938 if (typeof document !== "undefined") { 23939 registerDocument36(document); 23940 } 23941 return globalScope.__wpStyleRuntime; 23942 } 23943 function documentContainsStyleHash36(targetDocument, hash) { 23944 if (!targetDocument.head) { 23945 return false; 23946 } 23947 for (const style of targetDocument.head.querySelectorAll( 23948 `style[$STYLE_HASH_ATTRIBUTE36}]` 23949 )) { 23950 if (style.getAttribute(STYLE_HASH_ATTRIBUTE36) === hash) { 23951 return true; 23952 } 23953 } 23954 return false; 23955 } 23956 function injectStyle36(targetDocument, hash, css) { 23957 if (!targetDocument.head) { 23958 return; 23959 } 23960 const runtime = getRuntime36(); 23961 let injectedStyles = runtime.injectedStyles.get(targetDocument); 23962 if (!injectedStyles) { 23963 injectedStyles = /* @__PURE__ */ new Set(); 23964 runtime.injectedStyles.set(targetDocument, injectedStyles); 23965 } 23966 if (injectedStyles.has(hash)) { 23967 return; 23968 } 23969 if (documentContainsStyleHash36(targetDocument, hash)) { 23970 injectedStyles.add(hash); 23971 return; 23972 } 23973 const style = targetDocument.createElement("style"); 23974 style.setAttribute(STYLE_HASH_ATTRIBUTE36, hash); 23975 style.appendChild(targetDocument.createTextNode(css)); 23976 targetDocument.head.appendChild(style); 23977 injectedStyles.add(hash); 23978 } 23979 function registerDocument36(targetDocument) { 23980 const runtime = getRuntime36(); 23981 runtime.documents.set( 23982 targetDocument, 23983 (runtime.documents.get(targetDocument) ?? 0) + 1 23984 ); 23985 for (const [hash, css] of runtime.styles) { 23986 injectStyle36(targetDocument, hash, css); 23987 } 23988 return () => { 23989 const count = runtime.documents.get(targetDocument); 23990 if (count === void 0) { 23991 return; 23992 } 23993 if (count <= 1) { 23994 runtime.documents.delete(targetDocument); 23995 return; 23996 } 23997 runtime.documents.set(targetDocument, count - 1); 23998 }; 23999 } 24000 function registerStyle36(hash, css) { 24001 const runtime = getRuntime36(); 24002 runtime.styles.set(hash, css); 24003 for (const targetDocument of runtime.documents.keys()) { 24004 injectStyle36(targetDocument, hash, css); 24005 } 24006 } 24007 if (typeof process === "undefined" || true) { 24008 registerStyle36("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 24009 } 24010 var resets_default14 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 24011 if (typeof process === "undefined" || true) { 24012 registerStyle36("5a1ea2cbcd", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._3cb9c0aed6c8b7ec__root{width:160px}.ae5d4aa78c910311__label,.d655885866a5bb4a__value{color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}.d655885866a5bb4a__value{font-variant-numeric:tabular-nums}._896754819c053b32__track{background-color:var(--wpds-color-background-track-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);height:1.5px;overflow:hidden;position:relative;width:100%;@media (forced-colors:active){outline:var(--wpds-border-width-xs,1px) solid CanvasText;outline-offset:var(--wpds-border-width-xs,1px)}}.e1b9027901cdcd11__indicator{background-color:currentColor;border-radius:inherit;color:var(--wpds-color-background-thumb-neutral,#1e1e1e);height:100%;inset-block-start:0;position:absolute;@media not (prefers-reduced-motion){transition:width var(--wpds-motion-duration-xl,.4s) ease-in-out}&[data-indeterminate]{animation:_59b0eff7ac881028__progress-slide 1.5s ease-in-out infinite;transition:none;width:50%;@media (prefers-reduced-motion:reduce){animation-duration:3s;animation-timing-function:steps(4)}}}@media (forced-colors:active){.e1b9027901cdcd11__indicator{background-color:CanvasText;forced-color-adjust:none}}@keyframes _59b0eff7ac881028__progress-slide{0%{inset-inline-start:-50%}to{inset-inline-start:100%}}}}"); 24013 } 24014 var style_default27 = { "root": "_3cb9c0aed6c8b7ec__root", "label": "ae5d4aa78c910311__label", "value": "d655885866a5bb4a__value", "track": "_896754819c053b32__track", "indicator": "e1b9027901cdcd11__indicator", "progress-slide": "_59b0eff7ac881028__progress-slide" }; 24015 var Indicator = (0, import_element59.forwardRef)( 24016 function ProgressIndicator3({ color, className, style, ...props }, ref) { 24017 return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)( 24018 index_parts_exports2.Indicator, 24019 { 24020 ref, 24021 style: color === void 0 ? style : { ...style, color }, 24022 className: clsx_default( 24023 resets_default14["box-sizing"], 24024 style_default27.indicator, 24025 className 24026 ), 24027 ...props 24028 } 24029 ); 24030 } 24031 ); 24032 24033 // packages/ui/build-module/progress/label.mjs 24034 var import_element60 = __toESM(require_element(), 1); 24035 var import_jsx_runtime117 = __toESM(require_jsx_runtime(), 1); 24036 var STYLE_HASH_ATTRIBUTE37 = "data-wp-hash"; 24037 function getRuntime37() { 24038 const globalScope = globalThis; 24039 if (globalScope.__wpStyleRuntime) { 24040 return globalScope.__wpStyleRuntime; 24041 } 24042 globalScope.__wpStyleRuntime = { 24043 documents: /* @__PURE__ */ new Map(), 24044 styles: /* @__PURE__ */ new Map(), 24045 injectedStyles: /* @__PURE__ */ new WeakMap() 24046 }; 24047 if (typeof document !== "undefined") { 24048 registerDocument37(document); 24049 } 24050 return globalScope.__wpStyleRuntime; 24051 } 24052 function documentContainsStyleHash37(targetDocument, hash) { 24053 if (!targetDocument.head) { 24054 return false; 24055 } 24056 for (const style of targetDocument.head.querySelectorAll( 24057 `style[$STYLE_HASH_ATTRIBUTE37}]` 24058 )) { 24059 if (style.getAttribute(STYLE_HASH_ATTRIBUTE37) === hash) { 24060 return true; 24061 } 24062 } 24063 return false; 24064 } 24065 function injectStyle37(targetDocument, hash, css) { 24066 if (!targetDocument.head) { 24067 return; 24068 } 24069 const runtime = getRuntime37(); 24070 let injectedStyles = runtime.injectedStyles.get(targetDocument); 24071 if (!injectedStyles) { 24072 injectedStyles = /* @__PURE__ */ new Set(); 24073 runtime.injectedStyles.set(targetDocument, injectedStyles); 24074 } 24075 if (injectedStyles.has(hash)) { 24076 return; 24077 } 24078 if (documentContainsStyleHash37(targetDocument, hash)) { 24079 injectedStyles.add(hash); 24080 return; 24081 } 24082 const style = targetDocument.createElement("style"); 24083 style.setAttribute(STYLE_HASH_ATTRIBUTE37, hash); 24084 style.appendChild(targetDocument.createTextNode(css)); 24085 targetDocument.head.appendChild(style); 24086 injectedStyles.add(hash); 24087 } 24088 function registerDocument37(targetDocument) { 24089 const runtime = getRuntime37(); 24090 runtime.documents.set( 24091 targetDocument, 24092 (runtime.documents.get(targetDocument) ?? 0) + 1 24093 ); 24094 for (const [hash, css] of runtime.styles) { 24095 injectStyle37(targetDocument, hash, css); 24096 } 24097 return () => { 24098 const count = runtime.documents.get(targetDocument); 24099 if (count === void 0) { 24100 return; 24101 } 24102 if (count <= 1) { 24103 runtime.documents.delete(targetDocument); 24104 return; 24105 } 24106 runtime.documents.set(targetDocument, count - 1); 24107 }; 24108 } 24109 function registerStyle37(hash, css) { 24110 const runtime = getRuntime37(); 24111 runtime.styles.set(hash, css); 24112 for (const targetDocument of runtime.documents.keys()) { 24113 injectStyle37(targetDocument, hash, css); 24114 } 24115 } 24116 if (typeof process === "undefined" || true) { 24117 registerStyle37("5a1ea2cbcd", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._3cb9c0aed6c8b7ec__root{width:160px}.ae5d4aa78c910311__label,.d655885866a5bb4a__value{color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}.d655885866a5bb4a__value{font-variant-numeric:tabular-nums}._896754819c053b32__track{background-color:var(--wpds-color-background-track-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);height:1.5px;overflow:hidden;position:relative;width:100%;@media (forced-colors:active){outline:var(--wpds-border-width-xs,1px) solid CanvasText;outline-offset:var(--wpds-border-width-xs,1px)}}.e1b9027901cdcd11__indicator{background-color:currentColor;border-radius:inherit;color:var(--wpds-color-background-thumb-neutral,#1e1e1e);height:100%;inset-block-start:0;position:absolute;@media not (prefers-reduced-motion){transition:width var(--wpds-motion-duration-xl,.4s) ease-in-out}&[data-indeterminate]{animation:_59b0eff7ac881028__progress-slide 1.5s ease-in-out infinite;transition:none;width:50%;@media (prefers-reduced-motion:reduce){animation-duration:3s;animation-timing-function:steps(4)}}}@media (forced-colors:active){.e1b9027901cdcd11__indicator{background-color:CanvasText;forced-color-adjust:none}}@keyframes _59b0eff7ac881028__progress-slide{0%{inset-inline-start:-50%}to{inset-inline-start:100%}}}}"); 24118 } 24119 var style_default28 = { "root": "_3cb9c0aed6c8b7ec__root", "label": "ae5d4aa78c910311__label", "value": "d655885866a5bb4a__value", "track": "_896754819c053b32__track", "indicator": "e1b9027901cdcd11__indicator", "progress-slide": "_59b0eff7ac881028__progress-slide" }; 24120 var DEFAULT_RENDER2 = /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Text, {}); 24121 var Label = (0, import_element60.forwardRef)(function ProgressLabel3({ className, render = DEFAULT_RENDER2, ...props }, ref) { 24122 return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)( 24123 index_parts_exports2.Label, 24124 { 24125 ref, 24126 render, 24127 className: clsx_default(style_default28.label, className), 24128 ...props 24129 } 24130 ); 24131 }); 24132 24133 // packages/ui/build-module/progress/value.mjs 24134 var import_element61 = __toESM(require_element(), 1); 24135 var import_jsx_runtime118 = __toESM(require_jsx_runtime(), 1); 24136 var STYLE_HASH_ATTRIBUTE38 = "data-wp-hash"; 24137 function getRuntime38() { 24138 const globalScope = globalThis; 24139 if (globalScope.__wpStyleRuntime) { 24140 return globalScope.__wpStyleRuntime; 24141 } 24142 globalScope.__wpStyleRuntime = { 24143 documents: /* @__PURE__ */ new Map(), 24144 styles: /* @__PURE__ */ new Map(), 24145 injectedStyles: /* @__PURE__ */ new WeakMap() 24146 }; 24147 if (typeof document !== "undefined") { 24148 registerDocument38(document); 24149 } 24150 return globalScope.__wpStyleRuntime; 24151 } 24152 function documentContainsStyleHash38(targetDocument, hash) { 24153 if (!targetDocument.head) { 24154 return false; 24155 } 24156 for (const style of targetDocument.head.querySelectorAll( 24157 `style[$STYLE_HASH_ATTRIBUTE38}]` 24158 )) { 24159 if (style.getAttribute(STYLE_HASH_ATTRIBUTE38) === hash) { 24160 return true; 24161 } 24162 } 24163 return false; 24164 } 24165 function injectStyle38(targetDocument, hash, css) { 24166 if (!targetDocument.head) { 24167 return; 24168 } 24169 const runtime = getRuntime38(); 24170 let injectedStyles = runtime.injectedStyles.get(targetDocument); 24171 if (!injectedStyles) { 24172 injectedStyles = /* @__PURE__ */ new Set(); 24173 runtime.injectedStyles.set(targetDocument, injectedStyles); 24174 } 24175 if (injectedStyles.has(hash)) { 24176 return; 24177 } 24178 if (documentContainsStyleHash38(targetDocument, hash)) { 24179 injectedStyles.add(hash); 24180 return; 24181 } 24182 const style = targetDocument.createElement("style"); 24183 style.setAttribute(STYLE_HASH_ATTRIBUTE38, hash); 24184 style.appendChild(targetDocument.createTextNode(css)); 24185 targetDocument.head.appendChild(style); 24186 injectedStyles.add(hash); 24187 } 24188 function registerDocument38(targetDocument) { 24189 const runtime = getRuntime38(); 24190 runtime.documents.set( 24191 targetDocument, 24192 (runtime.documents.get(targetDocument) ?? 0) + 1 24193 ); 24194 for (const [hash, css] of runtime.styles) { 24195 injectStyle38(targetDocument, hash, css); 24196 } 24197 return () => { 24198 const count = runtime.documents.get(targetDocument); 24199 if (count === void 0) { 24200 return; 24201 } 24202 if (count <= 1) { 24203 runtime.documents.delete(targetDocument); 24204 return; 24205 } 24206 runtime.documents.set(targetDocument, count - 1); 24207 }; 24208 } 24209 function registerStyle38(hash, css) { 24210 const runtime = getRuntime38(); 24211 runtime.styles.set(hash, css); 24212 for (const targetDocument of runtime.documents.keys()) { 24213 injectStyle38(targetDocument, hash, css); 24214 } 24215 } 24216 if (typeof process === "undefined" || true) { 24217 registerStyle38("5a1ea2cbcd", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._3cb9c0aed6c8b7ec__root{width:160px}.ae5d4aa78c910311__label,.d655885866a5bb4a__value{color:var(--wpds-color-foreground-content-neutral,#1e1e1e)}.d655885866a5bb4a__value{font-variant-numeric:tabular-nums}._896754819c053b32__track{background-color:var(--wpds-color-background-track-neutral,#dbdbdb);border-radius:var(--wpds-border-radius-lg,8px);height:1.5px;overflow:hidden;position:relative;width:100%;@media (forced-colors:active){outline:var(--wpds-border-width-xs,1px) solid CanvasText;outline-offset:var(--wpds-border-width-xs,1px)}}.e1b9027901cdcd11__indicator{background-color:currentColor;border-radius:inherit;color:var(--wpds-color-background-thumb-neutral,#1e1e1e);height:100%;inset-block-start:0;position:absolute;@media not (prefers-reduced-motion){transition:width var(--wpds-motion-duration-xl,.4s) ease-in-out}&[data-indeterminate]{animation:_59b0eff7ac881028__progress-slide 1.5s ease-in-out infinite;transition:none;width:50%;@media (prefers-reduced-motion:reduce){animation-duration:3s;animation-timing-function:steps(4)}}}@media (forced-colors:active){.e1b9027901cdcd11__indicator{background-color:CanvasText;forced-color-adjust:none}}@keyframes _59b0eff7ac881028__progress-slide{0%{inset-inline-start:-50%}to{inset-inline-start:100%}}}}"); 24218 } 24219 var style_default29 = { "root": "_3cb9c0aed6c8b7ec__root", "label": "ae5d4aa78c910311__label", "value": "d655885866a5bb4a__value", "track": "_896754819c053b32__track", "indicator": "e1b9027901cdcd11__indicator", "progress-slide": "_59b0eff7ac881028__progress-slide" }; 24220 var DEFAULT_RENDER3 = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Text, {}); 24221 var Value = (0, import_element61.forwardRef)(function ProgressValue3({ className, render = DEFAULT_RENDER3, ...props }, ref) { 24222 return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)( 24223 index_parts_exports2.Value, 24224 { 24225 ref, 24226 render, 24227 className: clsx_default(style_default29.value, className), 24228 ...props 24229 } 24230 ); 24231 }); 24232 24233 // packages/ui/build-module/skeleton/skeleton.mjs 24234 var import_element62 = __toESM(require_element(), 1); 24235 var STYLE_HASH_ATTRIBUTE39 = "data-wp-hash"; 24236 function getRuntime39() { 24237 const globalScope = globalThis; 24238 if (globalScope.__wpStyleRuntime) { 24239 return globalScope.__wpStyleRuntime; 24240 } 24241 globalScope.__wpStyleRuntime = { 24242 documents: /* @__PURE__ */ new Map(), 24243 styles: /* @__PURE__ */ new Map(), 24244 injectedStyles: /* @__PURE__ */ new WeakMap() 24245 }; 24246 if (typeof document !== "undefined") { 24247 registerDocument39(document); 24248 } 24249 return globalScope.__wpStyleRuntime; 24250 } 24251 function documentContainsStyleHash39(targetDocument, hash) { 24252 if (!targetDocument.head) { 24253 return false; 24254 } 24255 for (const style of targetDocument.head.querySelectorAll( 24256 `style[$STYLE_HASH_ATTRIBUTE39}]` 24257 )) { 24258 if (style.getAttribute(STYLE_HASH_ATTRIBUTE39) === hash) { 24259 return true; 24260 } 24261 } 24262 return false; 24263 } 24264 function injectStyle39(targetDocument, hash, css) { 24265 if (!targetDocument.head) { 24266 return; 24267 } 24268 const runtime = getRuntime39(); 24269 let injectedStyles = runtime.injectedStyles.get(targetDocument); 24270 if (!injectedStyles) { 24271 injectedStyles = /* @__PURE__ */ new Set(); 24272 runtime.injectedStyles.set(targetDocument, injectedStyles); 24273 } 24274 if (injectedStyles.has(hash)) { 24275 return; 24276 } 24277 if (documentContainsStyleHash39(targetDocument, hash)) { 24278 injectedStyles.add(hash); 24279 return; 24280 } 24281 const style = targetDocument.createElement("style"); 24282 style.setAttribute(STYLE_HASH_ATTRIBUTE39, hash); 24283 style.appendChild(targetDocument.createTextNode(css)); 24284 targetDocument.head.appendChild(style); 24285 injectedStyles.add(hash); 24286 } 24287 function registerDocument39(targetDocument) { 24288 const runtime = getRuntime39(); 24289 runtime.documents.set( 24290 targetDocument, 24291 (runtime.documents.get(targetDocument) ?? 0) + 1 24292 ); 24293 for (const [hash, css] of runtime.styles) { 24294 injectStyle39(targetDocument, hash, css); 24295 } 24296 return () => { 24297 const count = runtime.documents.get(targetDocument); 24298 if (count === void 0) { 24299 return; 24300 } 24301 if (count <= 1) { 24302 runtime.documents.delete(targetDocument); 24303 return; 24304 } 24305 runtime.documents.set(targetDocument, count - 1); 24306 }; 24307 } 24308 function registerStyle39(hash, css) { 24309 const runtime = getRuntime39(); 24310 runtime.styles.set(hash, css); 24311 for (const targetDocument of runtime.documents.keys()) { 24312 injectStyle39(targetDocument, hash, css); 24313 } 24314 } 24315 if (typeof process === "undefined" || true) { 24316 registerStyle39("37477070fb", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.ccc29f9575c4c758__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 24317 } 24318 var resets_default15 = { "box-sizing": "ccc29f9575c4c758__box-sizing" }; 24319 if (typeof process === "undefined" || true) { 24320 registerStyle39("f990700b6a", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._556c49818c2e5de5__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}}._913f0b8e094f8386__pulse{@media not (prefers-reduced-motion){animation:d5b52a3750432acb__skeleton-pulse 1.5s ease-in-out infinite}}@keyframes d5b52a3750432acb__skeleton-pulse{0%,to{opacity:1}50%{opacity:.4}}}}"); 24321 } 24322 var style_default30 = { "skeleton": "_556c49818c2e5de5__skeleton", "pulse": "_913f0b8e094f8386__pulse", "skeleton-pulse": "d5b52a3750432acb__skeleton-pulse" }; 24323 var Skeleton = (0, import_element62.forwardRef)( 24324 function UnforwardedSkeleton({ render, ...props }, ref) { 24325 return useRender({ 24326 render, 24327 ref, 24328 props: mergeProps( 24329 { 24330 className: clsx_default( 24331 style_default30.skeleton, 24332 style_default30.pulse, 24333 resets_default15["box-sizing"] 24334 ), 24335 // Decorative by default; consumers mark the loading 24336 // region with aria-busy / role="status". 24337 "aria-hidden": true 24338 }, 24339 props 24340 ) 24341 }); 24342 } 24343 ); 24344 24345 // packages/admin-ui/build-module/navigable-region/index.mjs 24346 var import_element63 = __toESM(require_element(), 1); 24347 var import_jsx_runtime119 = __toESM(require_jsx_runtime(), 1); 24348 var NavigableRegion = (0, import_element63.forwardRef)( 24349 ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => { 24350 return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)( 24351 Tag, 24352 { 24353 ref, 24354 className: clsx_default("admin-ui-navigable-region", className), 24355 "aria-label": ariaLabel, 24356 role: "region", 24357 tabIndex: "-1", 24358 ...props, 24359 children 24360 } 24361 ); 24362 } 24363 ); 24364 NavigableRegion.displayName = "NavigableRegion"; 24365 var navigable_region_default = NavigableRegion; 24366 24367 // packages/admin-ui/build-module/navigation/index.mjs 24368 var import_i18n7 = __toESM(require_i18n(), 1); 24369 var import_jsx_runtime120 = __toESM(require_jsx_runtime(), 1); 24370 var STYLE_HASH_ATTRIBUTE40 = "data-wp-hash"; 24371 function getRuntime40() { 24372 const globalScope = globalThis; 24373 if (globalScope.__wpStyleRuntime) { 24374 return globalScope.__wpStyleRuntime; 24375 } 24376 globalScope.__wpStyleRuntime = { 24377 documents: /* @__PURE__ */ new Map(), 24378 styles: /* @__PURE__ */ new Map(), 24379 injectedStyles: /* @__PURE__ */ new WeakMap() 24380 }; 24381 if (typeof document !== "undefined") { 24382 registerDocument40(document); 24383 } 24384 return globalScope.__wpStyleRuntime; 24385 } 24386 function documentContainsStyleHash40(targetDocument, hash) { 24387 if (!targetDocument.head) { 24388 return false; 24389 } 24390 for (const style of targetDocument.head.querySelectorAll( 24391 `style[$STYLE_HASH_ATTRIBUTE40}]` 24392 )) { 24393 if (style.getAttribute(STYLE_HASH_ATTRIBUTE40) === hash) { 24394 return true; 24395 } 24396 } 24397 return false; 24398 } 24399 function injectStyle40(targetDocument, hash, css) { 24400 if (!targetDocument.head) { 24401 return; 24402 } 24403 const runtime = getRuntime40(); 24404 let injectedStyles = runtime.injectedStyles.get(targetDocument); 24405 if (!injectedStyles) { 24406 injectedStyles = /* @__PURE__ */ new Set(); 24407 runtime.injectedStyles.set(targetDocument, injectedStyles); 24408 } 24409 if (injectedStyles.has(hash)) { 24410 return; 24411 } 24412 if (documentContainsStyleHash40(targetDocument, hash)) { 24413 injectedStyles.add(hash); 24414 return; 24415 } 24416 const style = targetDocument.createElement("style"); 24417 style.setAttribute(STYLE_HASH_ATTRIBUTE40, hash); 24418 style.appendChild(targetDocument.createTextNode(css)); 24419 targetDocument.head.appendChild(style); 24420 injectedStyles.add(hash); 24421 } 24422 function registerDocument40(targetDocument) { 24423 const runtime = getRuntime40(); 24424 runtime.documents.set( 24425 targetDocument, 24426 (runtime.documents.get(targetDocument) ?? 0) + 1 24427 ); 24428 for (const [hash, css] of runtime.styles) { 24429 injectStyle40(targetDocument, hash, css); 24430 } 24431 return () => { 24432 const count = runtime.documents.get(targetDocument); 24433 if (count === void 0) { 24434 return; 24435 } 24436 if (count <= 1) { 24437 runtime.documents.delete(targetDocument); 24438 return; 24439 } 24440 runtime.documents.set(targetDocument, count - 1); 24441 }; 24442 } 24443 function registerStyle40(hash, css) { 24444 const runtime = getRuntime40(); 24445 runtime.styles.set(hash, css); 24446 for (const targetDocument of runtime.documents.keys()) { 24447 injectStyle40(targetDocument, hash, css); 24448 } 24449 } 24450 if (typeof process === "undefined" || true) { 24451 registerStyle40("73643ec0a7", ".c1e78b6d2e68225c__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)}._3e14e8043696860f__li{flex-shrink:0}.e1422d0e8f9e67df__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}.e1422d0e8f9e67df__item:hover,.e1422d0e8f9e67df__item[aria-current=page]{color:var(--wpds-color-foreground-interactive-neutral-weak-active,#1e1e1e)}.e1422d0e8f9e67df__item[aria-current=page]{font-weight:var(--wpds-typography-font-weight-emphasis,600)}"); 24452 } 24453 var style_default31 = { "list": "c1e78b6d2e68225c__list", "li": "_3e14e8043696860f__li", "item": "e1422d0e8f9e67df__item" }; 24454 var Navigation = ({ 24455 items, 24456 currentHref, 24457 ariaLabel = (0, import_i18n7.__)("Sections"), 24458 linkComponent, 24459 className 24460 }) => { 24461 if (!items.length) { 24462 return null; 24463 } 24464 const LinkComponent = linkComponent ?? "a"; 24465 if (true) { 24466 const invalidItem = items.find( 24467 (item) => typeof item.href !== "string" 24468 ); 24469 if (invalidItem) { 24470 throw new Error( 24471 `Navigation: item "$invalidItem.label}" is missing an \`href\` prop.` 24472 ); 24473 } 24474 const duplicate = items.find( 24475 (item, index2) => items.findIndex((other) => other.href === item.href) !== index2 24476 ); 24477 if (duplicate) { 24478 throw new Error( 24479 `Navigation: duplicate \`href\` "$duplicate.href}". Each item must have a unique \`href\` so a single item receives \`aria-current="page"\`.` 24480 ); 24481 } 24482 } 24483 return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("nav", { "aria-label": ariaLabel, className, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)( 24484 Stack, 24485 { 24486 render: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("ul", { role: "list" }), 24487 direction: "row", 24488 align: "center", 24489 gap: "md", 24490 className: style_default31.list, 24491 children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("li", { className: style_default31.li, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)( 24492 Text, 24493 { 24494 variant: "body-md", 24495 className: style_default31.item, 24496 render: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)( 24497 Link, 24498 { 24499 variant: "unstyled", 24500 "aria-current": item.href === currentHref ? "page" : void 0, 24501 render: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(LinkComponent, { href: item.href }) 24502 } 24503 ), 24504 children: item.label 24505 } 24506 ) }, item.href)) 24507 } 24508 ) }); 24509 }; 24510 var navigation_default = Navigation; 24511 24512 // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs 24513 var import_components = __toESM(require_components(), 1); 24514 var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle"); 24515 24516 // packages/admin-ui/build-module/page/header.mjs 24517 var import_jsx_runtime121 = __toESM(require_jsx_runtime(), 1); 24518 var STYLE_HASH_ATTRIBUTE41 = "data-wp-hash"; 24519 function getRuntime41() { 24520 const globalScope = globalThis; 24521 if (globalScope.__wpStyleRuntime) { 24522 return globalScope.__wpStyleRuntime; 24523 } 24524 globalScope.__wpStyleRuntime = { 24525 documents: /* @__PURE__ */ new Map(), 24526 styles: /* @__PURE__ */ new Map(), 24527 injectedStyles: /* @__PURE__ */ new WeakMap() 24528 }; 24529 if (typeof document !== "undefined") { 24530 registerDocument41(document); 24531 } 24532 return globalScope.__wpStyleRuntime; 24533 } 24534 function documentContainsStyleHash41(targetDocument, hash) { 24535 if (!targetDocument.head) { 24536 return false; 24537 } 24538 for (const style of targetDocument.head.querySelectorAll( 24539 `style[$STYLE_HASH_ATTRIBUTE41}]` 24540 )) { 24541 if (style.getAttribute(STYLE_HASH_ATTRIBUTE41) === hash) { 24542 return true; 24543 } 24544 } 24545 return false; 24546 } 24547 function injectStyle41(targetDocument, hash, css) { 24548 if (!targetDocument.head) { 24549 return; 24550 } 24551 const runtime = getRuntime41(); 24552 let injectedStyles = runtime.injectedStyles.get(targetDocument); 24553 if (!injectedStyles) { 24554 injectedStyles = /* @__PURE__ */ new Set(); 24555 runtime.injectedStyles.set(targetDocument, injectedStyles); 24556 } 24557 if (injectedStyles.has(hash)) { 24558 return; 24559 } 24560 if (documentContainsStyleHash41(targetDocument, hash)) { 24561 injectedStyles.add(hash); 24562 return; 24563 } 24564 const style = targetDocument.createElement("style"); 24565 style.setAttribute(STYLE_HASH_ATTRIBUTE41, hash); 24566 style.appendChild(targetDocument.createTextNode(css)); 24567 targetDocument.head.appendChild(style); 24568 injectedStyles.add(hash); 24569 } 24570 function registerDocument41(targetDocument) { 24571 const runtime = getRuntime41(); 24572 runtime.documents.set( 24573 targetDocument, 24574 (runtime.documents.get(targetDocument) ?? 0) + 1 24575 ); 24576 for (const [hash, css] of runtime.styles) { 24577 injectStyle41(targetDocument, hash, css); 24578 } 24579 return () => { 24580 const count = runtime.documents.get(targetDocument); 24581 if (count === void 0) { 24582 return; 24583 } 24584 if (count <= 1) { 24585 runtime.documents.delete(targetDocument); 24586 return; 24587 } 24588 runtime.documents.set(targetDocument, count - 1); 24589 }; 24590 } 24591 function registerStyle41(hash, css) { 24592 const runtime = getRuntime41(); 24593 runtime.styles.set(hash, css); 24594 for (const targetDocument of runtime.documents.keys()) { 24595 injectStyle41(targetDocument, hash, css); 24596 } 24597 } 24598 if (typeof process === "undefined" || true) { 24599 registerStyle41("603e22a829", ".a601da1d3e3fb3fd__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}._04c95d85dee161fd__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}.bacecf0582e29643__header-content{min-height:var(--wpds-dimension-size-md,32px)}.a377058511394079__header-actions{flex-shrink:0}.dea03f8da2e8f042__header-lockup{min-width:0}._2361437ecf7e72e7__header-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._75a71e5e0a35e8f7__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%}}.b810958ef8ab363b__sidebar-toggle-slot:empty{display:none}.eff378c474a49b83__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}._04c95d85dee161fd__header._7e7496f8b3e1c468__has-navigation,._04c95d85dee161fd__header._7e7496f8b3e1c468__has-navigation .eff378c474a49b83__header-subtitle{padding-block-end:0}._214d54afaddbb8d5__header-navigation{margin-block-start:var(--wpds-dimension-gap-md,12px)}._4bcfbc76045751b8__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&.cefc11b6ca36136d__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}"); 24600 } 24601 var style_default32 = { "page": "a601da1d3e3fb3fd__page", "header": "_04c95d85dee161fd__header", "header-content": "bacecf0582e29643__header-content", "header-actions": "a377058511394079__header-actions", "header-lockup": "dea03f8da2e8f042__header-lockup", "header-title": "_2361437ecf7e72e7__header-title", "header-visual": "_75a71e5e0a35e8f7__header-visual", "sidebar-toggle-slot": "b810958ef8ab363b__sidebar-toggle-slot", "header-subtitle": "eff378c474a49b83__header-subtitle", "has-navigation": "_7e7496f8b3e1c468__has-navigation", "header-navigation": "_214d54afaddbb8d5__header-navigation", "content": "_4bcfbc76045751b8__content", "has-padding": "cefc11b6ca36136d__has-padding" }; 24602 function Header({ 24603 headingLevel = 1, 24604 breadcrumbs, 24605 badges, 24606 visual, 24607 title, 24608 subTitle, 24609 actions, 24610 navigation, 24611 components, 24612 showSidebarToggle = true 24613 }) { 24614 const HeadingTag = `h$headingLevel}`; 24615 const hasNavigation = !!navigation?.items?.length; 24616 return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)( 24617 Stack, 24618 { 24619 direction: "column", 24620 className: clsx_default( 24621 style_default32.header, 24622 hasNavigation && style_default32["has-navigation"] 24623 ), 24624 children: [ 24625 /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)( 24626 Stack, 24627 { 24628 className: style_default32["header-content"], 24629 direction: "row", 24630 gap: "sm", 24631 justify: "space-between", 24632 children: [ 24633 /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)( 24634 Stack, 24635 { 24636 direction: "row", 24637 gap: "sm", 24638 align: "center", 24639 justify: "start", 24640 className: style_default32["header-lockup"], 24641 children: [ 24642 showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)( 24643 SidebarToggleSlot, 24644 { 24645 bubblesVirtually: true, 24646 className: style_default32["sidebar-toggle-slot"] 24647 } 24648 ), 24649 visual && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)( 24650 "div", 24651 { 24652 className: style_default32["header-visual"], 24653 "aria-hidden": "true", 24654 children: visual 24655 } 24656 ), 24657 title && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)( 24658 Text, 24659 { 24660 className: style_default32["header-title"], 24661 render: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(HeadingTag, {}), 24662 variant: "heading-lg", 24663 children: title 24664 } 24665 ), 24666 breadcrumbs, 24667 badges 24668 ] 24669 } 24670 ), 24671 actions && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)( 24672 Stack, 24673 { 24674 align: "center", 24675 className: style_default32["header-actions"], 24676 direction: "row", 24677 gap: "sm", 24678 children: actions 24679 } 24680 ) 24681 ] 24682 } 24683 ), 24684 subTitle && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)( 24685 Text, 24686 { 24687 render: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("p", {}), 24688 variant: "body-md", 24689 className: style_default32["header-subtitle"], 24690 children: subTitle 24691 } 24692 ), 24693 hasNavigation && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)( 24694 navigation_default, 24695 { 24696 ...navigation, 24697 linkComponent: components?.link, 24698 className: style_default32["header-navigation"] 24699 } 24700 ) 24701 ] 24702 } 24703 ); 24704 } 24705 24706 // packages/admin-ui/build-module/page/index.mjs 24707 var import_jsx_runtime122 = __toESM(require_jsx_runtime(), 1); 24708 var STYLE_HASH_ATTRIBUTE42 = "data-wp-hash"; 24709 function getRuntime42() { 24710 const globalScope = globalThis; 24711 if (globalScope.__wpStyleRuntime) { 24712 return globalScope.__wpStyleRuntime; 24713 } 24714 globalScope.__wpStyleRuntime = { 24715 documents: /* @__PURE__ */ new Map(), 24716 styles: /* @__PURE__ */ new Map(), 24717 injectedStyles: /* @__PURE__ */ new WeakMap() 24718 }; 24719 if (typeof document !== "undefined") { 24720 registerDocument42(document); 24721 } 24722 return globalScope.__wpStyleRuntime; 24723 } 24724 function documentContainsStyleHash42(targetDocument, hash) { 24725 if (!targetDocument.head) { 24726 return false; 24727 } 24728 for (const style of targetDocument.head.querySelectorAll( 24729 `style[$STYLE_HASH_ATTRIBUTE42}]` 24730 )) { 24731 if (style.getAttribute(STYLE_HASH_ATTRIBUTE42) === hash) { 24732 return true; 24733 } 24734 } 24735 return false; 24736 } 24737 function injectStyle42(targetDocument, hash, css) { 24738 if (!targetDocument.head) { 24739 return; 24740 } 24741 const runtime = getRuntime42(); 24742 let injectedStyles = runtime.injectedStyles.get(targetDocument); 24743 if (!injectedStyles) { 24744 injectedStyles = /* @__PURE__ */ new Set(); 24745 runtime.injectedStyles.set(targetDocument, injectedStyles); 24746 } 24747 if (injectedStyles.has(hash)) { 24748 return; 24749 } 24750 if (documentContainsStyleHash42(targetDocument, hash)) { 24751 injectedStyles.add(hash); 24752 return; 24753 } 24754 const style = targetDocument.createElement("style"); 24755 style.setAttribute(STYLE_HASH_ATTRIBUTE42, hash); 24756 style.appendChild(targetDocument.createTextNode(css)); 24757 targetDocument.head.appendChild(style); 24758 injectedStyles.add(hash); 24759 } 24760 function registerDocument42(targetDocument) { 24761 const runtime = getRuntime42(); 24762 runtime.documents.set( 24763 targetDocument, 24764 (runtime.documents.get(targetDocument) ?? 0) + 1 24765 ); 24766 for (const [hash, css] of runtime.styles) { 24767 injectStyle42(targetDocument, hash, css); 24768 } 24769 return () => { 24770 const count = runtime.documents.get(targetDocument); 24771 if (count === void 0) { 24772 return; 24773 } 24774 if (count <= 1) { 24775 runtime.documents.delete(targetDocument); 24776 return; 24777 } 24778 runtime.documents.set(targetDocument, count - 1); 24779 }; 24780 } 24781 function registerStyle42(hash, css) { 24782 const runtime = getRuntime42(); 24783 runtime.styles.set(hash, css); 24784 for (const targetDocument of runtime.documents.keys()) { 24785 injectStyle42(targetDocument, hash, css); 24786 } 24787 } 24788 if (typeof process === "undefined" || true) { 24789 registerStyle42("603e22a829", ".a601da1d3e3fb3fd__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}._04c95d85dee161fd__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}.bacecf0582e29643__header-content{min-height:var(--wpds-dimension-size-md,32px)}.a377058511394079__header-actions{flex-shrink:0}.dea03f8da2e8f042__header-lockup{min-width:0}._2361437ecf7e72e7__header-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._75a71e5e0a35e8f7__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%}}.b810958ef8ab363b__sidebar-toggle-slot:empty{display:none}.eff378c474a49b83__header-subtitle{color:var(--wpds-color-foreground-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}._04c95d85dee161fd__header._7e7496f8b3e1c468__has-navigation,._04c95d85dee161fd__header._7e7496f8b3e1c468__has-navigation .eff378c474a49b83__header-subtitle{padding-block-end:0}._214d54afaddbb8d5__header-navigation{margin-block-start:var(--wpds-dimension-gap-md,12px)}._4bcfbc76045751b8__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&.cefc11b6ca36136d__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}"); 24790 } 24791 var style_default33 = { "page": "a601da1d3e3fb3fd__page", "header": "_04c95d85dee161fd__header", "header-content": "bacecf0582e29643__header-content", "header-actions": "a377058511394079__header-actions", "header-lockup": "dea03f8da2e8f042__header-lockup", "header-title": "_2361437ecf7e72e7__header-title", "header-visual": "_75a71e5e0a35e8f7__header-visual", "sidebar-toggle-slot": "b810958ef8ab363b__sidebar-toggle-slot", "header-subtitle": "eff378c474a49b83__header-subtitle", "has-navigation": "_7e7496f8b3e1c468__has-navigation", "header-navigation": "_214d54afaddbb8d5__header-navigation", "content": "_4bcfbc76045751b8__content", "has-padding": "cefc11b6ca36136d__has-padding" }; 24792 function Page({ 24793 headingLevel, 24794 breadcrumbs, 24795 badges, 24796 visual, 24797 title, 24798 subTitle, 24799 children, 24800 className, 24801 actions, 24802 navigation, 24803 components, 24804 ariaLabel, 24805 hasPadding = false, 24806 showSidebarToggle = true 24807 }) { 24808 const classes = clsx_default(style_default33.page, className); 24809 const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : ""); 24810 return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [ 24811 (title || breadcrumbs || badges || actions || visual || !!navigation?.items?.length) && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)( 24812 Header, 24813 { 24814 headingLevel, 24815 breadcrumbs, 24816 badges, 24817 visual, 24818 title, 24819 subTitle, 24820 actions, 24821 navigation, 24822 components, 24823 showSidebarToggle 24824 } 24825 ), 24826 hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)( 24827 "div", 24828 { 24829 className: clsx_default( 24830 style_default33.content, 24831 style_default33["has-padding"] 24832 ), 24833 children 24834 } 24835 ) : children 24836 ] }); 24837 } 24838 Page.SidebarToggleFill = SidebarToggleFill; 24839 var page_default = Page; 24840 24841 // routes/font-list/stage.tsx 24842 var import_i18n59 = __toESM(require_i18n()); 24843 var import_components56 = __toESM(require_components()); 24844 var import_editor = __toESM(require_editor()); 24845 var import_core_data11 = __toESM(require_core_data()); 24846 var import_data13 = __toESM(require_data()); 24847 var import_element99 = __toESM(require_element()); 24848 24849 // packages/global-styles-ui/build-module/global-styles-ui.mjs 24850 var import_components55 = __toESM(require_components(), 1); 24851 var import_blocks6 = __toESM(require_blocks(), 1); 24852 var import_data12 = __toESM(require_data(), 1); 24853 var import_block_editor14 = __toESM(require_block_editor(), 1); 24854 var import_element98 = __toESM(require_element(), 1); 24855 var import_compose9 = __toESM(require_compose(), 1); 24856 24857 // packages/global-styles-engine/build-module/utils/object.mjs 24858 function setImmutably(object, path, value) { 24859 path = Array.isArray(path) ? [...path] : [path]; 24860 object = Array.isArray(object) ? [...object] : { ...object }; 24861 const leaf = path.pop(); 24862 let prev = object; 24863 for (const key of path) { 24864 const lvl = prev[key]; 24865 prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl }; 24866 } 24867 prev[leaf] = value; 24868 return object; 24869 } 24870 var getValueFromObjectPath = (object, path, defaultValue) => { 24871 const arrayPath = Array.isArray(path) ? path : path.split("."); 24872 let value = object; 24873 arrayPath.forEach((fieldName) => { 24874 value = value?.[fieldName]; 24875 }); 24876 return value ?? defaultValue; 24877 }; 24878 24879 // packages/global-styles-engine/build-module/settings/get-setting.mjs 24880 var VALID_SETTINGS = [ 24881 "appearanceTools", 24882 "useRootPaddingAwareAlignments", 24883 "background.backgroundClip", 24884 "background.backgroundImage", 24885 "background.backgroundRepeat", 24886 "background.backgroundSize", 24887 "background.backgroundPosition", 24888 "background.gradient", 24889 "border.color", 24890 "border.radius", 24891 "border.radiusSizes", 24892 "border.style", 24893 "border.width", 24894 "shadow.presets", 24895 "shadow.defaultPresets", 24896 "color.background", 24897 "color.button", 24898 "color.caption", 24899 "color.custom", 24900 "color.customDuotone", 24901 "color.customGradient", 24902 "color.defaultDuotone", 24903 "color.defaultGradients", 24904 "color.defaultPalette", 24905 "color.duotone", 24906 "color.gradients", 24907 "color.heading", 24908 "color.link", 24909 "color.palette", 24910 "color.text", 24911 "custom", 24912 "dimensions.aspectRatio", 24913 "dimensions.height", 24914 "dimensions.minHeight", 24915 "dimensions.minWidth", 24916 "dimensions.width", 24917 "dimensions.dimensionSizes", 24918 "layout.contentSize", 24919 "layout.definitions", 24920 "layout.wideSize", 24921 "lightbox.enabled", 24922 "lightbox.allowEditing", 24923 "position.fixed", 24924 "position.sticky", 24925 "spacing.customSpacingSize", 24926 "spacing.defaultSpacingSizes", 24927 "spacing.spacingSizes", 24928 "spacing.spacingScale", 24929 "spacing.blockGap", 24930 "spacing.margin", 24931 "spacing.padding", 24932 "spacing.units", 24933 "typography.fluid", 24934 "typography.customFontSize", 24935 "typography.defaultFontSizes", 24936 "typography.dropCap", 24937 "typography.fontFamilies", 24938 "typography.fontSizes", 24939 "typography.fontStyle", 24940 "typography.fontWeight", 24941 "typography.letterSpacing", 24942 "typography.lineHeight", 24943 "typography.textAlign", 24944 "typography.textColumns", 24945 "typography.textDecoration", 24946 "typography.textIndent", 24947 "typography.textShadow", 24948 "typography.defaultTextShadowPresets", 24949 "typography.textShadowPresets", 24950 "typography.textTransform", 24951 "typography.writingMode", 24952 "viewport.mobile", 24953 "viewport.tablet" 24954 ]; 24955 function getSetting(globalStyles, path, blockName) { 24956 const appendedBlockPath = blockName ? ".blocks." + blockName : ""; 24957 const appendedPropertyPath = path ? "." + path : ""; 24958 const contextualPath = `settings$appendedBlockPath}$appendedPropertyPath}`; 24959 const globalPath = `settings$appendedPropertyPath}`; 24960 if (path) { 24961 return getValueFromObjectPath(globalStyles, contextualPath) ?? getValueFromObjectPath(globalStyles, globalPath); 24962 } 24963 let result = {}; 24964 VALID_SETTINGS.forEach((setting) => { 24965 const value = getValueFromObjectPath( 24966 globalStyles, 24967 `settings$appendedBlockPath}.$setting}` 24968 ) ?? getValueFromObjectPath(globalStyles, `settings.$setting}`); 24969 if (value !== void 0) { 24970 result = setImmutably(result, setting.split("."), value); 24971 } 24972 }); 24973 return result; 24974 } 24975 24976 // packages/global-styles-engine/build-module/settings/set-setting.mjs 24977 function setSetting(globalStyles, path, newValue, blockName) { 24978 const appendedBlockPath = blockName ? ".blocks." + blockName : ""; 24979 const appendedPropertyPath = path ? "." + path : ""; 24980 const finalPath = `settings$appendedBlockPath}$appendedPropertyPath}`; 24981 return setImmutably( 24982 globalStyles, 24983 finalPath.split("."), 24984 newValue 24985 ); 24986 } 24987 24988 // packages/global-styles-engine/build-module/utils/common.mjs 24989 var import_style_engine = __toESM(require_style_engine(), 1); 24990 24991 // packages/global-styles-engine/build-module/utils/fluid.mjs 24992 var DEFAULT_MAXIMUM_VIEWPORT_WIDTH = "1600px"; 24993 var DEFAULT_MINIMUM_VIEWPORT_WIDTH = "320px"; 24994 var DEFAULT_SCALE_FACTOR = 1; 24995 var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN = 0.25; 24996 var DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX = 0.75; 24997 var DEFAULT_MINIMUM_FONT_SIZE_LIMIT = "14px"; 24998 function getComputedFluidTypographyValue({ 24999 minimumFontSize, 25000 maximumFontSize, 25001 fontSize, 25002 minimumViewportWidth = DEFAULT_MINIMUM_VIEWPORT_WIDTH, 25003 maximumViewportWidth = DEFAULT_MAXIMUM_VIEWPORT_WIDTH, 25004 scaleFactor = DEFAULT_SCALE_FACTOR, 25005 minimumFontSizeLimit 25006 }) { 25007 minimumFontSizeLimit = !!getTypographyValueAndUnit(minimumFontSizeLimit) ? minimumFontSizeLimit : DEFAULT_MINIMUM_FONT_SIZE_LIMIT; 25008 if (fontSize) { 25009 const fontSizeParsed = getTypographyValueAndUnit(fontSize); 25010 if (!fontSizeParsed?.unit || !fontSizeParsed?.value) { 25011 return null; 25012 } 25013 const minimumFontSizeLimitParsed = getTypographyValueAndUnit( 25014 minimumFontSizeLimit, 25015 { 25016 coerceTo: fontSizeParsed.unit 25017 } 25018 ); 25019 if (!!minimumFontSizeLimitParsed?.value && !minimumFontSize && !maximumFontSize) { 25020 if (fontSizeParsed?.value <= minimumFontSizeLimitParsed?.value) { 25021 return null; 25022 } 25023 } 25024 if (!maximumFontSize) { 25025 maximumFontSize = `$fontSizeParsed.value}$fontSizeParsed.unit}`; 25026 } 25027 if (!minimumFontSize) { 25028 const fontSizeValueInPx = fontSizeParsed.unit === "px" ? fontSizeParsed.value : fontSizeParsed.value * 16; 25029 const minimumFontSizeFactor = Math.min( 25030 Math.max( 25031 1 - 0.075 * Math.log2(fontSizeValueInPx), 25032 DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MIN 25033 ), 25034 DEFAULT_MINIMUM_FONT_SIZE_FACTOR_MAX 25035 ); 25036 const calculatedMinimumFontSize = roundToPrecision( 25037 fontSizeParsed.value * minimumFontSizeFactor, 25038 3 25039 ); 25040 if (!!minimumFontSizeLimitParsed?.value && calculatedMinimumFontSize < minimumFontSizeLimitParsed?.value) { 25041 minimumFontSize = `$minimumFontSizeLimitParsed.value}$minimumFontSizeLimitParsed.unit}`; 25042 } else { 25043 minimumFontSize = `$calculatedMinimumFontSize}$fontSizeParsed.unit}`; 25044 } 25045 } 25046 } 25047 const minimumFontSizeParsed = getTypographyValueAndUnit(minimumFontSize); 25048 const fontSizeUnit = minimumFontSizeParsed?.unit || "rem"; 25049 const maximumFontSizeParsed = getTypographyValueAndUnit(maximumFontSize, { 25050 coerceTo: fontSizeUnit 25051 }); 25052 if (!minimumFontSizeParsed || !maximumFontSizeParsed) { 25053 return null; 25054 } 25055 const minimumFontSizeRem = getTypographyValueAndUnit(minimumFontSize, { 25056 coerceTo: "rem" 25057 }); 25058 const maximumViewportWidthParsed = getTypographyValueAndUnit( 25059 maximumViewportWidth, 25060 { coerceTo: fontSizeUnit } 25061 ); 25062 const minimumViewportWidthParsed = getTypographyValueAndUnit( 25063 minimumViewportWidth, 25064 { coerceTo: fontSizeUnit } 25065 ); 25066 if (!maximumViewportWidthParsed || !minimumViewportWidthParsed || !minimumFontSizeRem) { 25067 return null; 25068 } 25069 const linearDenominator = maximumViewportWidthParsed.value - minimumViewportWidthParsed.value; 25070 if (!linearDenominator) { 25071 return null; 25072 } 25073 const minViewportWidthOffsetValue = roundToPrecision( 25074 minimumViewportWidthParsed.value / 100, 25075 3 25076 ); 25077 const viewportWidthOffset = roundToPrecision(minViewportWidthOffsetValue, 3) + fontSizeUnit; 25078 const linearFactor = 100 * ((maximumFontSizeParsed.value - minimumFontSizeParsed.value) / linearDenominator); 25079 const linearFactorScaled = roundToPrecision( 25080 (linearFactor || 1) * scaleFactor, 25081 3 25082 ); 25083 const fluidTargetFontSize = `$minimumFontSizeRem.value}$minimumFontSizeRem.unit} + ((1vw - $viewportWidthOffset}) * $linearFactorScaled})`; 25084 return `clamp($minimumFontSize}, $fluidTargetFontSize}, $maximumFontSize})`; 25085 } 25086 function getTypographyValueAndUnit(rawValue, options = {}) { 25087 if (typeof rawValue !== "string" && typeof rawValue !== "number") { 25088 return null; 25089 } 25090 if (isFinite(rawValue)) { 25091 rawValue = `$rawValue}px`; 25092 } 25093 const { coerceTo, rootSizeValue, acceptableUnits } = { 25094 coerceTo: "", 25095 // Default browser font size. Later we could inject some JS to compute this `getComputedStyle( document.querySelector( "html" ) ).fontSize`. 25096 rootSizeValue: 16, 25097 acceptableUnits: ["rem", "px", "em"], 25098 ...options 25099 }; 25100 const acceptableUnitsGroup = acceptableUnits?.join("|"); 25101 const regexUnits = new RegExp( 25102 `^(\\d*\\.?\\d+)($acceptableUnitsGroup}){1,1}$` 25103 ); 25104 const matches = rawValue.toString().match(regexUnits); 25105 if (!matches || matches.length < 3) { 25106 return null; 25107 } 25108 let [, value, unit] = matches; 25109 let returnValue = parseFloat(value); 25110 if ("px" === coerceTo && ("em" === unit || "rem" === unit)) { 25111 returnValue = returnValue * rootSizeValue; 25112 unit = coerceTo; 25113 } 25114 if ("px" === unit && ("em" === coerceTo || "rem" === coerceTo)) { 25115 returnValue = returnValue / rootSizeValue; 25116 unit = coerceTo; 25117 } 25118 if (("em" === coerceTo || "rem" === coerceTo) && ("em" === unit || "rem" === unit)) { 25119 unit = coerceTo; 25120 } 25121 if (!unit) { 25122 return null; 25123 } 25124 return { 25125 value: roundToPrecision(returnValue, 3), 25126 unit 25127 }; 25128 } 25129 function roundToPrecision(value, digits = 3) { 25130 const base = Math.pow(10, digits); 25131 return Math.round(value * base) / base; 25132 } 25133 25134 // packages/global-styles-engine/build-module/utils/typography.mjs 25135 function isFluidTypographyEnabled(typographySettings) { 25136 const fluidSettings = typographySettings?.fluid; 25137 return true === fluidSettings || fluidSettings && typeof fluidSettings === "object" && Object.keys(fluidSettings).length > 0; 25138 } 25139 function getFluidTypographyOptionsFromSettings(settings) { 25140 const typographySettings = settings?.typography ?? {}; 25141 const layoutSettings = settings?.layout; 25142 const defaultMaxViewportWidth = getTypographyValueAndUnit( 25143 layoutSettings?.wideSize 25144 ) ? layoutSettings?.wideSize : null; 25145 return isFluidTypographyEnabled(typographySettings) && defaultMaxViewportWidth ? { 25146 fluid: { 25147 maxViewportWidth: defaultMaxViewportWidth, 25148 ...typeof typographySettings.fluid === "object" ? typographySettings.fluid : {} 25149 } 25150 } : { 25151 fluid: typographySettings?.fluid 25152 }; 25153 } 25154 function getTypographyFontSizeValue(preset, settings) { 25155 const { size: defaultSize } = preset; 25156 if (!defaultSize || "0" === defaultSize || false === preset?.fluid) { 25157 return defaultSize; 25158 } 25159 if (!isFluidTypographyEnabled(settings?.typography) && !isFluidTypographyEnabled(preset)) { 25160 return defaultSize; 25161 } 25162 const fluidTypographySettings = getFluidTypographyOptionsFromSettings(settings)?.fluid ?? {}; 25163 const fluidFontSizeValue = getComputedFluidTypographyValue({ 25164 minimumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.min, 25165 maximumFontSize: typeof preset?.fluid === "boolean" ? void 0 : preset?.fluid?.max, 25166 fontSize: defaultSize, 25167 minimumFontSizeLimit: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minFontSize : void 0, 25168 maximumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.maxViewportWidth : void 0, 25169 minimumViewportWidth: typeof fluidTypographySettings === "object" ? fluidTypographySettings?.minViewportWidth : void 0 25170 }); 25171 if (!!fluidFontSizeValue) { 25172 return fluidFontSizeValue; 25173 } 25174 return defaultSize; 25175 } 25176 25177 // packages/global-styles-engine/build-module/utils/common.mjs 25178 var PRESET_METADATA = [ 25179 { 25180 path: ["color", "palette"], 25181 valueKey: "color", 25182 cssVarInfix: "color", 25183 classes: [ 25184 { classSuffix: "color", propertyName: "color" }, 25185 { 25186 classSuffix: "background-color", 25187 propertyName: "background-color" 25188 }, 25189 { 25190 classSuffix: "border-color", 25191 propertyName: "border-color" 25192 } 25193 ] 25194 }, 25195 { 25196 path: ["color", "gradients"], 25197 valueKey: "gradient", 25198 cssVarInfix: "gradient", 25199 classes: [ 25200 { 25201 classSuffix: "gradient-background", 25202 propertyName: "background" 25203 } 25204 ] 25205 }, 25206 { 25207 path: ["color", "duotone"], 25208 valueKey: "colors", 25209 cssVarInfix: "duotone", 25210 valueFunc: ({ slug }) => `url( '#wp-duotone-$slug}' )`, 25211 classes: [] 25212 }, 25213 { 25214 path: ["shadow", "presets"], 25215 valueKey: "shadow", 25216 cssVarInfix: "shadow", 25217 classes: [] 25218 }, 25219 { 25220 path: ["typography", "fontSizes"], 25221 valueFunc: (preset, settings) => getTypographyFontSizeValue(preset, settings), 25222 valueKey: "size", 25223 cssVarInfix: "font-size", 25224 classes: [{ classSuffix: "font-size", propertyName: "font-size" }] 25225 }, 25226 { 25227 path: ["typography", "fontFamilies"], 25228 valueKey: "fontFamily", 25229 cssVarInfix: "font-family", 25230 classes: [ 25231 { classSuffix: "font-family", propertyName: "font-family" } 25232 ] 25233 }, 25234 { 25235 path: ["typography", "textShadowPresets"], 25236 valueKey: "textShadow", 25237 cssVarInfix: "text-shadow", 25238 classes: [ 25239 { classSuffix: "text-shadow", propertyName: "text-shadow" } 25240 ] 25241 }, 25242 { 25243 path: ["spacing", "spacingSizes"], 25244 valueKey: "size", 25245 cssVarInfix: "spacing", 25246 valueFunc: ({ size: size4 }) => size4, 25247 classes: [] 25248 }, 25249 { 25250 path: ["border", "radiusSizes"], 25251 valueKey: "size", 25252 cssVarInfix: "border-radius", 25253 classes: [] 25254 }, 25255 { 25256 path: ["dimensions", "dimensionSizes"], 25257 valueKey: "size", 25258 cssVarInfix: "dimension", 25259 classes: [] 25260 } 25261 ]; 25262 function getResolvedRefValue(ruleValue, tree) { 25263 if (!ruleValue || !tree) { 25264 return ruleValue; 25265 } 25266 if (typeof ruleValue === "object" && "ref" in ruleValue && ruleValue?.ref) { 25267 const resolvedRuleValue = (0, import_style_engine.getCSSValueFromRawStyle)( 25268 getValueFromObjectPath(tree, ruleValue.ref) 25269 ); 25270 if (typeof resolvedRuleValue === "object" && resolvedRuleValue !== null && "ref" in resolvedRuleValue && resolvedRuleValue?.ref) { 25271 return void 0; 25272 } 25273 if (resolvedRuleValue === void 0) { 25274 return ruleValue; 25275 } 25276 return resolvedRuleValue; 25277 } 25278 return ruleValue; 25279 } 25280 function getResolvedThemeFilePath(file, themeFileURIs) { 25281 if (!file || !themeFileURIs || !Array.isArray(themeFileURIs)) { 25282 return file; 25283 } 25284 const uri = themeFileURIs.find( 25285 (themeFileUri) => themeFileUri?.name === file 25286 ); 25287 if (!uri?.href) { 25288 return file; 25289 } 25290 return uri?.href; 25291 } 25292 function getResolvedValue(ruleValue, tree) { 25293 if (!ruleValue || !tree) { 25294 return ruleValue; 25295 } 25296 const resolvedValue = getResolvedRefValue(ruleValue, tree); 25297 if (typeof resolvedValue === "object" && resolvedValue !== null && "url" in resolvedValue && resolvedValue?.url) { 25298 return { 25299 ...resolvedValue, 25300 url: getResolvedThemeFilePath( 25301 resolvedValue.url, 25302 tree?._links?.["wp:theme-file"] 25303 ) 25304 }; 25305 } 25306 return resolvedValue; 25307 } 25308 function findInPresetsBy(settings, blockName, presetPath = [], presetProperty = "slug", presetValueValue) { 25309 const orderedPresetsByOrigin = [ 25310 blockName ? getValueFromObjectPath(settings, [ 25311 "blocks", 25312 blockName, 25313 ...presetPath 25314 ]) : void 0, 25315 getValueFromObjectPath(settings, presetPath) 25316 ].filter(Boolean); 25317 for (const presetByOrigin of orderedPresetsByOrigin) { 25318 if (presetByOrigin) { 25319 const origins = ["custom", "theme", "default"]; 25320 for (const origin of origins) { 25321 const presets = presetByOrigin[origin]; 25322 if (presets) { 25323 const presetObject = presets.find( 25324 (preset) => preset[presetProperty] === presetValueValue 25325 ); 25326 if (presetObject) { 25327 if (presetProperty === "slug") { 25328 return presetObject; 25329 } 25330 const highestPresetObjectWithSameSlug = findInPresetsBy( 25331 settings, 25332 blockName, 25333 presetPath, 25334 "slug", 25335 presetObject.slug 25336 ); 25337 if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) { 25338 return presetObject; 25339 } 25340 return void 0; 25341 } 25342 } 25343 } 25344 } 25345 } 25346 } 25347 function getValueFromPresetVariable(features, blockName, variable, [presetType, slug] = []) { 25348 const metadata = PRESET_METADATA.find( 25349 (data) => data.cssVarInfix === presetType 25350 ); 25351 if (!metadata || !features.settings) { 25352 return variable; 25353 } 25354 const presetObject = findInPresetsBy( 25355 features.settings, 25356 blockName, 25357 metadata.path, 25358 "slug", 25359 slug 25360 ); 25361 if (presetObject) { 25362 const { valueKey } = metadata; 25363 const result = presetObject[valueKey]; 25364 return getValueFromVariable(features, blockName, result); 25365 } 25366 return variable; 25367 } 25368 function getValueFromCustomVariable(features, blockName, variable, path = []) { 25369 const result = (blockName ? getValueFromObjectPath(features?.settings ?? {}, [ 25370 "blocks", 25371 blockName, 25372 "custom", 25373 ...path 25374 ]) : void 0) ?? getValueFromObjectPath(features?.settings ?? {}, [ 25375 "custom", 25376 ...path 25377 ]); 25378 if (!result) { 25379 return variable; 25380 } 25381 return getValueFromVariable(features, blockName, result); 25382 } 25383 function getValueFromVariable(features, blockName, variable) { 25384 if (!variable || typeof variable !== "string") { 25385 if (typeof variable === "object" && variable !== null && "ref" in variable && typeof variable.ref === "string") { 25386 const resolvedVariable = getValueFromObjectPath( 25387 features, 25388 variable.ref 25389 ); 25390 if (!resolvedVariable || typeof resolvedVariable === "object" && "ref" in resolvedVariable) { 25391 return resolvedVariable; 25392 } 25393 variable = resolvedVariable; 25394 } else { 25395 return variable; 25396 } 25397 } 25398 const USER_VALUE_PREFIX = "var:"; 25399 const THEME_VALUE_PREFIX = "var(--wp--"; 25400 const THEME_VALUE_SUFFIX = ")"; 25401 let parsedVar; 25402 if (variable.startsWith(USER_VALUE_PREFIX)) { 25403 parsedVar = variable.slice(USER_VALUE_PREFIX.length).split("|"); 25404 } else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) { 25405 parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split("--"); 25406 } else { 25407 return variable; 25408 } 25409 const [type, ...path] = parsedVar; 25410 if (type === "preset") { 25411 return getValueFromPresetVariable( 25412 features, 25413 blockName, 25414 variable, 25415 path 25416 ); 25417 } 25418 if (type === "custom") { 25419 return getValueFromCustomVariable( 25420 features, 25421 blockName, 25422 variable, 25423 path 25424 ); 25425 } 25426 return variable; 25427 } 25428 25429 // packages/global-styles-engine/build-module/settings/get-style.mjs 25430 function getStyle(globalStyles, path, blockName, shouldDecodeEncode = true) { 25431 const appendedPath = path ? "." + path : ""; 25432 const finalPath = !blockName ? `styles$appendedPath}` : `styles.blocks.$blockName}$appendedPath}`; 25433 if (!globalStyles) { 25434 return void 0; 25435 } 25436 const rawResult = getValueFromObjectPath(globalStyles, finalPath); 25437 const result = shouldDecodeEncode ? getValueFromVariable(globalStyles, blockName, rawResult) : rawResult; 25438 return result; 25439 } 25440 25441 // packages/global-styles-engine/build-module/settings/set-style.mjs 25442 function setStyle(globalStyles, path, newValue, blockName) { 25443 const appendedPath = path ? "." + path : ""; 25444 const finalPath = !blockName ? `styles$appendedPath}` : `styles.blocks.$blockName}$appendedPath}`; 25445 return setImmutably( 25446 globalStyles, 25447 finalPath.split("."), 25448 newValue 25449 ); 25450 } 25451 25452 // packages/global-styles-engine/build-module/core/equal.mjs 25453 var import_es6 = __toESM(require_es6(), 1); 25454 function areGlobalStylesEqual(original, variation) { 25455 if (typeof original !== "object" || typeof variation !== "object") { 25456 return original === variation; 25457 } 25458 return (0, import_es6.default)(original?.styles, variation?.styles) && (0, import_es6.default)(original?.settings, variation?.settings); 25459 } 25460 25461 // packages/global-styles-engine/build-module/core/merge.mjs 25462 var import_deepmerge = __toESM(require_cjs(), 1); 25463 25464 // node_modules/.store/is-plain-object@5.1.0-5G_-lUnpSwJHYfRbkIxLrw/node_modules/is-plain-object/dist/is-plain-object.mjs 25465 function isObject(o) { 25466 return Object.prototype.toString.call(o) === "[object Object]"; 25467 } 25468 function isPlainObject(o) { 25469 var ctor, prot; 25470 if (isObject(o) === false) return false; 25471 ctor = o.constructor; 25472 if (ctor === void 0) return true; 25473 prot = ctor.prototype; 25474 if (isObject(prot) === false) return false; 25475 if (prot.hasOwnProperty("isPrototypeOf") === false) { 25476 return false; 25477 } 25478 return true; 25479 } 25480 25481 // packages/global-styles-engine/build-module/core/merge.mjs 25482 function mergeGlobalStyles(base, user) { 25483 return (0, import_deepmerge.default)(base, user, { 25484 /* 25485 * We only pass as arrays the presets, 25486 * in which case we want the new array of values 25487 * to override the old array (no merging). 25488 */ 25489 isMergeableObject: isPlainObject, 25490 /* 25491 * Exceptions to the above rule. 25492 * Background images should be replaced, not merged, 25493 * as they themselves are specific object definitions for the style. 25494 */ 25495 customMerge: (key) => { 25496 if (key === "backgroundImage") { 25497 return (baseConfig, userConfig) => userConfig ?? baseConfig; 25498 } 25499 return void 0; 25500 } 25501 }); 25502 } 25503 25504 // node_modules/.store/colord@2.10.0-Qx66Amv6c9C3nDPQDizV6Q/node_modules/colord/index.mjs 25505 for (r2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t = function(r3) { 25506 return "string" == typeof r3 ? r3.length > 0 : "number" == typeof r3; 25507 }, n = function(r3, t2, n2) { 25508 return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = Math.pow(10, t2)), Math.round(n2 * r3) / n2 + 0; 25509 }, u = function(r3, t2, n2) { 25510 return void 0 === t2 && (t2 = 0), void 0 === n2 && (n2 = 1), r3 > n2 ? n2 : r3 > t2 ? r3 : t2; 25511 }, e = function(r3) { 25512 return (r3 = isFinite(r3) ? r3 % 360 : 0) < 0 ? r3 + 360 : r3; 25513 }, o = function(r3, t2) { 25514 return void 0 === t2 && (t2 = 0), n(r3, t2) % 360; 25515 }, a = function(r3) { 25516 return { r: u(r3.r, 0, 255), g: u(r3.g, 0, 255), b: u(r3.b, 0, 255), a: u(r3.a) }; 25517 }, i = function(r3) { 25518 return { r: n(r3.r), g: n(r3.g), b: n(r3.b), a: n(r3.a, 3) }; 25519 }, s = /^#([0-9a-f]{3,8})$/i, d = function(r3, t2) { 25520 var n2 = r3.charCodeAt(t2); 25521 return (15 & n2) + 9 * (n2 >> 6); 25522 }, h = function(r3, t2) { 25523 return d(r3, t2) << 4 | d(r3, t2 + 1); 25524 }, b = [], f = 0; f < 256; f++) b.push((f < 16 ? "0" : "") + f.toString(16)); 25525 var r2; 25526 var t; 25527 var n; 25528 var u; 25529 var e; 25530 var o; 25531 var a; 25532 var i; 25533 var s; 25534 var d; 25535 var h; 25536 var b; 25537 var f; 25538 var g = function(r2) { 25539 return b[u(r2, 0, 255)]; 25540 }; 25541 var c = function(r2) { 25542 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; 25543 return { h: 60 * (i < 0 ? i + 6 : i), s: o ? a / o * 100 : 0, v: o / 255 * 100, a: e }; 25544 }; 25545 var v = function(r2) { 25546 var t = r2.h, n = r2.s, u = r2.v, e = r2.a; 25547 t = t / 360 * 6, n /= 100, u /= 100; 25548 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; 25549 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 }; 25550 }; 25551 var l = function(r2) { 25552 return { h: e(r2.h), s: u(r2.s, 0, 100), l: u(r2.l, 0, 100), a: u(r2.a) }; 25553 }; 25554 var p2 = function(r2) { 25555 return { h: o(r2.h), s: n(r2.s), l: n(r2.l), a: n(r2.a, 3) }; 25556 }; 25557 var m = function(r2) { 25558 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 })); 25559 var t, n, u; 25560 }; 25561 var y = function(r2) { 25562 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 }; 25563 var t, n, u, e; 25564 }; 25565 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; 25566 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; 25567 var M = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:,\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i; 25568 var H = /^rgba?\(\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s+([+-]?(?:\d*\.\d+|\d+))(%)?\s*(?:\/\s*([+-]?(?:\d*\.\d+|\d+))(%)?\s*)?\)$/i; 25569 var $ = { string: [[function(r2) { 25570 if (!s.test(r2)) return null; 25571 var t = r2.length; 25572 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; 25573 }, "hex"], [function(r2) { 25574 var t = M.exec(r2) || H.exec(r2); 25575 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; 25576 }, "rgb"], [function(t) { 25577 var n = N.exec(t) || x.exec(t); 25578 if (!n) return null; 25579 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) }); 25580 return m(o); 25581 }, "hsl"]], object: [[function(r2) { 25582 var n = r2.r, u = r2.g, e = r2.b, o = r2.a, i = void 0 === o ? 1 : o; 25583 return t(n) && t(u) && t(e) ? a({ r: Number(n), g: Number(u), b: Number(e), a: Number(i) }) : null; 25584 }, "rgb"], [function(r2) { 25585 var n = r2.h, u = r2.s, e = r2.l, o = r2.a, a = void 0 === o ? 1 : o; 25586 if (!t(n) || !t(u) || !t(e)) return null; 25587 var i = l({ h: Number(n), s: Number(u), l: Number(e), a: Number(a) }); 25588 return m(i); 25589 }, "hsl"], [function(r2) { 25590 var n = r2.h, o = r2.s, a = r2.v, i = r2.a, s = void 0 === i ? 1 : i; 25591 if (!t(n) || !t(o) || !t(a)) return null; 25592 var d = (function(r3) { 25593 return { h: e(r3.h), s: u(r3.s, 0, 100), v: u(r3.v, 0, 100), a: u(r3.a) }; 25594 })({ h: Number(n), s: Number(o), v: Number(a), a: Number(s) }); 25595 return v(d); 25596 }, "hsv"]] }; 25597 var j = function(r2, t) { 25598 for (var n = 0; n < t.length; n++) { 25599 var u = t[n][0](r2); 25600 if (u) return [u, t[n][1]]; 25601 } 25602 return [null, void 0]; 25603 }; 25604 var w = function(r2) { 25605 return "string" == typeof r2 ? j(r2.trim(), $.string) : "object" == typeof r2 && null !== r2 ? j(r2, $.object) : [null, void 0]; 25606 }; 25607 var k = function(r2, t) { 25608 var n = y(r2); 25609 return { h: n.h, s: u(n.s + 100 * t, 0, 100), l: n.l, a: n.a }; 25610 }; 25611 var E = function(r2) { 25612 return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255; 25613 }; 25614 var R = function(r2, t) { 25615 var n = y(r2); 25616 return { h: n.h, s: n.s, l: u(n.l + 100 * t, 0, 100), a: n.a }; 25617 }; 25618 var q = (function() { 25619 function r2(r3) { 25620 this.parsed = w(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 }; 25621 } 25622 return r2.prototype.isValid = function() { 25623 return null !== this.parsed; 25624 }, r2.prototype.brightness = function() { 25625 return n(E(this.rgba), 2); 25626 }, r2.prototype.isDark = function() { 25627 return E(this.rgba) < 0.5; 25628 }, r2.prototype.isLight = function() { 25629 return E(this.rgba) >= 0.5; 25630 }, r2.prototype.toHex = function() { 25631 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; 25632 var r3, t, u, e, o, a; 25633 }, r2.prototype.toRgb = function() { 25634 return i(this.rgba); 25635 }, r2.prototype.toRgbString = function() { 25636 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 + ")"; 25637 var r3, t, n, u, e; 25638 }, r2.prototype.toHsl = function() { 25639 return p2(y(this.rgba)); 25640 }, r2.prototype.toHslString = function() { 25641 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 + "%)"; 25642 var r3, t, n, u, e; 25643 }, r2.prototype.toHsv = function() { 25644 return r3 = c(this.rgba), { h: o(r3.h), s: n(r3.s), v: n(r3.v), a: n(r3.a, 3) }; 25645 var r3; 25646 }, r2.prototype.invert = function() { 25647 return A({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a }); 25648 var r3; 25649 }, r2.prototype.saturate = function(r3) { 25650 return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, r3)); 25651 }, r2.prototype.desaturate = function(r3) { 25652 return void 0 === r3 && (r3 = 0.1), A(k(this.rgba, -r3)); 25653 }, r2.prototype.grayscale = function() { 25654 return A(k(this.rgba, -1)); 25655 }, r2.prototype.lighten = function(r3) { 25656 return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, r3)); 25657 }, r2.prototype.darken = function(r3) { 25658 return void 0 === r3 && (r3 = 0.1), A(R(this.rgba, -r3)); 25659 }, r2.prototype.rotate = function(r3) { 25660 return void 0 === r3 && (r3 = 15), this.hue(y(this.rgba).h + r3); 25661 }, r2.prototype.alpha = function(r3) { 25662 return "number" == typeof r3 ? A({ r: (t = this.rgba).r, g: t.g, b: t.b, a: r3 }) : n(this.rgba.a, 3); 25663 var t; 25664 }, r2.prototype.hue = function(r3) { 25665 var t = y(this.rgba); 25666 return "number" == typeof r3 ? A({ h: r3, s: t.s, l: t.l, a: t.a }) : o(t.h); 25667 }, r2.prototype.isEqual = function(r3) { 25668 return this.toHex() === A(r3).toHex(); 25669 }, r2; 25670 })(); 25671 var A = function(r2) { 25672 return r2 instanceof q ? r2 : new q(r2); 25673 }; 25674 25675 // packages/global-styles-engine/build-module/utils/duotone.mjs 25676 function getValuesFromColors(colors = []) { 25677 const values = { 25678 r: [], 25679 g: [], 25680 b: [], 25681 a: [] 25682 }; 25683 colors.forEach((color) => { 25684 const rgbColor = A(color).toRgb(); 25685 values.r.push(rgbColor.r / 255); 25686 values.g.push(rgbColor.g / 255); 25687 values.b.push(rgbColor.b / 255); 25688 values.a.push(rgbColor.a); 25689 }); 25690 return values; 25691 } 25692 function getDuotoneUnsetStylesheet(selector) { 25693 return `$selector}{filter:none}`; 25694 } 25695 function getDuotoneStylesheet(selector, id) { 25696 return `$selector}{filter:url(#$id})}`; 25697 } 25698 function getDuotoneFilter(id, colors) { 25699 const values = getValuesFromColors(colors); 25700 return ` 25701 <svg 25702 xmlns:xlink="http://www.w3.org/1999/xlink" 25703 viewBox="0 0 0 0" 25704 width="0" 25705 height="0" 25706 focusable="false" 25707 role="none" 25708 aria-hidden="true" 25709 style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;" 25710 > 25711 <defs> 25712 <filter id="$id}"> 25713 <!-- 25714 Use sRGB instead of linearRGB so transparency looks correct. 25715 Use perceptual brightness to convert to grayscale. 25716 --> 25717 <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> 25718 <!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --> 25719 <feComponentTransfer color-interpolation-filters="sRGB"> 25720 <feFuncR type="table" tableValues="$values.r.join(" ")}"></feFuncR> 25721 <feFuncG type="table" tableValues="$values.g.join(" ")}"></feFuncG> 25722 <feFuncB type="table" tableValues="$values.b.join(" ")}"></feFuncB> 25723 <feFuncA type="table" tableValues="$values.a.join(" ")}"></feFuncA> 25724 </feComponentTransfer> 25725 <!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --> 25726 <feComposite in2="SourceGraphic" operator="in"></feComposite> 25727 </filter> 25728 </defs> 25729 </svg>`; 25730 } 25731 25732 // packages/global-styles-engine/build-module/utils/viewport.mjs 25733 var DEFAULT_VIEWPORT_BREAKPOINTS = { 25734 mobile: "480px", 25735 tablet: "782px" 25736 }; 25737 var VIEWPORT_SIZE_REGEXP = /^(\d+|\d*\.\d+)(px|em|rem)$/; 25738 var DEFAULT_FONT_SIZE = 16; 25739 function isViewportSettings(configOrSettings) { 25740 return "mobile" in configOrSettings || "tablet" in configOrSettings; 25741 } 25742 function getViewportSettings(configOrSettings) { 25743 if (!configOrSettings || typeof configOrSettings !== "object") { 25744 return {}; 25745 } 25746 if (isViewportSettings(configOrSettings)) { 25747 return configOrSettings; 25748 } 25749 return configOrSettings.settings?.viewport ?? {}; 25750 } 25751 function isValidViewportSize(value) { 25752 return typeof value === "string" && VIEWPORT_SIZE_REGEXP.test(value.trim()); 25753 } 25754 function getViewportBreakpointValueInPixels(value) { 25755 if (typeof value === "number") { 25756 return value; 25757 } 25758 if (typeof value !== "string") { 25759 return void 0; 25760 } 25761 const match2 = value.trim().match(VIEWPORT_SIZE_REGEXP); 25762 if (!match2) { 25763 return void 0; 25764 } 25765 const numericValue = Number.parseFloat(match2[1]); 25766 const unit = match2[2]; 25767 return unit === "px" ? numericValue : numericValue * DEFAULT_FONT_SIZE; 25768 } 25769 function getViewportBreakpoints(configOrSettings) { 25770 const viewportSettings = getViewportSettings(configOrSettings); 25771 const breakpoints = {}; 25772 const breakpointValuesInPixels = {}; 25773 Object.keys(DEFAULT_VIEWPORT_BREAKPOINTS).forEach((breakpoint) => { 25774 const key = breakpoint; 25775 const value = viewportSettings[key]; 25776 const px = getViewportBreakpointValueInPixels(value); 25777 if (px !== void 0 && isValidViewportSize(value)) { 25778 breakpoints[key] = value.trim(); 25779 breakpointValuesInPixels[key] = px; 25780 } 25781 }); 25782 const breakpointNames = Object.keys(breakpoints); 25783 if (!breakpointNames.length) { 25784 return { ...DEFAULT_VIEWPORT_BREAKPOINTS }; 25785 } 25786 if (1 === breakpointNames.length) { 25787 return breakpoints; 25788 } 25789 const mobile = breakpoints.mobile; 25790 const tablet = breakpoints.tablet; 25791 if (breakpointValuesInPixels.mobile >= breakpointValuesInPixels.tablet) { 25792 return { mobile }; 25793 } 25794 return { mobile, tablet }; 25795 } 25796 function getResponsiveMediaQueries(configOrSettings) { 25797 const breakpoints = getViewportBreakpoints(configOrSettings); 25798 const mediaQueries = {}; 25799 if (breakpoints.mobile) { 25800 mediaQueries["@mobile"] = `@media (width <= $breakpoints.mobile})`; 25801 } 25802 if (breakpoints.tablet) { 25803 mediaQueries["@tablet"] = breakpoints.mobile ? `@media ($breakpoints.mobile} < width <= $breakpoints.tablet})` : `@media (width <= $breakpoints.tablet})`; 25804 } 25805 return mediaQueries; 25806 } 25807 25808 // packages/global-styles-engine/build-module/variation.mjs 25809 function getVariationStyle(globalStyles, name2, variation, { resolveRefs = true } = {}) { 25810 if (!globalStyles?.styles?.blocks?.[name2]?.variations?.[variation]) { 25811 return void 0; 25812 } 25813 const replaceRefs = (variationStyles) => { 25814 Object.keys(variationStyles).forEach((key) => { 25815 const value = variationStyles[key]; 25816 if (typeof value === "object" && value !== null) { 25817 if (value.ref !== void 0) { 25818 if (typeof value.ref !== "string" || value.ref.trim() === "") { 25819 delete variationStyles[key]; 25820 } else { 25821 const refValue = getValueFromObjectPath( 25822 globalStyles, 25823 value.ref 25824 ); 25825 if (refValue !== void 0 && refValue !== null) { 25826 variationStyles[key] = refValue; 25827 } else { 25828 delete variationStyles[key]; 25829 } 25830 } 25831 } else { 25832 replaceRefs(value); 25833 if (Object.keys(value).length === 0) { 25834 delete variationStyles[key]; 25835 } 25836 } 25837 } 25838 }); 25839 }; 25840 const styles = JSON.parse( 25841 JSON.stringify( 25842 globalStyles.styles.blocks[name2].variations[variation] 25843 ) 25844 ); 25845 if (resolveRefs) { 25846 replaceRefs(styles); 25847 } 25848 return styles; 25849 } 25850 25851 // packages/global-styles-engine/build-module/resolve-style.mjs 25852 var DEFAULT_STATE_VALUE = "default"; 25853 function isDefaultBlockStyleState(selectedState) { 25854 const viewport = selectedState?.viewport; 25855 const pseudoState = selectedState?.pseudoState; 25856 return (!viewport || viewport === DEFAULT_STATE_VALUE) && (!pseudoState || pseudoState === DEFAULT_STATE_VALUE); 25857 } 25858 function getStyleStatePath(selectedState) { 25859 if (isDefaultBlockStyleState(selectedState)) { 25860 return []; 25861 } 25862 return [selectedState.viewport, selectedState.pseudoState].filter( 25863 (state) => !!state && state !== DEFAULT_STATE_VALUE 25864 ); 25865 } 25866 function getStyleForState(style, selectedState) { 25867 const path = getStyleStatePath(selectedState); 25868 if (!path.length) { 25869 return style; 25870 } 25871 return getValueFromObjectPath(style, path); 25872 } 25873 var TREE_STRUCTURAL_KEYS = /* @__PURE__ */ new Set(["blocks", "variations", "css"]); 25874 var EMPTY_INHERITANCE = Object.freeze({ 25875 value: {}, 25876 sources: {} 25877 }); 25878 var SOURCE_DESCRIPTORS = { 25879 root: { layer: "root" }, 25880 element: { layer: "element" }, 25881 block: { layer: "block" }, 25882 blockVariation: { layer: "blockVariation" } 25883 }; 25884 function createSourceDescriptor(type) { 25885 const descriptor = SOURCE_DESCRIPTORS[type]; 25886 if (!descriptor) { 25887 return null; 25888 } 25889 return { ...descriptor }; 25890 } 25891 function createContribution(styles, source) { 25892 if (!styles || !source) { 25893 return null; 25894 } 25895 return { styles, source }; 25896 } 25897 function getPathKey(path) { 25898 return path.join("."); 25899 } 25900 function getSourceForPath(source) { 25901 return { ...source }; 25902 } 25903 function isExplicitEmpty(value) { 25904 if (value === "" || value === null) { 25905 return true; 25906 } 25907 if (typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 0) { 25908 return true; 25909 } 25910 return false; 25911 } 25912 function isRefObject(value) { 25913 return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.ref === "string"; 25914 } 25915 function pickLayerRootContribution(layer) { 25916 if (!layer || typeof layer !== "object" || Array.isArray(layer)) { 25917 return null; 25918 } 25919 const contribution = {}; 25920 for (const key of Object.keys(layer)) { 25921 if (TREE_STRUCTURAL_KEYS.has(key)) { 25922 continue; 25923 } 25924 if (key === "elements") { 25925 if (layer.elements && typeof layer.elements === "object") { 25926 contribution.elements = layer.elements; 25927 } 25928 continue; 25929 } 25930 if (isExplicitEmpty(layer[key])) { 25931 continue; 25932 } 25933 contribution[key] = layer[key]; 25934 } 25935 return Object.keys(contribution).length === 0 ? null : contribution; 25936 } 25937 var ATOMIC_OBJECT_KEYS = /* @__PURE__ */ new Set(["backgroundImage"]); 25938 function deepMergeDroppingEmpties(target, source, globalStyles, sourceMetadata, sources, path = []) { 25939 if (!source || typeof source !== "object" || Array.isArray(source)) { 25940 return target; 25941 } 25942 for (const key of Object.keys(source)) { 25943 let sourceValue = source[key]; 25944 if (isExplicitEmpty(sourceValue)) { 25945 continue; 25946 } 25947 if (isRefObject(sourceValue)) { 25948 if (sourceValue.ref.trim() === "") { 25949 continue; 25950 } 25951 const resolved = getValueFromObjectPath( 25952 globalStyles, 25953 sourceValue.ref 25954 ); 25955 if (resolved === void 0 || resolved === null || isRefObject(resolved)) { 25956 continue; 25957 } 25958 sourceValue = resolved; 25959 } 25960 const nextPath = [...path, key]; 25961 if (!ATOMIC_OBJECT_KEYS.has(key) && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) && !isRefObject(sourceValue)) { 25962 const existing = target[key] && typeof target[key] === "object" && !Array.isArray(target[key]) ? target[key] : {}; 25963 target[key] = deepMergeDroppingEmpties( 25964 { ...existing }, 25965 sourceValue, 25966 globalStyles, 25967 sourceMetadata, 25968 sources, 25969 nextPath 25970 ); 25971 } else { 25972 target[key] = ATOMIC_OBJECT_KEYS.has(key) && sourceValue !== null && typeof sourceValue === "object" && !Array.isArray(sourceValue) ? { ...sourceValue } : sourceValue; 25973 if (sourceMetadata && sources) { 25974 sources[getPathKey(nextPath)] = getSourceForPath(sourceMetadata); 25975 } 25976 } 25977 } 25978 return target; 25979 } 25980 function getStateSlice(layerObject, selectedState) { 25981 if (!layerObject) { 25982 return null; 25983 } 25984 const slice = getStyleForState(layerObject, selectedState); 25985 return slice && typeof slice === "object" && !Array.isArray(slice) ? slice : null; 25986 } 25987 var NON_CASCADING_ROOT_PREFIXES = [ 25988 "color.background", 25989 "color.gradient", 25990 "background", 25991 "spacing", 25992 "dimensions", 25993 "border", 25994 "shadow", 25995 "filter" 25996 ]; 25997 function isNonCascadingRootPath(pathKey) { 25998 if (pathKey.startsWith("elements.")) { 25999 return false; 26000 } 26001 return NON_CASCADING_ROOT_PREFIXES.some( 26002 (prefix) => pathKey === prefix || pathKey.startsWith(`$prefix}.`) 26003 ); 26004 } 26005 function deleteAtPath(target, pathSegments) { 26006 if (!target || typeof target !== "object") { 26007 return; 26008 } 26009 const [head2, ...rest] = pathSegments; 26010 if (rest.length === 0) { 26011 delete target[head2]; 26012 return; 26013 } 26014 const child = target[head2]; 26015 if (child && typeof child === "object") { 26016 deleteAtPath(child, rest); 26017 if (Object.keys(child).length === 0) { 26018 delete target[head2]; 26019 } 26020 } 26021 } 26022 function dropNonCascadingRootLeaves(value, sources) { 26023 for (const pathKey of Object.keys(sources)) { 26024 if (sources[pathKey].layer === "root" && isNonCascadingRootPath(pathKey)) { 26025 deleteAtPath(value, pathKey.split(".")); 26026 delete sources[pathKey]; 26027 } 26028 } 26029 } 26030 function resolveThemeFileBackgroundImage(value, globalStyles, links) { 26031 const image = value?.background?.backgroundImage; 26032 if (!image) { 26033 return; 26034 } 26035 const resolved = getResolvedValue(image, { 26036 ...globalStyles, 26037 _links: links ?? void 0 26038 }); 26039 if (resolved !== void 0) { 26040 value.background.backgroundImage = resolved; 26041 } 26042 } 26043 function computeResolvedStyle(globalStyles, { 26044 blockName, 26045 variationName = null, 26046 elements = null, 26047 viewport = null, 26048 pseudoState = null 26049 } = {}) { 26050 if (!globalStyles || !globalStyles.styles) { 26051 return EMPTY_INHERITANCE; 26052 } 26053 if (!blockName) { 26054 return EMPTY_INHERITANCE; 26055 } 26056 const styles = globalStyles.styles; 26057 const selectedState = { viewport, pseudoState }; 26058 const root = styles; 26059 const block = styles.blocks?.[blockName] ?? null; 26060 const elementLayers = (elements ?? []).map((elementName) => styles.elements?.[elementName] ?? null).filter((layer) => !!layer); 26061 const variation = variationName ? getVariationStyle(globalStyles, blockName, variationName) ?? null : null; 26062 const contributions = [ 26063 createContribution( 26064 pickLayerRootContribution(root), 26065 createSourceDescriptor("root") 26066 ), 26067 ...elementLayers.map( 26068 (layer) => createContribution( 26069 pickLayerRootContribution(layer), 26070 createSourceDescriptor("element") 26071 ) 26072 ), 26073 block ? createContribution( 26074 pickLayerRootContribution(block), 26075 createSourceDescriptor("block") 26076 ) : null, 26077 variation ? createContribution( 26078 pickLayerRootContribution(variation), 26079 createSourceDescriptor("blockVariation") 26080 ) : null 26081 ]; 26082 if (!isDefaultBlockStyleState(selectedState)) { 26083 contributions.push( 26084 createContribution( 26085 pickLayerRootContribution( 26086 getStateSlice(root, selectedState) 26087 ), 26088 createSourceDescriptor("root") 26089 ), 26090 ...elementLayers.map( 26091 (layer) => createContribution( 26092 pickLayerRootContribution( 26093 getStateSlice(layer, selectedState) 26094 ), 26095 createSourceDescriptor("element") 26096 ) 26097 ), 26098 block ? createContribution( 26099 pickLayerRootContribution( 26100 getStateSlice(block, selectedState) 26101 ), 26102 createSourceDescriptor("block") 26103 ) : null, 26104 variation ? createContribution( 26105 pickLayerRootContribution( 26106 getStateSlice(variation, selectedState) 26107 ), 26108 createSourceDescriptor("blockVariation") 26109 ) : null 26110 ); 26111 } 26112 const filteredContributions = contributions.filter( 26113 Boolean 26114 ); 26115 if (filteredContributions.length === 0) { 26116 return EMPTY_INHERITANCE; 26117 } 26118 const sources = {}; 26119 const value = filteredContributions.reduce( 26120 (mergedValue, contribution) => deepMergeDroppingEmpties( 26121 mergedValue, 26122 contribution.styles, 26123 globalStyles, 26124 contribution.source, 26125 sources 26126 ), 26127 {} 26128 ); 26129 dropNonCascadingRootLeaves(value, sources); 26130 resolveThemeFileBackgroundImage( 26131 value, 26132 globalStyles, 26133 globalStyles._links ?? null 26134 ); 26135 return { value, sources }; 26136 } 26137 var NO_LINKS = {}; 26138 var memo5 = /* @__PURE__ */ new WeakMap(); 26139 function resolveStyle2(globalStyles, context = {}) { 26140 const styleData = globalStyles?.styles; 26141 if (!styleData || typeof styleData !== "object") { 26142 return computeResolvedStyle(globalStyles, context); 26143 } 26144 let byLinks = memo5.get(styleData); 26145 if (!byLinks) { 26146 byLinks = /* @__PURE__ */ new WeakMap(); 26147 memo5.set(styleData, byLinks); 26148 } 26149 const linksKey = globalStyles?._links ?? NO_LINKS; 26150 let inner = byLinks.get(linksKey); 26151 if (!inner) { 26152 inner = /* @__PURE__ */ new Map(); 26153 byLinks.set(linksKey, inner); 26154 } 26155 const sliceKey = `$context.elements?.join(",") ?? ""}:$context.viewport ?? ""}:$context.pseudoState ?? ""}`; 26156 const key = (context.blockName || "") + "" + (context.variationName || "") + "" + sliceKey; 26157 if (inner.has(key)) { 26158 return inner.get(key); 26159 } 26160 const result = computeResolvedStyle(globalStyles, context); 26161 inner.set(key, result); 26162 return result; 26163 } 26164 26165 // packages/global-styles-engine/build-module/lock-unlock.mjs 26166 var import_private_apis2 = __toESM(require_private_apis(), 1); 26167 var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( 26168 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", 26169 "@wordpress/global-styles-engine" 26170 ); 26171 26172 // packages/global-styles-engine/build-module/private-apis.mjs 26173 var privateApis = {}; 26174 lock2(privateApis, { 26175 getResponsiveMediaQueries, 26176 getViewportBreakpoints, 26177 getViewportBreakpointValueInPixels, 26178 getDuotoneFilter, 26179 getDuotoneStylesheet, 26180 getDuotoneUnsetStylesheet, 26181 resolveStyle: resolveStyle2, 26182 getVariationStyle 26183 }); 26184 26185 // packages/global-styles-ui/build-module/provider.mjs 26186 var import_element65 = __toESM(require_element(), 1); 26187 26188 // packages/global-styles-ui/build-module/context.mjs 26189 var import_element64 = __toESM(require_element(), 1); 26190 var GlobalStylesContext = (0, import_element64.createContext)({ 26191 user: { styles: {}, settings: {} }, 26192 base: { styles: {}, settings: {} }, 26193 merged: { styles: {}, settings: {} }, 26194 onChange: () => { 26195 }, 26196 fontLibraryEnabled: false 26197 }); 26198 26199 // packages/global-styles-ui/build-module/provider.mjs 26200 var import_jsx_runtime123 = __toESM(require_jsx_runtime(), 1); 26201 function GlobalStylesProvider({ 26202 children, 26203 value, 26204 baseValue, 26205 onChange, 26206 fontLibraryEnabled 26207 }) { 26208 const merged = (0, import_element65.useMemo)(() => { 26209 return mergeGlobalStyles(baseValue, value); 26210 }, [baseValue, value]); 26211 const contextValue = (0, import_element65.useMemo)( 26212 () => ({ 26213 user: value, 26214 base: baseValue, 26215 merged, 26216 onChange, 26217 fontLibraryEnabled 26218 }), 26219 [value, baseValue, merged, onChange, fontLibraryEnabled] 26220 ); 26221 return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(GlobalStylesContext.Provider, { value: contextValue, children }); 26222 } 26223 26224 // packages/global-styles-ui/build-module/screen-root.mjs 26225 var import_components8 = __toESM(require_components(), 1); 26226 var import_i18n12 = __toESM(require_i18n(), 1); 26227 var import_data2 = __toESM(require_data(), 1); 26228 var import_core_data2 = __toESM(require_core_data(), 1); 26229 26230 // packages/global-styles-ui/build-module/icon-with-current-color.mjs 26231 var import_jsx_runtime124 = __toESM(require_jsx_runtime(), 1); 26232 function IconWithCurrentColor({ 26233 className, 26234 ...props 26235 }) { 26236 return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)( 26237 icon_default, 26238 { 26239 className: clsx_default( 26240 className, 26241 "global-styles-ui-icon-with-current-color" 26242 ), 26243 ...props 26244 } 26245 ); 26246 } 26247 26248 // packages/global-styles-ui/build-module/navigation-button.mjs 26249 var import_components2 = __toESM(require_components(), 1); 26250 var import_jsx_runtime125 = __toESM(require_jsx_runtime(), 1); 26251 function GenericNavigationButton({ 26252 icon, 26253 children, 26254 ...props 26255 }) { 26256 return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_components2.__experimentalItem, { ...props, children: [ 26257 icon && /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_components2.__experimentalHStack, { justify: "flex-start", children: [ 26258 /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconWithCurrentColor, { icon, size: 24 }), 26259 /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_components2.FlexItem, { children }) 26260 ] }), 26261 !icon && children 26262 ] }); 26263 } 26264 function NavigationButtonAsItem(props) { 26265 return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_components2.Navigator.Button, { as: GenericNavigationButton, ...props }); 26266 } 26267 26268 // packages/global-styles-ui/build-module/root-menu.mjs 26269 var import_components3 = __toESM(require_components(), 1); 26270 var import_i18n10 = __toESM(require_i18n(), 1); 26271 var import_block_editor = __toESM(require_block_editor(), 1); 26272 26273 // packages/global-styles-ui/build-module/hooks.mjs 26274 var import_element66 = __toESM(require_element(), 1); 26275 var import_data = __toESM(require_data(), 1); 26276 var import_core_data = __toESM(require_core_data(), 1); 26277 var import_i18n9 = __toESM(require_i18n(), 1); 26278 26279 // packages/global-styles-ui/build-module/utils.mjs 26280 var import_i18n8 = __toESM(require_i18n(), 1); 26281 26282 // packages/global-styles-ui/build-module/lock-unlock.mjs 26283 var import_private_apis4 = __toESM(require_private_apis(), 1); 26284 var { lock: lock3, unlock: unlock3 } = (0, import_private_apis4.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( 26285 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", 26286 "@wordpress/global-styles-ui" 26287 ); 26288 26289 // packages/global-styles-ui/build-module/utils.mjs 26290 var { getViewportBreakpoints: getViewportBreakpoints2 } = unlock3(privateApis); 26291 var VALID_ELEMENT_STATES = { 26292 link: [ 26293 { value: ":link", label: (0, import_i18n8.__)("Link") }, 26294 { value: ":any-link", label: (0, import_i18n8.__)("Any Link") }, 26295 { value: ":visited", label: (0, import_i18n8.__)("Visited") }, 26296 { value: ":hover", label: (0, import_i18n8.__)("Hover") }, 26297 { value: ":focus", label: (0, import_i18n8.__)("Focus") }, 26298 { value: ":focus-visible", label: (0, import_i18n8.__)("Focus-visible") }, 26299 { value: ":active", label: (0, import_i18n8.__)("Active") } 26300 ], 26301 button: [ 26302 { value: ":link", label: (0, import_i18n8.__)("Link") }, 26303 { value: ":any-link", label: (0, import_i18n8.__)("Any Link") }, 26304 { value: ":visited", label: (0, import_i18n8.__)("Visited") }, 26305 { value: ":hover", label: (0, import_i18n8.__)("Hover") }, 26306 { value: ":focus", label: (0, import_i18n8.__)("Focus") }, 26307 { value: ":focus-visible", label: (0, import_i18n8.__)("Focus-visible") }, 26308 { value: ":active", label: (0, import_i18n8.__)("Active") } 26309 ] 26310 }; 26311 var VALID_BLOCK_STATES = { 26312 "core/button": [ 26313 { value: ":hover", label: (0, import_i18n8.__)("Hover") }, 26314 { value: ":focus", label: (0, import_i18n8.__)("Focus") }, 26315 { value: ":focus-visible", label: (0, import_i18n8.__)("Focus-visible") }, 26316 { value: ":active", label: (0, import_i18n8.__)("Active") } 26317 ], 26318 "core/navigation-link": [ 26319 { value: ":hover", label: (0, import_i18n8.__)("Hover") }, 26320 { value: ":focus", label: (0, import_i18n8.__)("Focus") }, 26321 { value: ":focus-visible", label: (0, import_i18n8.__)("Focus-visible") }, 26322 { value: ":active", label: (0, import_i18n8.__)("Active") } 26323 ] 26324 }; 26325 var RESPONSIVE_STATES = [ 26326 { value: "@tablet", label: (0, import_i18n8.__)("Tablet") }, 26327 { value: "@mobile", label: (0, import_i18n8.__)("Mobile") } 26328 ]; 26329 function removePropertiesFromObject(object, properties) { 26330 if (!properties?.length) { 26331 return object; 26332 } 26333 if (typeof object !== "object" || !object || !Object.keys(object).length) { 26334 return object; 26335 } 26336 for (const key in object) { 26337 if (properties.includes(key)) { 26338 delete object[key]; 26339 } else if (typeof object[key] === "object") { 26340 removePropertiesFromObject(object[key], properties); 26341 } 26342 } 26343 return object; 26344 } 26345 var filterObjectByProperties = (object, properties) => { 26346 if (!object || !properties?.length) { 26347 return {}; 26348 } 26349 const newObject = {}; 26350 Object.keys(object).forEach((key) => { 26351 if (properties.includes(key)) { 26352 newObject[key] = object[key]; 26353 } else if (typeof object[key] === "object") { 26354 const newFilter = filterObjectByProperties( 26355 object[key], 26356 properties 26357 ); 26358 if (Object.keys(newFilter).length) { 26359 newObject[key] = newFilter; 26360 } 26361 } 26362 }); 26363 return newObject; 26364 }; 26365 function isVariationWithProperties(variation, properties) { 26366 const variationWithProperties = filterObjectByProperties( 26367 structuredClone(variation), 26368 properties 26369 ); 26370 return areGlobalStylesEqual(variationWithProperties, variation); 26371 } 26372 function getFontFamilyFromSetting(fontFamilies, setting) { 26373 if (!Array.isArray(fontFamilies) || !setting) { 26374 return null; 26375 } 26376 const fontFamilyVariable = setting.replace("var(", "").replace(")", ""); 26377 const fontFamilySlug = fontFamilyVariable?.split("--").slice(-1)[0]; 26378 return fontFamilies.find( 26379 (fontFamily) => fontFamily.slug === fontFamilySlug 26380 ); 26381 } 26382 function getFontFamilies(themeJson) { 26383 const themeFontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; 26384 const customFontFamilies = themeJson?.settings?.typography?.fontFamilies?.custom; 26385 let fontFamilies = []; 26386 if (themeFontFamilies && customFontFamilies) { 26387 fontFamilies = [...themeFontFamilies, ...customFontFamilies]; 26388 } else if (themeFontFamilies) { 26389 fontFamilies = themeFontFamilies; 26390 } else if (customFontFamilies) { 26391 fontFamilies = customFontFamilies; 26392 } 26393 const bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily; 26394 const bodyFontFamily = getFontFamilyFromSetting( 26395 fontFamilies, 26396 bodyFontFamilySetting 26397 ); 26398 const headingFontFamilySetting = themeJson?.styles?.elements?.heading?.typography?.fontFamily; 26399 let headingFontFamily; 26400 if (!headingFontFamilySetting) { 26401 headingFontFamily = bodyFontFamily; 26402 } else { 26403 headingFontFamily = getFontFamilyFromSetting( 26404 fontFamilies, 26405 themeJson?.styles?.elements?.heading?.typography?.fontFamily 26406 ); 26407 } 26408 return [bodyFontFamily, headingFontFamily]; 26409 } 26410 26411 // packages/global-styles-ui/build-module/hooks.mjs 26412 function useStyle(path, blockName, readFrom = "merged", shouldDecodeEncode = true, state) { 26413 const { user, base, merged, onChange } = (0, import_element66.useContext)(GlobalStylesContext); 26414 const statePathParts = state?.split(".").filter(Boolean) ?? []; 26415 const pseudoSelectorState = statePathParts.find( 26416 (value) => value.startsWith(":") 26417 ); 26418 const statePathWithoutPseudo = statePathParts.filter((value) => !value.startsWith(":")).join("."); 26419 const stylePath = [path, statePathWithoutPseudo].filter(Boolean).join("."); 26420 let sourceValue = merged; 26421 if (readFrom === "base") { 26422 sourceValue = base; 26423 } else if (readFrom === "user") { 26424 sourceValue = user; 26425 } 26426 const styleValue = (0, import_element66.useMemo)(() => { 26427 const rawValue = getStyle( 26428 sourceValue, 26429 stylePath, 26430 blockName, 26431 shouldDecodeEncode 26432 ); 26433 if (pseudoSelectorState) { 26434 return rawValue?.[pseudoSelectorState] ?? {}; 26435 } 26436 return rawValue; 26437 }, [ 26438 sourceValue, 26439 stylePath, 26440 blockName, 26441 shouldDecodeEncode, 26442 pseudoSelectorState 26443 ]); 26444 const setStyleValue = (0, import_element66.useCallback)( 26445 (newValue) => { 26446 let valueToSet = newValue; 26447 if (pseudoSelectorState) { 26448 const fullCurrentValue = getStyle( 26449 user, 26450 stylePath, 26451 blockName, 26452 false 26453 ); 26454 valueToSet = { 26455 ...fullCurrentValue, 26456 [pseudoSelectorState]: newValue 26457 }; 26458 } 26459 const newGlobalStyles = setStyle( 26460 user, 26461 stylePath, 26462 valueToSet, 26463 blockName 26464 ); 26465 onChange(newGlobalStyles); 26466 }, 26467 [user, onChange, stylePath, blockName, pseudoSelectorState] 26468 ); 26469 return [styleValue, setStyleValue]; 26470 } 26471 function useSetting(path, blockName, readFrom = "merged") { 26472 const { user, base, merged, onChange } = (0, import_element66.useContext)(GlobalStylesContext); 26473 let sourceValue = merged; 26474 if (readFrom === "base") { 26475 sourceValue = base; 26476 } else if (readFrom === "user") { 26477 sourceValue = user; 26478 } 26479 const settingValue = (0, import_element66.useMemo)( 26480 () => getSetting(sourceValue, path, blockName), 26481 [sourceValue, path, blockName] 26482 ); 26483 const setSettingValue = (0, import_element66.useCallback)( 26484 (newValue) => { 26485 const newGlobalStyles = setSetting( 26486 user, 26487 path, 26488 newValue, 26489 blockName 26490 ); 26491 onChange(newGlobalStyles); 26492 }, 26493 [user, onChange, path, blockName] 26494 ); 26495 return [settingValue, setSettingValue]; 26496 } 26497 var EMPTY_ARRAY2 = []; 26498 function hasThemeVariation({ 26499 title, 26500 settings, 26501 styles 26502 }) { 26503 return title === (0, import_i18n9.__)("Default") || Object.keys(settings || {}).length > 0 || Object.keys(styles || {}).length > 0; 26504 } 26505 function useCurrentMergeThemeStyleVariationsWithUserConfig(properties = []) { 26506 const { variationsFromTheme } = (0, import_data.useSelect)((select) => { 26507 const _variationsFromTheme = select( 26508 import_core_data.store 26509 ).__experimentalGetCurrentThemeGlobalStylesVariations?.(); 26510 return { 26511 variationsFromTheme: _variationsFromTheme || EMPTY_ARRAY2 26512 }; 26513 }, []); 26514 const { user: userVariation } = (0, import_element66.useContext)(GlobalStylesContext); 26515 return (0, import_element66.useMemo)(() => { 26516 const clonedUserVariation = structuredClone(userVariation); 26517 const userVariationWithoutProperties = removePropertiesFromObject( 26518 clonedUserVariation, 26519 properties 26520 ); 26521 userVariationWithoutProperties.title = (0, import_i18n9.__)("Default"); 26522 const variationsWithPropertiesAndBase = variationsFromTheme.filter((variation) => { 26523 return isVariationWithProperties(variation, properties); 26524 }).map((variation) => { 26525 return mergeGlobalStyles( 26526 userVariationWithoutProperties, 26527 variation 26528 ); 26529 }); 26530 const variationsByProperties = [ 26531 userVariationWithoutProperties, 26532 ...variationsWithPropertiesAndBase 26533 ]; 26534 return variationsByProperties?.length ? variationsByProperties.filter(hasThemeVariation) : []; 26535 }, [properties, userVariation, variationsFromTheme]); 26536 } 26537 26538 // packages/global-styles-ui/build-module/root-menu.mjs 26539 var import_jsx_runtime126 = __toESM(require_jsx_runtime(), 1); 26540 var { 26541 useHasDimensionsPanel, 26542 useHasTypographyPanel, 26543 useHasColorPanel, 26544 useSettingsForBlockElement, 26545 useHasBackgroundPanel 26546 } = unlock3(import_block_editor.privateApis); 26547 26548 // packages/global-styles-ui/build-module/preview-styles.mjs 26549 var import_components7 = __toESM(require_components(), 1); 26550 26551 // packages/global-styles-ui/build-module/preview-hooks.mjs 26552 function useStylesPreviewColors() { 26553 const [textColor = "black"] = useStyle("color.text"); 26554 const [backgroundColor = "white"] = useStyle("color.background"); 26555 const [headingColor = textColor] = useStyle( 26556 "elements.h1.color.text" 26557 ); 26558 const [linkColor = headingColor] = useStyle( 26559 "elements.link.color.text" 26560 ); 26561 const [buttonBackgroundColor = linkColor] = useStyle( 26562 "elements.button.color.background" 26563 ); 26564 const [coreColors] = useSetting("color.palette.core") || []; 26565 const [themeColors] = useSetting("color.palette.theme") || []; 26566 const [customColors] = useSetting("color.palette.custom") || []; 26567 const paletteColors = (themeColors ?? []).concat(customColors ?? []).concat(coreColors ?? []); 26568 const textColorObject = paletteColors.filter( 26569 ({ color }) => color === textColor 26570 ); 26571 const buttonBackgroundColorObject = paletteColors.filter( 26572 ({ color }) => color === buttonBackgroundColor 26573 ); 26574 const highlightedColors = textColorObject.concat(buttonBackgroundColorObject).concat(paletteColors).filter( 26575 // we exclude these background color because it is already visible in the preview. 26576 ({ color }) => color !== backgroundColor 26577 ).slice(0, 2); 26578 return { 26579 paletteColors, 26580 highlightedColors 26581 }; 26582 } 26583 26584 // packages/global-styles-ui/build-module/typography-example.mjs 26585 var import_element67 = __toESM(require_element(), 1); 26586 var import_components4 = __toESM(require_components(), 1); 26587 var import_i18n11 = __toESM(require_i18n(), 1); 26588 26589 // packages/global-styles-ui/build-module/font-library/utils/preview-styles.mjs 26590 function findNearest(input, numbers) { 26591 if (numbers.length === 0) { 26592 return null; 26593 } 26594 numbers.sort((a, b) => Math.abs(input - a) - Math.abs(input - b)); 26595 return numbers[0]; 26596 } 26597 var FONT_WEIGHT_KEYWORDS = { 26598 normal: 400, 26599 bold: 700 26600 }; 26601 function isValidWeight(weight) { 26602 return weight !== void 0 && Number.isFinite(weight) && weight >= 1 && weight <= 1e3; 26603 } 26604 function resolveFontWeight(fontWeight) { 26605 const weights = String(fontWeight ?? "").trim().toLowerCase().split(/\s+/).filter(Boolean).map((value) => FONT_WEIGHT_KEYWORDS[value] ?? Number(value)); 26606 const [start, end] = weights; 26607 if (!isValidWeight(start)) { 26608 return "400"; 26609 } 26610 if (weights.length !== 2 || !isValidWeight(end)) { 26611 return String(start); 26612 } 26613 return String(Math.min(Math.max(400, start), end)); 26614 } 26615 function formatFontFamily(input) { 26616 const regex = /^(?!generic\([ a-zA-Z\-]+\)$)(?!var\(\s*--[\w-]+\s*\)$)(?!^[a-zA-Z\-]+$).+/; 26617 const output = input.trim(); 26618 const formatItem = (item) => { 26619 item = item.trim(); 26620 if (item.match(regex)) { 26621 item = item.replace(/^["']|["']$/g, ""); 26622 return `"$item}"`; 26623 } 26624 return item; 26625 }; 26626 if (output.includes(",")) { 26627 return output.split(",").map(formatItem).filter((item) => item !== "").join(", "); 26628 } 26629 return formatItem(output); 26630 } 26631 function formatFontFaceName(input) { 26632 if (!input) { 26633 return ""; 26634 } 26635 let output = input.trim(); 26636 if (output.includes(",")) { 26637 output = (output.split(",").find((item) => item.trim() !== "") ?? "").trim(); 26638 } 26639 output = output.replace(/^["']|["']$/g, ""); 26640 if (window.navigator.userAgent.toLowerCase().includes("firefox")) { 26641 output = `"$output}"`; 26642 } 26643 return output; 26644 } 26645 function getFamilyPreviewStyle(family) { 26646 const style = { 26647 fontFamily: formatFontFamily(family.fontFamily) 26648 }; 26649 if (!("fontFace" in family) || !Array.isArray(family.fontFace)) { 26650 style.fontWeight = "400"; 26651 style.fontStyle = "normal"; 26652 return style; 26653 } 26654 if (family.fontFace) { 26655 const normalFaces = family.fontFace.filter( 26656 (face) => face?.fontStyle && face.fontStyle.toLowerCase() === "normal" 26657 ); 26658 if (normalFaces.length > 0) { 26659 style.fontStyle = "normal"; 26660 const normalWeights = normalFaces.map( 26661 (face) => Number(resolveFontWeight(face.fontWeight)) 26662 ); 26663 style.fontWeight = String( 26664 findNearest(400, normalWeights) ?? 400 26665 ); 26666 } else { 26667 style.fontStyle = family.fontFace.length && family.fontFace[0].fontStyle || "normal"; 26668 style.fontWeight = family.fontFace.length && resolveFontWeight(family.fontFace[0].fontWeight) || "400"; 26669 } 26670 } 26671 return style; 26672 } 26673 function getFacePreviewStyle(face) { 26674 return { 26675 fontFamily: formatFontFamily(face.fontFamily), 26676 fontStyle: face.fontStyle || "normal", 26677 fontWeight: resolveFontWeight(face.fontWeight) 26678 }; 26679 } 26680 26681 // packages/global-styles-ui/build-module/typography-example.mjs 26682 var import_jsx_runtime127 = __toESM(require_jsx_runtime(), 1); 26683 function PreviewTypography({ 26684 fontSize, 26685 variation 26686 }) { 26687 const { base } = (0, import_element67.useContext)(GlobalStylesContext); 26688 let config = base; 26689 if (variation) { 26690 config = { ...base, ...variation }; 26691 } 26692 const [textColor] = useStyle("color.text"); 26693 const [bodyFontFamilies, headingFontFamilies] = getFontFamilies(config); 26694 const bodyPreviewStyle = bodyFontFamilies ? getFamilyPreviewStyle(bodyFontFamilies) : {}; 26695 const headingPreviewStyle = headingFontFamilies ? getFamilyPreviewStyle(headingFontFamilies) : {}; 26696 if (textColor) { 26697 bodyPreviewStyle.color = textColor; 26698 headingPreviewStyle.color = textColor; 26699 } 26700 if (fontSize) { 26701 bodyPreviewStyle.fontSize = fontSize; 26702 headingPreviewStyle.fontSize = fontSize; 26703 } 26704 return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)( 26705 import_components4.__unstableMotion.div, 26706 { 26707 animate: { 26708 scale: 1, 26709 opacity: 1 26710 }, 26711 initial: { 26712 scale: 0.1, 26713 opacity: 0 26714 }, 26715 transition: { 26716 delay: 0.3, 26717 type: "tween" 26718 }, 26719 style: { 26720 textAlign: "center", 26721 lineHeight: 1 26722 }, 26723 children: [ 26724 /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { style: headingPreviewStyle, children: (0, import_i18n11._x)("A", "Uppercase letter A") }), 26725 /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { style: bodyPreviewStyle, children: (0, import_i18n11._x)("a", "Lowercase letter A") }) 26726 ] 26727 } 26728 ); 26729 } 26730 26731 // packages/global-styles-ui/build-module/highlighted-colors.mjs 26732 var import_components5 = __toESM(require_components(), 1); 26733 var import_jsx_runtime128 = __toESM(require_jsx_runtime(), 1); 26734 function HighlightedColors({ 26735 normalizedColorSwatchSize, 26736 ratio 26737 }) { 26738 const { highlightedColors } = useStylesPreviewColors(); 26739 const scaledSwatchSize = normalizedColorSwatchSize * ratio; 26740 return highlightedColors.map(({ slug, color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)( 26741 import_components5.__unstableMotion.div, 26742 { 26743 style: { 26744 height: scaledSwatchSize, 26745 width: scaledSwatchSize, 26746 background: color, 26747 borderRadius: scaledSwatchSize / 2 26748 }, 26749 animate: { 26750 scale: 1, 26751 opacity: 1 26752 }, 26753 initial: { 26754 scale: 0.1, 26755 opacity: 0 26756 }, 26757 transition: { 26758 delay: index2 === 1 ? 0.2 : 0.1 26759 } 26760 }, 26761 `$slug}-$index2}` 26762 )); 26763 } 26764 26765 // packages/global-styles-ui/build-module/preview-wrapper.mjs 26766 var import_components6 = __toESM(require_components(), 1); 26767 var import_compose3 = __toESM(require_compose(), 1); 26768 var import_element68 = __toESM(require_element(), 1); 26769 var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1); 26770 var normalizedWidth = 248; 26771 var normalizedHeight = 152; 26772 var THROTTLE_OPTIONS = { 26773 leading: true, 26774 trailing: true 26775 }; 26776 function PreviewWrapper({ 26777 children, 26778 label, 26779 isFocused, 26780 withHoverView 26781 }) { 26782 const [backgroundColor = "white"] = useStyle("color.background"); 26783 const [gradientValue] = useStyle("color.gradient"); 26784 const disableMotion = (0, import_compose3.useReducedMotion)(); 26785 const [isHovered, setIsHovered] = (0, import_element68.useState)(false); 26786 const [containerResizeListener, { width }] = (0, import_compose3.useResizeObserver)(); 26787 const [throttledWidth, setThrottledWidthState] = (0, import_element68.useState)(width); 26788 const [ratioState, setRatioState] = (0, import_element68.useState)(); 26789 const setThrottledWidth = (0, import_compose3.useThrottle)( 26790 setThrottledWidthState, 26791 250, 26792 THROTTLE_OPTIONS 26793 ); 26794 (0, import_element68.useLayoutEffect)(() => { 26795 if (width) { 26796 setThrottledWidth(width); 26797 } 26798 }, [width, setThrottledWidth]); 26799 (0, import_element68.useLayoutEffect)(() => { 26800 const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1; 26801 const ratioDiff = newRatio - (ratioState || 0); 26802 const isRatioDiffBigEnough = Math.abs(ratioDiff) > 0.1; 26803 if (isRatioDiffBigEnough || !ratioState) { 26804 setRatioState(newRatio); 26805 } 26806 }, [throttledWidth, ratioState]); 26807 const fallbackRatio = width ? width / normalizedWidth : 1; 26808 const ratio = ratioState ? ratioState : fallbackRatio; 26809 const isReady = !!width; 26810 return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [ 26811 /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { style: { position: "relative" }, children: containerResizeListener }), 26812 !isReady && // Match the preview aspect ratio so layout doesn't jump once width is measured. 26813 /* @__PURE__ */ (0, import_jsx_runtime129.jsx)( 26814 Skeleton, 26815 { 26816 className: "global-styles-ui-preview__wrapper", 26817 style: { 26818 aspectRatio: normalizedWidth / normalizedHeight 26819 } 26820 } 26821 ), 26822 isReady && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)( 26823 "div", 26824 { 26825 className: clsx_default("global-styles-ui-preview__wrapper", { 26826 "is-hoverable": withHoverView 26827 }), 26828 style: { 26829 height: normalizedHeight * ratio 26830 }, 26831 onMouseEnter: () => setIsHovered(true), 26832 onMouseLeave: () => setIsHovered(false), 26833 tabIndex: -1, 26834 children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)( 26835 import_components6.__unstableMotion.div, 26836 { 26837 style: { 26838 height: normalizedHeight * ratio, 26839 width: "100%", 26840 background: gradientValue ?? backgroundColor 26841 }, 26842 initial: "start", 26843 animate: (isHovered || isFocused) && !disableMotion && label ? "hover" : "start", 26844 children: [].concat(children).map( 26845 (child, key) => child({ ratio, key }) 26846 ) 26847 } 26848 ) 26849 } 26850 ) 26851 ] }); 26852 } 26853 var preview_wrapper_default = PreviewWrapper; 26854 26855 // packages/global-styles-ui/build-module/preview-styles.mjs 26856 var import_jsx_runtime130 = __toESM(require_jsx_runtime(), 1); 26857 var firstFrameVariants = { 26858 start: { 26859 scale: 1, 26860 opacity: 1 26861 }, 26862 hover: { 26863 scale: 0, 26864 opacity: 0 26865 } 26866 }; 26867 var midFrameVariants = { 26868 hover: { 26869 opacity: 1 26870 }, 26871 start: { 26872 opacity: 0.5 26873 } 26874 }; 26875 var secondFrameVariants = { 26876 hover: { 26877 scale: 1, 26878 opacity: 1 26879 }, 26880 start: { 26881 scale: 0, 26882 opacity: 0 26883 } 26884 }; 26885 function PreviewStyles({ 26886 label, 26887 isFocused, 26888 withHoverView, 26889 variation 26890 }) { 26891 const [fontWeight] = useStyle("typography.fontWeight"); 26892 const [fontFamily = "serif"] = useStyle( 26893 "typography.fontFamily" 26894 ); 26895 const [headingFontFamily = fontFamily] = useStyle( 26896 "elements.h1.typography.fontFamily" 26897 ); 26898 const [headingFontWeight = fontWeight] = useStyle( 26899 "elements.h1.typography.fontWeight" 26900 ); 26901 const [textColor = "black"] = useStyle("color.text"); 26902 const [headingColor = textColor] = useStyle( 26903 "elements.h1.color.text" 26904 ); 26905 const { paletteColors } = useStylesPreviewColors(); 26906 return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)( 26907 preview_wrapper_default, 26908 { 26909 label, 26910 isFocused, 26911 withHoverView, 26912 children: [ 26913 ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)( 26914 import_components7.__unstableMotion.div, 26915 { 26916 variants: firstFrameVariants, 26917 style: { 26918 height: "100%", 26919 overflow: "hidden" 26920 }, 26921 children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)( 26922 import_components7.__experimentalHStack, 26923 { 26924 spacing: 10 * ratio, 26925 justify: "center", 26926 style: { 26927 height: "100%", 26928 overflow: "hidden" 26929 }, 26930 children: [ 26931 /* @__PURE__ */ (0, import_jsx_runtime130.jsx)( 26932 PreviewTypography, 26933 { 26934 fontSize: 65 * ratio, 26935 variation 26936 } 26937 ), 26938 /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_components7.__experimentalVStack, { spacing: 4 * ratio, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)( 26939 HighlightedColors, 26940 { 26941 normalizedColorSwatchSize: 32, 26942 ratio 26943 } 26944 ) }) 26945 ] 26946 } 26947 ) 26948 }, 26949 key 26950 ), 26951 ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)( 26952 import_components7.__unstableMotion.div, 26953 { 26954 variants: withHoverView ? midFrameVariants : void 0, 26955 style: { 26956 height: "100%", 26957 width: "100%", 26958 position: "absolute", 26959 top: 0, 26960 overflow: "hidden", 26961 filter: "blur(60px)", 26962 opacity: 0.1 26963 }, 26964 children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)( 26965 import_components7.__experimentalHStack, 26966 { 26967 spacing: 0, 26968 justify: "flex-start", 26969 style: { 26970 height: "100%", 26971 overflow: "hidden" 26972 }, 26973 children: paletteColors.slice(0, 4).map(({ color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)( 26974 "div", 26975 { 26976 style: { 26977 height: "100%", 26978 background: color, 26979 flexGrow: 1 26980 } 26981 }, 26982 index2 26983 )) 26984 } 26985 ) 26986 }, 26987 key 26988 ), 26989 ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime130.jsx)( 26990 import_components7.__unstableMotion.div, 26991 { 26992 variants: secondFrameVariants, 26993 style: { 26994 height: "100%", 26995 width: "100%", 26996 overflow: "hidden", 26997 position: "absolute", 26998 top: 0 26999 }, 27000 children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)( 27001 import_components7.__experimentalVStack, 27002 { 27003 spacing: 3 * ratio, 27004 justify: "center", 27005 style: { 27006 height: "100%", 27007 overflow: "hidden", 27008 padding: 10 * ratio, 27009 boxSizing: "border-box" 27010 }, 27011 children: label && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)( 27012 "div", 27013 { 27014 style: { 27015 fontSize: 40 * ratio, 27016 fontFamily: headingFontFamily, 27017 color: headingColor, 27018 fontWeight: headingFontWeight, 27019 lineHeight: "1em", 27020 textAlign: "center" 27021 }, 27022 children: label 27023 } 27024 ) 27025 } 27026 ) 27027 }, 27028 key 27029 ) 27030 ] 27031 } 27032 ); 27033 } 27034 var preview_styles_default = PreviewStyles; 27035 27036 // packages/global-styles-ui/build-module/screen-root.mjs 27037 var import_jsx_runtime131 = __toESM(require_jsx_runtime(), 1); 27038 27039 // packages/global-styles-ui/build-module/screen-block-list.mjs 27040 var import_blocks5 = __toESM(require_blocks(), 1); 27041 var import_i18n17 = __toESM(require_i18n(), 1); 27042 var import_components15 = __toESM(require_components(), 1); 27043 var import_data5 = __toESM(require_data(), 1); 27044 var import_element73 = __toESM(require_element(), 1); 27045 var import_block_editor7 = __toESM(require_block_editor(), 1); 27046 var import_compose4 = __toESM(require_compose(), 1); 27047 import { speak } from "@wordpress/a11y"; 27048 27049 // packages/global-styles-ui/build-module/variations/variations-panel.mjs 27050 var import_blocks = __toESM(require_blocks(), 1); 27051 var import_data3 = __toESM(require_data(), 1); 27052 var import_components9 = __toESM(require_components(), 1); 27053 var import_jsx_runtime132 = __toESM(require_jsx_runtime(), 1); 27054 function getFilteredBlockStyles(blockStyles, variations) { 27055 return blockStyles?.filter( 27056 (style) => style.source === "block" || variations.includes(style.name) 27057 ) || []; 27058 } 27059 function useBlockVariations(name2) { 27060 const blockStyles = (0, import_data3.useSelect)( 27061 (select) => { 27062 const { getBlockStyles } = select(import_blocks.store); 27063 return getBlockStyles(name2); 27064 }, 27065 [name2] 27066 ); 27067 const [variations] = useStyle("variations", name2); 27068 const variationNames = Object.keys(variations ?? {}); 27069 return getFilteredBlockStyles(blockStyles, variationNames); 27070 } 27071 27072 // packages/global-styles-ui/build-module/screen-header.mjs 27073 var import_components10 = __toESM(require_components(), 1); 27074 var import_i18n13 = __toESM(require_i18n(), 1); 27075 var import_block_editor2 = __toESM(require_block_editor(), 1); 27076 var import_jsx_runtime133 = __toESM(require_jsx_runtime(), 1); 27077 var { StateControl, StateControlBadges } = unlock3(import_block_editor2.privateApis); 27078 27079 // packages/global-styles-ui/build-module/screen-element.mjs 27080 var import_i18n16 = __toESM(require_i18n(), 1); 27081 var import_element72 = __toESM(require_element(), 1); 27082 var import_components14 = __toESM(require_components(), 1); 27083 var import_block_editor6 = __toESM(require_block_editor(), 1); 27084 27085 // packages/global-styles-ui/build-module/element-preview.mjs 27086 var import_i18n14 = __toESM(require_i18n(), 1); 27087 var import_element69 = __toESM(require_element(), 1); 27088 var import_data4 = __toESM(require_data(), 1); 27089 var import_blocks2 = __toESM(require_blocks(), 1); 27090 var import_block_editor3 = __toESM(require_block_editor(), 1); 27091 var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1); 27092 27093 // packages/global-styles-ui/build-module/screen-block.mjs 27094 var import_blocks4 = __toESM(require_blocks(), 1); 27095 var import_block_editor5 = __toESM(require_block_editor(), 1); 27096 var import_element71 = __toESM(require_element(), 1); 27097 var import_components13 = __toESM(require_components(), 1); 27098 var import_i18n15 = __toESM(require_i18n(), 1); 27099 27100 // packages/global-styles-ui/build-module/block-preview-panel.mjs 27101 var import_block_editor4 = __toESM(require_block_editor(), 1); 27102 var import_blocks3 = __toESM(require_blocks(), 1); 27103 var import_components11 = __toESM(require_components(), 1); 27104 var import_element70 = __toESM(require_element(), 1); 27105 var import_jsx_runtime135 = __toESM(require_jsx_runtime(), 1); 27106 var { getViewportBreakpoints: getViewportBreakpoints3, getViewportBreakpointValueInPixels: getViewportBreakpointValueInPixels2 } = unlock3( 27107 privateApis 27108 ); 27109 27110 // packages/global-styles-ui/build-module/subtitle.mjs 27111 var import_components12 = __toESM(require_components(), 1); 27112 var import_jsx_runtime136 = __toESM(require_jsx_runtime(), 1); 27113 function Subtitle({ children, level = 2 }) { 27114 return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_components12.__experimentalHeading, { className: "global-styles-ui-subtitle", level, children }); 27115 } 27116 27117 // packages/global-styles-ui/build-module/screen-block.mjs 27118 var import_jsx_runtime137 = __toESM(require_jsx_runtime(), 1); 27119 var { 27120 useHasDimensionsPanel: useHasDimensionsPanel2, 27121 useHasTypographyPanel: useHasTypographyPanel2, 27122 useHasBorderPanel, 27123 useSettingsForBlockElement: useSettingsForBlockElement2, 27124 useHasColorPanel: useHasColorPanel2, 27125 useHasFiltersPanel, 27126 useHasImageSettingsPanel, 27127 useHasBackgroundPanel: useHasBackgroundPanel2, 27128 BackgroundPanel: StylesBackgroundPanel, 27129 BorderPanel: StylesBorderPanel, 27130 ColorPanel: StylesColorPanel, 27131 TypographyPanel: StylesTypographyPanel, 27132 DimensionsPanel: StylesDimensionsPanel, 27133 FiltersPanel: StylesFiltersPanel, 27134 ImageSettingsPanel, 27135 AdvancedPanel: StylesAdvancedPanel 27136 } = unlock3(import_block_editor5.privateApis); 27137 27138 // packages/global-styles-ui/build-module/screen-element.mjs 27139 var import_jsx_runtime138 = __toESM(require_jsx_runtime(), 1); 27140 var { 27141 useSettingsForBlockElement: useSettingsForBlockElement3, 27142 useHasBackgroundPanel: useHasBackgroundPanel3, 27143 useHasBorderPanel: useHasBorderPanel2, 27144 useHasDimensionsPanel: useHasDimensionsPanel3, 27145 useHasTypographyPanel: useHasTypographyPanel3, 27146 BackgroundPanel: StylesBackgroundPanel2, 27147 BorderPanel: StylesBorderPanel2, 27148 DimensionsPanel: StylesDimensionsPanel2, 27149 TypographyPanel: StylesTypographyPanel2, 27150 AdvancedPanel: StylesAdvancedPanel2 27151 } = unlock3(import_block_editor6.privateApis); 27152 var ELEMENTS = { 27153 text: { 27154 description: (0, import_i18n16.__)("Manage the fonts used on the site."), 27155 title: (0, import_i18n16.__)("Text") 27156 }, 27157 link: { 27158 description: (0, import_i18n16.__)("Manage the appearance of links."), 27159 title: (0, import_i18n16.__)("Link") 27160 }, 27161 caption: { 27162 description: (0, import_i18n16.__)("Manage the appearance of captions."), 27163 title: (0, import_i18n16.__)("Caption") 27164 }, 27165 cite: { 27166 description: (0, import_i18n16.__)("Manage the appearance of citations."), 27167 title: (0, import_i18n16.__)("Citation") 27168 }, 27169 heading: { 27170 description: (0, import_i18n16.__)("Manage the appearance of all headings."), 27171 title: (0, import_i18n16.__)("All headings") 27172 }, 27173 h1: { 27174 description: (0, import_i18n16.__)("Manage the appearance of level 1 headings."), 27175 title: (0, import_i18n16.__)("Heading 1") 27176 }, 27177 h2: { 27178 description: (0, import_i18n16.__)("Manage the appearance of level 2 headings."), 27179 title: (0, import_i18n16.__)("Heading 2") 27180 }, 27181 h3: { 27182 description: (0, import_i18n16.__)("Manage the appearance of level 3 headings."), 27183 title: (0, import_i18n16.__)("Heading 3") 27184 }, 27185 h4: { 27186 description: (0, import_i18n16.__)("Manage the appearance of level 4 headings."), 27187 title: (0, import_i18n16.__)("Heading 4") 27188 }, 27189 h5: { 27190 description: (0, import_i18n16.__)("Manage the appearance of level 5 headings."), 27191 title: (0, import_i18n16.__)("Heading 5") 27192 }, 27193 h6: { 27194 description: (0, import_i18n16.__)("Manage the appearance of level 6 headings."), 27195 title: (0, import_i18n16.__)("Heading 6") 27196 }, 27197 textInput: { 27198 description: (0, import_i18n16.__)("Manage the appearance of inputs."), 27199 title: (0, import_i18n16.__)("Form input") 27200 }, 27201 select: { 27202 description: (0, import_i18n16.__)("Manage the appearance of selects."), 27203 title: (0, import_i18n16.__)("Form select") 27204 }, 27205 button: { 27206 description: (0, import_i18n16.__)("Manage the appearance of buttons."), 27207 title: (0, import_i18n16.__)("Form button") 27208 } 27209 }; 27210 27211 // packages/global-styles-ui/build-module/screen-block-list.mjs 27212 var import_jsx_runtime139 = __toESM(require_jsx_runtime(), 1); 27213 var { 27214 useHasDimensionsPanel: useHasDimensionsPanel4, 27215 useHasTypographyPanel: useHasTypographyPanel4, 27216 useHasBorderPanel: useHasBorderPanel3, 27217 useSettingsForBlockElement: useSettingsForBlockElement4, 27218 useHasColorPanel: useHasColorPanel3, 27219 useHasBackgroundPanel: useHasBackgroundPanel4, 27220 searchItems 27221 } = unlock3(import_block_editor7.privateApis); 27222 var ELEMENT_GROUPS = [ 27223 { 27224 title: (0, import_i18n17.__)("Elements"), 27225 elements: ["link", "caption", "cite"] 27226 }, 27227 { 27228 title: (0, import_i18n17.__)("Headings"), 27229 // `heading` styles every level at once; each level can then override 27230 // it. Themes set most of their heading styles here. 27231 elements: ["heading", "h1", "h2", "h3", "h4", "h5", "h6"] 27232 }, 27233 { 27234 title: (0, import_i18n17.__)("Form controls"), 27235 elements: ["textInput", "select", "button"] 27236 } 27237 ]; 27238 var ELEMENT_ICONS = { 27239 link: link_default, 27240 caption: caption_default, 27241 cite: caption_default, 27242 heading: heading_default, 27243 h1: heading_level_1_default, 27244 h2: heading_level_2_default, 27245 h3: heading_level_3_default, 27246 h4: heading_level_4_default, 27247 h5: heading_level_5_default, 27248 h6: heading_level_6_default, 27249 textInput: form_input_default, 27250 select: form_select_default, 27251 button: button_default 27252 }; 27253 function hasAnyValue(value) { 27254 if (value === void 0 || value === null) { 27255 return false; 27256 } 27257 if (Array.isArray(value)) { 27258 return value.length > 0; 27259 } 27260 if (typeof value === "object") { 27261 return Object.values(value).some(hasAnyValue); 27262 } 27263 return true; 27264 } 27265 function hasUserStylesForBlock(user, blockName) { 27266 return hasAnyValue(user?.styles?.blocks?.[blockName]) || hasAnyValue(user?.settings?.blocks?.[blockName]); 27267 } 27268 function useSortedBlockTypes() { 27269 const blockItems = (0, import_data5.useSelect)( 27270 (select) => select(import_blocks5.store).getBlockTypes(), 27271 [] 27272 ); 27273 const groupByType = (blocks, block) => { 27274 const { core, noncore } = blocks; 27275 const type = block.name.startsWith("core/") ? core : noncore; 27276 type.push(block); 27277 return blocks; 27278 }; 27279 const { core: coreItems, noncore: nonCoreItems } = blockItems.reduce( 27280 groupByType, 27281 { core: [], noncore: [] } 27282 ); 27283 return [...coreItems, ...nonCoreItems]; 27284 } 27285 function useBlockHasGlobalStyles(blockName) { 27286 const [rawSettings] = useSetting("", blockName); 27287 const settings = useSettingsForBlockElement4(rawSettings, blockName); 27288 const hasTypographyPanel = useHasTypographyPanel4(settings); 27289 const hasColorPanel = useHasColorPanel3(settings); 27290 const hasBackgroundPanel = useHasBackgroundPanel4(settings); 27291 const hasBorderPanel = useHasBorderPanel3(settings); 27292 const hasDimensionsPanel = useHasDimensionsPanel4(settings); 27293 const hasLayoutPanel = hasBorderPanel || hasDimensionsPanel; 27294 const hasVariationsPanel = !!useBlockVariations(blockName)?.length; 27295 const hasGlobalStyles = hasTypographyPanel || hasColorPanel || hasBackgroundPanel || hasLayoutPanel || hasVariationsPanel; 27296 return hasGlobalStyles; 27297 } 27298 function ListMenuItem({ path, icon, title }) { 27299 return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(NavigationButtonAsItem, { path, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(Stack, { direction: "row", align: "center", gap: "sm", children: [ 27300 /* @__PURE__ */ (0, import_jsx_runtime139.jsx)( 27301 import_block_editor7.BlockIcon, 27302 { 27303 className: "global-styles-ui-block-types-item__icon", 27304 icon 27305 } 27306 ), 27307 /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { children: title }) 27308 ] }) }); 27309 } 27310 function BlockMenuItem({ block }) { 27311 const hasBlockMenuItem = useBlockHasGlobalStyles(block.name); 27312 if (!hasBlockMenuItem) { 27313 return null; 27314 } 27315 return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)( 27316 ListMenuItem, 27317 { 27318 path: "/blocks/" + encodeURIComponent(block.name), 27319 icon: block.icon, 27320 title: block.title 27321 } 27322 ); 27323 } 27324 function ElementMenuItem({ element }) { 27325 return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)( 27326 ListMenuItem, 27327 { 27328 path: "/blocks/elements/" + element, 27329 icon: ELEMENT_ICONS[element], 27330 title: ELEMENTS[element].title 27331 } 27332 ); 27333 } 27334 function ListGroup({ title, children }) { 27335 return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "global-styles-ui-block-types-group", children: [ 27336 /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "global-styles-ui-block-types-group__title", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Subtitle, { level: 3, children: title }) }), 27337 children 27338 ] }); 27339 } 27340 function EmptyList({ 27341 filterValue, 27342 styleFilter 27343 }) { 27344 const label = "customized" === styleFilter && !filterValue ? (0, import_i18n17.__)("You haven't customized any blocks or elements yet.") : (0, import_i18n17.__)("No results found."); 27345 return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)( 27346 import_components15.__experimentalText, 27347 { 27348 align: "center", 27349 as: "p", 27350 className: "global-styles-ui-block-types-item-list__no-results", 27351 children: label 27352 } 27353 ); 27354 } 27355 function getFilteredElementGroups(filterValue, styleFilter, customizedElementNames) { 27356 const search = filterValue.trim().toLowerCase(); 27357 return ELEMENT_GROUPS.map((group) => ({ 27358 ...group, 27359 elements: group.elements.filter( 27360 (element) => ( 27361 // The element's name and group title match too, so "h1" finds 27362 // Heading 1 and "form" lists the form controls. 27363 (!search || [ELEMENTS[element].title, element, group.title].join(" ").toLowerCase().includes(search)) && (styleFilter !== "customized" || customizedElementNames.has(element)) 27364 ) 27365 ) 27366 })).filter((group) => group.elements.length > 0); 27367 } 27368 function BlockAndElementList({ filterValue, styleFilter }) { 27369 const sortedBlockTypes = useSortedBlockTypes(); 27370 const debouncedSpeak = (0, import_compose4.useDebounce)(speak, 500); 27371 const { user } = (0, import_element73.useContext)(GlobalStylesContext); 27372 const customizedBlockNames = (0, import_element73.useMemo)(() => { 27373 const names = /* @__PURE__ */ new Set(); 27374 const blockNames = [ 27375 ...Object.keys(user?.styles?.blocks ?? {}), 27376 ...Object.keys(user?.settings?.blocks ?? {}) 27377 ]; 27378 blockNames.forEach((blockName) => { 27379 if (hasUserStylesForBlock(user, blockName)) { 27380 names.add(blockName); 27381 } 27382 }); 27383 return names; 27384 }, [user]); 27385 const customizedElementNames = (0, import_element73.useMemo)(() => { 27386 const names = /* @__PURE__ */ new Set(); 27387 Object.entries(user?.styles?.elements ?? {}).forEach( 27388 ([name2, styles]) => { 27389 if (hasAnyValue(styles)) { 27390 names.add(name2); 27391 } 27392 } 27393 ); 27394 return names; 27395 }, [user]); 27396 const filteredElementGroups = getFilteredElementGroups( 27397 filterValue, 27398 styleFilter, 27399 customizedElementNames 27400 ); 27401 const searchedBlockTypes = searchItems( 27402 sortedBlockTypes, 27403 filterValue 27404 ); 27405 const filteredBlockTypes = styleFilter === "customized" ? searchedBlockTypes.filter( 27406 (blockType) => customizedBlockNames.has(blockType.name) 27407 ) : searchedBlockTypes; 27408 const blockTypesListRef = (0, import_element73.useRef)(null); 27409 const elementCount = filteredElementGroups.reduce( 27410 (total, group) => total + group.elements.length, 27411 0 27412 ); 27413 const hasBlockResults = filteredBlockTypes.length > 0; 27414 (0, import_element73.useEffect)(() => { 27415 if (!filterValue && styleFilter === "all") { 27416 return; 27417 } 27418 const blockCount = hasBlockResults ? blockTypesListRef.current?.childElementCount || 0 : 0; 27419 const count = elementCount + blockCount; 27420 const resultsFoundMessage = (0, import_i18n17.sprintf)( 27421 /* translators: %d: number of results. */ 27422 (0, import_i18n17._n)("%d result found.", "%d results found.", count), 27423 count 27424 ); 27425 debouncedSpeak(resultsFoundMessage, "polite"); 27426 }, [ 27427 filterValue, 27428 styleFilter, 27429 hasBlockResults, 27430 elementCount, 27431 debouncedSpeak 27432 ]); 27433 if (!elementCount && !hasBlockResults) { 27434 return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)( 27435 EmptyList, 27436 { 27437 filterValue, 27438 styleFilter 27439 } 27440 ); 27441 } 27442 return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(import_jsx_runtime139.Fragment, { children: [ 27443 filteredElementGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ListGroup, { title: group.title, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)( 27444 import_components15.__experimentalItemGroup, 27445 { 27446 className: "global-styles-ui-block-types-item-list", 27447 size: "small", 27448 children: group.elements.map((element) => /* @__PURE__ */ (0, import_jsx_runtime139.jsx)( 27449 ElementMenuItem, 27450 { 27451 element 27452 }, 27453 element 27454 )) 27455 } 27456 ) }, group.title)), 27457 hasBlockResults && /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(ListGroup, { title: (0, import_i18n17.__)("Blocks"), children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)( 27458 import_components15.__experimentalItemGroup, 27459 { 27460 ref: blockTypesListRef, 27461 className: "global-styles-ui-block-types-item-list", 27462 size: "small", 27463 children: filteredBlockTypes.map((block) => /* @__PURE__ */ (0, import_jsx_runtime139.jsx)( 27464 BlockMenuItem, 27465 { 27466 block 27467 }, 27468 "menu-itemblock-" + block.name 27469 )) 27470 } 27471 ) }) 27472 ] }); 27473 } 27474 var MemoizedBlockAndElementList = (0, import_element73.memo)(BlockAndElementList); 27475 27476 // packages/global-styles-ui/build-module/screen-typography.mjs 27477 var import_i18n33 = __toESM(require_i18n(), 1); 27478 var import_element85 = __toESM(require_element(), 1); 27479 27480 // packages/global-styles-ui/build-module/screen-body.mjs 27481 var import_components16 = __toESM(require_components(), 1); 27482 var import_jsx_runtime140 = __toESM(require_jsx_runtime(), 1); 27483 27484 // packages/global-styles-ui/build-module/typography-elements.mjs 27485 var import_i18n18 = __toESM(require_i18n(), 1); 27486 var import_components17 = __toESM(require_components(), 1); 27487 var import_jsx_runtime141 = __toESM(require_jsx_runtime(), 1); 27488 27489 // packages/global-styles-ui/build-module/variations/variations-typography.mjs 27490 var import_components19 = __toESM(require_components(), 1); 27491 27492 // packages/global-styles-ui/build-module/preview-typography.mjs 27493 var import_components18 = __toESM(require_components(), 1); 27494 var import_jsx_runtime142 = __toESM(require_jsx_runtime(), 1); 27495 var StylesPreviewTypography = ({ 27496 variation, 27497 isFocused, 27498 withHoverView 27499 }) => { 27500 return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)( 27501 preview_wrapper_default, 27502 { 27503 label: variation.title, 27504 isFocused, 27505 withHoverView, 27506 children: ({ ratio, key }) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)( 27507 import_components18.__experimentalHStack, 27508 { 27509 spacing: 10 * ratio, 27510 justify: "center", 27511 style: { 27512 height: "100%", 27513 overflow: "hidden" 27514 }, 27515 children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)( 27516 PreviewTypography, 27517 { 27518 variation, 27519 fontSize: 85 * ratio 27520 } 27521 ) 27522 }, 27523 key 27524 ) 27525 } 27526 ); 27527 }; 27528 var preview_typography_default = StylesPreviewTypography; 27529 27530 // packages/global-styles-ui/build-module/variations/variation.mjs 27531 var import_element74 = __toESM(require_element(), 1); 27532 var import_keycodes = __toESM(require_keycodes(), 1); 27533 var import_i18n19 = __toESM(require_i18n(), 1); 27534 var import_jsx_runtime143 = __toESM(require_jsx_runtime(), 1); 27535 function Variation({ 27536 variation, 27537 children, 27538 isPill = false, 27539 properties, 27540 showTooltip = false 27541 }) { 27542 const [isFocused, setIsFocused] = (0, import_element74.useState)(false); 27543 const { 27544 base, 27545 user, 27546 onChange: setUserConfig 27547 } = (0, import_element74.useContext)(GlobalStylesContext); 27548 const context = (0, import_element74.useMemo)(() => { 27549 let merged = mergeGlobalStyles(base, variation); 27550 if (properties) { 27551 merged = filterObjectByProperties(merged, properties); 27552 } 27553 return { 27554 user: variation, 27555 base, 27556 merged, 27557 onChange: () => { 27558 } 27559 }; 27560 }, [variation, base, properties]); 27561 const selectVariation = () => setUserConfig(variation); 27562 const selectOnEnter = (event) => { 27563 if (event.keyCode === import_keycodes.ENTER) { 27564 event.preventDefault(); 27565 selectVariation(); 27566 } 27567 }; 27568 const isActive = (0, import_element74.useMemo)( 27569 () => areGlobalStylesEqual(user, variation), 27570 [user, variation] 27571 ); 27572 let label = variation?.title; 27573 if (variation?.description) { 27574 label = (0, import_i18n19.sprintf)( 27575 /* translators: 1: variation title. 2: variation description. */ 27576 (0, import_i18n19._x)("%1$s (%2$s)", "variation label"), 27577 variation?.title, 27578 variation?.description 27579 ); 27580 } 27581 const content = /* @__PURE__ */ (0, import_jsx_runtime143.jsx)( 27582 "div", 27583 { 27584 className: clsx_default("global-styles-ui-variations_item", { 27585 "is-active": isActive 27586 }), 27587 role: "button", 27588 onClick: selectVariation, 27589 onKeyDown: selectOnEnter, 27590 tabIndex: 0, 27591 "aria-label": label, 27592 "aria-current": isActive, 27593 onFocus: () => setIsFocused(true), 27594 onBlur: () => setIsFocused(false), 27595 children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)( 27596 "div", 27597 { 27598 className: clsx_default("global-styles-ui-variations_item-preview", { 27599 "is-pill": isPill 27600 }), 27601 children: children(isFocused) 27602 } 27603 ) 27604 } 27605 ); 27606 return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(GlobalStylesContext.Provider, { value: context, children: showTooltip ? /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(tooltip_exports.Root, { children: [ 27607 /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(tooltip_exports.Trigger, { render: content }), 27608 /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(tooltip_exports.Popup, { children: variation?.title }) 27609 ] }) : content }); 27610 } 27611 27612 // packages/global-styles-ui/build-module/variations/variations-typography.mjs 27613 var import_jsx_runtime144 = __toESM(require_jsx_runtime(), 1); 27614 var propertiesToFilter = ["typography"]; 27615 function TypographyVariations({ 27616 title, 27617 gap = 2 27618 }) { 27619 const typographyVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter); 27620 if (typographyVariations?.length <= 1) { 27621 return null; 27622 } 27623 return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_components19.__experimentalVStack, { spacing: 3, children: [ 27624 title && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Subtitle, { level: 3, children: title }), 27625 /* @__PURE__ */ (0, import_jsx_runtime144.jsx)( 27626 import_components19.__experimentalGrid, 27627 { 27628 columns: 3, 27629 gap, 27630 className: "global-styles-ui-style-variations-container", 27631 children: typographyVariations.map( 27632 (variation, index2) => { 27633 return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)( 27634 Variation, 27635 { 27636 variation, 27637 properties: propertiesToFilter, 27638 showTooltip: true, 27639 children: () => /* @__PURE__ */ (0, import_jsx_runtime144.jsx)( 27640 preview_typography_default, 27641 { 27642 variation 27643 } 27644 ) 27645 }, 27646 index2 27647 ); 27648 } 27649 ) 27650 } 27651 ) 27652 ] }); 27653 } 27654 27655 // packages/global-styles-ui/build-module/font-families.mjs 27656 var import_i18n30 = __toESM(require_i18n(), 1); 27657 var import_components29 = __toESM(require_components(), 1); 27658 var import_element84 = __toESM(require_element(), 1); 27659 27660 // packages/global-styles-ui/build-module/font-library/context.mjs 27661 var import_element75 = __toESM(require_element(), 1); 27662 var import_data6 = __toESM(require_data(), 1); 27663 var import_core_data4 = __toESM(require_core_data(), 1); 27664 var import_i18n21 = __toESM(require_i18n(), 1); 27665 27666 // packages/global-styles-ui/build-module/font-library/api.mjs 27667 var import_api_fetch = __toESM(require_api_fetch(), 1); 27668 var import_core_data3 = __toESM(require_core_data(), 1); 27669 var FONT_FAMILIES_URL = "/wp/v2/font-families"; 27670 function invalidateFontFamilyCache(registry) { 27671 const { receiveEntityRecords } = registry.dispatch(import_core_data3.store); 27672 receiveEntityRecords( 27673 "postType", 27674 "wp_font_family", 27675 [], 27676 void 0, 27677 true 27678 // invalidateCache 27679 ); 27680 } 27681 async function fetchInstallFontFamily(data, registry) { 27682 const config = { 27683 path: FONT_FAMILIES_URL, 27684 method: "POST", 27685 body: data 27686 }; 27687 const response = await (0, import_api_fetch.default)(config); 27688 invalidateFontFamilyCache(registry); 27689 return { 27690 id: response.id, 27691 ...response.font_family_settings, 27692 fontFace: [] 27693 }; 27694 } 27695 async function fetchInstallFontFace(fontFamilyId, data, registry) { 27696 const config = { 27697 path: `$FONT_FAMILIES_URL}/$fontFamilyId}/font-faces`, 27698 method: "POST", 27699 body: data 27700 }; 27701 const response = await (0, import_api_fetch.default)(config); 27702 invalidateFontFamilyCache(registry); 27703 return { 27704 id: response.id, 27705 ...response.font_face_settings 27706 }; 27707 } 27708 27709 // node_modules/.store/tslib@2.8.1-LT-dxu1EkVy7OUDyVf5glQ/node_modules/tslib/tslib.es6.mjs 27710 var __assign = function() { 27711 __assign = Object.assign || function __assign2(t) { 27712 for (var s, i = 1, n = arguments.length; i < n; i++) { 27713 s = arguments[i]; 27714 for (var p3 in s) if (Object.prototype.hasOwnProperty.call(s, p3)) t[p3] = s[p3]; 27715 } 27716 return t; 27717 }; 27718 return __assign.apply(this, arguments); 27719 }; 27720 27721 // node_modules/.store/lower-case@2.0.2-5YZP5nczP5_f_8Vt5KBPjA/node_modules/lower-case/dist.es2015/index.js 27722 function lowerCase(str) { 27723 return str.toLowerCase(); 27724 } 27725 27726 // node_modules/.store/no-case@3.0.4-R4Hzt6qn-erEsTak7ojDpg/node_modules/no-case/dist.es2015/index.js 27727 var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g]; 27728 var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi; 27729 function noCase(input, options) { 27730 if (options === void 0) { 27731 options = {}; 27732 } 27733 var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d; 27734 var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0"); 27735 var start = 0; 27736 var end = result.length; 27737 while (result.charAt(start) === "\0") 27738 start++; 27739 while (result.charAt(end - 1) === "\0") 27740 end--; 27741 return result.slice(start, end).split("\0").map(transform).join(delimiter); 27742 } 27743 function replace(input, re, value) { 27744 if (re instanceof RegExp) 27745 return input.replace(re, value); 27746 return re.reduce(function(input2, re2) { 27747 return input2.replace(re2, value); 27748 }, input); 27749 } 27750 27751 // node_modules/.store/dot-case@3.0.4-hi-rLWlWmiZ169n4dWcbUA/node_modules/dot-case/dist.es2015/index.js 27752 function dotCase(input, options) { 27753 if (options === void 0) { 27754 options = {}; 27755 } 27756 return noCase(input, __assign({ delimiter: "." }, options)); 27757 } 27758 27759 // node_modules/.store/param-case@3.0.4-rdAht_VwpGpefPRylN2bTA/node_modules/param-case/dist.es2015/index.js 27760 function paramCase(input, options) { 27761 if (options === void 0) { 27762 options = {}; 27763 } 27764 return dotCase(input, __assign({ delimiter: "-" }, options)); 27765 } 27766 27767 // packages/kebab-case/build-module/index.mjs 27768 function kebabCase(str) { 27769 let input = str?.toString?.() ?? ""; 27770 input = input.replace(/['\u2019]/, ""); 27771 return paramCase(input, { 27772 splitRegexp: [ 27773 /(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g, 27774 // fooBar => foo-bar, 3Bar => 3-bar 27775 /(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g, 27776 // 3bar => 3-bar 27777 /([A-Za-z])([0-9])/g, 27778 // Foo3 => foo-3, foo3 => foo-3 27779 /([A-Z])([A-Z][a-z])/g 27780 // FOOBar => foo-bar 27781 ] 27782 }); 27783 } 27784 27785 // packages/global-styles-ui/build-module/font-library/utils/constants.mjs 27786 var import_i18n20 = __toESM(require_i18n(), 1); 27787 var ALLOWED_FILE_EXTENSIONS = ["otf", "ttf", "woff", "woff2"]; 27788 var FONT_WEIGHTS = { 27789 100: (0, import_i18n20._x)("Thin", "font weight"), 27790 200: (0, import_i18n20._x)("Extra-light", "font weight"), 27791 300: (0, import_i18n20._x)("Light", "font weight"), 27792 400: (0, import_i18n20._x)("Normal", "font weight"), 27793 500: (0, import_i18n20._x)("Medium", "font weight"), 27794 600: (0, import_i18n20._x)("Semi-bold", "font weight"), 27795 700: (0, import_i18n20._x)("Bold", "font weight"), 27796 800: (0, import_i18n20._x)("Extra-bold", "font weight"), 27797 900: (0, import_i18n20._x)("Black", "font weight") 27798 }; 27799 var FONT_STYLES = { 27800 normal: (0, import_i18n20._x)("Normal", "font style"), 27801 italic: (0, import_i18n20._x)("Italic", "font style") 27802 }; 27803 27804 // packages/global-styles-ui/build-module/font-library/utils/index.mjs 27805 var { File } = window; 27806 function setUIValuesNeeded(font2, extraValues = {}) { 27807 if (!font2.name && (font2.fontFamily || font2.slug)) { 27808 font2.name = font2.fontFamily || font2.slug; 27809 } 27810 return { 27811 ...font2, 27812 ...extraValues 27813 }; 27814 } 27815 function isUrlEncoded(url) { 27816 if (typeof url !== "string") { 27817 return false; 27818 } 27819 return url !== decodeURIComponent(url); 27820 } 27821 function getFontFaceVariantName(face) { 27822 const weightName = FONT_WEIGHTS[face.fontWeight ?? ""] || face.fontWeight; 27823 const styleName = face.fontStyle === "normal" ? "" : FONT_STYLES[face.fontStyle ?? ""] || face.fontStyle; 27824 return `$weightName} $styleName}`; 27825 } 27826 function mergeFontFaces(existing = [], incoming = []) { 27827 const map = /* @__PURE__ */ new Map(); 27828 for (const face of existing) { 27829 map.set(`$face.fontWeight}$face.fontStyle}`, face); 27830 } 27831 for (const face of incoming) { 27832 map.set(`$face.fontWeight}$face.fontStyle}`, face); 27833 } 27834 return Array.from(map.values()); 27835 } 27836 function mergeFontFamilies(existing = [], incoming = []) { 27837 const map = /* @__PURE__ */ new Map(); 27838 for (const font2 of existing) { 27839 map.set(font2.slug, { ...font2 }); 27840 } 27841 for (const font2 of incoming) { 27842 if (map.has(font2.slug)) { 27843 const { fontFace: incomingFontFaces, ...restIncoming } = font2; 27844 const existingFont = map.get(font2.slug); 27845 const mergedFontFaces = mergeFontFaces( 27846 existingFont.fontFace, 27847 incomingFontFaces 27848 ); 27849 map.set(font2.slug, { 27850 ...restIncoming, 27851 fontFace: mergedFontFaces 27852 }); 27853 } else { 27854 map.set(font2.slug, { ...font2 }); 27855 } 27856 } 27857 return Array.from(map.values()); 27858 } 27859 async function loadFontFaceInBrowser(fontFace, source, addTo = "all") { 27860 let dataSource; 27861 if (typeof source === "string") { 27862 dataSource = `url($source})`; 27863 } else if (source instanceof File) { 27864 dataSource = await source.arrayBuffer(); 27865 } else { 27866 return; 27867 } 27868 const newFont = new window.FontFace( 27869 formatFontFaceName(fontFace.fontFamily), 27870 dataSource, 27871 { 27872 style: fontFace.fontStyle, 27873 weight: String(fontFace.fontWeight) 27874 } 27875 ); 27876 const loadedFace = await newFont.load(); 27877 if (addTo === "document" || addTo === "all") { 27878 document.fonts.add(loadedFace); 27879 } 27880 if (addTo === "iframe" || addTo === "all") { 27881 const iframe = document.querySelector( 27882 'iframe[name="editor-canvas"]' 27883 ); 27884 if (iframe?.contentDocument) { 27885 iframe.contentDocument.fonts.add(loadedFace); 27886 } 27887 } 27888 } 27889 function unloadFontFaceInBrowser(fontFace, removeFrom = "all") { 27890 const unloadFontFace = (fonts) => { 27891 fonts.forEach((f) => { 27892 if (f.family === formatFontFaceName(fontFace?.fontFamily) && f.weight === fontFace?.fontWeight && f.style === fontFace?.fontStyle) { 27893 fonts.delete(f); 27894 } 27895 }); 27896 }; 27897 if (removeFrom === "document" || removeFrom === "all") { 27898 unloadFontFace(document.fonts); 27899 } 27900 if (removeFrom === "iframe" || removeFrom === "all") { 27901 const iframe = document.querySelector( 27902 'iframe[name="editor-canvas"]' 27903 ); 27904 if (iframe?.contentDocument) { 27905 unloadFontFace(iframe.contentDocument.fonts); 27906 } 27907 } 27908 } 27909 function getDisplaySrcFromFontFace(input) { 27910 if (!input) { 27911 return; 27912 } 27913 let src; 27914 if (Array.isArray(input)) { 27915 src = input[0]; 27916 } else { 27917 src = input; 27918 } 27919 if (src.startsWith("file:.")) { 27920 return; 27921 } 27922 if (!isUrlEncoded(src)) { 27923 src = encodeURI(src); 27924 } 27925 return src; 27926 } 27927 function makeFontFamilyFormData(fontFamily) { 27928 const formData = new FormData(); 27929 const { fontFace, category, ...familyWithValidParameters } = fontFamily; 27930 const fontFamilySettings = { 27931 ...familyWithValidParameters, 27932 slug: kebabCase(fontFamily.slug) 27933 }; 27934 formData.append( 27935 "font_family_settings", 27936 JSON.stringify(fontFamilySettings) 27937 ); 27938 return formData; 27939 } 27940 function makeFontFacesFormData(font2) { 27941 const fontFacesFormData = (font2?.fontFace ?? []).map( 27942 (item, faceIndex) => { 27943 const face = { ...item }; 27944 const formData = new FormData(); 27945 if (face.file) { 27946 const files = Array.isArray(face.file) ? face.file : [face.file]; 27947 const src = []; 27948 files.forEach((file, key) => { 27949 const fileId = `file-$faceIndex}-$key}`; 27950 formData.append(fileId, file, file.name); 27951 src.push(fileId); 27952 }); 27953 face.src = src.length === 1 ? src[0] : src; 27954 delete face.file; 27955 formData.append("font_face_settings", JSON.stringify(face)); 27956 } else { 27957 formData.append("font_face_settings", JSON.stringify(face)); 27958 } 27959 return formData; 27960 } 27961 ); 27962 return fontFacesFormData; 27963 } 27964 async function batchInstallFontFaces(fontFamilyId, fontFacesData, registry) { 27965 const responses = []; 27966 for (const faceData of fontFacesData) { 27967 try { 27968 const response = await fetchInstallFontFace( 27969 fontFamilyId, 27970 faceData, 27971 registry 27972 ); 27973 responses.push({ status: "fulfilled", value: response }); 27974 } catch (error2) { 27975 responses.push({ status: "rejected", reason: error2 }); 27976 } 27977 } 27978 const results = { 27979 errors: [], 27980 successes: [] 27981 }; 27982 responses.forEach((result, index2) => { 27983 if (result.status === "fulfilled" && result.value) { 27984 const response = result.value; 27985 results.successes.push(response); 27986 } else if (result.reason) { 27987 results.errors.push({ 27988 data: fontFacesData[index2], 27989 message: result.reason.message 27990 }); 27991 } 27992 }); 27993 return results; 27994 } 27995 async function downloadFontFaceAssets(src) { 27996 src = Array.isArray(src) ? src : [src]; 27997 const files = await Promise.all( 27998 src.map(async (url) => { 27999 return fetch(new Request(url)).then((response) => { 28000 if (!response.ok) { 28001 throw new Error( 28002 `Error downloading font face asset from $url}. Server responded with status: $response.status}` 28003 ); 28004 } 28005 return response.blob(); 28006 }).then((blob) => { 28007 const filename = url.split("/").pop(); 28008 const file = new File([blob], filename, { 28009 type: blob.type 28010 }); 28011 return file; 28012 }); 28013 }) 28014 ); 28015 return files.length === 1 ? files[0] : files; 28016 } 28017 function checkFontFaceInstalled(fontFace, collection) { 28018 return -1 !== collection.findIndex((collectionFontFace) => { 28019 return collectionFontFace.fontWeight === fontFace.fontWeight && collectionFontFace.fontStyle === fontFace.fontStyle; 28020 }); 28021 } 28022 28023 // packages/global-styles-ui/build-module/font-library/utils/set-immutably.mjs 28024 function setImmutably2(object, path, value) { 28025 path = Array.isArray(path) ? [...path] : [path]; 28026 object = Array.isArray(object) ? [...object] : { ...object }; 28027 const leaf = path.pop(); 28028 let prev = object; 28029 for (const key of path) { 28030 const lvl = prev[key]; 28031 prev = prev[key] = Array.isArray(lvl) ? [...lvl] : { ...lvl }; 28032 } 28033 prev[leaf] = value; 28034 return object; 28035 } 28036 28037 // packages/global-styles-ui/build-module/font-library/utils/toggleFont.mjs 28038 function toggleFont(font2, face, initialfonts = []) { 28039 const isFontActivated = (f) => f.slug === font2.slug; 28040 const getActivatedFont = (fonts) => fonts.find(isFontActivated); 28041 const toggleEntireFontFamily = (activatedFont2) => { 28042 if (!activatedFont2) { 28043 return [...initialfonts, font2]; 28044 } 28045 return initialfonts.filter( 28046 (f) => !isFontActivated(f) 28047 ); 28048 }; 28049 const toggleFontVariant = (activatedFont2) => { 28050 const isFaceActivated = (f) => f.fontWeight === face.fontWeight && f.fontStyle === face.fontStyle; 28051 if (!activatedFont2) { 28052 return [...initialfonts, { ...font2, fontFace: [face] }]; 28053 } 28054 let newFontFaces = activatedFont2.fontFace || []; 28055 if (newFontFaces.find(isFaceActivated)) { 28056 newFontFaces = newFontFaces.filter( 28057 (f) => !isFaceActivated(f) 28058 ); 28059 } else { 28060 newFontFaces = [...newFontFaces, face]; 28061 } 28062 if (newFontFaces.length === 0) { 28063 return initialfonts.filter( 28064 (f) => !isFontActivated(f) 28065 ); 28066 } 28067 return initialfonts.map( 28068 (f) => isFontActivated(f) ? { ...f, fontFace: newFontFaces } : f 28069 ); 28070 }; 28071 const activatedFont = getActivatedFont(initialfonts); 28072 if (!face) { 28073 return toggleEntireFontFamily(activatedFont); 28074 } 28075 return toggleFontVariant(activatedFont); 28076 } 28077 28078 // packages/global-styles-ui/build-module/font-library/context.mjs 28079 var import_jsx_runtime145 = __toESM(require_jsx_runtime(), 1); 28080 var FontLibraryContext = (0, import_element75.createContext)( 28081 {} 28082 ); 28083 FontLibraryContext.displayName = "FontLibraryContext"; 28084 function FontLibraryProvider({ children }) { 28085 const registry = (0, import_data6.useRegistry)(); 28086 const { saveEntityRecord, deleteEntityRecord } = (0, import_data6.useDispatch)(import_core_data4.store); 28087 const { globalStylesId } = (0, import_data6.useSelect)((select) => { 28088 const { __experimentalGetCurrentGlobalStylesId } = select(import_core_data4.store); 28089 return { globalStylesId: __experimentalGetCurrentGlobalStylesId() }; 28090 }, []); 28091 const globalStyles = (0, import_core_data4.useEntityRecord)( 28092 "root", 28093 "globalStyles", 28094 globalStylesId ?? 0, 28095 { enabled: globalStylesId !== void 0 } 28096 ); 28097 const [isInstalling, setIsInstalling] = (0, import_element75.useState)(false); 28098 const { records: libraryPosts = [], isResolving: isResolvingLibrary } = (0, import_core_data4.useEntityRecords)( 28099 "postType", 28100 "wp_font_family", 28101 { 28102 _embed: true, 28103 per_page: -1 28104 } 28105 ); 28106 const libraryFonts = (libraryPosts || []).map((fontFamilyPost) => { 28107 return { 28108 id: fontFamilyPost.id, 28109 ...fontFamilyPost.font_family_settings || {}, 28110 fontFace: fontFamilyPost?._embedded?.font_faces?.map( 28111 (face) => face.font_face_settings 28112 ) || [] 28113 }; 28114 }) || []; 28115 const [fontFamilies, setFontFamilies] = useSetting("typography.fontFamilies"); 28116 const saveFontFamilies = async (fonts) => { 28117 if (!globalStyles.record) { 28118 return; 28119 } 28120 const updatedGlobalStyles = globalStyles.record; 28121 const finalGlobalStyles = setImmutably2( 28122 updatedGlobalStyles ?? {}, 28123 ["settings", "typography", "fontFamilies"], 28124 fonts 28125 ); 28126 await saveEntityRecord("root", "globalStyles", finalGlobalStyles); 28127 }; 28128 const [modalTabOpen, setModalTabOpen] = (0, import_element75.useState)(""); 28129 const [libraryFontSelected, setLibraryFontSelected] = (0, import_element75.useState)(void 0); 28130 const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map((f) => setUIValuesNeeded(f, { source: "theme" })).sort((a, b) => a.name.localeCompare(b.name)) : []; 28131 const customFonts = fontFamilies?.custom ? fontFamilies.custom.map((f) => setUIValuesNeeded(f, { source: "custom" })).sort((a, b) => a.name.localeCompare(b.name)) : []; 28132 const baseCustomFonts = libraryFonts ? libraryFonts.map((f) => setUIValuesNeeded(f, { source: "custom" })).sort((a, b) => a.name.localeCompare(b.name)) : []; 28133 (0, import_element75.useEffect)(() => { 28134 if (!modalTabOpen) { 28135 setLibraryFontSelected(void 0); 28136 } 28137 }, [modalTabOpen]); 28138 const handleSetLibraryFontSelected = (font2) => { 28139 if (!font2) { 28140 setLibraryFontSelected(void 0); 28141 return; 28142 } 28143 const fonts = font2.source === "theme" ? themeFonts : baseCustomFonts; 28144 const fontSelected = fonts.find((f) => f.slug === font2.slug); 28145 setLibraryFontSelected({ 28146 ...fontSelected || font2, 28147 source: font2.source 28148 }); 28149 }; 28150 const [loadedFontUrls] = (0, import_element75.useState)(/* @__PURE__ */ new Set()); 28151 const getAvailableFontsOutline = (availableFontFamilies) => { 28152 const outline = availableFontFamilies.reduce( 28153 (acc, font2) => { 28154 const availableFontFaces = font2?.fontFace && font2.fontFace?.length > 0 ? font2?.fontFace.map( 28155 (face) => `$face.fontStyle ?? ""}$face.fontWeight ?? ""}` 28156 ) : ["normal400"]; 28157 acc[font2.slug] = availableFontFaces; 28158 return acc; 28159 }, 28160 {} 28161 ); 28162 return outline; 28163 }; 28164 const getActivatedFontsOutline = (source) => { 28165 switch (source) { 28166 case "theme": 28167 return getAvailableFontsOutline(themeFonts); 28168 case "custom": 28169 default: 28170 return getAvailableFontsOutline(customFonts); 28171 } 28172 }; 28173 const isFontActivated = (slug, style, weight, source) => { 28174 if (!style && !weight) { 28175 return !!getActivatedFontsOutline(source)[slug]; 28176 } 28177 return !!getActivatedFontsOutline(source)[slug]?.includes( 28178 (style ?? "") + (weight ?? "") 28179 ); 28180 }; 28181 const getFontFacesActivated = (slug, source) => { 28182 return getActivatedFontsOutline(source)[slug] || []; 28183 }; 28184 async function installFonts(fontFamiliesToInstall) { 28185 setIsInstalling(true); 28186 try { 28187 const fontFamiliesToActivate = []; 28188 let installationErrors = []; 28189 for (const fontFamilyToInstall of fontFamiliesToInstall) { 28190 let isANewFontFamily = false; 28191 const fontFamilyRecords = await (0, import_data6.resolveSelect)( 28192 import_core_data4.store 28193 ).getEntityRecords( 28194 "postType", 28195 "wp_font_family", 28196 { 28197 slug: fontFamilyToInstall.slug, 28198 per_page: 1, 28199 _embed: true 28200 } 28201 ); 28202 const fontFamilyPost = fontFamilyRecords && fontFamilyRecords.length > 0 ? fontFamilyRecords[0] : null; 28203 let installedFontFamily = fontFamilyPost ? { 28204 id: fontFamilyPost.id, 28205 ...fontFamilyPost.font_family_settings, 28206 fontFace: (fontFamilyPost?._embedded?.font_faces ?? []).map( 28207 (face) => face.font_face_settings 28208 ) || [] 28209 } : null; 28210 if (!installedFontFamily) { 28211 isANewFontFamily = true; 28212 installedFontFamily = await fetchInstallFontFamily( 28213 makeFontFamilyFormData(fontFamilyToInstall), 28214 registry 28215 ); 28216 } 28217 const alreadyInstalledFontFaces = installedFontFamily.fontFace && fontFamilyToInstall.fontFace ? installedFontFamily.fontFace.filter( 28218 (fontFaceToInstall) => fontFaceToInstall && fontFamilyToInstall.fontFace && checkFontFaceInstalled( 28219 fontFaceToInstall, 28220 fontFamilyToInstall.fontFace 28221 ) 28222 ) : []; 28223 if (installedFontFamily.fontFace && fontFamilyToInstall.fontFace) { 28224 fontFamilyToInstall.fontFace = fontFamilyToInstall.fontFace.filter( 28225 (fontFaceToInstall) => !checkFontFaceInstalled( 28226 fontFaceToInstall, 28227 installedFontFamily.fontFace 28228 ) 28229 ); 28230 } 28231 let successfullyInstalledFontFaces = []; 28232 let unsuccessfullyInstalledFontFaces = []; 28233 if (fontFamilyToInstall?.fontFace?.length ?? 0 > 0) { 28234 const response = await batchInstallFontFaces( 28235 // @ts-expect-error - Type mismatch: WpFontFamily.id can be number | string, but batchInstallFontFaces expects only string. 28236 installedFontFamily.id, 28237 makeFontFacesFormData( 28238 fontFamilyToInstall 28239 ), 28240 registry 28241 ); 28242 successfullyInstalledFontFaces = response?.successes; 28243 unsuccessfullyInstalledFontFaces = response?.errors; 28244 } 28245 if (successfullyInstalledFontFaces?.length > 0 || alreadyInstalledFontFaces?.length > 0) { 28246 installedFontFamily.fontFace = [ 28247 ...successfullyInstalledFontFaces 28248 ]; 28249 fontFamiliesToActivate.push(installedFontFamily); 28250 } 28251 if (installedFontFamily && !fontFamilyToInstall?.fontFace?.length) { 28252 fontFamiliesToActivate.push(installedFontFamily); 28253 } 28254 if (isANewFontFamily && (fontFamilyToInstall?.fontFace?.length ?? 0) > 0 && successfullyInstalledFontFaces?.length === 0) { 28255 await deleteEntityRecord( 28256 "postType", 28257 "wp_font_family", 28258 installedFontFamily.id, 28259 { force: true } 28260 ); 28261 } 28262 installationErrors = installationErrors.concat( 28263 unsuccessfullyInstalledFontFaces 28264 ); 28265 } 28266 const installationErrorMessages = installationErrors.reduce( 28267 (unique, item) => unique.includes(item.message) ? unique : [...unique, item.message], 28268 [] 28269 ); 28270 if (fontFamiliesToActivate.length > 0) { 28271 const activeFonts = activateCustomFontFamilies( 28272 // @ts-expect-error - Type mismatch: items may have id as number | string, but FontFamily.id should be string | undefined. 28273 fontFamiliesToActivate 28274 ); 28275 await saveFontFamilies(activeFonts); 28276 } 28277 if (installationErrorMessages.length > 0) { 28278 const installError = new Error((0, import_i18n21.__)("There was an error installing fonts.")); 28279 installError.installationErrors = installationErrorMessages; 28280 throw installError; 28281 } 28282 } finally { 28283 setIsInstalling(false); 28284 } 28285 } 28286 async function uninstallFontFamily(fontFamilyToUninstall) { 28287 if (!fontFamilyToUninstall?.id) { 28288 throw new Error((0, import_i18n21.__)("Font family to uninstall is not defined.")); 28289 } 28290 try { 28291 await deleteEntityRecord( 28292 "postType", 28293 "wp_font_family", 28294 fontFamilyToUninstall.id, 28295 { force: true } 28296 ); 28297 const activeFonts = deactivateFontFamily(fontFamilyToUninstall); 28298 await saveFontFamilies(activeFonts); 28299 return { deleted: true }; 28300 } catch (error2) { 28301 console.error( 28302 `There was an error uninstalling the font family:`, 28303 error2 28304 ); 28305 throw error2; 28306 } 28307 } 28308 const deactivateFontFamily = (font2) => { 28309 const initialCustomFonts = fontFamilies?.[font2.source ?? ""] ?? []; 28310 const newCustomFonts = initialCustomFonts.filter( 28311 (f) => f.slug !== font2.slug 28312 ); 28313 const activeFonts = { 28314 ...fontFamilies, 28315 [font2.source ?? ""]: newCustomFonts 28316 }; 28317 setFontFamilies(activeFonts); 28318 if (font2.fontFace) { 28319 font2.fontFace.forEach((face) => { 28320 unloadFontFaceInBrowser(face, "all"); 28321 }); 28322 } 28323 return activeFonts; 28324 }; 28325 const activateCustomFontFamilies = (fontsToAdd) => { 28326 const fontsToActivate = cleanFontsForSave(fontsToAdd); 28327 const activeFonts = { 28328 ...fontFamilies, 28329 // Merge the existing custom fonts with the new fonts. 28330 custom: mergeFontFamilies(fontFamilies?.custom, fontsToActivate) 28331 }; 28332 setFontFamilies(activeFonts); 28333 loadFontsInBrowser(fontsToActivate); 28334 return activeFonts; 28335 }; 28336 const cleanFontsForSave = (fonts) => { 28337 return fonts.map(({ id: _familyDbId, fontFace, ...font2 }) => ({ 28338 ...font2, 28339 ...fontFace && fontFace.length > 0 ? { 28340 fontFace: fontFace.map( 28341 ({ id: _faceDbId, ...face }) => face 28342 ) 28343 } : {} 28344 })); 28345 }; 28346 const loadFontsInBrowser = (fonts) => { 28347 fonts.forEach((font2) => { 28348 if (font2.fontFace) { 28349 font2.fontFace.forEach((face) => { 28350 const displaySrc = getDisplaySrcFromFontFace( 28351 face?.src ?? "" 28352 ); 28353 if (displaySrc) { 28354 loadFontFaceInBrowser(face, displaySrc, "all"); 28355 } 28356 }); 28357 } 28358 }); 28359 }; 28360 const toggleActivateFont = (font2, face) => { 28361 const initialFonts = fontFamilies?.[font2.source ?? ""] ?? []; 28362 const newFonts = toggleFont(font2, face, initialFonts); 28363 setFontFamilies({ 28364 ...fontFamilies, 28365 [font2.source ?? ""]: newFonts 28366 }); 28367 const isFaceActivated = isFontActivated( 28368 font2.slug, 28369 face?.fontStyle ?? "", 28370 face?.fontWeight ?? "", 28371 font2.source ?? "custom" 28372 ); 28373 if (face && isFaceActivated) { 28374 unloadFontFaceInBrowser(face, "all"); 28375 } else { 28376 const displaySrc = getDisplaySrcFromFontFace(face?.src ?? ""); 28377 if (face && displaySrc) { 28378 loadFontFaceInBrowser(face, displaySrc, "all"); 28379 } 28380 } 28381 }; 28382 const loadFontFaceAsset = async (fontFace) => { 28383 if (!fontFace.src) { 28384 return; 28385 } 28386 const src = getDisplaySrcFromFontFace(fontFace.src); 28387 if (!src || loadedFontUrls.has(src)) { 28388 return; 28389 } 28390 loadFontFaceInBrowser(fontFace, src, "document"); 28391 loadedFontUrls.add(src); 28392 }; 28393 return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)( 28394 FontLibraryContext.Provider, 28395 { 28396 value: { 28397 libraryFontSelected, 28398 handleSetLibraryFontSelected, 28399 fontFamilies: fontFamilies ?? {}, 28400 baseCustomFonts, 28401 isFontActivated, 28402 getFontFacesActivated, 28403 loadFontFaceAsset, 28404 installFonts, 28405 uninstallFontFamily, 28406 toggleActivateFont, 28407 getAvailableFontsOutline, 28408 modalTabOpen, 28409 setModalTabOpen, 28410 saveFontFamilies, 28411 isResolvingLibrary, 28412 isInstalling 28413 }, 28414 children 28415 } 28416 ); 28417 } 28418 var context_default = FontLibraryProvider; 28419 28420 // packages/global-styles-ui/build-module/font-library/modal.mjs 28421 var import_i18n28 = __toESM(require_i18n(), 1); 28422 var import_components27 = __toESM(require_components(), 1); 28423 var import_core_data7 = __toESM(require_core_data(), 1); 28424 var import_data8 = __toESM(require_data(), 1); 28425 28426 // packages/global-styles-ui/build-module/font-library/installed-fonts.mjs 28427 var import_components22 = __toESM(require_components(), 1); 28428 var import_core_data5 = __toESM(require_core_data(), 1); 28429 var import_data7 = __toESM(require_data(), 1); 28430 var import_element79 = __toESM(require_element(), 1); 28431 var import_i18n23 = __toESM(require_i18n(), 1); 28432 28433 // packages/global-styles-ui/build-module/font-library/font-card.mjs 28434 var import_i18n22 = __toESM(require_i18n(), 1); 28435 var import_element77 = __toESM(require_element(), 1); 28436 var import_components20 = __toESM(require_components(), 1); 28437 28438 // packages/global-styles-ui/build-module/font-library/font-demo.mjs 28439 var import_element76 = __toESM(require_element(), 1); 28440 var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1); 28441 var loadedPreviews = /* @__PURE__ */ new Set(); 28442 function getPreviewUrl(fontFace) { 28443 if (fontFace.preview) { 28444 return fontFace.preview; 28445 } 28446 if (fontFace.src) { 28447 return Array.isArray(fontFace.src) ? fontFace.src[0] : fontFace.src; 28448 } 28449 return void 0; 28450 } 28451 function getDisplayFontFace(font2) { 28452 if ("fontStyle" in font2 && font2.fontStyle || "fontWeight" in font2 && font2.fontWeight) { 28453 return font2; 28454 } 28455 if ("fontFace" in font2 && font2.fontFace && font2.fontFace.length) { 28456 return font2.fontFace.find( 28457 (face) => face.fontStyle === "normal" && face.fontWeight === "400" 28458 ) || font2.fontFace[0]; 28459 } 28460 return { 28461 fontStyle: "normal", 28462 fontWeight: "400", 28463 fontFamily: font2.fontFamily 28464 }; 28465 } 28466 function FontDemo({ font: font2, text }) { 28467 const ref = (0, import_element76.useRef)(null); 28468 const fontFace = getDisplayFontFace(font2); 28469 const style = getFamilyPreviewStyle(font2); 28470 text = text || ("name" in font2 ? font2.name : ""); 28471 const customPreviewUrl = font2.preview; 28472 const previewUrl = customPreviewUrl ?? getPreviewUrl(fontFace); 28473 const isPreviewImage = Boolean( 28474 previewUrl && /\.(png|jpg|jpeg|gif|svg)$/i.test(previewUrl) 28475 ); 28476 const [isIntersecting, setIsIntersecting] = (0, import_element76.useState)(false); 28477 const [isFontLoaded, setIsFontLoaded] = (0, import_element76.useState)(false); 28478 const [resolvedUrl, setResolvedUrl] = (0, import_element76.useState)(); 28479 const { loadFontFaceAsset } = (0, import_element76.useContext)(FontLibraryContext); 28480 const isAssetLoaded = isPreviewImage ? !!previewUrl && (loadedPreviews.has(previewUrl) || resolvedUrl === previewUrl) : isFontLoaded; 28481 const estimatedImageWidth = Math.min( 28482 Math.max(text.length * 12, 48), 28483 300 28484 ); 28485 const faceStyles = getFacePreviewStyle(fontFace); 28486 const textDemoStyle = { 28487 fontSize: "18px", 28488 lineHeight: 1, 28489 opacity: isAssetLoaded ? "1" : "0", 28490 ...style, 28491 ...faceStyles 28492 }; 28493 (0, import_element76.useEffect)(() => { 28494 if (isPreviewImage) { 28495 return; 28496 } 28497 const observer = new window.IntersectionObserver(([entry]) => { 28498 setIsIntersecting(entry.isIntersecting); 28499 }, {}); 28500 if (ref.current) { 28501 observer.observe(ref.current); 28502 } 28503 return () => observer.disconnect(); 28504 }, [isPreviewImage]); 28505 (0, import_element76.useEffect)(() => { 28506 const loadAsset = async () => { 28507 if (isIntersecting && !isPreviewImage) { 28508 if (fontFace.src) { 28509 await loadFontFaceAsset(fontFace); 28510 } 28511 setIsFontLoaded(true); 28512 } 28513 }; 28514 loadAsset(); 28515 }, [fontFace, isIntersecting, loadFontFaceAsset, isPreviewImage]); 28516 return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("div", { ref, className: "font-library__font-demo", children: isPreviewImage ? /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, { children: [ 28517 !isAssetLoaded && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)( 28518 Skeleton, 28519 { 28520 className: "font-library__font-variant-demo-skeleton", 28521 style: { width: estimatedImageWidth } 28522 } 28523 ), 28524 /* @__PURE__ */ (0, import_jsx_runtime146.jsx)( 28525 "img", 28526 { 28527 src: previewUrl, 28528 loading: "lazy", 28529 alt: text, 28530 onLoad: () => { 28531 if (previewUrl) { 28532 loadedPreviews.add(previewUrl); 28533 } 28534 setResolvedUrl(previewUrl); 28535 }, 28536 onError: () => setResolvedUrl(previewUrl), 28537 className: clsx_default( 28538 "font-library__font-variant_demo-image", 28539 { "is-loading": !isAssetLoaded } 28540 ) 28541 } 28542 ) 28543 ] }) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)( 28544 "span", 28545 { 28546 style: textDemoStyle, 28547 className: "font-library__font-variant_demo-text", 28548 children: text 28549 } 28550 ) }); 28551 } 28552 var font_demo_default = FontDemo; 28553 28554 // packages/global-styles-ui/build-module/font-library/font-card.mjs 28555 var import_jsx_runtime147 = __toESM(require_jsx_runtime(), 1); 28556 function FontCard({ 28557 font: font2, 28558 onClick, 28559 variantsText, 28560 navigatorPath, 28561 shouldFocus 28562 }) { 28563 const variantsCount = font2.fontFace?.length || 1; 28564 const style = { 28565 cursor: !!onClick ? "pointer" : "default" 28566 }; 28567 const navigator2 = (0, import_components20.useNavigator)(); 28568 const ref = (0, import_element77.useRef)(null); 28569 (0, import_element77.useEffect)(() => { 28570 if (shouldFocus) { 28571 ref.current?.focus(); 28572 } 28573 }, [shouldFocus]); 28574 return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)( 28575 import_components20.Button, 28576 { 28577 ref, 28578 __next40pxDefaultSize: true, 28579 onClick: () => { 28580 onClick(); 28581 if (navigatorPath) { 28582 navigator2.goTo(navigatorPath); 28583 } 28584 }, 28585 style, 28586 className: "font-library__font-card", 28587 children: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_components20.Flex, { justify: "space-between", wrap: false, children: [ 28588 /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(font_demo_default, { font: font2 }), 28589 /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_components20.Flex, { justify: "flex-end", children: [ 28590 /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_components20.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_components20.__experimentalText, { className: "font-library__font-card__count", children: variantsText || (0, import_i18n22.sprintf)( 28591 /* translators: %d: Number of font variants. */ 28592 (0, import_i18n22._n)( 28593 "%d variant", 28594 "%d variants", 28595 variantsCount 28596 ), 28597 variantsCount 28598 ) }) }), 28599 /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_components20.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(icon_default, { icon: (0, import_i18n22.isRTL)() ? chevron_left_default : chevron_right_default }) }) 28600 ] }) 28601 ] }) 28602 } 28603 ); 28604 } 28605 var font_card_default = FontCard; 28606 28607 // packages/global-styles-ui/build-module/font-library/library-font-variant.mjs 28608 var import_element78 = __toESM(require_element(), 1); 28609 var import_components21 = __toESM(require_components(), 1); 28610 var import_jsx_runtime148 = __toESM(require_jsx_runtime(), 1); 28611 function LibraryFontVariant({ 28612 face, 28613 font: font2 28614 }) { 28615 const { isFontActivated, toggleActivateFont } = (0, import_element78.useContext)(FontLibraryContext); 28616 const isInstalled = (font2?.fontFace?.length ?? 0) > 0 ? isFontActivated( 28617 font2.slug, 28618 face.fontStyle, 28619 face.fontWeight, 28620 font2.source 28621 ) : isFontActivated(font2.slug, void 0, void 0, font2.source); 28622 const handleToggleActivation = () => { 28623 if ((font2?.fontFace?.length ?? 0) > 0) { 28624 toggleActivateFont(font2, face); 28625 return; 28626 } 28627 toggleActivateFont(font2); 28628 }; 28629 const displayName = font2.name + " " + getFontFaceVariantName(face); 28630 const checkboxId = (0, import_element78.useId)(); 28631 return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "font-library__font-card", children: /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(import_components21.Flex, { justify: "flex-start", align: "center", gap: "1rem", children: [ 28632 /* @__PURE__ */ (0, import_jsx_runtime148.jsx)( 28633 import_components21.CheckboxControl, 28634 { 28635 checked: isInstalled, 28636 onChange: handleToggleActivation, 28637 id: checkboxId 28638 } 28639 ), 28640 /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("label", { htmlFor: checkboxId, children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)( 28641 font_demo_default, 28642 { 28643 font: face, 28644 text: displayName, 28645 onClick: handleToggleActivation 28646 } 28647 ) }) 28648 ] }) }); 28649 } 28650 var library_font_variant_default = LibraryFontVariant; 28651 28652 // packages/global-styles-ui/build-module/font-library/utils/sort-font-faces.mjs 28653 function getNumericFontWeight(value) { 28654 switch (value) { 28655 case "normal": 28656 return 400; 28657 case "bold": 28658 return 700; 28659 case "bolder": 28660 return 500; 28661 case "lighter": 28662 return 300; 28663 default: 28664 return parseInt(value, 10); 28665 } 28666 } 28667 function sortFontFaces(faces) { 28668 return faces.sort((a, b) => { 28669 if (a.fontStyle === "normal" && b.fontStyle !== "normal") { 28670 return -1; 28671 } 28672 if (b.fontStyle === "normal" && a.fontStyle !== "normal") { 28673 return 1; 28674 } 28675 if (a.fontStyle === b.fontStyle) { 28676 return getNumericFontWeight(a.fontWeight?.toString() ?? "normal") - getNumericFontWeight(b.fontWeight?.toString() ?? "normal"); 28677 } 28678 if (!a.fontStyle || !b.fontStyle) { 28679 return !a.fontStyle ? 1 : -1; 28680 } 28681 return a.fontStyle.localeCompare(b.fontStyle); 28682 }); 28683 } 28684 28685 // packages/global-styles-ui/build-module/font-library/installed-fonts.mjs 28686 var import_jsx_runtime149 = __toESM(require_jsx_runtime(), 1); 28687 function getFontFamiliesKey(fontFamilies) { 28688 if (!fontFamilies) { 28689 return ""; 28690 } 28691 const normalized = {}; 28692 for (const source of Object.keys(fontFamilies).sort()) { 28693 normalized[source] = (fontFamilies[source] ?? []).map((family) => ({ 28694 slug: family.slug, 28695 fontFace: (family.fontFace ?? []).map( 28696 (face) => `$face.fontStyle}-$face.fontWeight}` 28697 ).sort() 28698 })).sort((a, b) => a.slug.localeCompare(b.slug)); 28699 } 28700 return JSON.stringify(normalized); 28701 } 28702 function InstalledFonts() { 28703 const { 28704 baseCustomFonts, 28705 libraryFontSelected, 28706 handleSetLibraryFontSelected, 28707 uninstallFontFamily, 28708 isResolvingLibrary, 28709 isInstalling, 28710 saveFontFamilies, 28711 getFontFacesActivated 28712 } = (0, import_element79.useContext)(FontLibraryContext); 28713 const [fontFamilies, setFontFamilies] = useSetting("typography.fontFamilies"); 28714 const [lastSelectedFontSlug, setLastSelectedFontSlug] = (0, import_element79.useState)(void 0); 28715 const [isConfirmDeleteOpen, setIsConfirmDeleteOpen] = (0, import_element79.useState)(false); 28716 const [notice, setNotice] = (0, import_element79.useState)(null); 28717 const [baseFontFamilies] = useSetting("typography.fontFamilies", void 0, "base"); 28718 const globalStylesId = (0, import_data7.useSelect)((select) => { 28719 const { __experimentalGetCurrentGlobalStylesId } = select(import_core_data5.store); 28720 return __experimentalGetCurrentGlobalStylesId(); 28721 }, []); 28722 const globalStyles = (0, import_core_data5.useEntityRecord)( 28723 "root", 28724 "globalStyles", 28725 globalStylesId ?? 0, 28726 { enabled: globalStylesId !== void 0 } 28727 ); 28728 const editedFontFamilies = globalStyles?.edits?.settings?.typography?.fontFamilies; 28729 const savedFontFamilies = globalStyles?.record?.settings?.typography?.fontFamilies; 28730 const fontFamiliesHasChanges = (0, import_element79.useMemo)(() => { 28731 if (editedFontFamilies === void 0) { 28732 return false; 28733 } 28734 return getFontFamiliesKey(editedFontFamilies) !== getFontFamiliesKey(savedFontFamilies); 28735 }, [editedFontFamilies, savedFontFamilies]); 28736 const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map((f) => setUIValuesNeeded(f, { source: "theme" })).sort((a, b) => a.name.localeCompare(b.name)) : []; 28737 const themeFontsSlugs = new Set(themeFonts.map((f) => f.slug)); 28738 const baseThemeFonts = baseFontFamilies?.theme ? themeFonts.concat( 28739 baseFontFamilies.theme.filter((f) => !themeFontsSlugs.has(f.slug)).map((f) => setUIValuesNeeded(f, { source: "theme" })).sort((a, b) => a.name.localeCompare(b.name)) 28740 ) : []; 28741 const customFontFamilyId = libraryFontSelected?.source === "custom" && libraryFontSelected?.id; 28742 const canUserDelete = (0, import_data7.useSelect)( 28743 (select) => { 28744 const { canUser } = select(import_core_data5.store); 28745 return customFontFamilyId && canUser("delete", { 28746 kind: "postType", 28747 name: "wp_font_family", 28748 id: customFontFamilyId 28749 }); 28750 }, 28751 [customFontFamilyId] 28752 ); 28753 const shouldDisplayDeleteButton = !!libraryFontSelected && libraryFontSelected?.source !== "theme" && canUserDelete; 28754 const handleUninstallClick = () => { 28755 setIsConfirmDeleteOpen(true); 28756 }; 28757 const handleUpdate = async () => { 28758 setNotice(null); 28759 try { 28760 await saveFontFamilies(fontFamilies); 28761 setNotice({ 28762 type: "success", 28763 message: (0, import_i18n23.__)("Font family updated successfully.") 28764 }); 28765 } catch (error2) { 28766 setNotice({ 28767 type: "error", 28768 message: (0, import_i18n23.sprintf)( 28769 /* translators: %s: error message */ 28770 (0, import_i18n23.__)("There was an error updating the font family. %s"), 28771 error2.message 28772 ) 28773 }); 28774 } 28775 }; 28776 const getFontFacesToDisplay = (font2) => { 28777 if (!font2) { 28778 return []; 28779 } 28780 if (!font2.fontFace || !font2.fontFace.length) { 28781 return [ 28782 { 28783 fontFamily: font2.fontFamily, 28784 fontStyle: "normal", 28785 fontWeight: "400" 28786 } 28787 ]; 28788 } 28789 return sortFontFaces(font2.fontFace); 28790 }; 28791 const getFontCardVariantsText = (font2) => { 28792 const variantsInstalled = font2?.fontFace && (font2?.fontFace?.length ?? 0) > 0 ? font2.fontFace.length : 1; 28793 const variantsActive = getFontFacesActivated( 28794 font2.slug, 28795 font2.source 28796 ).length; 28797 return (0, import_i18n23.sprintf)( 28798 /* translators: 1: Active font variants, 2: Total font variants. */ 28799 (0, import_i18n23.__)("%1$d of %2$d active"), 28800 variantsActive, 28801 variantsInstalled 28802 ); 28803 }; 28804 (0, import_element79.useEffect)(() => { 28805 handleSetLibraryFontSelected(libraryFontSelected); 28806 }, []); 28807 const activeFontsCount = libraryFontSelected ? getFontFacesActivated( 28808 libraryFontSelected.slug, 28809 libraryFontSelected.source 28810 ).length : 0; 28811 const selectedFontsCount = libraryFontSelected?.fontFace?.length ?? (libraryFontSelected?.fontFamily ? 1 : 0); 28812 const isIndeterminate = activeFontsCount > 0 && activeFontsCount !== selectedFontsCount; 28813 const isSelectAllChecked = activeFontsCount === selectedFontsCount; 28814 const toggleSelectAll = () => { 28815 if (!libraryFontSelected || !libraryFontSelected?.source) { 28816 return; 28817 } 28818 const initialFonts = fontFamilies?.[libraryFontSelected.source]?.filter( 28819 (f) => f.slug !== libraryFontSelected.slug 28820 ) ?? []; 28821 const newFonts = isSelectAllChecked ? initialFonts : [...initialFonts, libraryFontSelected]; 28822 setFontFamilies({ 28823 ...fontFamilies, 28824 [libraryFontSelected.source]: newFonts 28825 }); 28826 if (libraryFontSelected.fontFace) { 28827 libraryFontSelected.fontFace.forEach((face) => { 28828 if (isSelectAllChecked) { 28829 unloadFontFaceInBrowser(face, "all"); 28830 } else { 28831 const displaySrc = getDisplaySrcFromFontFace( 28832 face?.src ?? "" 28833 ); 28834 if (displaySrc) { 28835 loadFontFaceInBrowser(face, displaySrc, "all"); 28836 } 28837 } 28838 }); 28839 } 28840 }; 28841 const hasFonts = baseThemeFonts.length > 0 || baseCustomFonts.length > 0; 28842 return /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", { className: "font-library__tabpanel-layout", children: [ 28843 isResolvingLibrary && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", { className: "font-library__loading", children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28844 progress_exports.Root, 28845 { 28846 value: null, 28847 "aria-label": (0, import_i18n23.__)("Loading fonts"), 28848 children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(progress_exports.Track, { children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(progress_exports.Indicator, {}) }) 28849 } 28850 ) }), 28851 !isResolvingLibrary && /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_jsx_runtime149.Fragment, { children: [ 28852 /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)( 28853 import_components22.Navigator, 28854 { 28855 initialPath: libraryFontSelected ? "/fontFamily" : "/", 28856 children: [ 28857 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_components22.Navigator.Screen, { path: "/", children: /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_components22.__experimentalVStack, { spacing: "8", children: [ 28858 notice && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28859 import_components22.Notice, 28860 { 28861 status: notice.type, 28862 onRemove: () => setNotice(null), 28863 children: notice.message 28864 } 28865 ), 28866 !hasFonts && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_components22.__experimentalText, { as: "p", children: (0, import_i18n23.__)("No fonts installed.") }), 28867 baseThemeFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_components22.__experimentalVStack, { children: [ 28868 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("h2", { 28869 className: "font-library__fonts-title", 28870 /* translators: Heading for a list of fonts provided by the theme. */ 28871 children: (0, import_i18n23._x)("Theme", "font source") 28872 }), 28873 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28874 "ul", 28875 { 28876 role: "list", 28877 className: "font-library__fonts-list", 28878 children: baseThemeFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28879 "li", 28880 { 28881 className: "font-library__fonts-list-item", 28882 children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28883 font_card_default, 28884 { 28885 font: font2, 28886 navigatorPath: "/fontFamily", 28887 variantsText: getFontCardVariantsText( 28888 font2 28889 ), 28890 shouldFocus: font2.slug === lastSelectedFontSlug, 28891 onClick: () => { 28892 setNotice(null); 28893 handleSetLibraryFontSelected( 28894 font2 28895 ); 28896 } 28897 } 28898 ) 28899 }, 28900 font2.slug 28901 )) 28902 } 28903 ) 28904 ] }), 28905 baseCustomFonts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_components22.__experimentalVStack, { children: [ 28906 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("h2", { 28907 className: "font-library__fonts-title", 28908 /* translators: Heading for a list of fonts installed by the user. */ 28909 children: (0, import_i18n23._x)("Custom", "font source") 28910 }), 28911 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28912 "ul", 28913 { 28914 role: "list", 28915 className: "font-library__fonts-list", 28916 children: baseCustomFonts.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28917 "li", 28918 { 28919 className: "font-library__fonts-list-item", 28920 children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28921 font_card_default, 28922 { 28923 font: font2, 28924 navigatorPath: "/fontFamily", 28925 variantsText: getFontCardVariantsText( 28926 font2 28927 ), 28928 shouldFocus: font2.slug === lastSelectedFontSlug, 28929 onClick: () => { 28930 setNotice(null); 28931 handleSetLibraryFontSelected( 28932 font2 28933 ); 28934 } 28935 } 28936 ) 28937 }, 28938 font2.slug 28939 )) 28940 } 28941 ) 28942 ] }) 28943 ] }) }), 28944 /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_components22.Navigator.Screen, { path: "/fontFamily", children: [ 28945 libraryFontSelected && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28946 ConfirmDeleteDialog, 28947 { 28948 font: libraryFontSelected, 28949 isOpen: isConfirmDeleteOpen, 28950 setIsOpen: setIsConfirmDeleteOpen, 28951 setNotice, 28952 uninstallFontFamily, 28953 handleSetLibraryFontSelected 28954 } 28955 ), 28956 /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_components22.Flex, { justify: "flex-start", children: [ 28957 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28958 import_components22.Navigator.BackButton, 28959 { 28960 icon: (0, import_i18n23.isRTL)() ? chevron_right_default : chevron_left_default, 28961 size: "small", 28962 onClick: () => { 28963 setLastSelectedFontSlug( 28964 libraryFontSelected?.slug 28965 ); 28966 handleSetLibraryFontSelected( 28967 void 0 28968 ); 28969 setNotice(null); 28970 }, 28971 label: (0, import_i18n23.__)("Back") 28972 } 28973 ), 28974 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28975 import_components22.__experimentalHeading, 28976 { 28977 level: 2, 28978 size: 13, 28979 className: "global-styles-ui-header", 28980 children: libraryFontSelected?.name 28981 } 28982 ) 28983 ] }), 28984 notice && /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_jsx_runtime149.Fragment, { children: [ 28985 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_components22.__experimentalSpacer, { margin: 1 }), 28986 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 28987 import_components22.Notice, 28988 { 28989 status: notice.type, 28990 onRemove: () => setNotice(null), 28991 children: notice.message 28992 } 28993 ), 28994 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_components22.__experimentalSpacer, { margin: 1 }) 28995 ] }), 28996 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_components22.__experimentalSpacer, { margin: 4 }), 28997 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_components22.__experimentalText, { children: (0, import_i18n23.__)( 28998 "Choose font variants. Keep in mind that too many variants could make your site slower." 28999 ) }), 29000 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_components22.__experimentalSpacer, { margin: 4 }), 29001 /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_components22.__experimentalVStack, { spacing: 0, children: [ 29002 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 29003 import_components22.CheckboxControl, 29004 { 29005 className: "font-library__select-all", 29006 label: (0, import_i18n23.__)("Select all"), 29007 checked: isSelectAllChecked, 29008 onChange: toggleSelectAll, 29009 indeterminate: isIndeterminate 29010 } 29011 ), 29012 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_components22.__experimentalSpacer, { margin: 8 }), 29013 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 29014 "ul", 29015 { 29016 role: "list", 29017 className: "font-library__fonts-list", 29018 children: libraryFontSelected && getFontFacesToDisplay( 29019 libraryFontSelected 29020 ).map((face, i) => /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 29021 "li", 29022 { 29023 className: "font-library__fonts-list-item", 29024 children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 29025 library_font_variant_default, 29026 { 29027 font: libraryFontSelected, 29028 face 29029 }, 29030 `face$i}` 29031 ) 29032 }, 29033 `face$i}` 29034 )) 29035 } 29036 ) 29037 ] }) 29038 ] }) 29039 ] 29040 } 29041 ), 29042 /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_components22.__experimentalHStack, { justify: "flex-end", className: "font-library__footer", children: [ 29043 isInstalling && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 29044 progress_exports.Root, 29045 { 29046 value: null, 29047 "aria-label": (0, import_i18n23.__)("Installing fonts"), 29048 children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(progress_exports.Track, { children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(progress_exports.Indicator, {}) }) 29049 } 29050 ), 29051 shouldDisplayDeleteButton && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 29052 import_components22.Button, 29053 { 29054 __next40pxDefaultSize: true, 29055 isDestructive: true, 29056 variant: "tertiary", 29057 onClick: handleUninstallClick, 29058 children: (0, import_i18n23.__)("Delete") 29059 } 29060 ), 29061 /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 29062 import_components22.Button, 29063 { 29064 __next40pxDefaultSize: true, 29065 variant: "primary", 29066 onClick: handleUpdate, 29067 disabled: !fontFamiliesHasChanges, 29068 accessibleWhenDisabled: true, 29069 children: (0, import_i18n23.__)("Update") 29070 } 29071 ) 29072 ] }) 29073 ] }) 29074 ] }); 29075 } 29076 function ConfirmDeleteDialog({ 29077 font: font2, 29078 isOpen, 29079 setIsOpen, 29080 setNotice, 29081 uninstallFontFamily, 29082 handleSetLibraryFontSelected 29083 }) { 29084 const navigator2 = (0, import_components22.useNavigator)(); 29085 const handleConfirmUninstall = async () => { 29086 setNotice(null); 29087 setIsOpen(false); 29088 try { 29089 await uninstallFontFamily(font2); 29090 navigator2.goBack(); 29091 handleSetLibraryFontSelected(void 0); 29092 setNotice({ 29093 type: "success", 29094 message: (0, import_i18n23.__)("Font family uninstalled successfully.") 29095 }); 29096 } catch (error2) { 29097 setNotice({ 29098 type: "error", 29099 message: (0, import_i18n23.__)("There was an error uninstalling the font family.") + error2.message 29100 }); 29101 } 29102 }; 29103 const handleCancelUninstall = () => { 29104 setIsOpen(false); 29105 }; 29106 return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)( 29107 import_components22.__experimentalConfirmDialog, 29108 { 29109 isOpen, 29110 cancelButtonText: (0, import_i18n23.__)("Cancel"), 29111 confirmButtonText: (0, import_i18n23.__)("Delete"), 29112 onCancel: handleCancelUninstall, 29113 onConfirm: handleConfirmUninstall, 29114 size: "medium", 29115 children: font2 && (0, import_i18n23.sprintf)( 29116 /* translators: %s: Name of the font. */ 29117 (0, import_i18n23.__)( 29118 'Are you sure you want to delete "%s" font and all its variants and assets?' 29119 ), 29120 font2.name 29121 ) 29122 } 29123 ); 29124 } 29125 var installed_fonts_default = InstalledFonts; 29126 29127 // packages/global-styles-ui/build-module/font-library/font-collection.mjs 29128 var import_element81 = __toESM(require_element(), 1); 29129 var import_components25 = __toESM(require_components(), 1); 29130 var import_compose5 = __toESM(require_compose(), 1); 29131 var import_i18n26 = __toESM(require_i18n(), 1); 29132 var import_core_data6 = __toESM(require_core_data(), 1); 29133 29134 // packages/global-styles-ui/build-module/font-library/utils/filter-fonts.mjs 29135 function filterFonts(fonts, filters) { 29136 const { category, search } = filters; 29137 let filteredFonts = fonts || []; 29138 if (category && category !== "all") { 29139 filteredFonts = filteredFonts.filter( 29140 (font2) => font2.categories && font2.categories.indexOf(category) !== -1 29141 ); 29142 } 29143 if (search) { 29144 filteredFonts = filteredFonts.filter( 29145 (font2) => font2.font_family_settings && font2.font_family_settings.name.toLowerCase().includes(search.toLowerCase()) 29146 ); 29147 } 29148 return filteredFonts; 29149 } 29150 29151 // packages/global-styles-ui/build-module/font-library/utils/fonts-outline.mjs 29152 function getFontsOutline(fonts) { 29153 return fonts.reduce( 29154 (acc, font2) => ({ 29155 ...acc, 29156 [font2.slug]: (font2?.fontFace || []).reduce( 29157 (faces, face) => ({ 29158 ...faces, 29159 [`$face.fontStyle}-$face.fontWeight}`]: true 29160 }), 29161 {} 29162 ) 29163 }), 29164 {} 29165 ); 29166 } 29167 function isFontFontFaceInOutline(slug, face, outline) { 29168 if (!face) { 29169 return !!outline[slug]; 29170 } 29171 return !!outline[slug]?.[`$face.fontStyle}-$face.fontWeight}`]; 29172 } 29173 29174 // packages/global-styles-ui/build-module/font-library/google-fonts-confirm-dialog.mjs 29175 var import_i18n24 = __toESM(require_i18n(), 1); 29176 var import_components23 = __toESM(require_components(), 1); 29177 var import_jsx_runtime150 = __toESM(require_jsx_runtime(), 1); 29178 function GoogleFontsConfirmDialog() { 29179 const handleConfirm = () => { 29180 window.localStorage.setItem( 29181 "wp-font-library-google-fonts-permission", 29182 "true" 29183 ); 29184 window.dispatchEvent(new Event("storage")); 29185 }; 29186 return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", { className: "font-library__google-fonts-confirm", children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_components23.Card, { children: /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(import_components23.CardBody, { children: [ 29187 /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_components23.__experimentalHeading, { level: 2, children: (0, import_i18n24.__)("Connect to Google Fonts") }), 29188 /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_components23.__experimentalSpacer, { margin: 6 }), 29189 /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_components23.__experimentalText, { as: "p", children: (0, import_i18n24.__)( 29190 "To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts." 29191 ) }), 29192 /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_components23.__experimentalSpacer, { margin: 3 }), 29193 /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_components23.__experimentalText, { as: "p", children: (0, import_i18n24.__)( 29194 "You can alternatively upload files directly on the Upload tab." 29195 ) }), 29196 /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_components23.__experimentalSpacer, { margin: 6 }), 29197 /* @__PURE__ */ (0, import_jsx_runtime150.jsx)( 29198 import_components23.Button, 29199 { 29200 __next40pxDefaultSize: true, 29201 variant: "primary", 29202 onClick: handleConfirm, 29203 children: (0, import_i18n24.__)("Allow access to Google Fonts") 29204 } 29205 ) 29206 ] }) }) }); 29207 } 29208 var google_fonts_confirm_dialog_default = GoogleFontsConfirmDialog; 29209 29210 // packages/global-styles-ui/build-module/font-library/collection-font-variant.mjs 29211 var import_element80 = __toESM(require_element(), 1); 29212 var import_components24 = __toESM(require_components(), 1); 29213 var import_i18n25 = __toESM(require_i18n(), 1); 29214 var import_jsx_runtime151 = __toESM(require_jsx_runtime(), 1); 29215 function CollectionFontVariant({ 29216 face, 29217 font: font2, 29218 handleToggleVariant, 29219 selected, 29220 installed 29221 }) { 29222 const handleToggleActivation = () => { 29223 if (installed) { 29224 return; 29225 } 29226 if (font2?.fontFace) { 29227 handleToggleVariant(font2, face); 29228 return; 29229 } 29230 handleToggleVariant(font2); 29231 }; 29232 const displayName = font2.name + " " + getFontFaceVariantName(face); 29233 const checkboxId = (0, import_element80.useId)(); 29234 const installedId = `$checkboxId}-installed`; 29235 return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("div", { className: "font-library__font-card", children: /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(import_components24.Flex, { justify: "space-between", align: "center", gap: "1rem", children: [ 29236 /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(import_components24.Flex, { justify: "flex-start", align: "center", gap: "1rem", children: [ 29237 /* @__PURE__ */ (0, import_jsx_runtime151.jsx)( 29238 import_components24.CheckboxControl, 29239 { 29240 checked: selected || installed, 29241 disabled: installed, 29242 onChange: handleToggleActivation, 29243 id: checkboxId, 29244 "aria-describedby": installed ? installedId : void 0 29245 } 29246 ), 29247 /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("label", { htmlFor: checkboxId, children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)( 29248 font_demo_default, 29249 { 29250 font: face, 29251 text: displayName, 29252 onClick: handleToggleActivation 29253 } 29254 ) }) 29255 ] }), 29256 installed && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)( 29257 Text, 29258 { 29259 id: installedId, 29260 className: "font-library__font-card__count", 29261 children: (0, import_i18n25.__)("Installed") 29262 } 29263 ) 29264 ] }) }); 29265 } 29266 var collection_font_variant_default = CollectionFontVariant; 29267 29268 // packages/global-styles-ui/build-module/font-library/font-collection.mjs 29269 var import_jsx_runtime152 = __toESM(require_jsx_runtime(), 1); 29270 var DEFAULT_CATEGORY = { 29271 slug: "all", 29272 name: (0, import_i18n26._x)("All", "font categories") 29273 }; 29274 var LOCAL_STORAGE_ITEM = "wp-font-library-google-fonts-permission"; 29275 var MIN_WINDOW_HEIGHT = 500; 29276 function FontCollection({ slug }) { 29277 const requiresPermission = slug === "google-fonts"; 29278 const getGoogleFontsPermissionFromStorage = () => { 29279 return window.localStorage.getItem(LOCAL_STORAGE_ITEM) === "true"; 29280 }; 29281 const [selectedFont, setSelectedFont] = (0, import_element81.useState)( 29282 null 29283 ); 29284 const [lastSelectedFontSlug, setLastSelectedFontSlug] = (0, import_element81.useState)(void 0); 29285 const [notice, setNotice] = (0, import_element81.useState)(null); 29286 const [fontsToInstall, setFontsToInstall] = (0, import_element81.useState)( 29287 [] 29288 ); 29289 const [page, setPage] = (0, import_element81.useState)(1); 29290 const [filters, setFilters] = (0, import_element81.useState)({}); 29291 const [renderConfirmDialog, setRenderConfirmDialog] = (0, import_element81.useState)( 29292 requiresPermission && !getGoogleFontsPermissionFromStorage() 29293 ); 29294 const { installFonts, isInstalling, baseCustomFonts } = (0, import_element81.useContext)(FontLibraryContext); 29295 const { record: selectedCollection, isResolving: isLoading } = (0, import_core_data6.useEntityRecord)("root", "fontCollection", slug); 29296 (0, import_element81.useEffect)(() => { 29297 const handleStorage = () => { 29298 setRenderConfirmDialog( 29299 requiresPermission && !getGoogleFontsPermissionFromStorage() 29300 ); 29301 }; 29302 handleStorage(); 29303 window.addEventListener("storage", handleStorage); 29304 return () => window.removeEventListener("storage", handleStorage); 29305 }, [slug, requiresPermission]); 29306 const revokeAccess = () => { 29307 window.localStorage.setItem(LOCAL_STORAGE_ITEM, "false"); 29308 window.dispatchEvent(new Event("storage")); 29309 }; 29310 (0, import_element81.useEffect)(() => { 29311 setSelectedFont(null); 29312 }, [slug]); 29313 (0, import_element81.useEffect)(() => { 29314 setFontsToInstall([]); 29315 }, [selectedFont]); 29316 const collectionFonts = (0, import_element81.useMemo)( 29317 () => selectedCollection?.font_families ?? [], 29318 [selectedCollection] 29319 ); 29320 const collectionCategories = selectedCollection?.categories ?? []; 29321 const categories = [DEFAULT_CATEGORY, ...collectionCategories]; 29322 const fonts = (0, import_element81.useMemo)( 29323 () => filterFonts(collectionFonts, filters), 29324 [collectionFonts, filters] 29325 ); 29326 const windowHeight = Math.max(window.innerHeight, MIN_WINDOW_HEIGHT); 29327 const pageSize = Math.floor((windowHeight - 417) / 61); 29328 const totalPages = Math.ceil(fonts.length / pageSize); 29329 const itemsStart = (page - 1) * pageSize; 29330 const itemsLimit = page * pageSize; 29331 const items = fonts.slice(itemsStart, itemsLimit); 29332 const handleCategoryFilter = (category) => { 29333 setFilters({ ...filters, category }); 29334 setPage(1); 29335 }; 29336 const handleUpdateSearchInput = (value) => { 29337 setFilters({ ...filters, search: value }); 29338 setPage(1); 29339 }; 29340 const debouncedUpdateSearchInput = (0, import_compose5.debounce)( 29341 // @ts-expect-error `debounce` expects a `(...args: unknown[]) => unknown` callback. 29342 handleUpdateSearchInput, 29343 300 29344 ); 29345 const handleToggleVariant = (font2, face) => { 29346 const newFontsToInstall = toggleFont(font2, face, fontsToInstall); 29347 setFontsToInstall(newFontsToInstall); 29348 }; 29349 const fontToInstallOutline = getFontsOutline(fontsToInstall); 29350 const installedFontsOutline = getFontsOutline(baseCustomFonts); 29351 const isFontFaceInstalled = (face) => !!selectedFont && isFontFontFaceInOutline( 29352 selectedFont.slug, 29353 selectedFont.fontFace ? face : null, 29354 // If the font has no fontFace, we want to check if the font is installed 29355 installedFontsOutline 29356 ); 29357 const installableFontFaces = selectedFont?.fontFace?.filter( 29358 (face) => !isFontFaceInstalled(face) 29359 ); 29360 const isAllInstalled = !!selectedFont && (selectedFont.fontFace?.length ? installableFontFaces?.length === 0 : isFontFontFaceInOutline( 29361 selectedFont.slug, 29362 null, 29363 installedFontsOutline 29364 )); 29365 const resetFontsToInstall = () => { 29366 setFontsToInstall([]); 29367 }; 29368 const selectFontCount = fontsToInstall.length > 0 ? fontsToInstall[0]?.fontFace?.length ?? 0 : 0; 29369 const isIndeterminate = selectFontCount > 0 && selectFontCount !== installableFontFaces?.length; 29370 const isSelectAllChecked = selectFontCount === installableFontFaces?.length; 29371 const toggleSelectAll = () => { 29372 const newFonts = []; 29373 if (!isSelectAllChecked && selectedFont) { 29374 newFonts.push( 29375 selectedFont.fontFace ? { ...selectedFont, fontFace: installableFontFaces } : selectedFont 29376 ); 29377 } 29378 setFontsToInstall(newFonts); 29379 }; 29380 const handleInstall = async () => { 29381 setNotice(null); 29382 const fontFamily = fontsToInstall[0]; 29383 try { 29384 if (fontFamily?.fontFace) { 29385 await Promise.all( 29386 fontFamily.fontFace.map(async (fontFace) => { 29387 if (fontFace.src) { 29388 fontFace.file = await downloadFontFaceAssets( 29389 fontFace.src 29390 ); 29391 } 29392 }) 29393 ); 29394 } 29395 } catch { 29396 setNotice({ 29397 type: "error", 29398 message: (0, import_i18n26.__)( 29399 "Error installing the fonts, could not be downloaded." 29400 ) 29401 }); 29402 return; 29403 } 29404 try { 29405 await installFonts([fontFamily]); 29406 setNotice({ 29407 type: "success", 29408 message: (0, import_i18n26.__)("Fonts were installed successfully.") 29409 }); 29410 } catch (error2) { 29411 setNotice({ 29412 type: "error", 29413 message: error2.message 29414 }); 29415 } 29416 resetFontsToInstall(); 29417 }; 29418 const getSortedFontFaces = (fontFamily) => { 29419 if (!fontFamily) { 29420 return []; 29421 } 29422 if (!fontFamily.fontFace || !fontFamily.fontFace.length) { 29423 return [ 29424 { 29425 fontFamily: fontFamily.fontFamily, 29426 fontStyle: "normal", 29427 fontWeight: "400" 29428 } 29429 ]; 29430 } 29431 return sortFontFaces(fontFamily.fontFace); 29432 }; 29433 if (renderConfirmDialog) { 29434 return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(google_fonts_confirm_dialog_default, {}); 29435 } 29436 const showActions = slug === "google-fonts" && !renderConfirmDialog && !selectedFont; 29437 return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", { className: "font-library__tabpanel-layout", children: [ 29438 isLoading && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "font-library__loading", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29439 progress_exports.Root, 29440 { 29441 value: null, 29442 "aria-label": (0, import_i18n26.__)("Loading fonts"), 29443 children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(progress_exports.Track, { children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(progress_exports.Indicator, {}) }) 29444 } 29445 ) }), 29446 !isLoading && selectedCollection && /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_jsx_runtime152.Fragment, { children: [ 29447 /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)( 29448 import_components25.Navigator, 29449 { 29450 initialPath: "/", 29451 className: "font-library__tabpanel-layout", 29452 children: [ 29453 /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_components25.Navigator.Screen, { path: "/", children: [ 29454 /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_components25.__experimentalHStack, { justify: "space-between", children: [ 29455 /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_components25.__experimentalVStack, { children: [ 29456 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalHeading, { level: 2, size: 13, children: selectedCollection.name }), 29457 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalText, { children: selectedCollection.description }) 29458 ] }), 29459 showActions && /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(menu_exports.Root, { children: [ 29460 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29461 menu_exports.Trigger, 29462 { 29463 render: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29464 import_components25.Button, 29465 { 29466 size: "small", 29467 icon: more_vertical_default, 29468 label: (0, import_i18n26.__)("Actions") 29469 } 29470 ) 29471 } 29472 ), 29473 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29474 menu_exports.Popup, 29475 { 29476 positioner: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29477 menu_exports.Positioner, 29478 { 29479 side: "bottom", 29480 align: "end" 29481 } 29482 ), 29483 children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(menu_exports.Item, { onClick: revokeAccess, children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(menu_exports.ItemLabel, { children: (0, import_i18n26.__)( 29484 "Revoke access to Google Fonts" 29485 ) }) }) 29486 } 29487 ) 29488 ] }) 29489 ] }), 29490 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalSpacer, { margin: 4 }), 29491 /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_components25.__experimentalHStack, { spacing: 4, justify: "space-between", children: [ 29492 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29493 import_components25.SearchControl, 29494 { 29495 className: "font-library__search", 29496 value: filters.search, 29497 placeholder: (0, import_i18n26.__)("Font name\u2026"), 29498 label: (0, import_i18n26.__)("Search"), 29499 onChange: debouncedUpdateSearchInput, 29500 hideLabelFromVision: false 29501 } 29502 ), 29503 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29504 import_components25.SelectControl, 29505 { 29506 label: (0, import_i18n26.__)("Category"), 29507 value: filters.category, 29508 onChange: handleCategoryFilter, 29509 children: categories && categories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29510 "option", 29511 { 29512 value: category.slug, 29513 children: category.name 29514 }, 29515 category.slug 29516 )) 29517 } 29518 ) 29519 ] }), 29520 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalSpacer, { margin: 4 }), 29521 !!selectedCollection?.font_families?.length && !fonts.length && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalText, { children: (0, import_i18n26.__)( 29522 "No fonts found. Try with a different search term." 29523 ) }), 29524 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "font-library__fonts-grid__main", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29525 "ul", 29526 { 29527 role: "list", 29528 className: "font-library__fonts-list", 29529 children: items.map((font2) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29530 "li", 29531 { 29532 className: "font-library__fonts-list-item", 29533 children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29534 font_card_default, 29535 { 29536 font: font2.font_family_settings, 29537 navigatorPath: "/fontFamily", 29538 shouldFocus: font2.font_family_settings.slug === lastSelectedFontSlug, 29539 onClick: () => { 29540 setSelectedFont( 29541 font2.font_family_settings 29542 ); 29543 } 29544 } 29545 ) 29546 }, 29547 font2.font_family_settings.slug 29548 )) 29549 } 29550 ) }) 29551 ] }), 29552 /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_components25.Navigator.Screen, { path: "/fontFamily", children: [ 29553 /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_components25.Flex, { justify: "flex-start", children: [ 29554 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29555 import_components25.Navigator.BackButton, 29556 { 29557 icon: (0, import_i18n26.isRTL)() ? chevron_right_default : chevron_left_default, 29558 size: "small", 29559 onClick: () => { 29560 setLastSelectedFontSlug( 29561 selectedFont?.slug 29562 ); 29563 setSelectedFont(null); 29564 setNotice(null); 29565 }, 29566 label: (0, import_i18n26.__)("Back") 29567 } 29568 ), 29569 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29570 import_components25.__experimentalHeading, 29571 { 29572 level: 2, 29573 size: 13, 29574 className: "global-styles-ui-header", 29575 children: selectedFont?.name 29576 } 29577 ) 29578 ] }), 29579 notice && /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_jsx_runtime152.Fragment, { children: [ 29580 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalSpacer, { margin: 1 }), 29581 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29582 import_components25.Notice, 29583 { 29584 status: notice.type, 29585 onRemove: () => setNotice(null), 29586 children: notice.message 29587 } 29588 ), 29589 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalSpacer, { margin: 1 }) 29590 ] }), 29591 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalSpacer, { margin: 4 }), 29592 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalText, { children: (0, import_i18n26.__)("Select font variants to install.") }), 29593 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalSpacer, { margin: 4 }), 29594 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29595 import_components25.CheckboxControl, 29596 { 29597 className: "font-library__select-all", 29598 label: (0, import_i18n26.__)("Select all"), 29599 checked: isSelectAllChecked || isAllInstalled, 29600 onChange: toggleSelectAll, 29601 indeterminate: isIndeterminate, 29602 disabled: isAllInstalled 29603 } 29604 ), 29605 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalVStack, { spacing: 0, children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29606 "ul", 29607 { 29608 role: "list", 29609 className: "font-library__fonts-list", 29610 children: selectedFont && getSortedFontFaces(selectedFont).map( 29611 (face, i) => /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29612 "li", 29613 { 29614 className: "font-library__fonts-list-item", 29615 children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29616 collection_font_variant_default, 29617 { 29618 font: selectedFont, 29619 face, 29620 handleToggleVariant, 29621 selected: isFontFontFaceInOutline( 29622 selectedFont.slug, 29623 selectedFont.fontFace ? face : null, 29624 // If the font has no fontFace, we want to check if the font is in the outline 29625 fontToInstallOutline 29626 ), 29627 installed: isFontFaceInstalled( 29628 face 29629 ) 29630 } 29631 ) 29632 }, 29633 `face$i}` 29634 ) 29635 ) 29636 } 29637 ) }), 29638 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_components25.__experimentalSpacer, { margin: 16 }) 29639 ] }) 29640 ] 29641 } 29642 ), 29643 selectedFont && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29644 import_components25.Flex, 29645 { 29646 justify: "flex-end", 29647 className: "font-library__footer", 29648 children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29649 import_components25.Button, 29650 { 29651 __next40pxDefaultSize: true, 29652 variant: "primary", 29653 onClick: handleInstall, 29654 isBusy: isInstalling, 29655 disabled: fontsToInstall.length === 0 || isInstalling, 29656 accessibleWhenDisabled: true, 29657 children: (0, import_i18n26.__)("Install") 29658 } 29659 ) 29660 } 29661 ), 29662 !selectedFont && /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)( 29663 import_components25.__experimentalHStack, 29664 { 29665 expanded: false, 29666 className: "font-library__footer", 29667 justify: "end", 29668 spacing: 6, 29669 children: [ 29670 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29671 import_components25.__experimentalHStack, 29672 { 29673 justify: "flex-start", 29674 expanded: false, 29675 spacing: 1, 29676 className: "font-library__page-selection", 29677 children: (0, import_element81.createInterpolateElement)( 29678 (0, import_i18n26.sprintf)( 29679 // translators: 1: Current page number, 2: Total number of pages. 29680 (0, import_i18n26._x)( 29681 "<div>Page</div>%1$s<div>of %2$d</div>", 29682 "paging" 29683 ), 29684 "<CurrentPage />", 29685 totalPages 29686 ), 29687 { 29688 div: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { "aria-hidden": true }), 29689 // @ts-expect-error — Tag injected via sprintf argument, not visible in format string. 29690 CurrentPage: /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)( 29691 select_exports.Root, 29692 { 29693 value: page.toString(), 29694 onValueChange: (newPage) => { 29695 if (newPage !== null) { 29696 setPage( 29697 parseInt(newPage) 29698 ); 29699 } 29700 }, 29701 children: [ 29702 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29703 select_exports.Trigger, 29704 { 29705 className: "font-library__page-selection-trigger", 29706 size: "small", 29707 variant: "minimal", 29708 "aria-label": (0, import_i18n26.__)( 29709 "Current page" 29710 ) 29711 } 29712 ), 29713 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(select_exports.Popup, { width: "content", children: [ 29714 ...Array(totalPages) 29715 ].map((e, i) => { 29716 const value = (i + 1).toString(); 29717 return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29718 select_exports.Item, 29719 { 29720 value, 29721 size: "small", 29722 children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(select_exports.ItemLabel, { children: value }) 29723 }, 29724 value 29725 ); 29726 }) }) 29727 ] 29728 } 29729 ) 29730 } 29731 ) 29732 } 29733 ), 29734 /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(import_components25.__experimentalHStack, { expanded: false, spacing: 1, children: [ 29735 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29736 import_components25.Button, 29737 { 29738 onClick: () => setPage(page - 1), 29739 disabled: page === 1, 29740 accessibleWhenDisabled: true, 29741 label: (0, import_i18n26.__)("Previous page"), 29742 icon: (0, import_i18n26.isRTL)() ? next_default : previous_default, 29743 showTooltip: true, 29744 size: "compact", 29745 tooltipPosition: "top" 29746 } 29747 ), 29748 /* @__PURE__ */ (0, import_jsx_runtime152.jsx)( 29749 import_components25.Button, 29750 { 29751 onClick: () => setPage(page + 1), 29752 disabled: page === totalPages, 29753 accessibleWhenDisabled: true, 29754 label: (0, import_i18n26.__)("Next page"), 29755 icon: (0, import_i18n26.isRTL)() ? previous_default : next_default, 29756 showTooltip: true, 29757 size: "compact", 29758 tooltipPosition: "top" 29759 } 29760 ) 29761 ] }) 29762 ] 29763 } 29764 ) 29765 ] }) 29766 ] }); 29767 } 29768 var font_collection_default = FontCollection; 29769 29770 // packages/global-styles-ui/build-module/font-library/upload-fonts.mjs 29771 var import_i18n27 = __toESM(require_i18n(), 1); 29772 var import_components26 = __toESM(require_components(), 1); 29773 var import_element82 = __toESM(require_element(), 1); 29774 29775 // packages/global-styles-ui/build-module/font-library/lib/unbrotli.mjs 29776 var __require2 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, { 29777 get: (a, b) => (typeof __require !== "undefined" ? __require : a)[b] 29778 }) : x2)(function(x2) { 29779 if (typeof __require !== "undefined") return __require.apply(this, arguments); 29780 throw Error('Dynamic require of "' + x2 + '" is not supported'); 29781 }); 29782 var unbrotli_default = (function() { 29783 var define, module, exports; 29784 return (/* @__PURE__ */ (function() { 29785 function r2(e, n, t) { 29786 function o(i2, f) { 29787 if (!n[i2]) { 29788 if (!e[i2]) { 29789 var c2 = "function" == typeof __require2 && __require2; 29790 if (!f && c2) return c2(i2, true); 29791 if (u) return u(i2, true); 29792 var a = new Error("Cannot find module '" + i2 + "'"); 29793 throw a.code = "MODULE_NOT_FOUND", a; 29794 } 29795 var p3 = n[i2] = { exports: {} }; 29796 e[i2][0].call( 29797 p3.exports, 29798 function(r22) { 29799 var n2 = e[i2][1][r22]; 29800 return o(n2 || r22); 29801 }, 29802 p3, 29803 p3.exports, 29804 r2, 29805 e, 29806 n, 29807 t 29808 ); 29809 } 29810 return n[i2].exports; 29811 } 29812 for (var u = "function" == typeof __require2 && __require2, i = 0; i < t.length; i++) 29813 o(t[i]); 29814 return o; 29815 } 29816 return r2; 29817 })())( 29818 { 29819 1: [ 29820 function(require2, module2, exports2) { 29821 var BROTLI_READ_SIZE = 4096; 29822 var BROTLI_IBUF_SIZE = 2 * BROTLI_READ_SIZE + 32; 29823 var BROTLI_IBUF_MASK = 2 * BROTLI_READ_SIZE - 1; 29824 var kBitMask = new Uint32Array([ 29825 0, 29826 1, 29827 3, 29828 7, 29829 15, 29830 31, 29831 63, 29832 127, 29833 255, 29834 511, 29835 1023, 29836 2047, 29837 4095, 29838 8191, 29839 16383, 29840 32767, 29841 65535, 29842 131071, 29843 262143, 29844 524287, 29845 1048575, 29846 2097151, 29847 4194303, 29848 8388607, 29849 16777215 29850 ]); 29851 function BrotliBitReader(input) { 29852 this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE); 29853 this.input_ = input; 29854 this.reset(); 29855 } 29856 BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE; 29857 BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK; 29858 BrotliBitReader.prototype.reset = function() { 29859 this.buf_ptr_ = 0; 29860 this.val_ = 0; 29861 this.pos_ = 0; 29862 this.bit_pos_ = 0; 29863 this.bit_end_pos_ = 0; 29864 this.eos_ = 0; 29865 this.readMoreInput(); 29866 for (var i = 0; i < 4; i++) { 29867 this.val_ |= this.buf_[this.pos_] << 8 * i; 29868 ++this.pos_; 29869 } 29870 return this.bit_end_pos_ > 0; 29871 }; 29872 BrotliBitReader.prototype.readMoreInput = function() { 29873 if (this.bit_end_pos_ > 256) { 29874 return; 29875 } else if (this.eos_) { 29876 if (this.bit_pos_ > this.bit_end_pos_) 29877 throw new Error( 29878 "Unexpected end of input " + this.bit_pos_ + " " + this.bit_end_pos_ 29879 ); 29880 } else { 29881 var dst = this.buf_ptr_; 29882 var bytes_read = this.input_.read( 29883 this.buf_, 29884 dst, 29885 BROTLI_READ_SIZE 29886 ); 29887 if (bytes_read < 0) { 29888 throw new Error("Unexpected end of input"); 29889 } 29890 if (bytes_read < BROTLI_READ_SIZE) { 29891 this.eos_ = 1; 29892 for (var p3 = 0; p3 < 32; p3++) 29893 this.buf_[dst + bytes_read + p3] = 0; 29894 } 29895 if (dst === 0) { 29896 for (var p3 = 0; p3 < 32; p3++) 29897 this.buf_[(BROTLI_READ_SIZE << 1) + p3] = this.buf_[p3]; 29898 this.buf_ptr_ = BROTLI_READ_SIZE; 29899 } else { 29900 this.buf_ptr_ = 0; 29901 } 29902 this.bit_end_pos_ += bytes_read << 3; 29903 } 29904 }; 29905 BrotliBitReader.prototype.fillBitWindow = function() { 29906 while (this.bit_pos_ >= 8) { 29907 this.val_ >>>= 8; 29908 this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24; 29909 ++this.pos_; 29910 this.bit_pos_ = this.bit_pos_ - 8 >>> 0; 29911 this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0; 29912 } 29913 }; 29914 BrotliBitReader.prototype.readBits = function(n_bits) { 29915 if (32 - this.bit_pos_ < n_bits) { 29916 this.fillBitWindow(); 29917 } 29918 var val = this.val_ >>> this.bit_pos_ & kBitMask[n_bits]; 29919 this.bit_pos_ += n_bits; 29920 return val; 29921 }; 29922 module2.exports = BrotliBitReader; 29923 }, 29924 {} 29925 ], 29926 2: [ 29927 function(require2, module2, exports2) { 29928 var CONTEXT_LSB6 = 0; 29929 var CONTEXT_MSB6 = 1; 29930 var CONTEXT_UTF8 = 2; 29931 var CONTEXT_SIGNED = 3; 29932 exports2.lookup = new Uint8Array([ 29933 /* CONTEXT_UTF8, last byte. */ 29934 /* ASCII range. */ 29935 0, 29936 0, 29937 0, 29938 0, 29939 0, 29940 0, 29941 0, 29942 0, 29943 0, 29944 4, 29945 4, 29946 0, 29947 0, 29948 4, 29949 0, 29950 0, 29951 0, 29952 0, 29953 0, 29954 0, 29955 0, 29956 0, 29957 0, 29958 0, 29959 0, 29960 0, 29961 0, 29962 0, 29963 0, 29964 0, 29965 0, 29966 0, 29967 8, 29968 12, 29969 16, 29970 12, 29971 12, 29972 20, 29973 12, 29974 16, 29975 24, 29976 28, 29977 12, 29978 12, 29979 32, 29980 12, 29981 36, 29982 12, 29983 44, 29984 44, 29985 44, 29986 44, 29987 44, 29988 44, 29989 44, 29990 44, 29991 44, 29992 44, 29993 32, 29994 32, 29995 24, 29996 40, 29997 28, 29998 12, 29999 12, 30000 48, 30001 52, 30002 52, 30003 52, 30004 48, 30005 52, 30006 52, 30007 52, 30008 48, 30009 52, 30010 52, 30011 52, 30012 52, 30013 52, 30014 48, 30015 52, 30016 52, 30017 52, 30018 52, 30019 52, 30020 48, 30021 52, 30022 52, 30023 52, 30024 52, 30025 52, 30026 24, 30027 12, 30028 28, 30029 12, 30030 12, 30031 12, 30032 56, 30033 60, 30034 60, 30035 60, 30036 56, 30037 60, 30038 60, 30039 60, 30040 56, 30041 60, 30042 60, 30043 60, 30044 60, 30045 60, 30046 56, 30047 60, 30048 60, 30049 60, 30050 60, 30051 60, 30052 56, 30053 60, 30054 60, 30055 60, 30056 60, 30057 60, 30058 24, 30059 12, 30060 28, 30061 12, 30062 0, 30063 /* UTF8 continuation byte range. */ 30064 0, 30065 1, 30066 0, 30067 1, 30068 0, 30069 1, 30070 0, 30071 1, 30072 0, 30073 1, 30074 0, 30075 1, 30076 0, 30077 1, 30078 0, 30079 1, 30080 0, 30081 1, 30082 0, 30083 1, 30084 0, 30085 1, 30086 0, 30087 1, 30088 0, 30089 1, 30090 0, 30091 1, 30092 0, 30093 1, 30094 0, 30095 1, 30096 0, 30097 1, 30098 0, 30099 1, 30100 0, 30101 1, 30102 0, 30103 1, 30104 0, 30105 1, 30106 0, 30107 1, 30108 0, 30109 1, 30110 0, 30111 1, 30112 0, 30113 1, 30114 0, 30115 1, 30116 0, 30117 1, 30118 0, 30119 1, 30120 0, 30121 1, 30122 0, 30123 1, 30124 0, 30125 1, 30126 0, 30127 1, 30128 2, 30129 3, 30130 2, 30131 3, 30132 2, 30133 3, 30134 2, 30135 3, 30136 2, 30137 3, 30138 2, 30139 3, 30140 2, 30141 3, 30142 2, 30143 3, 30144 2, 30145 3, 30146 2, 30147 3, 30148 2, 30149 3, 30150 2, 30151 3, 30152 2, 30153 3, 30154 2, 30155 3, 30156 2, 30157 3, 30158 2, 30159 3, 30160 2, 30161 3, 30162 2, 30163 3, 30164 2, 30165 3, 30166 2, 30167 3, 30168 2, 30169 3, 30170 2, 30171 3, 30172 2, 30173 3, 30174 2, 30175 3, 30176 2, 30177 3, 30178 2, 30179 3, 30180 2, 30181 3, 30182 2, 30183 3, 30184 2, 30185 3, 30186 2, 30187 3, 30188 2, 30189 3, 30190 2, 30191 3, 30192 /* ASCII range. */ 30193 0, 30194 0, 30195 0, 30196 0, 30197 0, 30198 0, 30199 0, 30200 0, 30201 0, 30202 0, 30203 0, 30204 0, 30205 0, 30206 0, 30207 0, 30208 0, 30209 0, 30210 0, 30211 0, 30212 0, 30213 0, 30214 0, 30215 0, 30216 0, 30217 0, 30218 0, 30219 0, 30220 0, 30221 0, 30222 0, 30223 0, 30224 0, 30225 0, 30226 1, 30227 1, 30228 1, 30229 1, 30230 1, 30231 1, 30232 1, 30233 1, 30234 1, 30235 1, 30236 1, 30237 1, 30238 1, 30239 1, 30240 1, 30241 2, 30242 2, 30243 2, 30244 2, 30245 2, 30246 2, 30247 2, 30248 2, 30249 2, 30250 2, 30251 1, 30252 1, 30253 1, 30254 1, 30255 1, 30256 1, 30257 1, 30258 2, 30259 2, 30260 2, 30261 2, 30262 2, 30263 2, 30264 2, 30265 2, 30266 2, 30267 2, 30268 2, 30269 2, 30270 2, 30271 2, 30272 2, 30273 2, 30274 2, 30275 2, 30276 2, 30277 2, 30278 2, 30279 2, 30280 2, 30281 2, 30282 2, 30283 2, 30284 1, 30285 1, 30286 1, 30287 1, 30288 1, 30289 1, 30290 3, 30291 3, 30292 3, 30293 3, 30294 3, 30295 3, 30296 3, 30297 3, 30298 3, 30299 3, 30300 3, 30301 3, 30302 3, 30303 3, 30304 3, 30305 3, 30306 3, 30307 3, 30308 3, 30309 3, 30310 3, 30311 3, 30312 3, 30313 3, 30314 3, 30315 3, 30316 1, 30317 1, 30318 1, 30319 1, 30320 0, 30321 /* UTF8 continuation byte range. */ 30322 0, 30323 0, 30324 0, 30325 0, 30326 0, 30327 0, 30328 0, 30329 0, 30330 0, 30331 0, 30332 0, 30333 0, 30334 0, 30335 0, 30336 0, 30337 0, 30338 0, 30339 0, 30340 0, 30341 0, 30342 0, 30343 0, 30344 0, 30345 0, 30346 0, 30347 0, 30348 0, 30349 0, 30350 0, 30351 0, 30352 0, 30353 0, 30354 0, 30355 0, 30356 0, 30357 0, 30358 0, 30359 0, 30360 0, 30361 0, 30362 0, 30363 0, 30364 0, 30365 0, 30366 0, 30367 0, 30368 0, 30369 0, 30370 0, 30371 0, 30372 0, 30373 0, 30374 0, 30375 0, 30376 0, 30377 0, 30378 0, 30379 0, 30380 0, 30381 0, 30382 0, 30383 0, 30384 0, 30385 0, 30386 0, 30387 0, 30388 0, 30389 0, 30390 0, 30391 0, 30392 0, 30393 0, 30394 0, 30395 0, 30396 0, 30397 0, 30398 0, 30399 0, 30400 0, 30401 0, 30402 0, 30403 0, 30404 0, 30405 0, 30406 0, 30407 0, 30408 0, 30409 0, 30410 0, 30411 0, 30412 0, 30413 0, 30414 0, 30415 0, 30416 0, 30417 0, 30418 2, 30419 2, 30420 2, 30421 2, 30422 2, 30423 2, 30424 2, 30425 2, 30426 2, 30427 2, 30428 2, 30429 2, 30430 2, 30431 2, 30432 2, 30433 2, 30434 2, 30435 2, 30436 2, 30437 2, 30438 2, 30439 2, 30440 2, 30441 2, 30442 2, 30443 2, 30444 2, 30445 2, 30446 2, 30447 2, 30448 2, 30449 2, 30450 0, 30451 1, 30452 1, 30453 1, 30454 1, 30455 1, 30456 1, 30457 1, 30458 1, 30459 1, 30460 1, 30461 1, 30462 1, 30463 1, 30464 1, 30465 1, 30466 2, 30467 2, 30468 2, 30469 2, 30470 2, 30471 2, 30472 2, 30473 2, 30474 2, 30475 2, 30476 2, 30477 2, 30478 2, 30479 2, 30480 2, 30481 2, 30482 2, 30483 2, 30484 2, 30485 2, 30486 2, 30487 2, 30488 2, 30489 2, 30490 2, 30491 2, 30492 2, 30493 2, 30494 2, 30495 2, 30496 2, 30497 2, 30498 2, 30499 2, 30500 2, 30501 2, 30502 2, 30503 2, 30504 2, 30505 2, 30506 2, 30507 2, 30508 2, 30509 2, 30510 2, 30511 2, 30512 2, 30513 2, 30514 3, 30515 3, 30516 3, 30517 3, 30518 3, 30519 3, 30520 3, 30521 3, 30522 3, 30523 3, 30524 3, 30525 3, 30526 3, 30527 3, 30528 3, 30529 3, 30530 3, 30531 3, 30532 3, 30533 3, 30534 3, 30535 3, 30536 3, 30537 3, 30538 3, 30539 3, 30540 3, 30541 3, 30542 3, 30543 3, 30544 3, 30545 3, 30546 3, 30547 3, 30548 3, 30549 3, 30550 3, 30551 3, 30552 3, 30553 3, 30554 3, 30555 3, 30556 3, 30557 3, 30558 3, 30559 3, 30560 3, 30561 3, 30562 3, 30563 3, 30564 3, 30565 3, 30566 3, 30567 3, 30568 3, 30569 3, 30570 3, 30571 3, 30572 3, 30573 3, 30574 3, 30575 3, 30576 3, 30577 3, 30578 4, 30579 4, 30580 4, 30581 4, 30582 4, 30583 4, 30584 4, 30585 4, 30586 4, 30587 4, 30588 4, 30589 4, 30590 4, 30591 4, 30592 4, 30593 4, 30594 4, 30595 4, 30596 4, 30597 4, 30598 4, 30599 4, 30600 4, 30601 4, 30602 4, 30603 4, 30604 4, 30605 4, 30606 4, 30607 4, 30608 4, 30609 4, 30610 4, 30611 4, 30612 4, 30613 4, 30614 4, 30615 4, 30616 4, 30617 4, 30618 4, 30619 4, 30620 4, 30621 4, 30622 4, 30623 4, 30624 4, 30625 4, 30626 4, 30627 4, 30628 4, 30629 4, 30630 4, 30631 4, 30632 4, 30633 4, 30634 4, 30635 4, 30636 4, 30637 4, 30638 4, 30639 4, 30640 4, 30641 4, 30642 5, 30643 5, 30644 5, 30645 5, 30646 5, 30647 5, 30648 5, 30649 5, 30650 5, 30651 5, 30652 5, 30653 5, 30654 5, 30655 5, 30656 5, 30657 5, 30658 5, 30659 5, 30660 5, 30661 5, 30662 5, 30663 5, 30664 5, 30665 5, 30666 5, 30667 5, 30668 5, 30669 5, 30670 5, 30671 5, 30672 5, 30673 5, 30674 5, 30675 5, 30676 5, 30677 5, 30678 5, 30679 5, 30680 5, 30681 5, 30682 5, 30683 5, 30684 5, 30685 5, 30686 5, 30687 5, 30688 5, 30689 5, 30690 6, 30691 6, 30692 6, 30693 6, 30694 6, 30695 6, 30696 6, 30697 6, 30698 6, 30699 6, 30700 6, 30701 6, 30702 6, 30703 6, 30704 6, 30705 7, 30706 /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */ 30707 0, 30708 8, 30709 8, 30710 8, 30711 8, 30712 8, 30713 8, 30714 8, 30715 8, 30716 8, 30717 8, 30718 8, 30719 8, 30720 8, 30721 8, 30722 8, 30723 16, 30724 16, 30725 16, 30726 16, 30727 16, 30728 16, 30729 16, 30730 16, 30731 16, 30732 16, 30733 16, 30734 16, 30735 16, 30736 16, 30737 16, 30738 16, 30739 16, 30740 16, 30741 16, 30742 16, 30743 16, 30744 16, 30745 16, 30746 16, 30747 16, 30748 16, 30749 16, 30750 16, 30751 16, 30752 16, 30753 16, 30754 16, 30755 16, 30756 16, 30757 16, 30758 16, 30759 16, 30760 16, 30761 16, 30762 16, 30763 16, 30764 16, 30765 16, 30766 16, 30767 16, 30768 16, 30769 16, 30770 16, 30771 24, 30772 24, 30773 24, 30774 24, 30775 24, 30776 24, 30777 24, 30778 24, 30779 24, 30780 24, 30781 24, 30782 24, 30783 24, 30784 24, 30785 24, 30786 24, 30787 24, 30788 24, 30789 24, 30790 24, 30791 24, 30792 24, 30793 24, 30794 24, 30795 24, 30796 24, 30797 24, 30798 24, 30799 24, 30800 24, 30801 24, 30802 24, 30803 24, 30804 24, 30805 24, 30806 24, 30807 24, 30808 24, 30809 24, 30810 24, 30811 24, 30812 24, 30813 24, 30814 24, 30815 24, 30816 24, 30817 24, 30818 24, 30819 24, 30820 24, 30821 24, 30822 24, 30823 24, 30824 24, 30825 24, 30826 24, 30827 24, 30828 24, 30829 24, 30830 24, 30831 24, 30832 24, 30833 24, 30834 24, 30835 32, 30836 32, 30837 32, 30838 32, 30839 32, 30840 32, 30841 32, 30842 32, 30843 32, 30844 32, 30845 32, 30846 32, 30847 32, 30848 32, 30849 32, 30850 32, 30851 32, 30852 32, 30853 32, 30854 32, 30855 32, 30856 32, 30857 32, 30858 32, 30859 32, 30860 32, 30861 32, 30862 32, 30863 32, 30864 32, 30865 32, 30866 32, 30867 32, 30868 32, 30869 32, 30870 32, 30871 32, 30872 32, 30873 32, 30874 32, 30875 32, 30876 32, 30877 32, 30878 32, 30879 32, 30880 32, 30881 32, 30882 32, 30883 32, 30884 32, 30885 32, 30886 32, 30887 32, 30888 32, 30889 32, 30890 32, 30891 32, 30892 32, 30893 32, 30894 32, 30895 32, 30896 32, 30897 32, 30898 32, 30899 40, 30900 40, 30901 40, 30902 40, 30903 40, 30904 40, 30905 40, 30906 40, 30907 40, 30908 40, 30909 40, 30910 40, 30911 40, 30912 40, 30913 40, 30914 40, 30915 40, 30916 40, 30917 40, 30918 40, 30919 40, 30920 40, 30921 40, 30922 40, 30923 40, 30924 40, 30925 40, 30926 40, 30927 40, 30928 40, 30929 40, 30930 40, 30931 40, 30932 40, 30933 40, 30934 40, 30935 40, 30936 40, 30937 40, 30938 40, 30939 40, 30940 40, 30941 40, 30942 40, 30943 40, 30944 40, 30945 40, 30946 40, 30947 48, 30948 48, 30949 48, 30950 48, 30951 48, 30952 48, 30953 48, 30954 48, 30955 48, 30956 48, 30957 48, 30958 48, 30959 48, 30960 48, 30961 48, 30962 56, 30963 /* CONTEXT_LSB6, last byte. */ 30964 0, 30965 1, 30966 2, 30967 3, 30968 4, 30969 5, 30970 6, 30971 7, 30972 8, 30973 9, 30974 10, 30975 11, 30976 12, 30977 13, 30978 14, 30979 15, 30980 16, 30981 17, 30982 18, 30983 19, 30984 20, 30985 21, 30986 22, 30987 23, 30988 24, 30989 25, 30990 26, 30991 27, 30992 28, 30993 29, 30994 30, 30995 31, 30996 32, 30997 33, 30998 34, 30999 35, 31000 36, 31001 37, 31002 38, 31003 39, 31004 40, 31005 41, 31006 42, 31007 43, 31008 44, 31009 45, 31010 46, 31011 47, 31012 48, 31013 49, 31014 50, 31015 51, 31016 52, 31017 53, 31018 54, 31019 55, 31020 56, 31021 57, 31022 58, 31023 59, 31024 60, 31025 61, 31026 62, 31027 63, 31028 0, 31029 1, 31030 2, 31031 3, 31032 4, 31033 5, 31034 6, 31035 7, 31036 8, 31037 9, 31038 10, 31039 11, 31040 12, 31041 13, 31042 14, 31043 15, 31044 16, 31045 17, 31046 18, 31047 19, 31048 20, 31049 21, 31050 22, 31051 23, 31052 24, 31053 25, 31054 26, 31055 27, 31056 28, 31057 29, 31058 30, 31059 31, 31060 32, 31061 33, 31062 34, 31063 35, 31064 36, 31065 37, 31066 38, 31067 39, 31068 40, 31069 41, 31070 42, 31071 43, 31072 44, 31073 45, 31074 46, 31075 47, 31076 48, 31077 49, 31078 50, 31079 51, 31080 52, 31081 53, 31082 54, 31083 55, 31084 56, 31085 57, 31086 58, 31087 59, 31088 60, 31089 61, 31090 62, 31091 63, 31092 0, 31093 1, 31094 2, 31095 3, 31096 4, 31097 5, 31098 6, 31099 7, 31100 8, 31101 9, 31102 10, 31103 11, 31104 12, 31105 13, 31106 14, 31107 15, 31108 16, 31109 17, 31110 18, 31111 19, 31112 20, 31113 21, 31114 22, 31115 23, 31116 24, 31117 25, 31118 26, 31119 27, 31120 28, 31121 29, 31122 30, 31123 31, 31124 32, 31125 33, 31126 34, 31127 35, 31128 36, 31129 37, 31130 38, 31131 39, 31132 40, 31133 41, 31134 42, 31135 43, 31136 44, 31137 45, 31138 46, 31139 47, 31140 48, 31141 49, 31142 50, 31143 51, 31144 52, 31145 53, 31146 54, 31147 55, 31148 56, 31149 57, 31150 58, 31151 59, 31152 60, 31153 61, 31154 62, 31155 63, 31156 0, 31157 1, 31158 2, 31159 3, 31160 4, 31161 5, 31162 6, 31163 7, 31164 8, 31165 9, 31166 10, 31167 11, 31168 12, 31169 13, 31170 14, 31171 15, 31172 16, 31173 17, 31174 18, 31175 19, 31176 20, 31177 21, 31178 22, 31179 23, 31180 24, 31181 25, 31182 26, 31183 27, 31184 28, 31185 29, 31186 30, 31187 31, 31188 32, 31189 33, 31190 34, 31191 35, 31192 36, 31193 37, 31194 38, 31195 39, 31196 40, 31197 41, 31198 42, 31199 43, 31200 44, 31201 45, 31202 46, 31203 47, 31204 48, 31205 49, 31206 50, 31207 51, 31208 52, 31209 53, 31210 54, 31211 55, 31212 56, 31213 57, 31214 58, 31215 59, 31216 60, 31217 61, 31218 62, 31219 63, 31220 /* CONTEXT_MSB6, last byte. */ 31221 0, 31222 0, 31223 0, 31224 0, 31225 1, 31226 1, 31227 1, 31228 1, 31229 2, 31230 2, 31231 2, 31232 2, 31233 3, 31234 3, 31235 3, 31236 3, 31237 4, 31238 4, 31239 4, 31240 4, 31241 5, 31242 5, 31243 5, 31244 5, 31245 6, 31246 6, 31247 6, 31248 6, 31249 7, 31250 7, 31251 7, 31252 7, 31253 8, 31254 8, 31255 8, 31256 8, 31257 9, 31258 9, 31259 9, 31260 9, 31261 10, 31262 10, 31263 10, 31264 10, 31265 11, 31266 11, 31267 11, 31268 11, 31269 12, 31270 12, 31271 12, 31272 12, 31273 13, 31274 13, 31275 13, 31276 13, 31277 14, 31278 14, 31279 14, 31280 14, 31281 15, 31282 15, 31283 15, 31284 15, 31285 16, 31286 16, 31287 16, 31288 16, 31289 17, 31290 17, 31291 17, 31292 17, 31293 18, 31294 18, 31295 18, 31296 18, 31297 19, 31298 19, 31299 19, 31300 19, 31301 20, 31302 20, 31303 20, 31304 20, 31305 21, 31306 21, 31307 21, 31308 21, 31309 22, 31310 22, 31311 22, 31312 22, 31313 23, 31314 23, 31315 23, 31316 23, 31317 24, 31318 24, 31319 24, 31320 24, 31321 25, 31322 25, 31323 25, 31324 25, 31325 26, 31326 26, 31327 26, 31328 26, 31329 27, 31330 27, 31331 27, 31332 27, 31333 28, 31334 28, 31335 28, 31336 28, 31337 29, 31338 29, 31339 29, 31340 29, 31341 30, 31342 30, 31343 30, 31344 30, 31345 31, 31346 31, 31347 31, 31348 31, 31349 32, 31350 32, 31351 32, 31352 32, 31353 33, 31354 33, 31355 33, 31356 33, 31357 34, 31358 34, 31359 34, 31360 34, 31361 35, 31362 35, 31363 35, 31364 35, 31365 36, 31366 36, 31367 36, 31368 36, 31369 37, 31370 37, 31371 37, 31372 37, 31373 38, 31374 38, 31375 38, 31376 38, 31377 39, 31378 39, 31379 39, 31380 39, 31381 40, 31382 40, 31383 40, 31384 40, 31385 41, 31386 41, 31387 41, 31388 41, 31389 42, 31390 42, 31391 42, 31392 42, 31393 43, 31394 43, 31395 43, 31396 43, 31397 44, 31398 44, 31399 44, 31400 44, 31401 45, 31402 45, 31403 45, 31404 45, 31405 46, 31406 46, 31407 46, 31408 46, 31409 47, 31410 47, 31411 47, 31412 47, 31413 48, 31414 48, 31415 48, 31416 48, 31417 49, 31418 49, 31419 49, 31420 49, 31421 50, 31422 50, 31423 50, 31424 50, 31425 51, 31426 51, 31427 51, 31428 51, 31429 52, 31430 52, 31431 52, 31432 52, 31433 53, 31434 53, 31435 53, 31436 53, 31437 54, 31438 54, 31439 54, 31440 54, 31441 55, 31442 55, 31443 55, 31444 55, 31445 56, 31446 56, 31447 56, 31448 56, 31449 57, 31450 57, 31451 57, 31452 57, 31453 58, 31454 58, 31455 58, 31456 58, 31457 59, 31458 59, 31459 59, 31460 59, 31461 60, 31462 60, 31463 60, 31464 60, 31465 61, 31466 61, 31467 61, 31468 61, 31469 62, 31470 62, 31471 62, 31472 62, 31473 63, 31474 63, 31475 63, 31476 63, 31477 /* CONTEXT_{M,L}SB6, second last byte, */ 31478 0, 31479 0, 31480 0, 31481 0, 31482 0, 31483 0, 31484 0, 31485 0, 31486 0, 31487 0, 31488 0, 31489 0, 31490 0, 31491 0, 31492 0, 31493 0, 31494 0, 31495 0, 31496 0, 31497 0, 31498 0, 31499 0, 31500 0, 31501 0, 31502 0, 31503 0, 31504 0, 31505 0, 31506 0, 31507 0, 31508 0, 31509 0, 31510 0, 31511 0, 31512 0, 31513 0, 31514 0, 31515 0, 31516 0, 31517 0, 31518 0, 31519 0, 31520 0, 31521 0, 31522 0, 31523 0, 31524 0, 31525 0, 31526 0, 31527 0, 31528 0, 31529 0, 31530 0, 31531 0, 31532 0, 31533 0, 31534 0, 31535 0, 31536 0, 31537 0, 31538 0, 31539 0, 31540 0, 31541 0, 31542 0, 31543 0, 31544 0, 31545 0, 31546 0, 31547 0, 31548 0, 31549 0, 31550 0, 31551 0, 31552 0, 31553 0, 31554 0, 31555 0, 31556 0, 31557 0, 31558 0, 31559 0, 31560 0, 31561 0, 31562 0, 31563 0, 31564 0, 31565 0, 31566 0, 31567 0, 31568 0, 31569 0, 31570 0, 31571 0, 31572 0, 31573 0, 31574 0, 31575 0, 31576 0, 31577 0, 31578 0, 31579 0, 31580 0, 31581 0, 31582 0, 31583 0, 31584 0, 31585 0, 31586 0, 31587 0, 31588 0, 31589 0, 31590 0, 31591 0, 31592 0, 31593 0, 31594 0, 31595 0, 31596 0, 31597 0, 31598 0, 31599 0, 31600 0, 31601 0, 31602 0, 31603 0, 31604 0, 31605 0, 31606 0, 31607 0, 31608 0, 31609 0, 31610 0, 31611 0, 31612 0, 31613 0, 31614 0, 31615 0, 31616 0, 31617 0, 31618 0, 31619 0, 31620 0, 31621 0, 31622 0, 31623 0, 31624 0, 31625 0, 31626 0, 31627 0, 31628 0, 31629 0, 31630 0, 31631 0, 31632 0, 31633 0, 31634 0, 31635 0, 31636 0, 31637 0, 31638 0, 31639 0, 31640 0, 31641 0, 31642 0, 31643 0, 31644 0, 31645 0, 31646 0, 31647 0, 31648 0, 31649 0, 31650 0, 31651 0, 31652 0, 31653 0, 31654 0, 31655 0, 31656 0, 31657 0, 31658 0, 31659 0, 31660 0, 31661 0, 31662 0, 31663 0, 31664 0, 31665 0, 31666 0, 31667 0, 31668 0, 31669 0, 31670 0, 31671 0, 31672 0, 31673 0, 31674 0, 31675 0, 31676 0, 31677 0, 31678 0, 31679 0, 31680 0, 31681 0, 31682 0, 31683 0, 31684 0, 31685 0, 31686 0, 31687 0, 31688 0, 31689 0, 31690 0, 31691 0, 31692 0, 31693 0, 31694 0, 31695 0, 31696 0, 31697 0, 31698 0, 31699 0, 31700 0, 31701 0, 31702 0, 31703 0, 31704 0, 31705 0, 31706 0, 31707 0, 31708 0, 31709 0, 31710 0, 31711 0, 31712 0, 31713 0, 31714 0, 31715 0, 31716 0, 31717 0, 31718 0, 31719 0, 31720 0, 31721 0, 31722 0, 31723 0, 31724 0, 31725 0, 31726 0, 31727 0, 31728 0, 31729 0, 31730 0, 31731 0, 31732 0, 31733 0 31734 ]); 31735 exports2.lookupOffsets = new Uint16Array([ 31736 /* CONTEXT_LSB6 */ 31737 1024, 31738 1536, 31739 1280, 31740 1536, 31741 0, 31742 256, 31743 768, 31744 512 31745 ]); 31746 }, 31747 {} 31748 ], 31749 3: [ 31750 function(require2, module2, exports2) { 31751 var BrotliInput = require2("./streams").BrotliInput; 31752 var BrotliOutput = require2("./streams").BrotliOutput; 31753 var BrotliBitReader = require2("./bit_reader"); 31754 var BrotliDictionary = require2("./dictionary"); 31755 var HuffmanCode = require2("./huffman").HuffmanCode; 31756 var BrotliBuildHuffmanTable = require2("./huffman").BrotliBuildHuffmanTable; 31757 var Context = require2("./context"); 31758 var Prefix = require2("./prefix"); 31759 var Transform = require2("./transform"); 31760 var kDefaultCodeLength = 8; 31761 var kCodeLengthRepeatCode = 16; 31762 var kNumLiteralCodes = 256; 31763 var kNumInsertAndCopyCodes = 704; 31764 var kNumBlockLengthCodes = 26; 31765 var kLiteralContextBits = 6; 31766 var kDistanceContextBits = 2; 31767 var HUFFMAN_TABLE_BITS = 8; 31768 var HUFFMAN_TABLE_MASK = 255; 31769 var HUFFMAN_MAX_TABLE_SIZE = 1080; 31770 var CODE_LENGTH_CODES = 18; 31771 var kCodeLengthCodeOrder = new Uint8Array([ 31772 1, 31773 2, 31774 3, 31775 4, 31776 0, 31777 5, 31778 17, 31779 6, 31780 16, 31781 7, 31782 8, 31783 9, 31784 10, 31785 11, 31786 12, 31787 13, 31788 14, 31789 15 31790 ]); 31791 var NUM_DISTANCE_SHORT_CODES = 16; 31792 var kDistanceShortCodeIndexOffset = new Uint8Array([ 31793 3, 31794 2, 31795 1, 31796 0, 31797 3, 31798 3, 31799 3, 31800 3, 31801 3, 31802 3, 31803 2, 31804 2, 31805 2, 31806 2, 31807 2, 31808 2 31809 ]); 31810 var kDistanceShortCodeValueOffset = new Int8Array([ 31811 0, 31812 0, 31813 0, 31814 0, 31815 -1, 31816 1, 31817 -2, 31818 2, 31819 -3, 31820 3, 31821 -1, 31822 1, 31823 -2, 31824 2, 31825 -3, 31826 3 31827 ]); 31828 var kMaxHuffmanTableSize = new Uint16Array([ 31829 256, 31830 402, 31831 436, 31832 468, 31833 500, 31834 534, 31835 566, 31836 598, 31837 630, 31838 662, 31839 694, 31840 726, 31841 758, 31842 790, 31843 822, 31844 854, 31845 886, 31846 920, 31847 952, 31848 984, 31849 1016, 31850 1048, 31851 1080 31852 ]); 31853 function DecodeWindowBits(br) { 31854 var n; 31855 if (br.readBits(1) === 0) { 31856 return 16; 31857 } 31858 n = br.readBits(3); 31859 if (n > 0) { 31860 return 17 + n; 31861 } 31862 n = br.readBits(3); 31863 if (n > 0) { 31864 return 8 + n; 31865 } 31866 return 17; 31867 } 31868 function DecodeVarLenUint8(br) { 31869 if (br.readBits(1)) { 31870 var nbits = br.readBits(3); 31871 if (nbits === 0) { 31872 return 1; 31873 } else { 31874 return br.readBits(nbits) + (1 << nbits); 31875 } 31876 } 31877 return 0; 31878 } 31879 function MetaBlockLength() { 31880 this.meta_block_length = 0; 31881 this.input_end = 0; 31882 this.is_uncompressed = 0; 31883 this.is_metadata = false; 31884 } 31885 function DecodeMetaBlockLength(br) { 31886 var out = new MetaBlockLength(); 31887 var size_nibbles; 31888 var size_bytes; 31889 var i; 31890 out.input_end = br.readBits(1); 31891 if (out.input_end && br.readBits(1)) { 31892 return out; 31893 } 31894 size_nibbles = br.readBits(2) + 4; 31895 if (size_nibbles === 7) { 31896 out.is_metadata = true; 31897 if (br.readBits(1) !== 0) 31898 throw new Error("Invalid reserved bit"); 31899 size_bytes = br.readBits(2); 31900 if (size_bytes === 0) return out; 31901 for (i = 0; i < size_bytes; i++) { 31902 var next_byte = br.readBits(8); 31903 if (i + 1 === size_bytes && size_bytes > 1 && next_byte === 0) 31904 throw new Error("Invalid size byte"); 31905 out.meta_block_length |= next_byte << i * 8; 31906 } 31907 } else { 31908 for (i = 0; i < size_nibbles; ++i) { 31909 var next_nibble = br.readBits(4); 31910 if (i + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0) 31911 throw new Error("Invalid size nibble"); 31912 out.meta_block_length |= next_nibble << i * 4; 31913 } 31914 } 31915 ++out.meta_block_length; 31916 if (!out.input_end && !out.is_metadata) { 31917 out.is_uncompressed = br.readBits(1); 31918 } 31919 return out; 31920 } 31921 function ReadSymbol(table, index2, br) { 31922 var start_index = index2; 31923 var nbits; 31924 br.fillBitWindow(); 31925 index2 += br.val_ >>> br.bit_pos_ & HUFFMAN_TABLE_MASK; 31926 nbits = table[index2].bits - HUFFMAN_TABLE_BITS; 31927 if (nbits > 0) { 31928 br.bit_pos_ += HUFFMAN_TABLE_BITS; 31929 index2 += table[index2].value; 31930 index2 += br.val_ >>> br.bit_pos_ & (1 << nbits) - 1; 31931 } 31932 br.bit_pos_ += table[index2].bits; 31933 return table[index2].value; 31934 } 31935 function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) { 31936 var symbol = 0; 31937 var prev_code_len = kDefaultCodeLength; 31938 var repeat = 0; 31939 var repeat_code_len = 0; 31940 var space = 32768; 31941 var table = []; 31942 for (var i = 0; i < 32; i++) 31943 table.push(new HuffmanCode(0, 0)); 31944 BrotliBuildHuffmanTable( 31945 table, 31946 0, 31947 5, 31948 code_length_code_lengths, 31949 CODE_LENGTH_CODES 31950 ); 31951 while (symbol < num_symbols && space > 0) { 31952 var p3 = 0; 31953 var code_len; 31954 br.readMoreInput(); 31955 br.fillBitWindow(); 31956 p3 += br.val_ >>> br.bit_pos_ & 31; 31957 br.bit_pos_ += table[p3].bits; 31958 code_len = table[p3].value & 255; 31959 if (code_len < kCodeLengthRepeatCode) { 31960 repeat = 0; 31961 code_lengths[symbol++] = code_len; 31962 if (code_len !== 0) { 31963 prev_code_len = code_len; 31964 space -= 32768 >> code_len; 31965 } 31966 } else { 31967 var extra_bits = code_len - 14; 31968 var old_repeat; 31969 var repeat_delta; 31970 var new_len = 0; 31971 if (code_len === kCodeLengthRepeatCode) { 31972 new_len = prev_code_len; 31973 } 31974 if (repeat_code_len !== new_len) { 31975 repeat = 0; 31976 repeat_code_len = new_len; 31977 } 31978 old_repeat = repeat; 31979 if (repeat > 0) { 31980 repeat -= 2; 31981 repeat <<= extra_bits; 31982 } 31983 repeat += br.readBits(extra_bits) + 3; 31984 repeat_delta = repeat - old_repeat; 31985 if (symbol + repeat_delta > num_symbols) { 31986 throw new Error( 31987 "[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols" 31988 ); 31989 } 31990 for (var x2 = 0; x2 < repeat_delta; x2++) 31991 code_lengths[symbol + x2] = repeat_code_len; 31992 symbol += repeat_delta; 31993 if (repeat_code_len !== 0) { 31994 space -= repeat_delta << 15 - repeat_code_len; 31995 } 31996 } 31997 } 31998 if (space !== 0) { 31999 throw new Error( 32000 "[ReadHuffmanCodeLengths] space = " + space 32001 ); 32002 } 32003 for (; symbol < num_symbols; symbol++) 32004 code_lengths[symbol] = 0; 32005 } 32006 function ReadHuffmanCode(alphabet_size, tables, table, br) { 32007 var table_size = 0; 32008 var simple_code_or_skip; 32009 var code_lengths = new Uint8Array(alphabet_size); 32010 br.readMoreInput(); 32011 simple_code_or_skip = br.readBits(2); 32012 if (simple_code_or_skip === 1) { 32013 var i; 32014 var max_bits_counter = alphabet_size - 1; 32015 var max_bits = 0; 32016 var symbols = new Int32Array(4); 32017 var num_symbols = br.readBits(2) + 1; 32018 while (max_bits_counter) { 32019 max_bits_counter >>= 1; 32020 ++max_bits; 32021 } 32022 for (i = 0; i < num_symbols; ++i) { 32023 symbols[i] = br.readBits(max_bits) % alphabet_size; 32024 code_lengths[symbols[i]] = 2; 32025 } 32026 code_lengths[symbols[0]] = 1; 32027 switch (num_symbols) { 32028 case 1: 32029 break; 32030 case 3: 32031 if (symbols[0] === symbols[1] || symbols[0] === symbols[2] || symbols[1] === symbols[2]) { 32032 throw new Error( 32033 "[ReadHuffmanCode] invalid symbols" 32034 ); 32035 } 32036 break; 32037 case 2: 32038 if (symbols[0] === symbols[1]) { 32039 throw new Error( 32040 "[ReadHuffmanCode] invalid symbols" 32041 ); 32042 } 32043 code_lengths[symbols[1]] = 1; 32044 break; 32045 case 4: 32046 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]) { 32047 throw new Error( 32048 "[ReadHuffmanCode] invalid symbols" 32049 ); 32050 } 32051 if (br.readBits(1)) { 32052 code_lengths[symbols[2]] = 3; 32053 code_lengths[symbols[3]] = 3; 32054 } else { 32055 code_lengths[symbols[0]] = 2; 32056 } 32057 break; 32058 } 32059 } else { 32060 var i; 32061 var code_length_code_lengths = new Uint8Array( 32062 CODE_LENGTH_CODES 32063 ); 32064 var space = 32; 32065 var num_codes = 0; 32066 var huff = [ 32067 new HuffmanCode(2, 0), 32068 new HuffmanCode(2, 4), 32069 new HuffmanCode(2, 3), 32070 new HuffmanCode(3, 2), 32071 new HuffmanCode(2, 0), 32072 new HuffmanCode(2, 4), 32073 new HuffmanCode(2, 3), 32074 new HuffmanCode(4, 1), 32075 new HuffmanCode(2, 0), 32076 new HuffmanCode(2, 4), 32077 new HuffmanCode(2, 3), 32078 new HuffmanCode(3, 2), 32079 new HuffmanCode(2, 0), 32080 new HuffmanCode(2, 4), 32081 new HuffmanCode(2, 3), 32082 new HuffmanCode(4, 5) 32083 ]; 32084 for (i = simple_code_or_skip; i < CODE_LENGTH_CODES && space > 0; ++i) { 32085 var code_len_idx = kCodeLengthCodeOrder[i]; 32086 var p3 = 0; 32087 var v2; 32088 br.fillBitWindow(); 32089 p3 += br.val_ >>> br.bit_pos_ & 15; 32090 br.bit_pos_ += huff[p3].bits; 32091 v2 = huff[p3].value; 32092 code_length_code_lengths[code_len_idx] = v2; 32093 if (v2 !== 0) { 32094 space -= 32 >> v2; 32095 ++num_codes; 32096 } 32097 } 32098 if (!(num_codes === 1 || space === 0)) 32099 throw new Error( 32100 "[ReadHuffmanCode] invalid num_codes or space" 32101 ); 32102 ReadHuffmanCodeLengths( 32103 code_length_code_lengths, 32104 alphabet_size, 32105 code_lengths, 32106 br 32107 ); 32108 } 32109 table_size = BrotliBuildHuffmanTable( 32110 tables, 32111 table, 32112 HUFFMAN_TABLE_BITS, 32113 code_lengths, 32114 alphabet_size 32115 ); 32116 if (table_size === 0) { 32117 throw new Error( 32118 "[ReadHuffmanCode] BuildHuffmanTable failed: " 32119 ); 32120 } 32121 return table_size; 32122 } 32123 function ReadBlockLength(table, index2, br) { 32124 var code; 32125 var nbits; 32126 code = ReadSymbol(table, index2, br); 32127 nbits = Prefix.kBlockLengthPrefixCode[code].nbits; 32128 return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits); 32129 } 32130 function TranslateShortCodes(code, ringbuffer, index2) { 32131 var val; 32132 if (code < NUM_DISTANCE_SHORT_CODES) { 32133 index2 += kDistanceShortCodeIndexOffset[code]; 32134 index2 &= 3; 32135 val = ringbuffer[index2] + kDistanceShortCodeValueOffset[code]; 32136 } else { 32137 val = code - NUM_DISTANCE_SHORT_CODES + 1; 32138 } 32139 return val; 32140 } 32141 function MoveToFront(v2, index2) { 32142 var value = v2[index2]; 32143 var i = index2; 32144 for (; i; --i) v2[i] = v2[i - 1]; 32145 v2[0] = value; 32146 } 32147 function InverseMoveToFrontTransform(v2, v_len) { 32148 var mtf = new Uint8Array(256); 32149 var i; 32150 for (i = 0; i < 256; ++i) { 32151 mtf[i] = i; 32152 } 32153 for (i = 0; i < v_len; ++i) { 32154 var index2 = v2[i]; 32155 v2[i] = mtf[index2]; 32156 if (index2) MoveToFront(mtf, index2); 32157 } 32158 } 32159 function HuffmanTreeGroup(alphabet_size, num_htrees) { 32160 this.alphabet_size = alphabet_size; 32161 this.num_htrees = num_htrees; 32162 this.codes = new Array( 32163 num_htrees + num_htrees * kMaxHuffmanTableSize[alphabet_size + 31 >>> 5] 32164 ); 32165 this.htrees = new Uint32Array(num_htrees); 32166 } 32167 HuffmanTreeGroup.prototype.decode = function(br) { 32168 var i; 32169 var table_size; 32170 var next = 0; 32171 for (i = 0; i < this.num_htrees; ++i) { 32172 this.htrees[i] = next; 32173 table_size = ReadHuffmanCode( 32174 this.alphabet_size, 32175 this.codes, 32176 next, 32177 br 32178 ); 32179 next += table_size; 32180 } 32181 }; 32182 function DecodeContextMap(context_map_size, br) { 32183 var out = { num_htrees: null, context_map: null }; 32184 var use_rle_for_zeros; 32185 var max_run_length_prefix = 0; 32186 var table; 32187 var i; 32188 br.readMoreInput(); 32189 var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1; 32190 var context_map = out.context_map = new Uint8Array( 32191 context_map_size 32192 ); 32193 if (num_htrees <= 1) { 32194 return out; 32195 } 32196 use_rle_for_zeros = br.readBits(1); 32197 if (use_rle_for_zeros) { 32198 max_run_length_prefix = br.readBits(4) + 1; 32199 } 32200 table = []; 32201 for (i = 0; i < HUFFMAN_MAX_TABLE_SIZE; i++) { 32202 table[i] = new HuffmanCode(0, 0); 32203 } 32204 ReadHuffmanCode( 32205 num_htrees + max_run_length_prefix, 32206 table, 32207 0, 32208 br 32209 ); 32210 for (i = 0; i < context_map_size; ) { 32211 var code; 32212 br.readMoreInput(); 32213 code = ReadSymbol(table, 0, br); 32214 if (code === 0) { 32215 context_map[i] = 0; 32216 ++i; 32217 } else if (code <= max_run_length_prefix) { 32218 var reps = 1 + (1 << code) + br.readBits(code); 32219 while (--reps) { 32220 if (i >= context_map_size) { 32221 throw new Error( 32222 "[DecodeContextMap] i >= context_map_size" 32223 ); 32224 } 32225 context_map[i] = 0; 32226 ++i; 32227 } 32228 } else { 32229 context_map[i] = code - max_run_length_prefix; 32230 ++i; 32231 } 32232 } 32233 if (br.readBits(1)) { 32234 InverseMoveToFrontTransform( 32235 context_map, 32236 context_map_size 32237 ); 32238 } 32239 return out; 32240 } 32241 function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) { 32242 var ringbuffer = tree_type * 2; 32243 var index2 = tree_type; 32244 var type_code = ReadSymbol( 32245 trees, 32246 tree_type * HUFFMAN_MAX_TABLE_SIZE, 32247 br 32248 ); 32249 var block_type; 32250 if (type_code === 0) { 32251 block_type = ringbuffers[ringbuffer + (indexes[index2] & 1)]; 32252 } else if (type_code === 1) { 32253 block_type = ringbuffers[ringbuffer + (indexes[index2] - 1 & 1)] + 1; 32254 } else { 32255 block_type = type_code - 2; 32256 } 32257 if (block_type >= max_block_type) { 32258 block_type -= max_block_type; 32259 } 32260 block_types[tree_type] = block_type; 32261 ringbuffers[ringbuffer + (indexes[index2] & 1)] = block_type; 32262 ++indexes[index2]; 32263 } 32264 function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) { 32265 var rb_size = ringbuffer_mask + 1; 32266 var rb_pos = pos & ringbuffer_mask; 32267 var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK; 32268 var nbytes; 32269 if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) { 32270 while (len-- > 0) { 32271 br.readMoreInput(); 32272 ringbuffer[rb_pos++] = br.readBits(8); 32273 if (rb_pos === rb_size) { 32274 output.write(ringbuffer, rb_size); 32275 rb_pos = 0; 32276 } 32277 } 32278 return; 32279 } 32280 if (br.bit_end_pos_ < 32) { 32281 throw new Error( 32282 "[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32" 32283 ); 32284 } 32285 while (br.bit_pos_ < 32) { 32286 ringbuffer[rb_pos] = br.val_ >>> br.bit_pos_; 32287 br.bit_pos_ += 8; 32288 ++rb_pos; 32289 --len; 32290 } 32291 nbytes = br.bit_end_pos_ - br.bit_pos_ >> 3; 32292 if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) { 32293 var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos; 32294 for (var x2 = 0; x2 < tail; x2++) 32295 ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2]; 32296 nbytes -= tail; 32297 rb_pos += tail; 32298 len -= tail; 32299 br_pos = 0; 32300 } 32301 for (var x2 = 0; x2 < nbytes; x2++) 32302 ringbuffer[rb_pos + x2] = br.buf_[br_pos + x2]; 32303 rb_pos += nbytes; 32304 len -= nbytes; 32305 if (rb_pos >= rb_size) { 32306 output.write(ringbuffer, rb_size); 32307 rb_pos -= rb_size; 32308 for (var x2 = 0; x2 < rb_pos; x2++) 32309 ringbuffer[x2] = ringbuffer[rb_size + x2]; 32310 } 32311 while (rb_pos + len >= rb_size) { 32312 nbytes = rb_size - rb_pos; 32313 if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) { 32314 throw new Error( 32315 "[CopyUncompressedBlockToOutput] not enough bytes" 32316 ); 32317 } 32318 output.write(ringbuffer, rb_size); 32319 len -= nbytes; 32320 rb_pos = 0; 32321 } 32322 if (br.input_.read(ringbuffer, rb_pos, len) < len) { 32323 throw new Error( 32324 "[CopyUncompressedBlockToOutput] not enough bytes" 32325 ); 32326 } 32327 br.reset(); 32328 } 32329 function JumpToByteBoundary(br) { 32330 var new_bit_pos = br.bit_pos_ + 7 & ~7; 32331 var pad_bits = br.readBits(new_bit_pos - br.bit_pos_); 32332 return pad_bits == 0; 32333 } 32334 function BrotliDecompressedSize(buffer) { 32335 var input = new BrotliInput(buffer); 32336 var br = new BrotliBitReader(input); 32337 DecodeWindowBits(br); 32338 var out = DecodeMetaBlockLength(br); 32339 return out.meta_block_length; 32340 } 32341 exports2.BrotliDecompressedSize = BrotliDecompressedSize; 32342 function BrotliDecompressBuffer(buffer, output_size) { 32343 var input = new BrotliInput(buffer); 32344 if (output_size == null) { 32345 output_size = BrotliDecompressedSize(buffer); 32346 } 32347 var output_buffer = new Uint8Array(output_size); 32348 var output = new BrotliOutput(output_buffer); 32349 BrotliDecompress(input, output); 32350 if (output.pos < output.buffer.length) { 32351 output.buffer = output.buffer.subarray( 32352 0, 32353 output.pos 32354 ); 32355 } 32356 return output.buffer; 32357 } 32358 exports2.BrotliDecompressBuffer = BrotliDecompressBuffer; 32359 function BrotliDecompress(input, output) { 32360 var i; 32361 var pos = 0; 32362 var input_end = 0; 32363 var window_bits = 0; 32364 var max_backward_distance; 32365 var max_distance = 0; 32366 var ringbuffer_size; 32367 var ringbuffer_mask; 32368 var ringbuffer; 32369 var ringbuffer_end; 32370 var dist_rb = [16, 15, 11, 4]; 32371 var dist_rb_idx = 0; 32372 var prev_byte1 = 0; 32373 var prev_byte2 = 0; 32374 var hgroup = [ 32375 new HuffmanTreeGroup(0, 0), 32376 new HuffmanTreeGroup(0, 0), 32377 new HuffmanTreeGroup(0, 0) 32378 ]; 32379 var block_type_trees; 32380 var block_len_trees; 32381 var br; 32382 var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE; 32383 br = new BrotliBitReader(input); 32384 window_bits = DecodeWindowBits(br); 32385 max_backward_distance = (1 << window_bits) - 16; 32386 ringbuffer_size = 1 << window_bits; 32387 ringbuffer_mask = ringbuffer_size - 1; 32388 ringbuffer = new Uint8Array( 32389 ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength 32390 ); 32391 ringbuffer_end = ringbuffer_size; 32392 block_type_trees = []; 32393 block_len_trees = []; 32394 for (var x2 = 0; x2 < 3 * HUFFMAN_MAX_TABLE_SIZE; x2++) { 32395 block_type_trees[x2] = new HuffmanCode(0, 0); 32396 block_len_trees[x2] = new HuffmanCode(0, 0); 32397 } 32398 while (!input_end) { 32399 var meta_block_remaining_len = 0; 32400 var is_uncompressed; 32401 var block_length = [1 << 28, 1 << 28, 1 << 28]; 32402 var block_type = [0]; 32403 var num_block_types = [1, 1, 1]; 32404 var block_type_rb = [0, 1, 0, 1, 0, 1]; 32405 var block_type_rb_index = [0]; 32406 var distance_postfix_bits; 32407 var num_direct_distance_codes; 32408 var distance_postfix_mask; 32409 var num_distance_codes; 32410 var context_map = null; 32411 var context_modes = null; 32412 var num_literal_htrees; 32413 var dist_context_map = null; 32414 var num_dist_htrees; 32415 var context_offset = 0; 32416 var context_map_slice = null; 32417 var literal_htree_index = 0; 32418 var dist_context_offset = 0; 32419 var dist_context_map_slice = null; 32420 var dist_htree_index = 0; 32421 var context_lookup_offset1 = 0; 32422 var context_lookup_offset2 = 0; 32423 var context_mode; 32424 var htree_command; 32425 for (i = 0; i < 3; ++i) { 32426 hgroup[i].codes = null; 32427 hgroup[i].htrees = null; 32428 } 32429 br.readMoreInput(); 32430 var _out = DecodeMetaBlockLength(br); 32431 meta_block_remaining_len = _out.meta_block_length; 32432 if (pos + meta_block_remaining_len > output.buffer.length) { 32433 var tmp = new Uint8Array( 32434 pos + meta_block_remaining_len 32435 ); 32436 tmp.set(output.buffer); 32437 output.buffer = tmp; 32438 } 32439 input_end = _out.input_end; 32440 is_uncompressed = _out.is_uncompressed; 32441 if (_out.is_metadata) { 32442 JumpToByteBoundary(br); 32443 for (; meta_block_remaining_len > 0; --meta_block_remaining_len) { 32444 br.readMoreInput(); 32445 br.readBits(8); 32446 } 32447 continue; 32448 } 32449 if (meta_block_remaining_len === 0) { 32450 continue; 32451 } 32452 if (is_uncompressed) { 32453 br.bit_pos_ = br.bit_pos_ + 7 & ~7; 32454 CopyUncompressedBlockToOutput( 32455 output, 32456 meta_block_remaining_len, 32457 pos, 32458 ringbuffer, 32459 ringbuffer_mask, 32460 br 32461 ); 32462 pos += meta_block_remaining_len; 32463 continue; 32464 } 32465 for (i = 0; i < 3; ++i) { 32466 num_block_types[i] = DecodeVarLenUint8(br) + 1; 32467 if (num_block_types[i] >= 2) { 32468 ReadHuffmanCode( 32469 num_block_types[i] + 2, 32470 block_type_trees, 32471 i * HUFFMAN_MAX_TABLE_SIZE, 32472 br 32473 ); 32474 ReadHuffmanCode( 32475 kNumBlockLengthCodes, 32476 block_len_trees, 32477 i * HUFFMAN_MAX_TABLE_SIZE, 32478 br 32479 ); 32480 block_length[i] = ReadBlockLength( 32481 block_len_trees, 32482 i * HUFFMAN_MAX_TABLE_SIZE, 32483 br 32484 ); 32485 block_type_rb_index[i] = 1; 32486 } 32487 } 32488 br.readMoreInput(); 32489 distance_postfix_bits = br.readBits(2); 32490 num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits); 32491 distance_postfix_mask = (1 << distance_postfix_bits) - 1; 32492 num_distance_codes = num_direct_distance_codes + (48 << distance_postfix_bits); 32493 context_modes = new Uint8Array( 32494 num_block_types[0] 32495 ); 32496 for (i = 0; i < num_block_types[0]; ++i) { 32497 br.readMoreInput(); 32498 context_modes[i] = br.readBits(2) << 1; 32499 } 32500 var _o1 = DecodeContextMap( 32501 num_block_types[0] << kLiteralContextBits, 32502 br 32503 ); 32504 num_literal_htrees = _o1.num_htrees; 32505 context_map = _o1.context_map; 32506 var _o2 = DecodeContextMap( 32507 num_block_types[2] << kDistanceContextBits, 32508 br 32509 ); 32510 num_dist_htrees = _o2.num_htrees; 32511 dist_context_map = _o2.context_map; 32512 hgroup[0] = new HuffmanTreeGroup( 32513 kNumLiteralCodes, 32514 num_literal_htrees 32515 ); 32516 hgroup[1] = new HuffmanTreeGroup( 32517 kNumInsertAndCopyCodes, 32518 num_block_types[1] 32519 ); 32520 hgroup[2] = new HuffmanTreeGroup( 32521 num_distance_codes, 32522 num_dist_htrees 32523 ); 32524 for (i = 0; i < 3; ++i) { 32525 hgroup[i].decode(br); 32526 } 32527 context_map_slice = 0; 32528 dist_context_map_slice = 0; 32529 context_mode = context_modes[block_type[0]]; 32530 context_lookup_offset1 = Context.lookupOffsets[context_mode]; 32531 context_lookup_offset2 = Context.lookupOffsets[context_mode + 1]; 32532 htree_command = hgroup[1].htrees[0]; 32533 while (meta_block_remaining_len > 0) { 32534 var cmd_code; 32535 var range_idx; 32536 var insert_code; 32537 var copy_code; 32538 var insert_length; 32539 var copy_length; 32540 var distance_code; 32541 var distance; 32542 var context; 32543 var j2; 32544 var copy_dst; 32545 br.readMoreInput(); 32546 if (block_length[1] === 0) { 32547 DecodeBlockType( 32548 num_block_types[1], 32549 block_type_trees, 32550 1, 32551 block_type, 32552 block_type_rb, 32553 block_type_rb_index, 32554 br 32555 ); 32556 block_length[1] = ReadBlockLength( 32557 block_len_trees, 32558 HUFFMAN_MAX_TABLE_SIZE, 32559 br 32560 ); 32561 htree_command = hgroup[1].htrees[block_type[1]]; 32562 } 32563 --block_length[1]; 32564 cmd_code = ReadSymbol( 32565 hgroup[1].codes, 32566 htree_command, 32567 br 32568 ); 32569 range_idx = cmd_code >> 6; 32570 if (range_idx >= 2) { 32571 range_idx -= 2; 32572 distance_code = -1; 32573 } else { 32574 distance_code = 0; 32575 } 32576 insert_code = Prefix.kInsertRangeLut[range_idx] + (cmd_code >> 3 & 7); 32577 copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7); 32578 insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset + br.readBits( 32579 Prefix.kInsertLengthPrefixCode[insert_code].nbits 32580 ); 32581 copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset + br.readBits( 32582 Prefix.kCopyLengthPrefixCode[copy_code].nbits 32583 ); 32584 prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask]; 32585 prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask]; 32586 for (j2 = 0; j2 < insert_length; ++j2) { 32587 br.readMoreInput(); 32588 if (block_length[0] === 0) { 32589 DecodeBlockType( 32590 num_block_types[0], 32591 block_type_trees, 32592 0, 32593 block_type, 32594 block_type_rb, 32595 block_type_rb_index, 32596 br 32597 ); 32598 block_length[0] = ReadBlockLength( 32599 block_len_trees, 32600 0, 32601 br 32602 ); 32603 context_offset = block_type[0] << kLiteralContextBits; 32604 context_map_slice = context_offset; 32605 context_mode = context_modes[block_type[0]]; 32606 context_lookup_offset1 = Context.lookupOffsets[context_mode]; 32607 context_lookup_offset2 = Context.lookupOffsets[context_mode + 1]; 32608 } 32609 context = Context.lookup[context_lookup_offset1 + prev_byte1] | Context.lookup[context_lookup_offset2 + prev_byte2]; 32610 literal_htree_index = context_map[context_map_slice + context]; 32611 --block_length[0]; 32612 prev_byte2 = prev_byte1; 32613 prev_byte1 = ReadSymbol( 32614 hgroup[0].codes, 32615 hgroup[0].htrees[literal_htree_index], 32616 br 32617 ); 32618 ringbuffer[pos & ringbuffer_mask] = prev_byte1; 32619 if ((pos & ringbuffer_mask) === ringbuffer_mask) { 32620 output.write( 32621 ringbuffer, 32622 ringbuffer_size 32623 ); 32624 } 32625 ++pos; 32626 } 32627 meta_block_remaining_len -= insert_length; 32628 if (meta_block_remaining_len <= 0) break; 32629 if (distance_code < 0) { 32630 var context; 32631 br.readMoreInput(); 32632 if (block_length[2] === 0) { 32633 DecodeBlockType( 32634 num_block_types[2], 32635 block_type_trees, 32636 2, 32637 block_type, 32638 block_type_rb, 32639 block_type_rb_index, 32640 br 32641 ); 32642 block_length[2] = ReadBlockLength( 32643 block_len_trees, 32644 2 * HUFFMAN_MAX_TABLE_SIZE, 32645 br 32646 ); 32647 dist_context_offset = block_type[2] << kDistanceContextBits; 32648 dist_context_map_slice = dist_context_offset; 32649 } 32650 --block_length[2]; 32651 context = (copy_length > 4 ? 3 : copy_length - 2) & 255; 32652 dist_htree_index = dist_context_map[dist_context_map_slice + context]; 32653 distance_code = ReadSymbol( 32654 hgroup[2].codes, 32655 hgroup[2].htrees[dist_htree_index], 32656 br 32657 ); 32658 if (distance_code >= num_direct_distance_codes) { 32659 var nbits; 32660 var postfix; 32661 var offset4; 32662 distance_code -= num_direct_distance_codes; 32663 postfix = distance_code & distance_postfix_mask; 32664 distance_code >>= distance_postfix_bits; 32665 nbits = (distance_code >> 1) + 1; 32666 offset4 = (2 + (distance_code & 1) << nbits) - 4; 32667 distance_code = num_direct_distance_codes + (offset4 + br.readBits(nbits) << distance_postfix_bits) + postfix; 32668 } 32669 } 32670 distance = TranslateShortCodes( 32671 distance_code, 32672 dist_rb, 32673 dist_rb_idx 32674 ); 32675 if (distance < 0) { 32676 throw new Error( 32677 "[BrotliDecompress] invalid distance" 32678 ); 32679 } 32680 if (pos < max_backward_distance && max_distance !== max_backward_distance) { 32681 max_distance = pos; 32682 } else { 32683 max_distance = max_backward_distance; 32684 } 32685 copy_dst = pos & ringbuffer_mask; 32686 if (distance > max_distance) { 32687 if (copy_length >= BrotliDictionary.minDictionaryWordLength && copy_length <= BrotliDictionary.maxDictionaryWordLength) { 32688 var offset4 = BrotliDictionary.offsetsByLength[copy_length]; 32689 var word_id = distance - max_distance - 1; 32690 var shift4 = BrotliDictionary.sizeBitsByLength[copy_length]; 32691 var mask = (1 << shift4) - 1; 32692 var word_idx = word_id & mask; 32693 var transform_idx = word_id >> shift4; 32694 offset4 += word_idx * copy_length; 32695 if (transform_idx < Transform.kNumTransforms) { 32696 var len = Transform.transformDictionaryWord( 32697 ringbuffer, 32698 copy_dst, 32699 offset4, 32700 copy_length, 32701 transform_idx 32702 ); 32703 copy_dst += len; 32704 pos += len; 32705 meta_block_remaining_len -= len; 32706 if (copy_dst >= ringbuffer_end) { 32707 output.write( 32708 ringbuffer, 32709 ringbuffer_size 32710 ); 32711 for (var _x8 = 0; _x8 < copy_dst - ringbuffer_end; _x8++) 32712 ringbuffer[_x8] = ringbuffer[ringbuffer_end + _x8]; 32713 } 32714 } else { 32715 throw new Error( 32716 "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len 32717 ); 32718 } 32719 } else { 32720 throw new Error( 32721 "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len 32722 ); 32723 } 32724 } else { 32725 if (distance_code > 0) { 32726 dist_rb[dist_rb_idx & 3] = distance; 32727 ++dist_rb_idx; 32728 } 32729 if (copy_length > meta_block_remaining_len) { 32730 throw new Error( 32731 "Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len 32732 ); 32733 } 32734 for (j2 = 0; j2 < copy_length; ++j2) { 32735 ringbuffer[pos & ringbuffer_mask] = ringbuffer[pos - distance & ringbuffer_mask]; 32736 if ((pos & ringbuffer_mask) === ringbuffer_mask) { 32737 output.write( 32738 ringbuffer, 32739 ringbuffer_size 32740 ); 32741 } 32742 ++pos; 32743 --meta_block_remaining_len; 32744 } 32745 } 32746 prev_byte1 = ringbuffer[pos - 1 & ringbuffer_mask]; 32747 prev_byte2 = ringbuffer[pos - 2 & ringbuffer_mask]; 32748 } 32749 pos &= 1073741823; 32750 } 32751 output.write(ringbuffer, pos & ringbuffer_mask); 32752 } 32753 exports2.BrotliDecompress = BrotliDecompress; 32754 BrotliDictionary.init(); 32755 }, 32756 { 32757 "./bit_reader": 1, 32758 "./context": 2, 32759 "./dictionary": 6, 32760 "./huffman": 7, 32761 "./prefix": 9, 32762 "./streams": 10, 32763 "./transform": 11 32764 } 32765 ], 32766 4: [ 32767 function(require2, module2, exports2) { 32768 var base64 = require2("base64-js"); 32769 exports2.init = function() { 32770 var BrotliDecompressBuffer = require2("./decode").BrotliDecompressBuffer; 32771 var compressed = base64.toByteArray( 32772 require2("./dictionary.bin.js") 32773 ); 32774 return BrotliDecompressBuffer(compressed); 32775 }; 32776 }, 32777 { "./decode": 3, "./dictionary.bin.js": 5, "base64-js": 8 } 32778 ], 32779 5: [ 32780 function(require2, module2, exports2) { 32781 module2.exports = "W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYXHRJaNAOByiaK6CusgFdBPE40r0rvqXV7tksKO2DrHYXBTv8P5ysqxEx8VDXUDDqkPH6NNOV/a2WH8zlkXRELSa8P+heNyJBBP7PgsG1EtWtNef6/i+lcayzQwQCsduidpbKfhWUDgAEmyhGu/zVTacI6RS0zTABrOYueemnVa19u9fT23N/Ta6RvTpof5DWygqreCqrDAgM4LID1+1T/taU6yTFVLqXOv+/MuQOFnaF8vLMKD7tKWDoBdALgxF33zQccCcdHx8fKIVdW69O7qHtXpeGr9jbbpFA+qRMWr5hp0s67FPc7HAiLV0g0/peZlW7hJPYEhZyhpSwahnf93/tZgfqZWXFdmdXBzqxGHLrQKxoAY6fRoBhgCRPmmGueYZ5JexTVDKUIXzkG/fqp/0U3hAgQdJ9zumutK6nqWbaqvm1pgu03IYR+G+8s0jDBBz8cApZFSBeuWasyqo2OMDKAZCozS+GWSvL/HsE9rHxooe17U3s/lTE+VZAk4j3dp6uIGaC0JMiqR5CUsabPyM0dOYDR7Ea7ip4USZlya38YfPtvrX/tBlhHilj55nZ1nfN24AOAi9BVtz/Mbn8AEDJCqJgsVUa6nQnSxv2Fs7l/NlCzpfYEjmPrNyib/+t0ei2eEMjvNhLkHCZlci4WhBe7ePZTmzYqlY9+1pxtS4GB+5lM1BHT9tS270EWUDYFq1I0yY/fNiAk4bk9yBgmef/f2k6AlYQZHsNFnW8wBQxCd68iWv7/35bXfz3JZmfGligWAKRjIs3IpzxQ27vAglHSiOzCYzJ9L9A1CdiyFvyR66ucA4jKifu5ehwER26yV7HjKqn5Mfozo7Coxxt8LWWPT47BeMxX8p0Pjb7hZn+6bw7z3Lw+7653j5sI8CLu5kThpMlj1m4c2ch3jGcP1FsT13vuK3qjecKTZk2kHcOZY40UX+qdaxstZqsqQqgXz+QGF99ZJLqr3VYu4aecl1Ab5GmqS8k/GV5b95zxQ5d4EfXUJ6kTS/CXF/aiqKDOT1T7Jz5z0PwDUcwr9clLN1OJGCiKfqvah+h3XzrBOiLOW8wvn8gW6qE8vPxi+Efv+UH55T7PQFVMh6cZ1pZQlzJpKZ7P7uWvwPGJ6DTlR6wbyj3Iv2HyefnRo/dv7dNx+qaa0N38iBsR++Uil7Wd4afwDNsrzDAK4fXZwvEY/jdKuIKXlfrQd2C39dW7ntnRbIp9OtGy9pPBn/V2ASoi/2UJZfS+xuGLH8bnLuPlzdTNS6zdyk8Dt/h6sfOW5myxh1f+zf3zZ3MX/mO9cQPp5pOx967ZA6/pqHvclNfnUFF+rq+Vd7alKr6KWPcIDhpn6v2K6NlUu6LrKo8b/pYpU/Gazfvtwhn7tEOUuXht5rUJdSf6sLjYf0VTYDgwJ81yaqKTUYej/tbHckSRb/HZicwGJqh1mAHB/IuNs9dc9yuvF3D5Xocm3elWFdq5oEy70dYFit79yaLiNjPj5UUcVmZUVhQEhW5V2Z6Cm4HVH/R8qlamRYwBileuh07CbEce3TXa2JmXWBf+ozt319psboobeZhVnwhMZzOeQJzhpTDbP71Tv8HuZxxUI/+ma3XW6DFDDs4+qmpERwHGBd2edxwUKlODRdUWZ/g0GOezrbzOZauFMai4QU6GVHV6aPNBiBndHSsV4IzpvUiiYyg6OyyrL4Dj5q/Lw3N5kAwftEVl9rNd7Jk5PDij2hTH6wIXnsyXkKePxbmHYgC8A6an5Fob/KH5GtC0l4eFso+VpxedtJHdHpNm+Bvy4C79yVOkrZsLrQ3OHCeB0Ra+kBIRldUGlDCEmq2RwXnfyh6Dz+alk6eftI2n6sastRrGwbwszBeDRS/Fa/KwRJkCzTsLr/JCs5hOPE/MPLYdZ1F1fv7D+VmysX6NpOC8aU9F4Qs6HvDyUy9PvFGDKZ/P5101TYHFl8pjj6wm/qyS75etZhhfg0UEL4OYmHk6m6dO192AzoIyPSV9QedDA4Ml23rRbqxMPMxf7FJnDc5FTElVS/PyqgePzmwVZ26NWhRDQ+oaT7ly7ell4s3DypS1s0g+tOr7XHrrkZj9+x/mJBttrLx98lFIaRZzHz4aC7r52/JQ4VjHahY2/YVXZn/QC2ztQb/sY3uRlyc5vQS8nLPGT/n27495i8HPA152z7Fh5aFpyn1GPJKHuPL8Iw94DuW3KjkURAWZXn4EQy89xiKEHN1mk/tkM4gYDBxwNoYvRfE6LFqsxWJtPrDGbsnLMap3Ka3MUoytW0cvieozOmdERmhcqzG+3HmZv2yZeiIeQTKGdRT4HHNxekm1tY+/n06rGmFleqLscSERzctTKM6G9P0Pc1RmVvrascIxaO1CQCiYPE15bD7c3xSeW7gXxYjgxcrUlcbIvO0r+Yplhx0kTt3qafDOmFyMjgGxXu73rddMHpV1wMubyAGcf/v5dLr5P72Ta9lBF+fzMJrMycwv+9vnU3ANIl1cH9tfW7af8u0/HG0vV47jNFXzFTtaha1xvze/s8KMtCYucXc1nzfd/MQydUXn/b72RBt5wO/3jRcMH9BdhC/yctKBIveRYPrNpDWqBsO8VMmP+WvRaOcA4zRMR1PvSoO92rS7pYEv+fZfEfTMzEdM+6X5tLlyxExhqLRkms5EuLovLfx66de5fL2/yX02H52FPVwahrPqmN/E0oVXnsCKhbi/yRxX83nRbUKWhzYceXOntfuXn51NszJ6MO73pQf5Pl4in3ec4JU8hF7ppV34+mm9r1LY0ee/i1O1wpd8+zfLztE0cqBxggiBi5Bu95v9l3r9r/U5hweLn+TbfxowrWDqdJauKd8+q/dH8sbPkc9ttuyO94f7/XK/nHX46MPFLEb5qQlNPvhJ50/59t9ft3LXu7uVaWaO2bDrDCnRSzZyWvFKxO1+vT8MwwunR3bX0CkfPjqb4K9O19tn5X50PvmYpEwHtiW9WtzuV/s76B1zvLLNkViNd8ySxIl/3orfqP90TyTGaf7/rx8jQzeHJXdmh/N6YDvbvmTBwCdxfEQ1NcL6wNMdSIXNq7b1EUzRy1/Axsyk5p22GMG1b+GxFgbHErZh92wuvco0AuOLXct9hvw2nw/LqIcDRRmJmmZzcgUa7JpM/WV/S9IUfbF56TL2orzqwebdRD8nIYNJ41D/hz37Fo11p2Y21wzPcn713qVGhqtevStYfGH4n69OEJtPvbbLYWvscDqc3Hgnu166+tAyLnxrX0Y5zoYjV++1sI7t5kMr02KT/+uwtkc+rZLOf/qn/s3nYCf13Dg8/sB2diJgjGqjQ+TLhxbzyue2Ob7X6/9lUwW7a+lbznHzOYy8LKW1C/uRPbQY3KW/0gO9LXunHLvPL97afba9bFtc9hmz7GAttjVYlCvQAiOwAk/gC5+hkLEs6tr3AZKxLJtOEwk2dLxTYWsIB/j/ToWtIWzo906FrSG8iaqqqqqqiIiIiAgzMzMzNz+AyK+01/zi8n8S+Y1MjoRaQ80WU/G8MBlO+53VPXANrWm4wzGUVZUjjBJZVdhpcfkjsmcWaO+UEldXi1e+zq+HOsCpknYshuh8pOLISJun7TN0EIGW2xTnlOImeecnoGW4raxe2G1T3HEvfYUYMhG+gAFOAwh5nK8mZhwJMmN7r224QVsNFvZ87Z0qatvknklyPDK3Hy45PgVKXji52Wen4d4PlFVVYGnNap+fSpFbK90rYnhUc6n91Q3AY9E0tJOFrcfZtm/491XbcG/jsViUPPX76qmeuiz+qY1Hk7/1VPM405zWVuoheLUimpWYdVzCmUdKHebMdzgrYrb8mL2eeLSnRWHdonfZa8RsOU9F37w+591l5FLYHiOqWeHtE/lWrBHcRKp3uhtr8yXm8LU/5ms+NM6ZKsqu90cFZ4o58+k4rdrtB97NADFbwmEG7lXqvirhOTOqU14xuUF2myIjURcPHrPOQ4lmM3PeMg7bUuk0nnZi67bXsU6H8lhqIo8TaOrEafCO1ARK9PjC0QOoq2BxmMdgYB9G/lIb9++fqNJ2s7BHGFyBNmZAR8J3KCo012ikaSP8BCrf6VI0X5xdnbhHIO+B5rbOyB54zXkzfObyJ4ecwxfqBJMLFc7m59rNcw7hoHnFZ0b00zee+gTqvjm61Pb4xn0kcDX4jvHM0rBXZypG3DCKnD/Waa/ZtHmtFPgO5eETx+k7RrVg3aSwm2YoNXnCs3XPQDhNn+Fia6IlOOuIG6VJH7TP6ava26ehKHQa2T4N0tcZ9dPCGo3ZdnNltsHQbeYt5vPnJezV/cAeNypdml1vCHI8M81nSRP5Qi2+mI8v/sxiZru9187nRtp3f/42NemcONa+4eVC3PCZzc88aZh851CqSsshe70uPxeN/dmYwlwb3trwMrN1Gq8jbnApcVDx/yDPeYs5/7r62tsQ6lLg+DiFXTEhzR9dHqv0iT4tgj825W+H3XiRUNUZT2kR9Ri0+lp+UM3iQtS8uOE23Ly4KYtvqH13jghUntJRAewuzNLDXp8RxdcaA3cMY6TO2IeSFRXezeWIjCqyhsUdMYuCgYTZSKpBype1zRfq8FshvfBPc6BAQWl7/QxIDp3VGo1J3vn42OEs3qznws+YLRXbymyB19a9XBx6n/owcyxlEYyFWCi+kG9F+EyD/4yn80+agaZ9P7ay2Dny99aK2o91FkfEOY8hBwyfi5uwx2y5SaHmG+oq/zl1FX/8irOf8Y3vAcX/6uLP6A6nvMO24edSGPjQc827Rw2atX+z2bKq0CmW9mOtYnr5/AfDa1ZfPaXnKtlWborup7QYx+Or2uWb+N3N//2+yDcXMqIJdf55xl7/vsj4WoPPlxLxtVrkJ4w/tTe3mLdATOOYwxcq52w5Wxz5MbPdVs5O8/lhfE7dPj0bIiPQ3QV0iqm4m3YX8hRfc6jQ3fWepevMqUDJd86Z4vwM40CWHnn+WphsGHfieF02D3tmZvpWD+kBpNCFcLnZhcmmrhpGzzbdA+sQ1ar18OJD87IOKOFoRNznaHPNHUfUNhvY1iU+uhvEvpKHaUn3qK3exVVyX4joipp3um7FmYJWmA+WbIDshRpbVRx5/nqstCgy87FGbfVB8yDGCqS+2qCsnRwnSAN6zgzxfdB2nBT/vZ4/6uxb6oH8b4VBRxiIB93wLa47hG3w2SL/2Z27yOXJFwZpSJaBYyvajA7vRRYNKqljXKpt/CFD/tSMr18DKKbwB0xggBePatl1nki0yvqW5zchlyZmJ0OTxJ3D+fsYJs/mxYN5+Le5oagtcl+YsVvy8kSjI2YGvGjvmpkRS9W2dtXqWnVuxUhURm1lKtou/hdEq19VBp9OjGvHEQSmrpuf2R24mXGheil8KeiANY8fW1VERUfBImb64j12caBZmRViZHbeVMjCrPDg9A90IXrtnsYCuZtRQ0PyrKDjBNOsPfKsg1pA02gHlVr0OXiFhtp6nJqXVzcbfM0KnzC3ggOENPE9VBdmHKN6LYaijb4wXxJn5A0FSDF5j+h1ooZx885Jt3ZKzO5n7Z5WfNEOtyyPqQEnn7WLv5Fis3PdgMshjF1FRydbNyeBbyKI1oN1TRVrVK7kgsb/zjX4NDPIRMctVeaxVB38Vh1x5KbeJbU138AM5KzmZu3uny0ErygxiJF7GVXUrPzFxrlx1uFdAaZFDN9cvIb74qD9tzBMo7L7WIEYK+sla1DVMHpF0F7b3+Y6S+zjvLeDMCpapmJo1weBWuxKF3rOocih1gun4BoJh1kWnV/Jmiq6uOhK3VfKxEHEkafjLgK3oujaPzY6SXg8phhL4TNR1xvJd1Wa0aYFfPUMLrNBDCh4AuGRTbtKMc6Z1Udj8evY/ZpCuMAUefdo69DZUngoqE1P9A3PJfOf7WixCEj+Y6t7fYeHbbxUAoFV3M89cCKfma3fc1+jKRe7MFWEbQqEfyzO2x/wrO2VYH7iYdQ9BkPyI8/3kXBpLaCpU7eC0Yv/am/tEDu7HZpqg0EvHo0nf/R/gRzUWy33/HXMJQeu1GylKmOkXzlCfGFruAcPPhaGqZOtu19zsJ1SO2Jz4Ztth5cBX6mRQwWmDwryG9FUMlZzNckMdK+IoMJv1rOWnBamS2w2KHiaPMPLC15hCZm4KTpoZyj4E2TqC/P6r7/EhnDMhKicZZ1ZwxuC7DPzDGs53q8gXaI9kFTK+2LTq7bhwsTbrMV8Rsfua5lMS0FwbTitUVnVa1yTb5IX51mmYnUcP9wPr8Ji1tiYJeJV9GZTrQhF7vvdU2OTU42ogJ9FDwhmycI2LIg++03C6scYhUyUuMV5tkw6kGUoL+mjNC38+wMdWNljn6tGPpRES7veqrSn5TRuv+dh6JVL/iDHU1db4c9WK3++OrH3PqziF916UMUKn8G67nN60GfWiHrXYhUG3yVWmyYak59NHj8t1smG4UDiWz2rPHNrKnN4Zo1LBbr2/eF9YZ0n0blx2nG4X+EKFxvS3W28JESD+FWk61VCD3z/URGHiJl++7TdBwkCj6tGOH3qDb0QqcOF9Kzpj0HUb/KyFW3Yhj2VMKJqGZleFBH7vqvf7WqLC3XMuHV8q8a4sTFuxUtkD/6JIBvKaVjv96ndgruKZ1k/BHzqf2K9fLk7HGXANyLDd1vxkK/i055pnzl+zw6zLnwXlVYVtfmacJgEpRP1hbGgrYPVN6v2lG+idQNGmwcKXu/8xEj/P6qe/sB2WmwNp6pp8jaISMkwdleFXYK55NHWLTTbutSUqjBfDGWo/Yg918qQ+8BRZSAHZbfuNZz2O0sov1Ue4CWlVg3rFhM3Kljj9ksGd/NUhk4nH+a5UN2+1i8+NM3vRNp7uQ6sqexSCukEVlVZriHNqFi5rLm9TMWa4qm3idJqppQACol2l4VSuvWLfta4JcXy3bROPNbXOgdOhG47LC0CwW/dMlSx4Jf17aEU3yA1x9p+Yc0jupXgcMuYNku64iYOkGToVDuJvlbEKlJqsmiHbvNrIVZEH+yFdF8DbleZ6iNiWwMqvtMp/mSpwx5KxRrT9p3MAPTHGtMbfvdFhyj9vhaKcn3At8Lc16Ai+vBcSp1ztXi7rCJZx/ql7TXcclq6Q76UeKWDy9boS0WHIjUuWhPG8LBmW5y2rhuTpM5vsLt+HOLh1Yf0DqXa9tsfC+kaKt2htA0ai/L2i7RKoNjEwztkmRU0GfgW1TxUvPFhg0V7DdfWJk5gfrccpYv+MA9M0dkGTLECeYwUixRzjRFdmjG7zdZIl3XKB9YliNKI31lfa7i2JG5C8Ss+rHe0D7Z696/V3DEAOWHnQ9yNahMUl5kENWS6pHKKp2D1BaSrrHdE1w2qNxIztpXgUIrF0bm15YML4b6V1k+GpNysTahKMVrrS85lTVo9OGJ96I47eAy5rYWpRf/mIzeoYU1DKaQCTUVwrhHeyNoDqHel+lLxr9WKzhSYw7vrR6+V5q0pfi2k3L1zqkubY6rrd9ZLvSuWNf0uqnkY+FpTvFzSW9Fp0b9l8JA7THV9eCi/PY/SCZIUYx3BU2alj7Cm3VV6eYpios4b6WuNOJdYXUK3zTqj5CVG2FqYM4Z7CuIU0qO05XR0d71FHM0YhZmJmTRfLlXEumN82BGtzdX0S19t1e+bUieK8zRmqpa4Qc5TSjifmaQsY2ETLjhI36gMR1+7qpjdXXHiceUekfBaucHShAOiFXmv3sNmGQyU5iVgnoocuonQXEPTFwslHtS8R+A47StI9wj0iSrtbi5rMysczFiImsQ+bdFClnFjjpXXwMy6O7qfjOr8Fb0a7ODItisjnn3EQO16+ypd1cwyaAW5Yzxz5QknfMO7643fXW/I9y3U2xH27Oapqr56Z/tEzglj6IbT6HEHjopiXqeRbe5mQQvxtcbDOVverN0ZgMdzqRYRjaXtMRd56Q4cZSmdPvZJdSrhJ1D9zNXPqAEqPIavPdfubt5oke2kmv0dztIszSv2VYuoyf1UuopbsYb+uX9h6WpwjpgtZ6fNNawNJ4q8O3CFoSbioAaOSZMx2GYaPYB+rEb6qjQiNRFQ76TvwNFVKD+BhH9VhcKGsXzmMI7BptU/CNWolM7YzROvpFAntsiWJp6eR2d3GarcYShVYSUqhmYOWj5E96NK2WvmYNTeY7Zs4RUEdv9h9QT4EseKt6LzLrqEOs3hxAY1MaNWpSa6zZx8F3YOVeCYMS88W+CYHDuWe4yoc6YK+djDuEOrBR5lvh0r+Q9uM88lrjx9x9AtgpQVNE8r+3O6Gvw59D+kBF/UMXyhliYUtPjmvXGY6Dk3x+kEOW+GtdMVC4EZTqoS/jmR0P0LS75DOc/w2vnri97M4SdbZ8qeU7gg8DVbERkU5geaMQO3mYrSYyAngeUQqrN0C0/vsFmcgWNXNeidsTAj7/4MncJR0caaBUpbLK1yBCBNRjEv6KvuVSdpPnEMJdsRRtqJ+U8tN1gXA4ePHc6ZT0eviI73UOJF0fEZ8YaneAQqQdGphNvwM4nIqPnXxV0xA0fnCT+oAhJuyw/q8jO0y8CjSteZExwBpIN6SvNp6A5G/abi6egeND/1GTguhuNjaUbbnSbGd4L8937Ezm34Eyi6n1maeOBxh3PI0jzJDf5mh/BsLD7F2GOKvlA/5gtvxI3/eV4sLfKW5Wy+oio+es/u6T8UU+nsofy57Icb/JlZHPFtCgd/x+bwt3ZT+xXTtTtTrGAb4QehC6X9G+8YT+ozcLxDsdCjsuOqwPFnrdLYaFc92Ui0m4fr39lYmlCaqTit7G6O/3kWDkgtXjNH4BiEm/+jegQnihOtfffn33WxsFjhfMd48HT+f6o6X65j7XR8WLSHMFkxbvOYsrRsF1bowDuSQ18Mkxk4qz2zoGPL5fu9h2Hqmt1asl3Q3Yu3szOc+spiCmX4AETBM3pLoTYSp3sVxahyhL8eC4mPN9k2x3o0xkiixIzM3CZFzf5oR4mecQ5+ax2wCah3/crmnHoqR0+KMaOPxRif1oEFRFOO/kTPPmtww+NfMXxEK6gn6iU32U6fFruIz8Q4WgljtnaCVTBgWx7diUdshC9ZEa5yKpRBBeW12r/iNc/+EgNqmhswNB8SBoihHXeDF7rrWDLcmt3V8GYYN7pXRy4DZjj4DJuUBL5iC3DQAaoo4vkftqVTYRGLS3mHZ7gdmdTTqbgNN/PTdTCOTgXolc88MhXAEUMdX0iy1JMuk5wLsgeu0QUYlz2S4skTWwJz6pOm/8ihrmgGfFgri+ZWUK2gAPHgbWa8jaocdSuM4FJYoKicYX/ZSENkg9Q1ZzJfwScfVnR2DegOGwCvmogaWJCLQepv9WNlU6QgsmOwICquU28Mlk3d9W5E81lU/5Ez0LcX6lwKMWDNluNKfBDUy/phJgBcMnfkh9iRxrdOzgs08JdPB85Lwo+GUSb4t3nC+0byqMZtO2fQJ4U2zGIr49t/28qmmGv2RanDD7a3FEcdtutkW8twwwlUSpb8QalodddbBfNHKDQ828BdE7OBgFdiKYohLawFYqpybQoxATZrheLhdI7+0Zlu9Q1myRcd15r9UIm8K2LGJxqTegntqNVMKnf1a8zQiyUR1rxoqjiFxeHxqFcYUTHfDu7rhbWng6qOxOsI+5A1p9mRyEPdVkTlE24vY54W7bWc6jMgZvNXdfC9/9q7408KDsbdL7Utz7QFSDetz2picArzrdpL8OaCHC9V26RroemtDZ5yNM/KGkWMyTmfnInEvwtSD23UcFcjhaE3VKzkoaEMKGBft4XbIO6forTY1lmGQwVmKicBCiArDzE+1oIxE08fWeviIOD5TznqH+OoHadvoOP20drMPe5Irg3XBQziW2XDuHYzjqQQ4wySssjXUs5H+t3FWYMHppUnBHMx/nYIT5d7OmjDbgD9F6na3m4l7KdkeSO3kTEPXafiWinogag7b52taiZhL1TSvBFmEZafFq2H8khQaZXuitCewT5FBgVtPK0j4xUHPfUz3Q28eac1Z139DAP23dgki94EC8vbDPTQC97HPPSWjUNG5tWKMsaxAEMKC0665Xvo1Ntd07wCLNf8Q56mrEPVpCxlIMVlQlWRxM3oAfpgIc+8KC3rEXUog5g06vt7zgXY8grH7hhwVSaeuvC06YYRAwpbyk/Unzj9hLEZNs2oxPQB9yc+GnL6zTgq7rI++KDJwX2SP8Sd6YzTuw5lV/kU6eQxRD12omfQAW6caTR4LikYkBB1CMOrvgRr/VY75+NSB40Cni6bADAtaK+vyxVWpf9NeKJxN2KYQ8Q2xPB3K1s7fuhvWbr2XpgW044VD6DRs0qXoqKf1NFsaGvKJc47leUV3pppP/5VTKFhaGuol4Esfjf5zyCyUHmHthChcYh4hYLQF+AFWsuq4t0wJyWgdwQVOZiV0efRHPoK5+E1vjz9wTJmVkITC9oEstAsyZSgE/dbicwKr89YUxKZI+owD205Tm5lnnmDRuP/JnzxX3gMtlrcX0UesZdxyQqYQuEW4R51vmQ5xOZteUd8SJruMlTUzhtVw/Nq7eUBcqN2/HVotgfngif60yKEtoUx3WYOZlVJuJOh8u59fzSDPFYtQgqDUAGyGhQOAvKroXMcOYY0qjnStJR/G3aP+Jt1sLVlGV8POwr/6OGsqetnyF3TmTqZjENfnXh51oxe9qVUw2M78EzAJ+IM8lZ1MBPQ9ZWSVc4J3mWSrLKrMHReA5qdGoz0ODRsaA+vwxXA2cAM4qlfzBJA6581m4hzxItQw5dxrrBL3Y6kCbUcFxo1S8jyV44q//+7ASNNudZ6xeaNOSIUffqMn4A9lIjFctYn2gpEPAb3f7p3iIBN8H14FUGQ9ct2hPsL+cEsTgUrR47uJVN4n4wt/wgfwwHuOnLd4yobkofy8JvxSQTA7rMpDIc608SlZFJfZYcmbT0tAHpPE8MrtQ42siTUNWxqvWZOmvu9f0JPoQmg+6l7sZWwyfi6PXkxJnwBraUG0MYG4zYHQz3igy/XsFkx5tNQxw43qvI9dU3f0DdhOUlHKjmi1VAr2Kiy0HZwD8VeEbhh0OiDdMYspolQsYdSwjCcjeowIXNZVUPmL2wwIkYhmXKhGozdCJ4lRKbsf4NBh/XnQoS92NJEWOVOFs2YhN8c5QZFeK0pRdAG40hqvLbmoSA8xQmzOOEc7wLcme9JOsjPCEgpCwUs9E2DohMHRhUeyGIN6TFvrbny8nDuilsDpzrH5mS76APoIEJmItS67sQJ+nfwddzmjPxcBEBBCw0kWDwd0EZCkNeOD7NNQhtBm7KHL9mRxj6U1yWU2puzlIDtpYxdH4ZPeXBJkTGAJfUr/oTCz/iypY6uXaR2V1doPxJYlrw2ghH0D5gbrhFcIxzYwi4a/4hqVdf2DdxBp6vGYDjavxMAAoy+1+3aiO6S3W/QAKNVXagDtvsNtx7Ks+HKgo6U21B+QSZgIogV5Bt+BnXisdVfy9VyXV+2P5fMuvdpAjM1o/K9Z+XnE4EOCrue+kcdYHqAQ0/Y/OmNlQ6OI33jH/uD1RalPaHpJAm2av0/xtpqdXVKNDrc9F2izo23Wu7firgbURFDNX9eGGeYBhiypyXZft2j3hTvzE6PMWKsod//rEILDkzBXfi7xh0eFkfb3/1zzPK/PI5Nk3FbZyTl4mq5BfBoVoqiPHO4Q4QKZAlrQ3MdNfi3oxIjvsM3kAFv3fdufurqYR3PSwX/mpGy/GFI/B2MNPiNdOppWVbs/gjF3YH+QA9jMhlAbhvasAHstB0IJew09iAkmXHl1/TEj+jvHOpOGrPRQXbPADM+Ig2/OEcUcpgPTItMtW4DdqgfYVI/+4hAFWYjUGpOP/UwNuB7+BbKOcALbjobdgzeBQfjgNSp2GOpxzGLj70Vvq5cw2AoYENwKLUtJUX8sGRox4dVa/TN4xKwaKcl9XawQR/uNus700Hf17pyNnezrUgaY9e4MADhEDBpsJT6y1gDJs1q6wlwGhuUzGR7C8kgpjPyHWwsvrf3yn1zJEIRa5eSxoLAZOCR9xbuztxFRJW9ZmMYfCFJ0evm9F2fVnuje92Rc4Pl6A8bluN8MZyyJGZ0+sNSb//DvAFxC2BqlEsFwccWeAl6CyBcQV1bx4mQMBP1Jxqk1EUADNLeieS2dUFbQ/c/kvwItbZ7tx0st16viqd53WsRmPTKv2AD8CUnhtPWg5aUegNpsYgasaw2+EVooeNKmrW3MFtj76bYHJm5K9gpAXZXsE5U8DM8XmVOSJ1F1WnLy6nQup+jx52bAb+rCq6y9WXl2B2oZDhfDkW7H3oYfT/4xx5VncBuxMXP2lNfhUVQjSSzSRbuZFE4vFawlzveXxaYKVs8LpvAb8IRYF3ZHiRnm0ADeNPWocwxSzNseG7NrSEVZoHdKWqaGEBz1N8Pt7kFbqh3LYmAbm9i1IChIpLpM5AS6mr6OAPHMwwznVy61YpBYX8xZDN/a+lt7n+x5j4bNOVteZ8lj3hpAHSx1VR8vZHec4AHO9XFCdjZ9eRkSV65ljMmZVzaej2qFn/qt1lvWzNZEfHxK3qOJrHL6crr0CRzMox5f2e8ALBB4UGFZKA3tN6F6IXd32GTJXGQ7DTi9j/dNcLF9jCbDcWGKxoKTYblIwbLDReL00LRcDPMcQuXLMh5YzgtfjkFK1DP1iDzzYYVZz5M/kWYRlRpig1htVRjVCknm+h1M5LiEDXOyHREhvzCGpFZjHS0RsK27o2avgdilrJkalWqPW3D9gmwV37HKmfM3F8YZj2ar+vHFvf3B8CRoH4kDHIK9mrAg+owiEwNjjd9V+FsQKYR8czJrUkf7Qoi2YaW6EVDZp5zYlqiYtuXOTHk4fAcZ7qBbdLDiJq0WNV1l2+Hntk1mMWvxrYmc8kIx8G3rW36J6Ra4lLrTOCgiOihmow+YnzUT19jbV2B3RWqSHyxkhmgsBqMYWvOcUom1jDQ436+fcbu3xf2bbeqU/ca+C4DOKE+e3qvmeMqW3AxejfzBRFVcwVYPq4L0APSWWoJu+5UYX4qg5U6YTioqQGPG9XrnuZ/BkxuYpe6Li87+18EskyQW/uA+uk2rpHpr6hut2TlVbKgWkFpx+AZffweiw2+VittkEyf/ifinS/0ItRL2Jq3tQOcxPaWO2xrG68GdFoUpZgFXaP2wYVtRc6xYCfI1CaBqyWpg4bx8OHBQwsV4XWMibZZ0LYjWEy2IxQ1mZrf1/UNbYCJplWu3nZ4WpodIGVA05d+RWSS+ET9tH3RfGGmNI1cIY7evZZq7o+a0bjjygpmR3mVfalkT/SZGT27Q8QGalwGlDOS9VHCyFAIL0a1Q7JiW3saz9gqY8lqKynFrPCzxkU4SIfLc9VfCI5edgRhDXs0edO992nhTKHriREP1NJC6SROMgQ0xO5kNNZOhMOIT99AUElbxqeZF8A3xrfDJsWtDnUenAHdYWSwAbYjFqQZ+D5gi3hNK8CSxU9i6f6ClL9IGlj1OPMQAsr84YG6ijsJpCaGWj75c3yOZKBB9mNpQNPUKkK0D6wgLH8MGoyRxTX6Y05Q4AnYNXMZwXM4eij/9WpsM/9CoRnFQXGR6MEaY+FXvXEO3RO0JaStk6OXuHVATHJE+1W+TU3bSZ2ksMtqjO0zfSJCdBv7y2d8DMx6TfVme3q0ZpTKMMu4YL/t7ciTNtdDkwPogh3Cnjx7qk08SHwf+dksZ7M2vCOlfsF0hQ6J4ehPCaHTNrM/zBSOqD83dBEBCW/F/LEmeh0nOHd7oVl3/Qo/9GUDkkbj7yz+9cvvu+dDAtx8NzCDTP4iKdZvk9MWiizvtILLepysflSvTLFBZ37RLwiriqyRxYv/zrgFd/9XVHh/OmzBvDX4mitMR/lUavs2Vx6cR94lzAkplm3IRNy4TFfu47tuYs9EQPIPVta4P64tV+sZ7n3ued3cgEx2YK+QL5+xms6osk8qQbTyuKVGdaX9FQqk6qfDnT5ykxk0VK7KZ62b6DNDUfQlqGHxSMKv1P0XN5BqMeKG1P4Wp5QfZDUCEldppoX0U6ss2jIko2XpURKCIhfaOqLPfShdtS37ZrT+jFRSH2xYVV1rmT/MBtRQhxiO4MQ3iAGlaZi+9PWBEIXOVnu9jN1f921lWLZky9bqbM3J2MAAI9jmuAx3gyoEUa6P2ivs0EeNv/OR+AX6q5SW6l5HaoFuS6jr6yg9limu+P0KYKzfMXWcQSfTXzpOzKEKpwI3YGXZpSSy2LTlMgfmFA3CF6R5c9xWEtRuCg2ZPUQ2Nb6dRFTNd4TfGHrnEWSKHPuRyiJSDAZ+KX0VxmSHjGPbQTLVpqixia2uyhQ394gBMt7C3ZAmxn/DJS+l1fBsAo2Eir/C0jG9csd4+/tp12pPc/BVJGaK9mfvr7M/CeztrmCO5qY06Edi4xAGtiEhnWAbzLy2VEyazE1J5nPmgU4RpW4Sa0TnOT6w5lgt3/tMpROigHHmexBGAMY0mdcDbDxWIz41NgdD6oxgHsJRgr5RnT6wZAkTOcStU4NMOQNemSO7gxGahdEsC+NRVGxMUhQmmM0llWRbbmFGHzEqLM4Iw0H7577Kyo+Zf+2cUFIOw93gEY171vQaM0HLwpjpdRR6Jz7V0ckE7XzYJ0TmY9znLdzkva0vNrAGGT5SUZ5uaHDkcGvI0ySpwkasEgZPMseYcu85w8HPdSNi+4T6A83iAwDbxgeFcB1ZM2iGXzFcEOUlYVrEckaOyodfvaYSQ7GuB4ISE0nYJc15X/1ciDTPbPCgYJK55VkEor4LvzL9S2WDy4xj+6FOqVyTAC2ZNowheeeSI5hA/02l8UYkv4nk9iaVn+kCVEUstgk5Hyq+gJm6R9vG3rhuM904he/hFmNQaUIATB1y3vw+OmxP4X5Yi6A5I5jJufHCjF9+AGNwnEllZjUco6XhsO5T5+R3yxz5yLVOnAn0zuS+6zdj0nTJbEZCbXJdtpfYZfCeCOqJHoE2vPPFS6eRLjIJlG69X93nfR0mxSFXzp1Zc0lt/VafDaImhUMtbnqWVb9M4nGNQLN68BHP7AR8Il9dkcxzmBv8PCZlw9guY0lurbBsmNYlwJZsA/B15/HfkbjbwPddaVecls/elmDHNW2r4crAx43feNkfRwsaNq/yyJ0d/p5hZ6AZajz7DBfUok0ZU62gCzz7x8eVfJTKA8IWn45vINLSM1q+HF9CV9qF3zP6Ml21kPPL3CXzkuYUlnSqT+Ij4tI/od5KwIs+tDajDs64owN7tOAd6eucGz+KfO26iNcBFpbWA5732bBNWO4kHNpr9D955L61bvHCF/mwSrz6eQaDjfDEANqGMkFc+NGxpKZzCD2sj/JrHd+zlPQ8Iz7Q+2JVIiVCuCKoK/hlAEHzvk/Piq3mRL1rT/fEh9hoT5GJmeYswg1otiKydizJ/fS2SeKHVu6Z3JEHjiW8NaTQgP5xdBli8nC57XiN9hrquBu99hn9zqwo92+PM2JXtpeVZS0PdqR5mDyDreMMtEws+CpwaRyyzoYtfcvt9PJIW0fJVNNi/FFyRsea7peLvJrL+5b4GOXJ8tAr+ATk9f8KmiIsRhqRy0vFzwRV3Z5dZ3QqIU8JQ/uQpkJbjMUMFj2F9sCFeaBjI4+fL/oN3+LQgjI4zuAfQ+3IPIPFQBccf0clJpsfpnBxD84atwtupkGqKvrH7cGNl/QcWcSi6wcVDML6ljOgYbo+2BOAWNNjlUBPiyitUAwbnhFvLbnqw42kR3Yp2kv2dMeDdcGOX5kT4S6M44KHEB/SpCfl7xgsUvs+JNY9G3O2X/6FEt9FyAn57lrbiu+tl83sCymSvq9eZbe9mchL7MTf/Ta78e80zSf0hYY5eUU7+ff14jv7Xy8qjzfzzzvaJnrIdvFb5BLWKcWGy5/w7+vV2cvIfwHqdTB+RuJK5oj9mbt0Hy94AmjMjjwYNZlNS6uiyxNnwNyt3gdreLb64p/3+08nXkb92LTkkRgFOwk1oGEVllcOj5lv1hfAZywDows0944U8vUFw+A/nuVq/UCygsrmWIBnHyU01d0XJPwriEOvx/ISK6Pk4y2w0gmojZs7lU8TtakBAdne4v/aNxmMpK4VcGMp7si0yqsiolXRuOi1Z1P7SqD3Zmp0CWcyK4Ubmp2SXiXuI5nGLCieFHKHNRIlcY3Pys2dwMTYCaqlyWSITwr2oGXvyU3h1Pf8eQ3w1bnD7ilocVjYDkcXR3Oo1BXgMLTUjNw2xMVwjtp99NhSVc5aIWrDQT5DHPKtCtheBP4zHcw4dz2eRdTMamhlHhtfgqJJHI7NGDUw1XL8vsSeSHyKqDtqoAmrQqsYwvwi7HW3ojWyhIa5oz5xJTaq14NAzFLjVLR12rRNUQ6xohDnrWFb5bG9yf8aCD8d5phoackcNJp+Dw3Due3RM+5Rid7EuIgsnwgpX0rUWh/nqPtByMhMZZ69NpgvRTKZ62ViZ+Q7Dp5r4K0d7EfJuiy06KuIYauRh5Ecrhdt2QpTS1k1AscEHvapNbU3HL1F2TFyR33Wxb5MvH5iZsrn3SDcsxlnnshO8PLwmdGN+paWnQuORtZGX37uhFT64SeuPsx8UOokY6ON85WdQ1dki5zErsJGazcBOddWJEKqNPiJpsMD1GrVLrVY+AOdPWQneTyyP1hRX/lMM4ZogGGOhYuAdr7F/DOiAoc++cn5vlf0zkMUJ40Z1rlgv9BelPqVOpxKeOpzKdF8maK+1Vv23MO9k/8+qpLoxrIGH2EDQlnGmH8CD31G8QqlyQIcpmR5bwmSVw9/Ns6IHgulCRehvZ/+VrM60Cu/r3AontFfrljew74skYe2uyn7JKQtFQBQRJ9ryGic/zQOsbS4scUBctA8cPToQ3x6ZBQu6DPu5m1bnCtP8TllLYA0UTQNVqza5nfew3Mopy1GPUwG5jsl0OVXniPmAcmLqO5HG8Hv3nSLecE9oOjPDXcsTxoCBxYyzBdj4wmnyEV4kvFDunipS8SSkvdaMnTBN9brHUR8xdmmEAp/Pdqk9uextp1t+JrtXwpN/MG2w/qhRMpSNxQ1uhg/kKO30eQ/FyHUDkWHT8V6gGRU4DhDMxZu7xXij9Ui6jlpWmQCqJg3FkOTq3WKneCRYZxBXMNAVLQgHXSCGSqNdjebY94oyIpVjMYehAiFx/tqzBXFHZaL5PeeD74rW5OysFoUXY8sebUZleFTUa/+zBKVTFDopTReXNuZq47QjkWnxjirCommO4L/GrFtVV21EpMyw8wyThL5Y59d88xtlx1g1ttSICDwnof6lt/6zliPzgVUL8jWBjC0o2D6Kg+jNuThkAlaDJsq/AG2aKA//A76avw2KNqtv223P+Wq3StRDDNKFFgtsFukYt1GFDWooFVXitaNhb3RCyJi4cMeNjROiPEDb4k+G3+hD8tsg+5hhmSc/8t2JTSwYoCzAI75doq8QTHe+E/Tw0RQSUDlU+6uBeNN3h6jJGX/mH8oj0i3caCNsjvTnoh73BtyZpsflHLq6AfwJNCDX4S98h4+pCOhGKDhV3rtkKHMa3EG4J9y8zFWI4UsfNzC/Rl5midNn7gwoN9j23HGCQQ+OAZpTTPMdiVow740gIyuEtd0qVxMyNXhHcnuXRKdw5wDUSL358ktjMXmAkvIB73BLa1vfF9BAUZInPYJiwxqFWQQBVk7gQH4ojfUQ/KEjn+A/WR6EEe4CtbpoLe1mzHkajgTIoE0SLDHVauKhrq12zrAXBGbPPWKCt4DGedq3JyGRbmPFW32bE7T20+73BatV/qQhhBWfWBFHfhYWXjALts38FemnoT+9bn1jDBMcUMmYgSc0e7GQjv2MUBwLU8ionCpgV+Qrhg7iUIfUY6JFxR0Y+ZTCPM+rVuq0GNLyJXX6nrUTt8HzFBRY1E/FIm2EeVA9NcXrj7S6YYIChVQCWr/m2fYUjC4j0XLkzZ8GCSLfmkW3PB/xq+nlXsKVBOj7vTvqKCOMq7Ztqr3cQ+N8gBnPaAps+oGwWOkbuxnRYj/x/WjiDclVrs22xMK4qArE1Ztk1456kiJriw6abkNeRHogaPRBgbgF9Z8i/tbzWELN4CvbqtrqV9TtGSnmPS2F9kqOIBaazHYaJ9bi3AoDBvlZasMluxt0BDXfhp02Jn411aVt6S4TUB8ZgFDkI6TP6gwPY85w+oUQSsjIeXVminrwIdK2ZAawb8Se6XOJbOaliQxHSrnAeONDLuCnFejIbp4YDtBcQCwMsYiRZfHefuEJqJcwKTTJ8sx5hjHmJI1sPFHOr6W9AhZ2NAod38mnLQk1gOz2LCAohoQbgMbUK9RMEA3LkiF7Sr9tLZp6lkciIGhE2V546w3Mam53VtVkGbB9w0Yk2XiRnCmbpxmHr2k4eSC0RuNbjNsUfDIfc8DZvRvgUDe1IlKdZTzcT4ZGEb53dp8VtsoZlyXzLHOdAbsp1LPTVaHvLA0GYDFMbAW/WUBfUAdHwqLFAV+3uHvYWrCfhUOR2i89qvCBoOb48usAGdcF2M4aKn79k/43WzBZ+xR1L0uZfia70XP9soQReeuhZiUnXFDG1T8/OXNmssTSnYO+3kVLAgeiY719uDwL9FQycgLPessNihMZbAKG7qwPZyG11G1+ZA3jAX2yddpYfmaKBlmfcK/V0mwIRUDC0nJSOPUl2KB8h13F4dlVZiRhdGY5farwN+f9hEb1cRi41ZcGDn6Xe9MMSTOY81ULJyXIHSWFIQHstVYLiJEiUjktlHiGjntN5/btB8Fu+vp28zl2fZXN+dJDyN6EXhS+0yzqpl/LSJNEUVxmu7BsNdjAY0jVsAhkNuuY0E1G48ej25mSt+00yPbQ4SRCVkIwb6ISvYtmJRPz9Zt5dk76blf+lJwAPH5KDF+vHAmACLoCdG2Adii6dOHnNJnTmZtoOGO8Q1jy1veMw6gbLFToQmfJa7nT7Al89mRbRkZZQxJTKgK5Kc9INzmTJFp0tpAPzNmyL/F08bX3nhCumM/cR/2RPn9emZ3VljokttZD1zVWXlUIqEU7SLk5I0lFRU0AcENXBYazNaVzsVHA/sD3o9hm42wbHIRb/BBQTKzAi8s3+bMtpOOZgLdQzCYPfX3UUxKd1WYVkGH7lh/RBBgMZZwXzU9+GYxdBqlGs0LP+DZ5g2BWNh6FAcR944B+K/JTWI3t9YyVyRhlP4CCoUk/mmF7+r2pilVBjxXBHFaBfBtr9hbVn2zDuI0kEOG3kBx8CGdPOjX1ph1POOZJUO1JEGG0jzUy2tK4X0CgVNYhmkqqQysRNtKuPdCJqK3WW57kaV17vXgiyPrl4KEEWgiGF1euI4QkSFHFf0TDroQiLNKJiLbdhH0YBhriRNCHPxSqJmNNoketaioohqMglh6wLtEGWSM1EZbQg72h0UJAIPVFCAJOThpQGGdKfFovcwEeiBuZHN2Ob4uVM7+gwZLz1D9E7ta4RmMZ24OBBAg7Eh6dLXGofZ4U2TFOCQMKjwhVckjrydRS+YaqCw1kYt6UexuzbNEDyYLTZnrY1PzsHZJT4U+awO2xlqTSYu6n/U29O2wPXgGOEKDMSq+zTUtyc8+6iLp0ivav4FKx+xxVy4FxhIF/pucVDqpsVe2jFOfdZhTzLz2QjtzvsTCvDPU7bzDH2eXVKUV9TZ+qFtaSSxnYgYdXKwVreIgvWhT9eGDB2OvnWyPLfIIIfNnfIxU8nW7MbcH05nhlsYtaW9EZRsxWcKdEqInq1DiZPKCz7iGmAU9/ccnnQud2pNgIGFYOTAWjhIrd63aPDgfj8/sdlD4l+UTlcxTI9jbaMqqN0gQxSHs60IAcW3cH4p3V1aSciTKB29L1tz2eUQhRiTgTvmqc+sGtBNh4ky0mQJGsdycBREP+fAaSs1EREDVo5gvgi5+aCN7NECw30owbCc1mSpjiahyNVwJd1jiGgzSwfTpzf2c5XJvG/g1n0fH88KHNnf+u7ZiRMlXueSIsloJBUtW9ezvsx9grfsX/FNxnbxU1Lvg0hLxixypHKGFAaPu0xCD8oDTeFSyfRT6s8109GMUZL8m2xXp8X2dpPCWWdX84iga4BrTlOfqox4shqEgh/Ht4qRst52cA1xOIUuOxgfUivp6v5f8IVyaryEdpVk72ERAwdT4aoY1usBgmP+0m06Q216H/nubtNYxHaOIYjcach3A8Ez/zc0KcShhel0HCYjFsA0FjYqyJ5ZUH1aZw3+zWC0hLpM6GDfcAdn9fq2orPmZbW6XXrf+Krc9RtvII5jeD3dFoT1KwZJwxfUMvc5KLfn8rROW23Jw89sJ2a5dpB3qWDUBWF2iX8OCuKprHosJ2mflBR+Wqs86VvgI/XMnsqb97+VlKdPVysczPj8Jhzf+WCvGBHijAqYlavbF60soMWlHbvKT+ScvhprgeTln51xX0sF+Eadc/l2s2a5BgkVbHYyz0E85p0LstqH+gEGiR84nBRRFIn8hLSZrGwqjZ3E29cuGi+5Z5bp7EM8MWFa9ssS/vy4VrDfECSv7DSU84DaP0sXI3Ap4lWznQ65nQoTKRWU30gd7Nn8ZowUvGIx4aqyXGwmA/PB4qN8msJUODezUHEl0VP9uo+cZ8vPFodSIB4C7lQYjEFj8yu49C2KIV3qxMFYTevG8KqAr0TPlkbzHHnTpDpvpzziAiNFh8xiT7C/TiyH0EguUw4vxAgpnE27WIypV+uFN2zW7xniF/n75trs9IJ5amB1zXXZ1LFkJ6GbS/dFokzl4cc2mamVwhL4XU0Av5gDWAl+aEWhAP7t2VIwU+EpvfOPDcLASX7H7lZpXA2XQfbSlD4qU18NffNPoAKMNSccBfO9YVVgmlW4RydBqfHAV7+hrZ84WJGho6bNT0YMhxxLdOx/dwGj0oyak9aAkNJ8lRJzUuA8sR+fPyiyTgUHio5+Pp+YaKlHrhR41jY5NESPS3x+zTMe0S2HnLOKCOQPpdxKyviBvdHrCDRqO+l96HhhNBLXWv4yEMuEUYo8kXnYJM8oIgVM4XJ+xXOev4YbWeqsvgq0lmw4/PiYr9sYLt+W5EAuYSFnJEan8CwJwbtASBfLBBpJZiRPor/aCJBZsM+MhvS7ZepyHvU8m5WSmaZnxuLts8ojl6KkS8oSAHkq5GWlCB/NgJ5W3rO2Cj1MK7ahxsCrbTT3a0V/QQH+sErxV4XUWDHx0kkFy25bPmBMBQ6BU3HoHhhYcJB9JhP6NXUWKxnE0raXHB6U9KHpWdQCQI72qevp5fMzcm+AvC85rsynVQhruDA9fp9COe7N56cg1UKGSas89vrN+WlGLYTwi5W+0xYdKEGtGCeNJwXKDU0XqU5uQYnWsMwTENLGtbQMvoGjIFIEMzCRal4rnBAg7D/CSn8MsCvS+FDJJAzoiioJEhZJgAp9n2+1Yznr7H+6eT4YkJ9Mpj60ImcW4i4iHDLn9RydB8dx3QYm3rsX6n4VRrZDsYK6DCGwkwd5n3/INFEpk16fYpP6JtMQpqEMzcOfQGAHXBTEGzuLJ03GYQL9bmV2/7ExDlRf+Uvf1sM2frRtCWmal12pMgtonvSCtR4n1CLUZRdTHDHP1Otwqd+rcdlavnKjUB/OYXQHUJzpNyFoKpQK+2OgrEKpGyIgIBgn2y9QHnTJihZOpEvOKIoHAMGAXHmj21Lym39Mbiow4IF+77xNuewziNVBxr6KD5e+9HzZSBIlUa/AmsDFJFXeyrQakR3FwowTGcADJHcEfhGkXYNGSYo4dh4bxwLM+28xjiqkdn0/3R4UEkvcBrBfn/SzBc1XhKM2VPlJgKSorjDac96V2UnQYXl1/yZPT4DVelgO+soMjexXwYO58VLl5xInQUZI8jc3H2CPnCNb9X05nOxIy4MlecasTqGK6s2az4RjpF2cQP2G28R+7wDPsZDZC/kWtjdoHC7SpdPmqQrUAhMwKVuxCmYTiD9q/O7GHtZvPSN0CAUQN/rymXZNniYLlJDE70bsk6Xxsh4kDOdxe7A2wo7P9F5YvqqRDI6brf79yPCSp4I0jVoO4YnLYtX5nzspR5WB4AKOYtR1ujXbOQpPyYDvfRE3FN5zw0i7reehdi7yV0YDRKRllGCGRk5Yz+Uv1fYl2ZwrnGsqsjgAVo0xEUba8ohjaNMJNwTwZA/wBDWFSCpg1eUH8MYL2zdioxRTqgGQrDZxQyNzyBJPXZF0+oxITJAbj7oNC5JwgDMUJaM5GqlGCWc//KCIrI+aclEe4IA0uzv7cuj6GCdaJONpi13O544vbtIHBF+A+JeDFUQNy61Gki3rtyQ4aUywn6ru314/dkGiP8Iwjo0J/2Txs49ZkwEl4mx+iYUUO55I6pJzU4P+7RRs+DXZkyKUYZqVWrPF4I94m4Wx1tXeE74o9GuX977yvJ/jkdak8+AmoHVjI15V+WwBdARFV2IPirJgVMdsg1Pez2VNHqa7EHWdTkl3XTcyjG9BiueWFvQfXI8aWSkuuRmqi/HUuzqyvLJfNfs0txMqldYYflWB1BS31WkuPJGGwXUCpjiQSktkuBMWwHjSkQxeehqw1Kgz0Trzm7QbtgxiEPDVmWCNCAeCfROTphd1ZNOhzLy6XfJyG6Xgd5MCAZw4xie0Sj5AnY1/akDgNS9YFl3Y06vd6FAsg2gVQJtzG7LVq1OH2frbXNHWH/NY89NNZ4QUSJqL2yEcGADbT38X0bGdukqYlSoliKOcsSTuqhcaemUeYLLoI8+MZor2RxXTRThF1LrHfqf/5LcLAjdl4EERgUysYS2geE+yFdasU91UgUDsc2cSQ1ZoT9+uLOwdgAmifwQqF028INc2IQEDfTmUw3eZxvz7Ud1z3xc1PQfeCvfKsB9jOhRj7rFyb9XcDWLcYj0bByosychMezMLVkFiYcdBBQtvI6K0KRuOZQH2kBsYHJaXTkup8F0eIhO1/GcIwWKpr2mouB7g5TUDJNvORXPXa/mU8bh27TAZYBe2sKx4NSv5OjnHIWD2RuysCzBlUfeNXhDd2jxnHoUlheJ3jBApzURy0fwm2FwwsSU0caQGl0Kv8hopRQE211NnvtLRsmCNrhhpEDoNiZEzD2QdJWKbRRWnaFedXHAELSN0t0bfsCsMf0ktfBoXBoNA+nZN9+pSlmuzspFevmsqqcMllzzvkyXrzoA+Ryo1ePXpdGOoJvhyru+EBRsmOp7MXZ0vNUMUqHLUoKglg1p73sWeZmPc+KAw0pE2zIsFFE5H4192KwDvDxdxEYoDBDNZjbg2bmADTeUKK57IPD4fTYF4c6EnXx/teYMORBDtIhPJneiZny7Nv/zG+YmekIKCoxr6kauE2bZtBLufetNG0BtBY7f+/ImUypMBvdWu/Q7vTMRzw5aQGZWuc1V0HEsItFYMIBnoKGZ0xcarba/TYZq50kCaflFysYjA4EDKHqGdpYWdKYmm+a7TADmW35yfnOYpZYrkpVEtiqF0EujI00aeplNs2k+qyFZNeE3CDPL9P6b4PQ/kataHkVpLSEVGK7EX6rAa7IVNrvZtFvOA6okKvBgMtFDAGZOx88MeBcJ8AR3AgUUeIznAN6tjCUipGDZONm1FjWJp4A3QIzSaIOmZ7DvF/ysYYbM/fFDOV0jntAjRdapxJxL0eThpEhKOjCDDq2ks+3GrwxqIFKLe1WdOzII8XIOPGnwy6LKXVfpSDOTEfaRsGujhpS4hBIsMOqHbl16PJxc4EkaVu9wpEYlF/84NSv5Zum4drMfp9yXbzzAOJqqS4YkI4cBrFrC7bMPiCfgI3nNZAqkk3QOZqR+yyqx+nDQKBBBZ7QKrfGMCL+XpqFaBJU0wpkBdAhbR4hJsmT5aynlvkouoxm/NjD5oe6BzVIO9uktM+/5dEC5P7vZvarmuO/lKXz4sBabVPIATuKTrwbJP8XUkdM6uEctHKXICUJGjaZIWRbZp8czquQYfY6ynBUCfIU+gG6wqSIBmYIm9pZpXdaL121V7q0VjDjmQnXvMe7ysoEZnZL15B0SpxS1jjd83uNIOKZwu5MPzg2NhOx3xMOPYwEn2CUzbSrwAs5OAtrz3GAaUkJOU74XwjaYUmGJdZBS1NJVkGYrToINLKDjxcuIlyfVsKQSG/G4DyiO2SlQvJ0d0Ot1uOG5IFSAkq+PRVMgVMDvOIJMdqjeCFKUGRWBW9wigYvcbU7CQL/7meF2KZAaWl+4y9uhowAX7elogAvItAAxo2+SFxGRsHGEW9BnhlTuWigYxRcnVUBRQHV41LV+Fr5CJYV7sHfeywswx4XMtUx6EkBhR+q8AXXUA8uPJ73Pb49i9KG9fOljvXeyFj9ixgbo6CcbAJ7WHWqKHy/h+YjBwp6VcN7M89FGzQ04qbrQtgrOFybg3gQRTYG5xn73ArkfQWjCJROwy3J38Dx/D7jOa6BBNsitEw1wGq780EEioOeD+ZGp2J66ADiVGMayiHYucMk8nTK2zzT9CnEraAk95kQjy4k0GRElLL5YAKLQErJ5rp1eay9O4Fb6yJGm9U4FaMwPGxtKD6odIIHKoWnhKo1U8KIpFC+MVn59ZXmc7ZTBZfsg6FQ8W10YfTr4u0nYrpHZbZ1jXiLmooF0cOm0+mPnJBXQtepc7n0BqOipNCqI6yyloTeRShNKH04FIo0gcMk0H/xThyN4pPAWjDDkEp3lNNPRNVfpMI44CWRlRgViP64eK0JSRp0WUvCWYumlW/c58Vcz/yMwVcW5oYb9+26TEhwvbxiNg48hl1VI1UXTU//Eta+BMKnGUivctfL5wINDD0giQL1ipt6U7C9cd4+lgqY2lMUZ02Uv6Prs+ZEZer7ZfWBXVghlfOOrClwsoOFKzWEfz6RZu1eCs+K8fLvkts5+BX0gyrFYve0C3qHrn5U/Oh6D/CihmWIrY7HUZRhJaxde+tldu6adYJ+LeXupQw0XExC36RETdNFxcq9glMu4cNQSX9cqR/GQYp+IxUkIcNGWVU7ZtGa6P3XAyodRt0XeS3Tp01AnCh0ZbUh4VrSZeV9RWfSoWyxnY3hzcZ30G/InDq4wxRrEejreBxnhIQbkxenxkaxl+k7eLUQkUR6vKJ2iDFNGX3WmVA1yaOH+mvhBd+sE6vacQzFobwY5BqEAFmejwW5ne7HtVNolOUgJc8CsUxmc/LBi8N5mu9VsIA5HyErnS6zeCz7VLI9+n/hbT6hTokMXTVyXJRKSG2hd2labXTbtmK4fNH3IZBPreSA4FMeVouVN3zG5x9CiGpLw/3pceo4qGqp+rVp+z+7yQ98oEf+nyH4F3+J9IheDBa94Wi63zJbLBCIZm7P0asHGpIJt3PzE3m0S4YIWyXBCVXGikj8MudDPB/6Nm2v4IxJ5gU0ii0guy5SUHqGUYzTP0jIJU5E82RHUXtX4lDdrihBLdP1YaG1AGUC12rQKuIaGvCpMjZC9bWSCYnjDlvpWbkdXMTNeBHLKiuoozMGIvkczmP0aRJSJ8PYnLCVNhKHXBNckH79e8Z8Kc2wUej4sQZoH8qDRGkg86maW/ZQWGNnLcXmq3FlXM6ssR/3P6E/bHMvm6HLrv1yRixit25JsH3/IOr2UV4BWJhxXW5BJ6Xdr07n9kF3ZNAk6/Xpc5MSFmYJ2R7bdL8Kk7q1OU9Elg/tCxJ8giT27wSTySF0GOxg4PbYJdi/Nyia9Nn89CGDulfJemm1aiEr/eleGSN+5MRrVJ4K6lgyTTIW3i9cQ0dAi6FHt0YMbH3wDSAtGLSAccezzxHitt1QdhW36CQgPcA8vIIBh3/JNjf/Obmc2yzpk8edSlS4lVdwgW5vzbYEyFoF4GCBBby1keVNueHAH+evi+H7oOVfS3XuPQSNTXOONAbzJeSb5stwdQHl1ZjrGoE49I8+A9j3t+ahhQj74FCSWpZrj7wRSFJJnnwi1T9HL5qrCFW/JZq6P62XkMWTb+u4lGpKfmmwiJWx178GOG7KbrZGqyWwmuyKWPkNswkZ1q8uptUlviIi+AXh2bOOTOLsrtNkfqbQJeh24reebkINLkjut5r4d9GR/r8CBa9SU0UQhsnZp5cP+RqWCixRm7i4YRFbtZ4EAkhtNa6jHb6gPYQv7MKqkPLRmX3dFsK8XsRLVZ6IEVrCbmNDc8o5mqsogjAQfoC9Bc7R6gfw03m+lQpv6kTfhxscDIX6s0w+fBxtkhjXAXr10UouWCx3C/p/FYwJRS/AXRKkjOb5CLmK4XRe0+xeDDwVkJPZau52bzLEDHCqV0f44pPgKOkYKgTZJ33fmk3Tu8SdxJ02SHM8Fem5SMsWqRyi2F1ynfRJszcFKykdWlNqgDA/L9lKYBmc7Zu/q9ii1FPF47VJkqhirUob53zoiJtVVRVwMR34gV9iqcBaHbRu9kkvqk3yMpfRFG49pKKjIiq7h/VpRwPGTHoY4cg05X5028iHsLvUW/uz+kjPyIEhhcKUwCkJAwbR9pIEGOn8z6svAO8i89sJ3dL5qDWFYbS+HGPRMxYwJItFQN86YESeJQhn2urGiLRffQeLptDl8dAgb+Tp47UQPxWOw17OeChLN1WnzlkPL1T5O+O3Menpn4C3IY5LEepHpnPeZHbvuWfeVtPlkH4LZjPbBrkJT3NoRJzBt86CO0Xq59oQ+8dsm0ymRcmQyn8w71mhmcuEI5byuF+C88VPYly2sEzjlzAQ3vdn/1+Hzguw6qFNNbqenhZGbdiG6RwZaTG7jTA2X9RdXjDN9yj1uQpyO4Lx8KRAcZcbZMafp4wPOd5MdXoFY52V1A8M9hi3sso93+uprE0qYNMjkE22CvK4HuUxqN7oIz5pWuETq1lQAjqlSlqdD2Rnr/ggp/TVkQYjn9lMfYelk2sH5HPdopYo7MHwlV1or9Bxf+QCyLzm92vzG2wjiIjC/ZHEJzeroJl6bdFPTpZho5MV2U86fLQqxNlGIMqCGy+9WYhJ8ob1r0+Whxde9L2PdysETv97O+xVw+VNN1TZSQN5I6l9m5Ip6pLIqLm4a1B1ffH6gHyqT9p82NOjntRWGIofO3bJz5GhkvSWbsXueTAMaJDou99kGLqDlhwBZNEQ4mKPuDvVwSK4WmLluHyhA97pZiVe8g+JxmnJF8IkV/tCs4Jq/HgOoAEGR9tCDsDbDmi3OviUQpG5D8XmKcSAUaFLRXb2lmJTNYdhtYyfjBYZQmN5qT5CNuaD3BVnlkCk7bsMW3AtXkNMMTuW4HjUERSJnVQ0vsBGa1wo3Qh7115XGeTF3NTz8w0440AgU7c3bSXO/KMINaIWXd0oLpoq/0/QJxCQSJ9XnYy1W7TYLBJpHsVWD1ahsA7FjNvRd6mxCiHsm8g6Z0pnzqIpF1dHUtP2ITU5Z1hZHbu+L3BEEStBbL9XYvGfEakv1bmf+bOZGnoiuHEdlBnaChxYKNzB23b8sw8YyT7Ajxfk49eJIAvdbVkdFCe2J0gMefhQ0bIZxhx3fzMIysQNiN8PgOUKxOMur10LduigREDRMZyP4oGWrP1GFY4t6groASsZ421os48wAdnrbovNhLt7ScNULkwZ5AIZJTrbaKYTLjA1oJ3sIuN/aYocm/9uoQHEIlacF1s/TM1fLcPTL38O9fOsjMEIwoPKfvt7opuI9G2Hf/PR4aCLDQ7wNmIdEuXJ/QNL72k5q4NejAldPfe3UVVqzkys8YZ/jYOGOp6c+YzRCrCuq0M11y7TiN6qk7YXRMn/gukxrEimbMQjr3jwRM6dKVZ4RUfWQr8noPXLJq6yh5R3EH1IVOHESst/LItbG2D2vRsZRkAObzvQAAD3mb3/G4NzopI0FAiHfbpq0X72adg6SRj+8OHMShtFxxLZlf/nLgRLbClwl5WmaYSs+yEjkq48tY7Z2bE0N91mJwt+ua0NlRJIDh0HikF4UvSVorFj2YVu9YeS5tfvlVjPSoNu/Zu6dEUfBOT555hahBdN3Sa5Xuj2Rvau1lQNIaC944y0RWj9UiNDskAK1WoL+EfXcC6IbBXFRyVfX/WKXxPAwUyIAGW8ggZ08hcijKTt1YKnUO6QPvcrmDVAb0FCLIXn5id4fD/Jx4tw/gbXs7WF9b2RgXtPhLBG9vF5FEkdHAKrQHZAJC/HWvk7nvzzDzIXZlfFTJoC3JpGgLPBY7SQTjGlUvG577yNutZ1hTfs9/1nkSXK9zzKLRZ3VODeKUovJe0WCq1zVMYxCJMenmNzPIU2S8TA4E7wWmbNkxq9rI2dd6v0VpcAPVMxnDsvWTWFayyqvKZO7Z08a62i/oH2/jxf8rpmfO64in3FLiL1GX8IGtVE9M23yGsIqJbxDTy+LtaMWDaPqkymb5VrQdzOvqldeU0SUi6IirG8UZ3jcpRbwHa1C0Dww9G/SFX3gPvTJQE+kyz+g1BeMILKKO+olcHzctOWgzxYHnOD7dpCRtuZEXACjgqesZMasoPgnuDC4nUviAAxDc5pngjoAITIkvhKwg5d608pdrZcA+qn5TMT6Uo/QzBaOxBCLTJX3Mgk85rMfsnWx86oLxf7p2PX5ONqieTa/qM3tPw4ZXvlAp83NSD8F7+ZgctK1TpoYwtiU2h02HCGioH5tkVCqNVTMH5p00sRy2JU1qyDBP2CII/Dg4WDsIl+zgeX7589srx6YORRQMBfKbodbB743Tl4WLKOEnwWUVBsm94SOlCracU72MSyj068wdpYjyz1FwC2bjQnxnB6Mp/pZ+yyZXtguEaYB+kqhjQ6UUmwSFazOb+rhYjLaoiM+aN9/8KKn0zaCTFpN9eKwWy7/u4EHzO46TdFSNjMfn2iPSJwDPCFHc0I1+vjdAZw5ZjqR/uzi9Zn20oAa5JnLEk/EA3VRWE7J/XrupfFJPtCUuqHPpnlL7ISJtRpSVcB8qsZCm2QEkWoROtCKKxUh3yEcMbWYJwk6DlEBG0bZP6eg06FL3v6RPb7odGuwm7FN8fG4woqtB8e7M5klPpo97GoObNwt+ludTAmxyC5hmcFx+dIvEZKI6igFKHqLH01iY1o7903VzG9QGetyVx5RNmBYUU+zIuSva/yIcECUi4pRmE3VkF2avqulQEUY4yZ/wmNboBzPmAPey3+dSYtBZUjeWWT0pPwCz4Vozxp9xeClIU60qvEFMQCaPvPaA70WlOP9f/ey39macvpGCVa+zfa8gO44wbxpJUlC8GN/pRMTQtzY8Z8/hiNrU+Zq64ZfFGIkdj7m7abcK1EBtws1X4J/hnqvasPvvDSDYWN+QcQVGMqXalkDtTad5rYY0TIR1Eqox3czwPMjKPvF5sFv17Thujr1IZ1Ytl4VX1J0vjXKmLY4lmXipRAro0qVGEcXxEVMMEl54jQMd4J7RjgomU0j1ptjyxY+cLiSyXPfiEcIS2lWDK3ISAy6UZ3Hb5vnPncA94411jcy75ay6B6DSTzK6UTCZR9uDANtPBrvIDgjsfarMiwoax2OlLxaSoYn4iRgkpEGqEkwox5tyI8aKkLlfZ12lO11TxsqRMY89j5JaO55XfPJPDL1LGSnC88Re9Ai+Nu5bZjtwRrvFITUFHPR4ZmxGslQMecgbZO7nHk32qHxYkdvWpup07ojcMCaVrpFAyFZJJbNvBpZfdf39Hdo2kPtT7v0/f8R/B5Nz4f1t9/3zNM/7n6SUHfcWk5dfQFJvcJMgPolGCpOFb/WC0FGWU2asuQyT+rm88ZKZ78Cei/CAh939CH0JYbpZIPtxc2ufXqjS3pHH9lnWK4iJ7OjR/EESpCo2R3MYKyE7rHfhTvWho4cL1QdN4jFTyR6syMwFm124TVDDRXMNveI1Dp/ntwdz8k8kxw7iFSx6+Yx6O+1LzMVrN0BBzziZi9kneZSzgollBnVwBh6oSOPHXrglrOj+QmR/AESrhDpKrWT+8/AiMDxS/5wwRNuGQPLlJ9ovomhJWn8sMLVItQ8N/7IXvtD8kdOoHaw+vBSbFImQsv/OCAIui99E+YSIOMlMvBXkAt+NAZK8wB9Jf8CPtB+TOUOR+z71d/AFXpPBT6+A5FLjxMjLIEoJzrQfquvxEIi+WoUzGR1IzQFNvbYOnxb2PyQ0kGdyXKzW2axQL8lNAXPk6NEjqrRD1oZtKLlFoofrXw0dCNWASHzy+7PSzOUJ3XtaPZsxLDjr+o41fKuKWNmjiZtfkOzItvlV2MDGSheGF0ma04qE3TUEfqJMrXFm7DpK+27DSvCUVf7rbNoljPhha5W7KBqVq0ShUSTbRmuqPtQreVWH4JET5yMhuqMoSd4r/N8sDmeQiQQvi1tcZv7Moc7dT5X5AtCD6kNEGZOzVcNYlpX4AbTsLgSYYliiPyVoniuYYySxsBy5cgb3pD+EK0Gpb0wJg031dPgaL8JZt6sIvzNPEHfVPOjXmaXj4bd4voXzpZ5GApMhILgMbCEWZ2zwgdeQgjNHLbPIt+KqxRwWPLTN6HwZ0Ouijj4UF+Sg0Au8XuIKW0WxlexdrFrDcZJ8Shauat3X0XmHygqgL1nAu2hrJFb4wZXkcS+i36KMyU1yFvYv23bQUJi/3yQpqr/naUOoiEWOxckyq/gq43dFou1DVDaYMZK9tho7+IXXokBCs5GRfOcBK7g3A+jXQ39K4YA8PBRW4m5+yR0ZAxWJncjRVbITvIAPHYRt1EJ3YLiUbqIvoKHtzHKtUy1ddRUQ0AUO41vonZDUOW+mrszw+SW/6Q/IUgNpcXFjkM7F4CSSQ2ExZg85otsMs7kqsQD4OxYeBNDcSpifjMoLb7GEbGWTwasVObmB/bfPcUlq0wYhXCYEDWRW02TP5bBrYsKTGWjnWDDJ1F7zWai0zW/2XsCuvBQjPFcTYaQX3tSXRSm8hsAoDdjArK/OFp6vcWYOE7lizP0Yc+8p16i7/NiXIiiQTp7c7Xus925VEtlKAjUdFhyaiLT7VxDagprMFwix4wZ05u0qj7cDWFd0W9OYHIu3JbJKMXRJ1aYNovugg+QqRN7fNHSi26VSgBpn+JfMuPo3aeqPWik/wI5Rz3BWarPQX4i5+dM0npwVOsX+KsOhC7vDg+OJsz4Q5zlnIeflUWL6QYMbf9WDfLmosLF4Qev3mJiOuHjoor/dMeBpA9iKDkMjYBNbRo414HCxjsHrB4EXNbHzNMDHCLuNBG6Sf+J4MZ/ElVsDSLxjIiGsTPhw8BPjxbfQtskj+dyNMKOOcUYIRBEIqbazz3lmjlRQhplxq673VklMMY6597vu+d89ec/zq7Mi4gQvh87ehYbpOuZEXj5g/Q7S7BFDAAB9DzG35SC853xtWVcnZQoH54jeOqYLR9NDuwxsVthTV7V99n/B7HSbAytbEyVTz/5NhJ8gGIjG0E5j3griULUd5Rg7tQR+90hJgNQKQH2btbSfPcaTOfIexc1db1BxUOhM1vWCpLaYuKr3FdNTt/T3PWCpEUWDKEtzYrjpzlL/wri3MITKsFvtF8QVV/NhVo97aKIBgdliNc10dWdXVDpVtsNn+2UIolrgqdWA4EY8so0YvB4a+aLzMXiMAuOHQrXY0tr+CL10JbvZzgjJJuB1cRkdT7DUqTvnswVUp5kkUSFVtIIFYK05+tQxT6992HHNWVhWxUsD1PkceIrlXuUVRogwmfdhyrf6zzaL8+c0L7GXMZOteAhAVQVwdJh+7nrX7x4LaIIfz2F2v7Dg/uDfz2Fa+4gFm2zHAor8UqimJG3VTJtZEoFXhnDYXvxMJFc6ku2bhbCxzij2z5UNuK0jmp1mnvkVNUfR+SEmj1Lr94Lym75PO7Fs0MIr3GdsWXRXSfgLTVY0FLqba97u1In8NAcY7IC6TjWLigwKEIm43NxTdaVTv9mcKkzuzBkKd8x/xt1p/9BbP7Wyb4bpo1K1gnOpbLvKz58pWl3B55RJ/Z5mRDLPtNQg14jdOEs9+h/V5UVpwrAI8kGbX8KPVPDIMfIqKDjJD9UyDOPhjZ3vFAyecwyq4akUE9mDOtJEK1hpDyi6Ae87sWAClXGTiwPwN7PXWwjxaR79ArHRIPeYKTunVW24sPr/3HPz2IwH8oKH4OlWEmt4BLM6W5g4kMcYbLwj2usodD1088stZA7VOsUSpEVl4w7NMb1EUHMRxAxLF0CIV+0L3iZb+ekB1vSDSFjAZ3hfLJf7gFaXrOKn+mhR+rWw/eTXIcAgl4HvFuBg1LOmOAwJH3eoVEjjwheKA4icbrQCmvAtpQ0mXG0agYp5mj4Rb6mdQ+RV4QBPbxMqh9C7o8nP0Wko2ocnCHeRGhN1XVyT2b9ACsL+6ylUy+yC3QEnaKRIJK91YtaoSrcWZMMwxuM0E9J68Z+YyjA0g8p1PfHAAIROy6Sa04VXOuT6A351FOWhKfTGsFJ3RTJGWYPoLk5FVK4OaYR9hkJvezwF9vQN1126r6isMGXWTqFW+3HL3I/jurlIdDWIVvYY+s6yq7lrFSPAGRdnU7PVwY/SvWbZGpXzy3BQ2LmAJlrONUsZs4oGkly0V267xbD5KMY8woNNsmWG1VVgLCra8aQBBcI4DP2BlNwxhiCtHlaz6OWFoCW0vMR3ErrG7JyMjTSCnvRcsEHgmPnwA6iNpJ2DrFb4gLlhKJyZGaWkA97H6FFdwEcLT6DRQQL++fOkVC4cYGW1TG/3iK5dShRSuiBulmihqgjR45Vi03o2RbQbP3sxt90VxQ6vzdlGfkXmmKmjOi080JSHkLntjvsBJnv7gKscOaTOkEaRQqAnCA4HWtB4XnMtOhpRmH2FH8tTXrIjAGNWEmudQLCkcVlGTQ965Kh0H6ixXbgImQP6b42B49sO5C8pc7iRlgyvSYvcnH9FgQ3azLbQG2cUW96SDojTQStxkOJyOuDGTHAnnWkz29aEwN9FT8EJ4yhXOg+jLTrCPKeEoJ9a7lDXOjEr8AgX4BmnMQ668oW0zYPyQiVMPxKRHtpfnEEyaKhdzNVThlxxDQNdrHeZiUFb6NoY2KwvSb7BnRcpJy+/g/zAYx3fYSN5QEaVD2Y1VsNWxB0BSO12MRsRY8JLfAezRMz5lURuLUnG1ToKk6Q30FughqWN6gBNcFxP/nY/iv+iaUQOa+2Nuym46wtI/DvSfzSp1jEi4SdYBE7YhTiVV5cX9gwboVDMVgZp5YBQlHOQvaDNfcCoCJuYhf5kz5kwiIKPjzgpcRJHPbOhJajeoeRL53cuMahhV8Z7IRr6M4hW0JzT7mzaMUzQpm866zwM7Cs07fJYXuWvjAMkbe5O6V4bu71sOG6JQ4oL8zIeXHheFVavzxmlIyBkgc9IZlEDplMPr8xlcyss4pVUdwK1e7CK2kTsSdq7g5SHRAl3pYUB9Ko4fsh4qleOyJv1z3KFSTSvwEcRO/Ew8ozEDYZSqpfoVW9uhJfYrNAXR0Z3VmeoAD+rVWtwP/13sE/3ICX3HhDG3CMc476dEEC0K3umSAD4j+ZQLVdFOsWL2C1TH5+4KiSWH+lMibo+B55hR3Gq40G1n25sGcN0mEcoU2wN9FCVyQLBhYOu9aHVLWjEKx2JIUZi5ySoHUAI9b8hGzaLMxCZDMLhv8MkcpTqEwz9KFDpCpqQhVmsGQN8m24wyB82FAKNmjgfKRsXRmsSESovAwXjBIoMKSG51p6Um8b3i7GISs7kjTq/PZoioCfJzfKdJTN0Q45kQEQuh9H88M3yEs3DbtRTKALraM0YC8laiMiOOe6ADmTcCiREeAWZelBaEXRaSuj2lx0xHaRYqF65O0Lo5OCFU18A8cMDE4MLYm9w2QSr9NgQAIcRxZsNpA7UJR0e71JL+VU+ISWFk5I97lra8uGg7GlQYhGd4Gc6rxsLFRiIeGO4abP4S4ekQ1fiqDCy87GZHd52fn5aaDGuvOmIofrzpVwMvtbreZ/855OaXTRcNiNE0wzGZSxbjg26v8ko8L537v/XCCWP2MFaArJpvnkep0pA+O86MWjRAZPQRfznZiSIaTppy6m3p6HrNSsY7fDtz7Cl4V/DJAjQDoyiL2uwf1UHVd2AIrzBUSlJaTj4k6NL97a/GqhWKU9RUmjnYKpm2r+JYUcrkCuZKvcYvrg8pDoUKQywY9GDWg03DUFSirlUXBS5SWn/KAntnf0IdHGL/7mwXqDG+LZYjbEdQmqUqq4y54TNmWUP7IgcAw5816YBzwiNIJiE9M4lPCzeI/FGBeYy3p6IAmH4AjXXmvQ4Iy0Y82NTobcAggT2Cdqz6Mx4TdGoq9fn2etrWKUNFyatAHydQTVUQ2S5OWVUlugcNvoUrlA8cJJz9MqOa/W3iVno4zDHfE7zhoY5f5lRTVZDhrQbR8LS4eRLz8iPMyBL6o4PiLlp89FjdokQLaSBmKHUwWp0na5fE3v9zny2YcDXG/jfI9sctulHRbdkI5a4GOPJx4oAJQzVZ/yYAado8KNZUdEFs9ZPiBsausotXMNebEgr0dyopuqfScFJ3ODNPHgclACPdccwv0YJGQdsN2lhoV4HVGBxcEUeUX/alr4nqpcc1CCR3vR7g40zteQg/JvWmFlUE4mAiTpHlYGrB7w+U2KdSwQz2QJKBe/5eiixWipmfP15AFWrK8Sh1GBBYLgzki1wTMhGQmagXqJ2+FuqJ8f0XzXCVJFHQdMAw8xco11HhM347alrAu+wmX3pDFABOvkC+WPX0Uhg1Z5MVHKNROxaR84YV3s12UcM+70cJ460SzEaKLyh472vOMD3XnaK7zxZcXlWqenEvcjmgGNR2OKbI1s8U+iwiW+HotHalp3e1MGDy6BMVIvajnAzkFHbeVsgjmJUkrP9OAwnEHYXVBqYx3q7LvXjoVR0mY8h+ZaOnh053pdsGkmbqhyryN01eVHySr+CkDYkSMeZ1xjPNVM+gVLTDKu2VGsMUJqWO4TwPDP0VOg2/8ITbAUaMGb4LjL7L+Pi11lEVMXTYIlAZ/QHmTENjyx3kDkBdfcvvQt6tKk6jYFM4EG5UXDTaF5+1ZjRz6W7MdJPC+wTkbDUim4p5QQH3b9kGk2Bkilyeur8Bc20wm5uJSBO95GfYDI1EZipoRaH7uVveneqz43tlTZGRQ4a7CNmMHgXyOQQOL6WQkgMUTQDT8vh21aSdz7ERiZT1jK9F+v6wgFvuEmGngSvIUR2CJkc5tx1QygfZnAruONobB1idCLB1FCfO7N1ZdRocT8/Wye+EnDiO9pzqIpnLDl4bkaRKW+ekBVwHn46Shw1X0tclt/0ROijuUB4kIInrVJU4buWf4YITJtjOJ6iKdr1u+flgQeFH70GxKjhdgt/MrwfB4K/sXczQ+9zYcrD4dhY6qZhZ010rrxggWA8JaZyg2pYij8ieYEg1aZJkZK9O1Re7sB0iouf60rK0Gd+AYlp7soqCBCDGwfKeUQhCBn0E0o0GS6PdmjLi0TtCYZeqazqwN+yNINIA8Lk3iPDnWUiIPLGNcHmZDxfeK0iAdxm/T7LnN+gemRL61hHIc0NCAZaiYJR+OHnLWSe8sLrK905B5eEJHNlWq4RmEXIaFTmo49f8w61+NwfEUyuJAwVqZCLFcyHBKAcIVj3sNzfEOXzVKIndxHw+AR93owhbCxUZf6Gs8cz6/1VdrFEPrv330+9s6BtMVPJ3zl/Uf9rUi0Z/opexfdL3ykF76e999GPfVv8fJv/Y/+/5hEMon1tqNFyVRevV9y9/uIvsG3dbB8GRRrgaEXfhx+2xeOFt+cEn3RZanNxdEe2+B6MHpNbrRE53PlDifPvFcp4kO78ILR0T4xyW/WGPyBsqGdoA7zJJCu1TKbGfhnqgnRbxbB2B3UZoeQ2bz2sTVnUwokTcTU21RxN1PYPS3Sar7T0eRIsyCNowr9amwoMU/od9s2APtiKNL6ENOlyKADstAEWKA+sdKDhrJ6BOhRJmZ+QJbAaZ3/5Fq0/lumCgEzGEbu3yi0Y4I4EgVAjqxh4HbuQn0GrRhOWyAfsglQJAVL1y/6yezS2k8RE2MstJLh92NOB3GCYgFXznF4d25qiP4ZCyI4RYGesut6FXK6GwPpKK8WHEkhYui0AyEmr5Ml3uBFtPFdnioI8RiCooa7Z1G1WuyIi3nSNglutc+xY8BkeW3JJXPK6jd2VIMpaSxpVtFq+R+ySK9J6WG5Qvt+C+QH1hyYUOVK7857nFmyDBYgZ/o+AnibzNVqyYCJQvyDXDTK+iXdkA71bY7TL3bvuLxLBQ8kbTvTEY9aqkQ3+MiLWbEgjLzOH+lXgco1ERgzd80rDCymlpaRQbOYnKG/ODoFl46lzT0cjM5FYVvv0qLUbD5lyJtMUaC1pFlTkNONx6lliaX9o0i/1vws5bNKn5OuENQEKmLlcP4o2ZmJjD4zzd3Fk32uQ4uRWkPSUqb4LBe3EXHdORNB2BWsws5daRnMfNVX7isPSb1hMQdAJi1/qmDMfRUlCU74pmnzjbXfL8PVG8NsW6IQM2Ne23iCPIpryJjYbVnm5hCvKpMa7HLViNiNc+xTfDIaKm3jctViD8A1M9YPJNk003VVr4Zo2MuGW8vil8SLaGpPXqG7I4DLdtl8a4Rbx1Lt4w5Huqaa1XzZBtj208EJVGcmKYEuaeN27zT9EE6a09JerXdEbpaNgNqYJdhP1NdqiPKsbDRUi86XvvNC7rME5mrSQtrzAZVndtSjCMqd8BmaeGR4l4YFULGRBeXIV9Y4yxLFdyoUNpiy2IhePSWzBofYPP0eIa2q5JP4j9G8at/AqoSsLAUuRXtvgsqX/zYwsE+of6oSDbUOo4RMJw+DOUTJq+hnqwKim9Yy/napyZNTc2rCq6V9jHtJbxGPDwlzWj/Sk3zF/BHOlT/fSjSq7FqlPI1q6J+ru8Aku008SFINXZfOfnZNOvGPMtEmn2gLPt+H4QLA+/SYe4j398auzhKIp2Pok3mPC5q1IN1HgR+mnEfc4NeeHYwd2/kpszR3cBn7ni9NbIqhtSWFW8xbUJuUPVOeeXu3j0IGZmFNiwaNZ6rH4/zQ2ODz6tFxRLsUYZu1bfd1uIvfQDt4YD/efKYv8VF8bHGDgK22w2Wqwpi43vNCOXFJZCGMqWiPbL8mil6tsmOTXAWCyMCw73e2rADZj2IK6rqksM3EXF2cbLb4vjB14wa/yXK5vwU+05MzERJ5nXsXsW21o7M+gO0js2OyKciP5uF2iXyb2DiptwQeHeqygkrNsqVCSlldxBMpwHi1vfc8RKpP/4L3Lmpq6DZcvhDDfxTCE3splacTcOtXdK2g303dIWBVe2wD/Gvja1cClFQ67gw0t1ZUttsUgQ1Veky8oOpS6ksYEc4bqseCbZy766SvL3FodmnahlWJRgVCNjPxhL/fk2wyvlKhITH/VQCipOI0dNcRa5B1M5HmOBjTLeZQJy237e2mobwmDyJNHePhdDmiknvLKaDbShL+Is1XTCJuLQd2wmdJL7+mKvs294whXQD+vtd88KKk0DXP8B1Xu9J+xo69VOuFgexgTrcvI6SyltuLix9OPuE6/iRJYoBMEXxU4shQMf4Fjqwf1PtnJ/wWSZd29rhZjRmTGgiGTAUQqRz+nCdjeMfYhsBD5Lv60KILWEvNEHfmsDs2L0A252351eUoYxAysVaCJVLdH9QFWAmqJDCODUcdoo12+gd6bW2boY0pBVHWL6LQDK5bYWh1V8vFvi0cRpfwv7cJiMX3AZNJuTddHehTIdU0YQ/sQ1dLoF2xQPcCuHKiuCWOY30DHe1OwcClLAhqAKyqlnIbH/8u9ScJpcS4kgp6HKDUdiOgRaRGSiUCRBjzI5gSksMZKqy7Sd51aeg0tgJ+x0TH9YH2Mgsap9N7ENZdEB0bey2DMTrBA1hn56SErNHf3tKtqyL9b6yXEP97/rc+jgD2N1LNUH6RM9AzP3kSipr06RkKOolR7HO768jjWiH1X92jA7dkg7gcNcjqsZCgfqWw0tPXdLg20cF6vnQypg7gLtkazrHAodyYfENPQZsdfnjMZiNu4nJO97D1/sQE+3vNFzrSDOKw+keLECYf7RJwVHeP/j79833oZ0egonYB2FlFE5qj02B/LVOMJQlsB8uNg3Leg4qtZwntsOSNidR0abbZmAK4sCzvt8Yiuz2yrNCJoH5O8XvX/vLeR/BBYTWj0sOPYM/jyxRd5+/JziKAABaPcw/34UA3aj/gLZxZgRCWN6m4m3demanNgsx0P237/Q+Ew5VYnJPkyCY0cIVHoFn2Ay/e7U4P19APbPFXEHX94N6KhEMPG7iwB3+I+O1jd5n6VSgHegxgaSawO6iQCYFgDsPSMsNOcUj4q3sF6KzGaH/0u5PQoAj/8zq6Uc9MoNrGqhYeb2jQo0WlGlXjxtanZLS24/OIN5Gx/2g684BPDQpwlqnkFcxpmP/osnOXrFuu4PqifouQH0eF5qCkvITQbJw/Zvy5mAHWC9oU+cTiYhJmSfKsCyt1cGVxisKu+NymEQIAyaCgud/V09qT3nk/9s/SWsYtha7yNpzBIMM40rCSGaJ9u6lEkl00vXBiEt7p9P5IBCiavynEOv7FgLqPdeqxRiCwuFVMolSIUBcoyfUC2e2FJSAUgYdVGFf0b0Kn2EZlK97yyxrT2MVgvtRikfdaAW8RwEEfN+B7/eK8bBdp7URpbqn1xcrC6d2UjdsKbzCjBFqkKkoZt7Mrhg6YagE7spkqj0jOrWM+UGQ0MUlG2evP1uE1p2xSv4dMK0dna6ENcNUF+xkaJ7B764NdxLCpuvhblltVRAf7vK5qPttJ/9RYFUUSGcLdibnz6mf7WkPO3MkUUhR2mAOuGv8IWw5XG1ZvoVMnjSAZe6T7WYA99GENxoHkMiKxHlCuK5Gd0INrISImHQrQmv6F4mqU/TTQ8nHMDzCRivKySQ8dqkpQgnUMnwIkaAuc6/FGq1hw3b2Sba398BhUwUZSAIO8XZvnuLdY2n6hOXws+gq9BHUKcKFA6kz6FDnpxLPICa3qGhnc97bo1FT/XJk48LrkHJ2CAtBv0RtN97N21plfpXHvZ8gMJb7Zc4cfI6MbPwsW7AilCSXMFIEUEmir8XLEklA0ztYbGpTTGqttp5hpFTTIqUyaAIqvMT9A/x+Ji5ejA4Bhxb/cl1pUdOD6epd3yilIdO6j297xInoiBPuEDW2/UfslDyhGkQs7Wy253bVnlT+SWg89zYIK/9KXFl5fe+jow2rd5FXv8zDPrmfMXiUPt9QBO/iK4QGbX5j/7Rx1c1vzsY8ONbP3lVIaPrhL4+1QrECTN3nyKavGG0gBBtHvTKhGoBHgMXHStFowN+HKrPriYu+OZ05Frn8okQrPaaxoKP1ULCS/cmKFN3gcH7HQlVjraCeQmtjg1pSQxeuqXiSKgLpxc/1OiZsU4+n4lz4hpahGyWBURLi4642n1gn9qz9bIsaCeEPJ0uJmenMWp2tJmIwLQ6VSgDYErOeBCfSj9P4G/vI7oIF+l/n5fp956QgxGvur77ynawAu3G9MdFbJbu49NZnWnnFcQHjxRuhUYvg1U/e84N4JTecciDAKb/KYIFXzloyuE1eYXf54MmhjTq7B/yBToDzzpx3tJCTo3HCmVPYfmtBRe3mPYEE/6RlTIxbf4fSOcaKFGk4gbaUWe44hVk9SZzhW80yfW5QWBHxmtUzvMhfVQli4gZTktIOZd9mjJ5hsbmzttaHQB29Am3dZkmx3g/qvYocyhZ2PXAWsNQiIaf+Q8W/MWPIK7/TjvCx5q2XRp4lVWydMc2wIQkhadDB0xsnw/kSEyGjLKjI4coVIwtubTF3E7MJ6LS6UOsJKj82XVAVPJJcepfewbzE91ivXZvOvYfsmMevwtPpfMzGmC7WJlyW2j0jh7AF1JLmwEJSKYwIvu6DHc3YnyLH9ZdIBnQ+nOVDRiP+REpqv++typYHIvoJyICGA40d8bR7HR2k7do6UQTHF4oriYeIQbxKe4Th6+/l1BjUtS9hqORh3MbgvYrStXTfSwaBOmAVQZzpYNqsAmQyjY56MUqty3c/xH6GuhNvNaG9vGbG6cPtBM8UA3e8r51D0AR9kozKuGGSMgLz3nAHxDNnc7GTwpLj7/6HeWp1iksDeTjwCLpxejuMtpMnGJgsiku1sOACwQ9ukzESiDRN77YNESxR5LphOlcASXA5uIts1LnBIcn1J7BLWs49DMALSnuz95gdOrTZr0u1SeYHinno/pE58xYoXbVO/S+FEMMs5qyWkMnp8Q3ClyTlZP52Y9nq7b8fITPuVXUk9ohG5EFHw4gAEcjFxfKb3xuAsEjx2z1wxNbSZMcgS9GKyW3R6KwJONgtA64LTyxWm8Bvudp0M1FdJPEGopM4Fvg7G/hsptkhCfHFegv4ENwxPeXmYhxwZy7js+BeM27t9ODBMynVCLJ7RWcBMteZJtvjOYHb5lOnCLYWNEMKC59BA7covu1cANa2PXL05iGdufOzkgFqqHBOrgQVUmLEc+Mkz4Rq8O6WkNr7atNkH4M8d+SD1t/tSzt3oFql+neVs+AwEI5JaBJaxARtY2Z4mKoUqxds4UpZ0sv3zIbNoo0J4fihldQTX3XNcuNcZmcrB5LTWMdzeRuAtBk3cZHYQF6gTi3PNuDJ0nmR+4LPLoHvxQIxRgJ9iNNXqf2SYJhcvCtJiVWo85TsyFOuq7EyBPJrAdhEgE0cTq16FQXhYPJFqSfiVn0IQnPOy0LbU4BeG94QjdYNB0CiQ3QaxQqD2ebSMiNjaVaw8WaM4Z5WnzcVDsr4eGweSLa2DE3BWViaxhZFIcSTjgxNCAfelg+hznVOYoe5VqTYs1g7WtfTm3e4/WduC6p+qqAM8H4ZyrJCGpewThTDPe6H7CzX/zQ8Tm+r65HeZn+MsmxUciEWPlAVaK/VBaQBWfoG/aRL/jSZIQfep/89GjasWmbaWzeEZ2R1FOjvyJT37O9B8046SRSKVEnXWlBqbkb5XCS3qFeuE9xb9+frEknxWB5h1D/hruz2iVDEAS7+qkEz5Ot5agHJc7WCdY94Ws61sURcX5nG8UELGBAHZ3i+3VulAyT0nKNNz4K2LBHBWJcTBX1wzf+//u/j/9+//v87+9/l9Lbh/L/uyNYiTsWV2LwsjaA6MxTuzFMqmxW8Jw/+IppdX8t/Clgi1rI1SN0UC/r6tX/4lUc2VV1OQReSeCsjUpKZchw4XUcjHfw6ryCV3R8s6VXm67vp4n+lcPV9gJwmbKQEsmrJi9c2vkwrm8HFbVYNTaRGq8D91t9n5+U+aD/hNtN3HjC/nC/vUoGFSCkXP+NlRcmLUqLbiUBl4LYf1U/CCvwtd3ryCH8gUmGITAxiH1O5rnGTz7y1LuFjmnFGQ1UWuM7HwfXtWl2fPFKklYwNUpF2IL/TmaRETjQiM5SJacI+3Gv5MBU8lP5Io6gWkawpyzNEVGqOdx4YlO1dCvjbWFZWbCmeiFKPSlMKtKcMFLs/KQxtgAHi7NZNCQ32bBAW2mbHflVZ8wXKi1JKVHkW20bnYnl3dKWJeWJOiX3oKPBD6Zbi0ZvSIuWktUHB8qDR8DMMh1ZfkBL9FS9x5r0hBGLJ8pUCJv3NYH+Ae8p40mZWd5m5fhobFjQeQvqTT4VKWIYfRL0tfaXKiVl75hHReuTJEcqVlug+eOIIc4bdIydtn2K0iNZPsYWQvQio2qbO3OqAlPHDDOB7DfjGEfVF51FqqNacd6QmgFKJpMfLp5DHTv4wXlONKVXF9zTJpDV4m1sYZqJPhotcsliZM8yksKkCkzpiXt+EcRQvSQqmBS9WdWkxMTJXPSw94jqI3varCjQxTazjlMH8jTS8ilaW8014/vwA/LNa+YiFoyyx3s/KswP3O8QW1jtq45yTM/DX9a8M4voTVaO2ebvw1EooDw/yg6Y1faY+WwrdVs5Yt0hQ5EwRfYXSFxray1YvSM+kYmlpLG2/9mm1MfmbKHXr44Ih8nVKb1M537ZANUkCtdsPZ80JVKVKabVHCadaLXg+IV8i5GSwpZti0h6diTaKs9sdpUKEpd7jDUpYmHtiX33SKiO3tuydkaxA7pEc9XIQEOfWJlszj5YpL5bKeQyT7aZSBOamvSHl8xsWvgo26IP/bqk+0EJUz+gkkcvlUlyPp2kdKFtt7y5aCdks9ZJJcFp5ZWeaWKgtnXMN3ORwGLBE0PtkEIek5FY2aVssUZHtsWIvnljMVJtuVIjpZup/5VL1yPOHWWHkOMc6YySWMckczD5jUj2mlLVquFaMU8leGVaqeXis+aRRL8zm4WuBk6cyWfGMxgtr8useQEx7k/PvRoZyd9nde1GUCV84gMX8Ogu/BWezYPSR27llzQnA97oo0pYyxobYUJfsj+ysTm9zJ+S4pk0TGo9VTG0KjqYhTmALfoDZVKla2b5yhv241PxFaLJs3i05K0AAIdcGxCJZmT3ZdT7CliR7q+kur7WdQjygYtOWRL9B8E4s4LI8KpAj7bE0dg7DLOaX+MGeAi0hMMSSWZEz+RudXbZCsGYS0QqiXjH9XQbd8sCB+nIVTq7/T/FDS+zWY9q7Z2fdq1tdLb6v3hKKVDAw5gjj6o9r1wHFROdHc18MJp4SJ2Ucvu+iQ9EgkekW8VCM+psM6y+/2SBy8tNN4a3L1MzP+OLsyvESo5gS7IQOnIqMmviJBVc6zbVG1n8eXiA3j46kmvvtJlewwNDrxk4SbJOtP/TV/lIVK9ueShNbbMHfwnLTLLhbZuO79ec5XvfgRwLFK+w1r5ZWW15rVFZrE+wKqNRv5KqsLNfpGgnoUU6Y71NxEmN7MyqwqAQqoIULOw/LbuUB2+uE75gJt+kq1qY4LoxV+qR/zalupea3D5+WMeaRIn0sAI6DDWDh158fqUb4YhAxhREbUN0qyyJYkBU4V2KARXDT65gW3gRsiv7xSPYEKLwzgriWcWgPr0sbZnv7m1XHNFW6xPdGNZUdxFiUYlmXNjDVWuu7LCkX/nVkrXaJhiYktBISC2xgBXQnNEP+cptWl1eG62a7CPXrnrkTQ5BQASbEqUZWMDiZUisKyHDeLFOaJILUo5f6iDt4ZO8MlqaKLto0AmTHVVbkGuyPa1R/ywZsWRoRDoRdNMMHwYTsklMVnlAd2S0282bgMI8fiJpDh69OSL6K3qbo20KfpNMurnYGQSr/stFqZ7hYsxKlLnKAKhsmB8AIpEQ4bd/NrTLTXefsE6ChRmKWjXKVgpGoPs8GAicgKVw4K0qgDgy1A6hFq1WRat3fHF+FkU+b6H4NWpOU3KXTxrIb2qSHAb+qhm8hiSROi/9ofapjxhyKxxntPpge6KL5Z4+WBMYkAcE6+0Hd3Yh2zBsK2MV3iW0Y6cvOCroXlRb2MMJtdWx+3dkFzGh2Pe3DZ9QpSqpaR/rE1ImOrHqYYyccpiLC22amJIjRWVAherTfpQLmo6/K2pna85GrDuQPlH1Tsar8isAJbXLafSwOof4gg9RkAGm/oYpBQQiPUoyDk2BCQ1k+KILq48ErFo4WSRhHLq/y7mgw3+L85PpP6xWr6cgp9sOjYjKagOrxF148uhuaWtjet953fh1IQiEzgC+d2IgBCcUZqgTAICm2bR8oCjDLBsmg+ThyhfD+zBalsKBY1Ce54Y/t9cwfbLu9SFwEgphfopNA3yNxgyDafUM3mYTovZNgPGdd4ZFFOj1vtfFW3u7N+iHEN1HkeesDMXKPyoCDCGVMo4GCCD6PBhQ3dRZIHy0Y/3MaE5zU9mTCrwwnZojtE+qNpMSkJSpmGe0EzLyFelMJqhfFQ7a50uXxZ8pCc2wxtAKWgHoeamR2O7R+bq7IbPYItO0esdRgoTaY38hZLJ5y02oIVwoPokGIzxAMDuanQ1vn2WDQ00Rh6o5QOaCRu99fwDbQcN0XAuqkFpxT/cfz3slGRVokrNU0iqiMAJFEbKScZdmSkTUznC0U+MfwFOGdLgsewRyPKwBZYSmy6U325iUhBQNxbAC3FLKDV9VSOuQpOOukJ/GAmu/tyEbX9DgEp6dv1zoU0IqzpG6gssSjIYRVPGgU1QAQYRgIT8gEV0EXr1sqeh2I6rXjtmoCYyEDCe/PkFEi/Q48FuT29p557iN+LCwk5CK/CZ2WdAdfQZh2Z9QGrzPLSNRj5igUWzl9Vi0rCqH8G1Kp4QMLkuwMCAypdviDXyOIk0AHTM8HBYKh3b0/F+DxoNj4ZdoZfCpQVdnZarqoMaHWnMLNVcyevytGsrXQEoIbubqWYNo7NRHzdc0zvT21fWVirj7g36iy6pxogfvgHp1xH1Turbz8QyyHnXeBJicpYUctbzApwzZ1HT+FPEXMAgUZetgeGMwt4G+DHiDT2Lu+PT21fjJCAfV16a/Wu1PqOkUHSTKYhWW6PhhHUlNtWzFnA7MbY+r64vkwdpfNB2JfWgWXAvkzd42K4lN9x7Wrg4kIKgXCb4mcW595MCPJ/cTfPAMQMFWwnqwde4w8HZYJFpQwcSMhjVz4B8p6ncSCN1X4klxoIH4BN2J6taBMj6lHkAOs8JJAmXq5xsQtrPIPIIp/HG6i21xMGcFgqDXSRF0xQg14d2uy6HgKE13LSvQe52oShF5Jx1R6avyL4thhXQZHfC94oZzuPUBKFYf1VvDaxIrtV6dNGSx7DO0i1p6CzBkuAmEqyWceQY7F9+U0ObYDzoa1iKao/cOD/v6Q9gHrrr1uCeOk8fST9MG23Ul0KmM3r+Wn6Hi6WAcL7gEeaykicvgjzkjSwFsAXIR81Zx4QJ6oosVyJkCcT+4xAldCcihqvTf94HHUPXYp3REIaR4dhpQF6+FK1H0i9i7Pvh8owu3lO4PT1iuqu+DkL2Bj9+kdfGAg2TXw03iNHyobxofLE2ibjsYDPgeEQlRMR7afXbSGQcnPjI2D+sdtmuQ771dbASUsDndU7t58jrrNGRzISvwioAlHs5FA+cBE5Ccznkd8NMV6BR6ksnKLPZnMUawRDU1MZ/ib3xCdkTblHKu4blNiylH5n213yM0zubEie0o4JhzcfAy3H5qh2l17uLooBNLaO+gzonTH2uF8PQu9EyH+pjGsACTMy4cHzsPdymUSXYJOMP3yTkXqvO/lpvt0cX5ekDEu9PUfBeZODkFuAjXCaGdi6ew4qxJ8PmFfwmPpkgQjQlWqomFY6UkjmcnAtJG75EVR+NpzGpP1Ef5qUUbfowrC3zcSLX3BxgWEgEx/v9cP8H8u1Mvt9/rMDYf6sjwU1xSOPBgzFEeJLMRVFtKo5QHsUYT8ZRLCah27599EuqoC9PYjYO6aoAMHB8X1OHwEAYouHfHB3nyb2B+SnZxM/vw/bCtORjLMSy5aZoEpvgdGvlJfNPFUu/p7Z4VVK1hiI0/UTuB3ZPq4ohEbm7Mntgc1evEtknaosgZSwnDC2BdMmibpeg48X8Ixl+/8+xXdbshQXUPPvx8jT3fkELivHSmqbhblfNFShWAyQnJ3WBU6SMYSIpTDmHjdLVAdlADdz9gCplZw6mTiHqDwIsxbm9ErGusiVpg2w8Q3khKV/R9Oj8PFeF43hmW/nSd99nZzhyjCX3QOZkkB6BsH4H866WGyv9E0hVAzPYah2tkRfQZMmP2rinfOeQalge0ovhduBjJs9a1GBwReerceify49ctOh5/65ATYuMsAkVltmvTLBk4oHpdl6i+p8DoNj4Fb2vhdFYer2JSEilEwPd5n5zNoGBXEjreg/wh2NFnNRaIUHSOXa4eJRwygZoX6vnWnqVdCRT1ARxeFrNBJ+tsdooMwqnYhE7zIxnD8pZH+P0Nu1wWxCPTADfNWmqx626IBJJq6NeapcGeOmbtXvl0TeWG0Y7OGGV4+EHTtNBIT5Wd0Bujl7inXgZgfXTM5efD3qDTJ54O9v3Bkv+tdIRlq1kXcVD0BEMirmFxglNPt5pedb1AnxuCYMChUykwsTIWqT23XDpvTiKEru1cTcEMeniB+HQDehxPXNmkotFdwUPnilB/u4Nx5Xc6l8J9jH1EgKZUUt8t8cyoZleDBEt8oibDmJRAoMKJ5Oe9CSWS5ZMEJvacsGVdXDWjp/Ype5x0p9PXB2PAwt2LRD3d+ftNgpuyvxlP8pB84oB1i73vAVpwyrmXW72hfW6Dzn9Jkj4++0VQ4d0KSx1AsDA4OtXXDo63/w+GD+zC7w5SJaxsmnlYRQ4dgdjA7tTl2KNLnpJ+mvkoDxtt1a4oPaX3EVqj96o9sRKBQqU7ZOiupeAIyLMD+Y3YwHx30XWHB5CQiw7q3mj1EDlP2eBsZbz79ayUMbyHQ7s8gu4Lgip1LiGJj7NQj905/+rgUYKAA5qdrlHKIknWmqfuR+PB8RdBkDg/NgnlT89G72h2NvySnj7UyBwD+mi/IWs1xWbxuVwUIVXun5cMqBtFbrccI+DILjsVQg6eeq0itiRfedn89CvyFtpkxaauEvSANuZmB1p8FGPbU94J9medwsZ9HkUYjmI7OH5HuxendLbxTaYrPuIfE2ffXFKhoNBUp33HsFAXmCV/Vxpq5AYgFoRr5Ay93ZLRlgaIPjhZjXZZChT+aE5iWAXMX0oSFQEtwjiuhQQItTQX5IYrKfKB+queTNplR1Hoflo5/I6aPPmACwQCE2jTOYo5Dz1cs7Sod0KTG/3kEDGk3kUaUCON19xSJCab3kNpWZhSWkO8l+SpW70Wn3g0ciOIJO5JXma6dbos6jyisuxXwUUhj2+1uGhcvuliKtWwsUTw4gi1c/diEEpZHoKoxTBeMDmhPhKTx7TXWRakV8imJR355DcIHkR9IREHxohP4TbyR5LtFU24umRPRmEYHbpe1LghyxPx7YgUHjNbbQFRQhh4KeU1EabXx8FS3JAxp2rwRDoeWkJgWRUSKw6gGP5U2PuO9V4ZuiKXGGzFQuRuf+tkSSsbBtRJKhCi3ENuLlXhPbjTKD4djXVnfXFds6Zb+1XiUrRfyayGxJq1+SYBEfbKlgjiSmk0orgTqzSS+DZ5rTqsJbttiNtp+KMqGE2AHGFw6jQqM5vD6vMptmXV9OAjq49Uf/Lx9Opam+Hn5O9p8qoBBAQixzQZ4eNVkO9sPzJAMyR1y4/RCQQ1s0pV5KAU5sKLw3tkcFbI/JqrjCsK4Mw+W8aod4lioYuawUiCyVWBE/qPaFi5bnkgpfu/ae47174rI1fqQoTbW0HrU6FAejq7ByM0V4zkZTg02/YJK2N7hUQRCeZ4BIgSEqgD8XsjzG6LIsSbuHoIdz/LhFzbNn1clci1NHWJ0/6/O8HJMdIpEZbqi1RrrFfoo/rI/7ufm2MPG5lUI0IYJ4MAiHRTSOFJ2oTverFHYXThkYFIoyFx6rMYFgaOKM4xNWdlOnIcKb/suptptgTOTdVIf4YgdaAjJnIAm4qNNHNQqqAzvi53GkyRCEoseUBrHohZsjUbkR8gfKtc/+Oa72lwxJ8Mq6HDfDATbfbJhzeIuFQJSiw1uZprHlzUf90WgqG76zO0eCB1WdPv1IT6sNxxh91GEL2YpgC97ikFHyoaH92ndwduqZ6IYjkg20DX33MWdoZk7QkcKUCgisIYslOaaLyvIIqRKWQj16jE1DlQWJJaPopWTJjXfixEjRJJo8g4++wuQjbq+WVYjsqCuNIQW3YjnxKe2M5ZKEqq+cX7ZVgnkbsU3RWIyXA1rxv4kGersYJjD//auldXGmcEbcfTeF16Y1708FB1HIfmWv6dSFi6oD4E+RIjCsEZ+kY7dKnwReJJw3xCjKvi3kGN42rvyhUlIz0Bp+fNSV5xwFiuBzG296e5s/oHoFtUyUplmPulIPl+e1CQIQVtjlzLzzzbV+D/OVQtYzo5ixtMi5BmHuG4N/uKfJk5UIREp7+12oZlKtPBomXSzAY0KgtbPzzZoHQxujnREUgBU+O/jKKhgxVhRPtbqyHiUaRwRpHv7pgRPyUrnE7fYkVblGmfTY28tFCvlILC04Tz3ivkNWVazA+OsYrxvRM/hiNn8Fc4bQBeUZABGx5S/xFf9Lbbmk298X7iFg2yeimvsQqqJ+hYbt6uq+Zf9jC+Jcwiccd61NKQtFvGWrgJiHB5lwi6fR8KzYS7EaEHf/ka9EC7H8D+WEa3TEACHBkNSj/cXxFeq4RllC+fUFm2xtstYLL2nos1DfzsC9vqDDdRVcPA3Ho95aEQHvExVThXPqym65llkKlfRXbPTRiDepdylHjmV9YTWAEjlD9DdQnCem7Aj/ml58On366392214B5zrmQz/9ySG2mFqEwjq5sFl5tYJPw5hNz8lyZPUTsr5E0F2C9VMPnZckWP7+mbwp/BiN7f4kf7vtGnZF2JGvjK/sDX1RtcFY5oPQnE4lIAYV49U3C9SP0LCY/9i/WIFK9ORjzM9kG/KGrAuwFmgdEpdLaiqQNpCTGZVuAO65afkY1h33hrqyLjZy92JK3/twdj9pafFcwfXONmPQWldPlMe7jlP24Js0v9m8bIJ9TgS2IuRvE9ZVRaCwSJYOtAfL5H/YS4FfzKWKbek+GFulheyKtDNlBtrdmr+KU+ibHTdalzFUmMfxw3f36x+3cQbJLItSilW9cuvZEMjKw987jykZRlsH/UI+HlKfo2tLwemBEeBFtmxF2xmItA/dAIfQ+rXnm88dqvXa+GapOYVt/2waFimXFx3TC2MUiOi5/Ml+3rj/YU6Ihx2hXgiDXFsUeQkRAD6wF3SCPi2flk7XwKAA4zboqynuELD312EJ88lmDEVOMa1W/K/a8tGylZRMrMoILyoMQzzbDJHNZrhH77L9qSC42HVmKiZ5S0016UTp83gOhCwz9XItK9fgXfK3F5d7nZCBUekoLxrutQaPHa16Rjsa0gTrzyjqTnmcIcrxg6X6dkKiucudc0DD5W4pJPf0vuDW8r5/uw24YfMuxFRpD2ovT2mFX79xH6Jf+MVdv2TYqR6/955QgVPe3JCD/WjAYcLA9tpXgFiEjge2J5ljeI/iUzg91KQuHkII4mmHZxC3XQORLAC6G7uFn5LOmlnXkjFdoO976moNTxElS8HdxWoPAkjjocDR136m2l+f5t6xaaNgdodOvTu0rievnhNAB79WNrVs6EsPgkgfahF9gSFzzAd+rJSraw5Mllit7vUP5YxA843lUpu6/5jAR0RvH4rRXkSg3nE+O5GFyfe+L0s5r3k05FyghSFnKo4TTgs07qj4nTLqOYj6qaW9knJTDkF5OFMYbmCP+8H16Ty482OjvERV6OFyw043L9w3hoJi408sR+SGo1WviXUu8d7qS+ehKjpKwxeCthsm2LBFSFeetx0x4AaKPxtp3CxdWqCsLrB1s/j5TAhc1jNZsXWl6tjo/WDoewxzg8T8NnhZ1niUwL/nhfygLanCnRwaFGDyLw+sfZhyZ1UtYTp8TYB6dE7R3VsKKH95CUxJ8u8N+9u2/9HUNKHW3x3w5GQrfOPafk2w5qZq8MaHT0ebeY3wIsp3rN9lrpIsW9c1ws3VNV+JwNz0Lo9+V7zZr6GD56We6gWVIvtmam5GPPkVAbr74r6SwhuL+TRXtW/0pgyX16VNl4/EAD50TnUPuwrW6OcUO2VlWXS0inq872kk7GUlW6o/ozFKq+Sip6LcTtSDfDrPTcCHhx75H8BeRon+KG2wRwzfDgWhALmiWOMO6h3pm1UCZEPEjScyk7tdLx6WrdA2N1QTPENvNnhCQjW6kl057/qv7IwRryHrZBCwVSbLLnFRiHdTwk8mlYixFt1slEcPD7FVht13HyqVeyD55HOXrh2ElAxJyinGeoFzwKA91zfrdLvDxJSjzmImfvTisreI25EDcVfGsmxLVbfU8PGe/7NmWWKjXcdTJ11jAlVIY/Bv/mcxg/Q10vCHwKG1GW/XbJq5nxDhyLqiorn7Wd7VEVL8UgVzpHMjQ+Z8DUgSukiVwWAKkeTlVVeZ7t1DGnCgJVIdBPZAEK5f8CDyDNo7tK4/5DBjdD5MPV86TaEhGsLVFPQSI68KlBYy84FievdU9gWh6XZrugvtCZmi9vfd6db6V7FmoEcRHnG36VZH8N4aZaldq9zZawt1uBFgxYYx+Gs/qW1jwANeFy+LCoymyM6zgG7j8bGzUyLhvrbJkTYAEdICEb4kMKusKT9V3eIwMLsjdUdgijMc+7iKrr+TxrVWG0U+W95SGrxnxGrE4eaJFfgvAjUM4SAy8UaRwE9j6ZQH5qYAWGtXByvDiLSDfOD0yFA3UCMKSyQ30fyy1mIRg4ZcgZHLNHWl+c9SeijOvbOJxoQy7lTN2r3Y8p6ovxvUY74aOYbuVezryqXA6U+fcp6wSV9X5/OZKP18tB56Ua0gMyxJI7XyNT7IrqN8GsB9rL/kP5KMrjXxgqKLDa+V5OCH6a5hmOWemMUsea9vQl9t5Oce76PrTyTv50ExOqngE3PHPfSL//AItPdB7kGnyTRhVUUFNdJJ2z7RtktZwgmQzhBG/G7QsjZmJfCE7k75EmdIKH7xlnmDrNM/XbTT6FzldcH/rcRGxlPrv4qDScqE7JSmQABJWqRT/TUcJSwoQM+1jvDigvrjjH8oeK2in1S+/yO1j8xAws/T5u0VnIvAPqaE1atNuN0cuRliLcH2j0nTL4JpcR7w9Qya0JoaHgsOiALLCCzRkl1UUESz+ze/gIXHGtDwgYrK6pCFKJ1webSDog4zTlPkgXZqxlQDiYMjhDpwTtBW2WxthWbov9dt2X9XFLFmcF+eEc1UaQ74gqZiZsdj63pH1qcv3Vy8JYciogIVKsJ8Yy3J9w/GhjWVSQAmrS0BPOWK+RKV+0lWqXgYMnIFwpcZVD7zPSp547i9HlflB8gVnSTGmmq1ClO081OW/UH11pEQMfkEdDFzjLC1Cdo/BdL3s7cXb8J++Hzz1rhOUVZFIPehRiZ8VYu6+7Er7j5PSZu9g/GBdmNzJmyCD9wiswj9BZw+T3iBrg81re36ihMLjoVLoWc+62a1U/7qVX5CpvTVF7rocSAKwv4cBVqZm7lLDS/qoXs4fMs/VQi6BtVbNA3uSzKpQfjH1o3x4LrvkOn40zhm6hjduDglzJUwA0POabgdXIndp9fzhOo23Pe+Rk9GSLX0d71Poqry8NQDTzNlsa+JTNG9+UrEf+ngxCjGEsDCc0bz+udVRyHQI1jmEO3S+IOQycEq7XwB6z3wfMfa73m8PVRp+iOgtZfeSBl01xn03vMaQJkyj7vnhGCklsCWVRUl4y+5oNUzQ63B2dbjDF3vikd/3RUMifPYnX5Glfuk2FsV/7RqjI9yKTbE8wJY+74p7qXO8+dIYgjtLD/N8TJtRh04N9tXJA4H59IkMmLElgvr0Q5OCeVfdAt+5hkh4pQgfRMHpL74XatLQpPiOyHRs/OdmHtBf8nOZcxVKzdGclIN16lE7kJ+pVMjspOI+5+TqLRO6m0ZpNXJoZRv9MPDRcAfJUtNZHyig/s2wwReakFgPPJwCQmu1I30/tcBbji+Na53i1W1N+BqoY7Zxo+U/M9XyJ4Ok2SSkBtoOrwuhAY3a03Eu6l8wFdIG1cN+e8hopTkiKF093KuH/BcB39rMiGDLn6XVhGKEaaT/vqb/lufuAdpGExevF1+J9itkFhCfymWr9vGb3BTK4j598zRH7+e+MU9maruZqb0pkGxRDRE1CD4Z8LV4vhgPidk5w2Bq816g3nHw1//j3JStz7NR9HIWELO8TMn3QrP/zZp//+Dv9p429/ogv+GATR+n/UdF+ns9xNkXZQJXY4t9jMkJNUFygAtzndXwjss+yWH9HAnLQQfhAskdZS2l01HLWv7L7us5uTH409pqitvfSOQg/c+Zt7k879P3K9+WV68n7+3cZfuRd/dDPP/03rn+d+/nBvWfgDlt8+LzjqJ/vx3CnNOwiXhho778C96iD+1TBvRZYeP+EH81LE0vVwOOrmCLB3iKzI1x+vJEsrPH4uF0UB4TJ4X3uDfOCo3PYpYe0MF4bouh0DQ/l43fxUF7Y+dpWuvTSffB0yO2UQUETI/LwCZE3BvnevJ7c9zUlY3H58xzke6DNFDQG8n0WtDN4LAYN4nogKav1ezOfK/z+t6tsCTp+dhx4ymjWuCJk1dEUifDP+HyS4iP/Vg9B2jTo9L4NbiBuDS4nuuHW6H+JDQn2JtqRKGkEQPEYE7uzazXIkcxIAqUq1esasZBETlEZY7y7Jo+RoV/IsjY9eIMkUvr42Hc0xqtsavZvhz1OLwSxMOTuqzlhb0WbdOwBH9EYiyBjatz40bUxTHbiWxqJ0uma19qhPruvcWJlbiSSH48OLDDpaHPszvyct41ZfTu10+vjox6kOqK6v0K/gEPphEvMl/vwSv+A4Hhm36JSP9IXTyCZDm4kKsqD5ay8b1Sad/vaiyO5N/sDfEV6Z4q95E+yfjxpqBoBETW2C7xl4pIO2bDODDFurUPwE7EWC2Uplq+AHmBHvir2PSgkR12/Ry65O0aZtQPeXi9mTlF/Wj5GQ+vFkYyhXsLTjrBSP9hwk4GPqDP5rBn5/l8b0mLRAvRSzXHc293bs3s8EsdE3m2exxidWVB4joHR+S+dz5/W+v00K3TqN14CDBth8eWcsTbiwXPsygHdGid0PEdy6HHm2v/IUuV5RVapYmzGsX90mpnIdNGcOOq64Dbc5GUbYpD9M7S+6cLY//QmjxFLP5cuTFRm3vA5rkFZroFnO3bjHF35uU3s8mvL7Tp9nyTc4mymTJ5sLIp7umSnGkO23faehtz3mmTS7fbVx5rP7x3HXIjRNeq/A3xCs9JNB08c9S9BF2O3bOur0ItslFxXgRPdaapBIi4dRpKGxVz7ir69t/bc9qTxjvtOyGOfiLGDhR4fYywHv1WdOplxIV87TpLBy3Wc0QP0P9s4G7FBNOdITS/tep3o3h1TEa5XDDii7fWtqRzUEReP2fbxz7bHWWJdbIOxOUJZtItNZpTFRfj6vm9sYjRxQVO+WTdiOhdPeTJ+8YirPvoeL88l5iLYOHd3b/Imkq+1ZN1El3UikhftuteEYxf1Wujof8Pr4ICTu5ezZyZ4tHQMxlzUHLYO2VMOoNMGL/20S5i2o2obfk+8qqdR7xzbRDbgU0lnuIgz4LelQ5XS7xbLuSQtNS95v3ZUOdaUx/Qd8qxCt6xf2E62yb/HukLO6RyorV8KgYl5YNc75y+KvefrxY+lc/64y9kvWP0a0bDz/rojq+RWjO06WeruWqNFU7r3HPIcLWRql8ICZsz2Ls/qOm/CLn6++X+Qf7mGspYCrZod/lpl6Rw4xN/yuq8gqV4B6aHk1hVE1SfILxWu5gvXqbfARYQpspcxKp1F/c8XOPzkZvmoSw+vEqBLdrq1fr3wAPv5NnM9i8F+jdAuxkP5Z71c6uhK3enlnGymr7UsWZKC12qgUiG8XXGQ9mxnqz4GSIlybF9eXmbqj2sHX+a1jf0gRoONHRdRSrIq03Ty89eQ1GbV/Bk+du4+V15zls+vvERvZ4E7ZbnxWTVjDjb4o/k8jlw44pTIrUGxxuJvBeO+heuhOjpFsO6lVJ/aXnJDa/bM0Ql1cLbXE/Pbv3EZ3vj3iVrB5irjupZTzlnv677NrI9UNYNqbPgp/HZXS+lJmk87wec+7YOxTDo2aw2l3NfDr34VNlvqWJBknuK7oSlZ6/T10zuOoPZOeoIk81N+sL843WJ2Q4Z0fZ3scsqC/JV2fuhWi1jGURSKZV637lf53Xnnx16/vKEXY89aVJ0fv91jGdfG+G4+sniwHes4hS+udOr4RfhFhG/F5gUG35QaU+McuLmclb5ZWmR+sG5V6nf+PxYzlrnFGxpZaK8eqqVo0NfmAWoGfXDiT/FnUbWvzGDOTr8aktOZWg4BYvz5YH12ZbfCcGtNk+dDAZNGWvHov+PIOnY9Prjg8h/wLRrT69suaMVZ5bNuK00lSVpnqSX1NON/81FoP92rYndionwgOiA8WMf4vc8l15KqEEG4yAm2+WAN5Brfu1sq9suWYqgoajgOYt/JCk1gC8wPkK+XKCtRX6TAtgvrnuBgNRmn6I8lVDipOVB9kX6Oxkp4ZKyd1M6Gj8/v2U7k+YQBL95Kb9PQENucJb0JlW3b5tObN7m/Z1j1ev388d7o15zgXsI9CikAGAViR6lkJv7nb4Ak40M2G8TJ447kN+pvfHiOFjSUSP6PM+QfbAywKJCBaxSVxpizHseZUyUBhq59vFwrkyGoRiHbo0apweEZeSLuNiQ+HAekOnarFg00dZNXaPeoHPTRR0FmEyqYExOVaaaO8c0uFUh7U4e/UxdBmthlBDgg257Q33j1hA7HTxSeTTSuVnPZbgW1nodwmG16aKBDKxEetv7D9OjO0JhrbJTnoe+kcGoDJazFSO8/fUN9Jy/g4XK5PUkw2dgPDGpJqBfhe7GA+cjzfE/EGsMM+FV9nj9IAhrSfT/J3QE5TEIYyk5UjsI6ZZcCPr6A8FZUF4g9nnpVmjX90MLSQysIPD0nFzqwCcSJmIb5mYv2Cmk+C1MDFkZQyCBq4c/Yai9LJ6xYkGS/x2s5/frIW2vmG2Wrv0APpCdgCA9snFvfpe8uc0OwdRs4G9973PGEBnQB5qKrCQ6m6X/H7NInZ7y/1674/ZXOVp7OeuCRk8JFS516VHrnH1HkIUIlTIljjHaQtEtkJtosYul77cVwjk3gW1Ajaa6zWeyHGLlpk3VHE2VFzT2yI/EvlGUSz2H9zYE1s4nsKMtMqNyKNtL/59CpFJki5Fou6VXGm8vWATEPwrUVOLvoA8jLuwOzVBCgHB2Cr5V6OwEWtJEKokJkfc87h+sNHTvMb0KVTp5284QTPupoWvQVUwUeogZR3kBMESYo0mfukewRVPKh5+rzLQb7HKjFFIgWhj1w3yN/qCNoPI8XFiUgBNT1hCHBsAz8L7Oyt8wQWUFj92ONn/APyJFg8hzueqoJdNj57ROrFbffuS/XxrSXLTRgj5uxZjpgQYceeMc2wJrahReSKpm3QjHfqExTLAB2ipVumE8pqcZv8LYXQiPHHsgb5BMW8zM5pvQit+mQx8XGaVDcfVbLyMTlY8xcfmm/RSAT/H09UQol5gIz7rESDmnrQ4bURIB4iRXMDQwxgex1GgtDxKp2HayIkR+E/aDmCttNm2C6lytWdfOVzD6X2SpDWjQDlMRvAp1symWv4my1bPCD+E1EmGnMGWhNwmycJnDV2WrQNxO45ukEb08AAffizYKVULp15I4vbNK5DzWwCSUADfmKhfGSUqii1L2UsE8rB7mLuHuUJZOx4+WiizHBJ/hwboaBzhpNOVvgFTf5cJsHef7L1HCI9dOUUbb+YxUJWn6dYOLz+THi91kzY5dtO5c+grX7v0jEbsuoOGnoIreDIg/sFMyG+TyCLIcAWd1IZ1UNFxE8Uie13ucm40U2fcxC0u3WLvLOxwu+F7MWUsHsdtFQZ7W+nlfCASiAKyh8rnP3EyDByvtJb6Kax6/HkLzT9SyEyTMVM1zPtM0MJY14DmsWh4MgD15Ea9Hd00AdkTZ0EiG5NAGuIBzQJJ0JR0na+OB7lQA6UKxMfihIQ7GCCnVz694QvykWXTxpS2soDu+smru1UdIxSvAszBFD1c8c6ZOobA8bJiJIvuycgIXBQIXWwhyTgZDQxJTRXgEwRNAawGSXO0a1DKjdihLVNp/taE/xYhsgwe+VpKEEB4LlraQyE84gEihxCnbfoyOuJIEXy2FIYw+JjRusybKlU2g/vhTSGTydvCvXhYBdtAXtS2v7LkHtmXh/8fly1do8FI/D0f8UbzVb5h+KRhMGSAmR2mhi0YG/uj7wgxcfzCrMvdjitUIpXDX8ae2JcF/36qUWIMwN6JsjaRGNj+jEteGDcFyTUb8X/NHSucKMJp7pduxtD6KuxVlyxxwaeiC1FbGBESO84lbyrAugYxdl+2N8/6AgWpo/IeoAOcsG35IA/b3AuSyoa55L7llBLlaWlEWvuCFd8f8NfcTUgzJv6CbB+6ohWwodlk9nGWFpBAOaz5uEW5xBvmjnHFeDsb0mXwayj3mdYq5gxxNf3H3/tnCgHwjSrpSgVxLmiTtuszdRUFIsn6LiMPjL808vL1uQhDbM7aA43mISXReqjSskynIRcHCJ9qeFopJfx9tqyUoGbSwJex/0aDE3plBPGtNBYgWbdLom3+Q/bjdizR2/AS/c/dH/d3G7pyl1qDXgtOFtEqidwLqxPYtrNEveasWq3vPUUtqTeu8gpov4bdOQRI2kneFvRNMrShyVeEupK1PoLDPMSfWMIJcs267mGB8X9CehQCF0gIyhpP10mbyM7lwW1e6TGvHBV1sg/UyTghHPGRqMyaebC6pbB1WKNCQtlai1GGvmq9zUKaUzLaXsXEBYtHxmFbEZ2kJhR164LhWW2Tlp1dhsGE7ZgIWRBOx3Zcu2DxgH+G83WTPceKG0TgQKKiiNNOlWgvqNEbnrk6fVD+AqRam2OguZb0YWSTX88N+i/ELSxbaUUpPx4vJUzYg/WonSeA8xUK6u7DPHgpqWpEe6D4cXg5uK9FIYVba47V/nb+wyOtk+zG8RrS4EA0ouwa04iByRLSvoJA2FzaobbZtXnq8GdbfqEp5I2dpfpj59TCVif6+E75p665faiX8gS213RqBxTZqfHP46nF6NSenOneuT+vgbLUbdTH2/t0REFXZJOEB6DHvx6N6g9956CYrY/AYcm9gELJXYkrSi+0F0geKDZgOCIYkLU/+GOW5aGj8mvLFgtFH5+XC8hvAE3CvHRfl4ofM/Qwk4x2A+R+nyc9gNu/9Tem7XW4XRnyRymf52z09cTOdr+PG6+P/Vb4QiXlwauc5WB1z3o+IJjlbxI8MyWtSzT+k4sKVbhF3xa+vDts3NxXa87iiu+xRH9cAprnOL2h6vV54iQRXuOAj1s8nLFK8gZ70ThIQcWdF19/2xaJmT0efrkNDkWbpAQPdo92Z8+Hn/aLjbOzB9AI/k12fPs9HhUNDJ1u6ax2VxD3R6PywN7BrLJ26z6s3QoMp76qzzwetrDABKSGkfW5PwS1GvYNUbK6uRqxfyVGNyFB0E+OugMM8kKwmJmupuRWO8XkXXXQECyRVw9UyIrtCtcc4oNqXqr7AURBmKn6Khz3eBN96LwIJrAGP9mr/59uTOSx631suyT+QujDd4beUFpZ0kJEEnjlP+X/Kr2kCKhnENTg4BsMTOmMqlj2WMFLRUlVG0fzdCBgUta9odrJfpVdFomTi6ak0tFjXTcdqqvWBAzjY6hVrH9sbt3Z9gn+AVDpTcQImefbB4edirjzrsNievve4ZT4EUZWV3TxEsIW+9MT/RJoKfZZYSRGfC1CwPG/9rdMOM8qR/LUYvw5f/emUSoD7YSFuOoqchdUg2UePd1eCtFSKgxLSZ764oy4lvRCIH6bowPxZWwxNFctksLeil47pfevcBipkkBIc4ngZG+kxGZ71a72KQ7VaZ6MZOZkQJZXM6kb/Ac0/XkJx8dvyfJcWbI3zONEaEPIW8GbkYjsZcwy+eMoKrYjDmvEEixHzkCSCRPRzhOfJZuLdcbx19EL23MA8rnjTZZ787FGMnkqnpuzB5/90w1gtUSRaWcb0eta8198VEeZMUSfIhyuc4/nywFQ9uqn7jdqXh+5wwv+RK9XouNPbYdoEelNGo34KyySwigsrfCe0v/PlWPvQvQg8R0KgHO18mTVThhQrlbEQ0Kp/JxPdjHyR7E1QPw/ut0r+HDDG7BwZFm9IqEUZRpv2WpzlMkOemeLcAt5CsrzskLGaVOAxyySzZV/D2EY7ydNZMf8e8VhHcKGHAWNszf1EOq8fNstijMY4JXyATwTdncFFqcNDfDo+mWFvxJJpc4sEZtjXyBdoFcxbUmniCoKq5jydUHNjYJxMqN1KzYV62MugcELVhS3Bnd+TLLOh7dws/zSXWzxEb4Nj4aFun5x4kDWLK5TUF/yCXB/cZYvI9kPgVsG2jShtXkxfgT+xzjJofXqPEnIXIQ1lnIdmVzBOM90EXvJUW6a0nZ/7XjJGl8ToO3H/fdxnxmTNKBZxnkpXLVgLXCZywGT3YyS75w/PAH5I/jMuRspej8xZObU9kREbRA+kqjmKRFaKGWAmFQspC+QLbKPf0RaK3OXvBSWqo46p70ws/eZpu6jCtZUgQy6r4tHMPUdAgWGGUYNbuv/1a6K+MVFsd3T183+T8capSo6m0+Sh57fEeG/95dykGJBQMj09DSW2bY0mUonDy9a8trLnnL5B5LW3Nl8rJZNysO8Zb+80zXxqUGFpud3Qzwb7bf+8mq6x0TAnJU9pDQR9YQmZhlna2xuxJt0aCO/f1SU8gblOrbIyMsxTlVUW69VJPzYU2HlRXcqE2lLLxnObZuz2tT9CivfTAUYfmzJlt/lOPgsR6VN64/xQd4Jlk/RV7UKVv2Gx/AWsmTAuCWKhdwC+4HmKEKYZh2Xis4KsUR1BeObs1c13wqFRnocdmuheaTV30gvVXZcouzHKK5zwrN52jXJEuX6dGx3BCpV/++4f3hyaW/cQJLFKqasjsMuO3B3WlMq2gyYfdK1e7L2pO/tRye2mwzwZPfdUMrl5wdLqdd2Kv/wVtnpyWYhd49L6rsOV+8HXPrWH2Kup89l2tz6bf80iYSd+V4LROSOHeamvexR524q4r43rTmtFzQvArpvWfLYFZrbFspBsXNUqqenjxNNsFXatZvlIhk7teUPfK+YL32F8McTnjv0BZNppb+vshoCrtLXjIWq3EJXpVXIlG6ZNL0dh6qEm2WMwDjD3LfOfkGh1/czYc/0qhiD2ozNnH4882MVVt3JbVFkbwowNCO3KL5IoYW5wlVeGCViOuv1svZx7FbzxKzA4zGqBlRRaRWCobXaVq4yYCWbZf8eiJwt3OY+MFiSJengcFP2t0JMfzOiJ7cECvpx7neg1Rc5x+7myPJOXt2FohVRyXtD+/rDoTOyGYInJelZMjolecVHUhUNqvdZWg2J2t0jPmiLFeRD/8fOT4o+NGILb+TufCo9ceBBm3JLVn+MO2675n7qiEX/6W+188cYg3Zn5NSTjgOKfWFSAANa6raCxSoVU851oJLY11WIoYK0du0ec5E4tCnAPoKh71riTsjVIp3gKvBbEYQiNYrmH22oLQWA2AdwMnID6PX9b58dR2QKo4qag1D1Z+L/FwEKTR7osOZPWECPJIHQqPUsM5i/CH5YupVPfFA5pHUBcsesh8eO5YhyWnaVRPZn/BmdXVumZWPxMP5e28zm2uqHgFoT9CymHYNNrzrrjlXZM06HnzDxYNlI5b/QosxLmmrqDFqmogQdqk0WLkUceoAvQxHgkIyvWU69BPFr24VB6+lx75Rna6dGtrmOxDnvBojvi1/4dHjVeg8owofPe1cOnxU1ioh016s/Vudv9mhV9f35At+Sh28h1bpp8xhr09+vf47Elx3Ms6hyp6QvB3t0vnLbOhwo660cp7K0vvepabK7YJfxEWWfrC2YzJfYOjygPwfwd/1amTqa0hZ5ueebhWYVMubRTwIjj+0Oq0ohU3zfRfuL8gt59XsHdwKtxTQQ4Y2qz6gisxnm2UdlmpEkgOsZz7iEk6QOt8BuPwr+NR01LTqXmJo1C76o1N274twJvl+I069TiLpenK/miRxhyY8jvYV6W1WuSwhH9q7kuwnJMtm7IWcqs7HsnyHSqWXLSpYtZGaR1V3t0gauninFPZGtWskF65rtti48UV9uV9KM8kfDYs0pgB00S+TlzTXV6P8mxq15b9En8sz3jWSszcifZa/NuufPNnNTb031pptt0+sRSH/7UG8pzbsgtt3OG3ut7B9JzDMt2mTZuyRNIV8D54TuTrpNcHtgmMlYJeiY9XS83NYJicjRjtJSf9BZLsQv629QdDsKQhTK5CnXhpk7vMNkHzPhm0ExW/VCGApHfPyBagtZQTQmPHx7g5IXXsrQDPzIVhv2LB6Ih138iSDww1JNHrDvzUxvp73MsQBVhW8EbrReaVUcLB1R3PUXyaYG4HpJUcLVxMgDxcPkVRQpL7VTAGabDzbKcvg12t5P8TSGQkrj/gOrpnbiDHwluA73xbXts/L7u468cRWSWRtgTwlQnA47EKg0OiZDgFxAKQQUcsbGomITgeXUAAyKe03eA7Mp4gnyKQmm0LXJtEk6ddksMJCuxDmmHzmVhO+XaN2A54MIh3niw5CF7PwiXFZrnA8wOdeHLvvhdoqIDG9PDI7UnWWHq526T8y6ixJPhkuVKZnoUruOpUgOOp3iIKBjk+yi1vHo5cItHXb1PIKzGaZlRS0g5d3MV2pD8FQdGYLZ73aae/eEIUePMc4NFz8pIUfLCrrF4jVWH5gQneN3S8vANBmUXrEcKGn6hIUN95y1vpsvLwbGpzV9L0ZKTan6TDXM05236uLJcIEMKVAxKNT0K8WljuwNny3BNQRfzovA85beI9zr1AGNYnYCVkR1aGngWURUrgqR+gRrQhxW81l3CHevjvGEPzPMTxdsIfB9dfGRbZU0cg/1mcubtECX4tvaedmNAvTxCJtc2QaoUalGfENCGK7IS/O8CRpdOVca8EWCRwv2sSWE8CJPW5PCugjCXPd3h6U60cPD+bdhtXZuYB6stcoveE7Sm5MM2yvfUHXFSW7KzLmi7/EeEWL0wqcOH9MOSKjhCHHmw+JGLcYE/7SBZQCRggox0ZZTAxrlzNNXYXL5fNIjkdT4YMqVUz6p8YDt049v4OXGdg3qTrtLBUXOZf7ahPlZAY/O+7Sp0bvGSHdyQ8B1LOsplqMb9Se8VAE7gIdSZvxbRSrfl+Lk5Qaqi5QJceqjitdErcHXg/3MryljPSIAMaaloFm1cVwBJ8DNmkDqoGROSHFetrgjQ5CahuKkdH5pRPigMrgTtlFI8ufJPJSUlGgTjbBSvpRc0zypiUn6U5KZqcRoyrtzhmJ7/caeZkmVRwJQeLOG8LY6vP5ChpKhc8Js0El+n6FXqbx9ItdtLtYP92kKfaTLtCi8StLZdENJa9Ex1nOoz1kQ7qxoiZFKRyLf4O4CHRT0T/0W9F8epNKVoeyxUXhy3sQMMsJjQJEyMOjmOhMFgOmmlscV4eFi1CldU92yjwleirEKPW3bPAuEhRZV7JsKV3Lr5cETAiFuX5Nw5UlF7d2HZ96Bh0sgFIL5KGaKSoVYVlvdKpZJVP5+NZ7xDEkQhmDgsDKciazJCXJ6ZN2B3FY2f6VZyGl/t4aunGIAk/BHaS+i+SpdRfnB/OktOvyjinWNfM9Ksr6WwtCa1hCmeRI6icpFM4o8quCLsikU0tMoZI/9EqXRMpKGaWzofl4nQuVQm17d5fU5qXCQeCDqVaL9XJ9qJ08n3G3EFZS28SHEb3cdRBdtO0YcTzil3QknNKEe/smQ1fTb0XbpyNB5xAeuIlf+5KWlEY0DqJbsnzJlQxJPOVyHiKMx5Xu9FcEv1Fbg6Fhm4t+Jyy5JC1W3YO8dYLsO0PXPbxodBgttTbH3rt9Cp1lJIk2r3O1Zqu94eRbnIz2f50lWolYzuKsj4PMok4abHLO8NAC884hiXx5Fy5pWKO0bWL7uEGXaJCtznhP67SlQ4xjWIfgq6EpZ28QMtuZK7JC0RGbl9nA4XtFLug/NLMoH1pGt9IonAJqcEDLyH6TDROcbsmGPaGIxMo41IUAnQVPMPGByp4mOmh9ZQMkBAcksUK55LsZj7E5z5XuZoyWCKu6nHmDq22xI/9Z8YdxJy4kWpD16jLVrpwGLWfyOD0Wd+cBzFBxVaGv7S5k9qwh/5t/LQEXsRqI3Q9Rm3QIoaZW9GlsDaKOUyykyWuhNOprSEi0s1G4rgoiX1V743EELti+pJu5og6X0g6oTynUqlhH9k6ezyRi05NGZHz0nvp3HOJr7ebrAUFrDjbkFBObEvdQWkkUbL0pEvMU46X58vF9j9F3j6kpyetNUBItrEubW9ZvMPM4qNqLlsSBJqOH3XbNwv/cXDXNxN8iFLzUhteisYY+RlHYOuP29/Cb+L+xv+35Rv7xudnZ6ohK4cMPfCG8KI7dNmjNk/H4e84pOxn/sZHK9psfvj8ncA8qJz7O8xqbxESDivGJOZzF7o5PJLQ7g34qAWoyuA+x3btU98LT6ZyGyceIXjrqob2CAVql4VOTQPUQYvHV/g4zAuCZGvYQBtf0wmd5lilrvuEn1BXLny01B4h4SMDlYsnNpm9d7m9h578ufpef9Z4WplqWQvqo52fyUA7J24eZD5av6SyGIV9kpmHNqyvdfzcpEMw97BvknV2fq+MFHun9BT3Lsf8pbzvisWiIQvYkng+8Vxk1V+dli1u56kY50LRjaPdotvT5BwqtwyF+emo/z9J3yVUVGfKrxQtJMOAQWoQii/4dp9wgybSa5mkucmRLtEQZ/pz0tL/NVcgWAd95nEQ3Tg6tNbuyn3Iepz65L3huMUUBntllWuu4DbtOFSMSbpILV4fy6wlM0SOvi6CpLh81c1LreIvKd61uEWBcDw1lUBUW1I0Z+m/PaRlX+PQ/oxg0Ye6KUiIiTF4ADNk59Ydpt5/rkxmq9tV5Kcp/eQLUVVmBzQNVuytQCP6Ezd0G8eLxWyHpmZWJ3bAzkWTtg4lZlw42SQezEmiUPaJUuR/qklVA/87S4ArFCpALdY3QRdUw3G3XbWUp6aq9z0zUizcPa7351p9JXOZyfdZBFnqt90VzQndXB/mwf8LC9STj5kenVpNuqOQQP3mIRJj7eV21FxG8VAxKrEn3c+XfmZ800EPb9/5lIlijscUbB6da0RQaMook0zug1G0tKi/JBC4rw7/D3m4ARzAkzMcVrDcT2SyFtUdWAsFlsPDFqV3N+EjyXaoEePwroaZCiLqEzb8MW+PNE9TmTC01EzWli51PzZvUqkmyuROU+V6ik+Le/9qT6nwzUzf9tP68tYei0YaDGx6kAd7jn1cKqOCuYbiELH9zYqcc4MnRJjkeGiqaGwLImhyeKs+xKJMBlOJ05ow9gGCKZ1VpnMKoSCTbMS+X+23y042zOb5MtcY/6oBeAo1Vy89OTyhpavFP78jXCcFH0t7Gx24hMEOm2gsEfGabVpQgvFqbQKMsknFRRmuPHcZu0Su/WMFphZvB2r/EGbG72rpGGho3h+Msz0uGzJ7hNK2uqQiE1qmn0zgacKYYZBCqsxV+sjbpoVdSilW/b94n2xNb648VmNIoizqEWhBnsen+d0kbCPmRItfWqSBeOd9Wne3c6bcd6uvXOJ6WdiSsuXq0ndhqrQ4QoWUjCjYtZ0EAhnSOP1m44xkf0O7jXghrzSJWxP4a/t72jU29Vu2rvu4n7HfHkkmQOMGSS+NPeLGO5I73mC2B7+lMiBQQZRM9/9liLIfowupUFAbPBbR+lxDM6M8Ptgh1paJq5Rvs7yEuLQv/7d1oU2woFSb3FMPWQOKMuCuJ7pDDjpIclus5TeEoMBy2YdVB4fxmesaCeMNsEgTHKS5WDSGyNUOoEpcC2OFWtIRf0w27ck34/DjxRTVIcc9+kqZE6iMSiVDsiKdP/Xz5XfEhm/sBhO50p1rvJDlkyyxuJ9SPgs7YeUJBjXdeAkE+P9OQJm6SZnn1svcduI78dYmbkE2mtziPrcjVisXG78spLvbZaSFx/Rks9zP4LKn0Cdz/3JsetkT06A8f/yCgMO6Mb1Hme0JJ7b2wZz1qleqTuKBGokhPVUZ0dVu+tnQYNEY1fmkZSz6+EGZ5EzL7657mreZGR3jUfaEk458PDniBzsSmBKhDRzfXameryJv9/D5m6HIqZ0R+ouCE54Dzp4IJuuD1e4Dc5i+PpSORJfG23uVgqixAMDvchMR0nZdH5brclYwRoJRWv/rlxGRI5ffD5NPGmIDt7vDE1434pYdVZIFh89Bs94HGGJbTwrN8T6lh1HZFTOB4lWzWj6EVqxSMvC0/ljWBQ3F2kc/mO2b6tWonT2JEqEwFts8rz2h+oWNds9ceR2cb7zZvJTDppHaEhK5avWqsseWa2Dt5BBhabdWSktS80oMQrL4TvAM9b5HMmyDnO+OkkbMXfUJG7eXqTIG6lqSOEbqVR+qYdP7uWb57WEJqzyh411GAVsDinPs7KvUeXItlcMdOUWzXBH6zscymV1LLVCtc8IePojzXHF9m5b5zGwBRdzcyUJkiu938ApmAayRdJrX1PmVguWUvt2ThQ62czItTyWJMW2An/hdDfMK7SiFQlGIdAbltHz3ycoh7j9V7GxNWBpbtcSdqm4XxRwTawc3cbZ+xfSv9qQfEkDKfZTwCkqWGI/ur250ItXlMlh6vUNWEYIg9A3GzbgmbqvTN8js2YMo87CU5y6nZ4dbJLDQJj9fc7yM7tZzJDZFtqOcU8+mZjYlq4VmifI23iHb1ZoT9E+kT2dolnP1AfiOkt7PQCSykBiXy5mv637IegWSKj9IKrYZf4Lu9+I7ub+mkRdlvYzehh/jaJ9n7HUH5b2IbgeNdkY7wx1yVzxS7pbvky6+nmVUtRllEFfweUQ0/nG017WoUYSxs+j2B4FV/F62EtHlMWZXYrjGHpthnNb1x66LKZ0Qe92INWHdfR/vqp02wMS8r1G4dJqHok8KmQ7947G13a4YXbsGgHcBvRuVu1eAi4/A5+ZixmdSXM73LupB/LH7O9yxLTVXJTyBbI1S49TIROrfVCOb/czZ9pM4JsZx8kUz8dQGv7gUWKxXvTH7QM/3J2OuXXgciUhqY+cgtaOliQQVOYthBLV3xpESZT3rmfEYNZxmpBbb24CRao86prn+i9TNOh8VxRJGXJfXHATJHs1T5txgc/opYrY8XjlGQQbRcoxIBcnVsMjmU1ymmIUL4dviJXndMAJ0Yet+c7O52/p98ytlmAsGBaTAmMhimAnvp1TWNGM9BpuitGj+t810CU2UhorrjPKGtThVC8WaXw04WFnT5fTjqmPyrQ0tN3CkLsctVy2xr0ZWgiWVZ1OrlFjjxJYsOiZv2cAoOvE+7sY0I/TwWcZqMoyIKNOftwP7w++Rfg67ljfovKYa50if3fzE/8aPYVey/Nq35+nH2sLPh/fP5TsylSKGOZ4k69d2PnH43+kq++sRXHQqGArWdwhx+hpwQC6JgT2uxehYU4Zbw7oNb6/HLikPyJROGK2ouyr+vzseESp9G50T4AyFrSqOQ0rroCYP4sMDFBrHn342EyZTMlSyk47rHSq89Y9/nI3zG5lX16Z5lxphguLOcZUndL8wNcrkyjH82jqg8Bo8OYkynrxZvbFno5lUS3OPr8Ko3mX9NoRPdYOKKjD07bvgFgpZ/RF+YzkWvJ/Hs/tUbfeGzGWLxNAjfDzHHMVSDwB5SabQLsIZHiBp43FjGkaienYoDd18hu2BGwOK7U3o70K/WY/kuuKdmdrykIBUdG2mvE91L1JtTbh20mOLbk1vCAamu7utlXeGU2ooVikbU/actcgmsC1FKk2qmj3GWeIWbj4tGIxE7BLcBWUvvcnd/lYxsMV4F917fWeFB/XbINN3qGvIyTpCalz1lVewdIGqeAS/gB8Mi+sA+BqDiX3VGD2eUunTRbSY+AuDy4E3Qx3hAhwnSXX+B0zuj3eQ1miS8Vux2z/l6/BkWtjKGU72aJkOCWhGcSf3+kFkkB15vGOsQrSdFr6qTj0gBYiOlnBO41170gOWHSUoBVRU2JjwppYdhIFDfu7tIRHccSNM5KZOFDPz0TGMAjzzEpeLwTWp+kn201kU6NjbiMQJx83+LX1e1tZ10kuChJZ/XBUQ1dwaBHjTDJDqOympEk8X2M3VtVw21JksChA8w1tTefO3RJ1FMbqZ01bHHkudDB/OhLfe7P5GOHaI28ZXKTMuqo0hLWQ4HabBsGG7NbP1RiXtETz074er6w/OerJWEqjmkq2y51q1BVI+JUudnVa3ogBpzdhFE7fC7kybrAt2Z6RqDjATAUEYeYK45WMupBKQRtQlU+uNsjnzj6ZmGrezA+ASrWxQ6LMkHRXqXwNq7ftv28dUx/ZSJciDXP2SWJsWaN0FjPX9Yko6LobZ7aYW/IdUktI9apTLyHS8DyWPyuoZyxN1TK/vtfxk3HwWh6JczZC8Ftn0bIJay2g+n5wd7lm9rEsKO+svqVmi+c1j88hSCxbzrg4+HEP0Nt1/B6YW1XVm09T1CpAKjc9n18hjqsaFGdfyva1ZG0Xu3ip6N6JGpyTSqY5h4BOlpLPaOnyw45PdXTN+DtAKg7DLrLFTnWusoSBHk3s0d7YouJHq85/R09Tfc37ENXZF48eAYLnq9GLioNcwDZrC6FW6godB8JnqYUPvn0pWLfQz0lM0Yy8Mybgn84Ds3Q9bDP10bLyOV+qzxa4Rd9Dhu7cju8mMaONXK3UqmBQ9qIg7etIwEqM/kECk/Dzja4Bs1xR+Q/tCbc8IKrSGsTdJJ0vge7IG20W687uVmK6icWQ6cD3lwFzgNMGtFvO5qyJeKflGLAAcQZOrkxVwy3cWvqlGpvjmf9Qe6Ap20MPbV92DPV0OhFM4kz8Yr0ffC2zLWSQ1kqY6QdQrttR3kh1YLtQd1kCEv5hVoPIRWl5ERcUTttBIrWp6Xs5Ehh5OUUwI5aEBvuiDmUoENmnVw1FohCrbRp1A1E+XSlWVOTi7ADW+5Ohb9z1vK4qx5R5lPdGCPBJZ00mC+Ssp8VUbgpGAvXWMuWQQRbCqI6Rr2jtxZxtfP7W/8onz+yz0Gs76LaT5HX9ecyiZCB/ZR/gFtMxPsDwohoeCRtiuLxE1GM1vUEUgBv86+eehL58/P56QFGQ/MqOe/vC76L63jzmeax4exd/OKTUvkXg+fOJUHych9xt/9goJMrapSgvXrj8+8vk/N80f22Sewj6cyGqt1B6mztoeklVHHraouhvHJaG/OuBz6DHKMpFmQULU1bRWlyYE0RPXYYkUycIemN7TLtgNCJX6BqdyxDKkegO7nJK5xQ7OVYDZTMf9bVHidtk6DQX9Et+V9M7esgbsYBdEeUpsB0Xvw2kd9+rI7V+m47u+O/tq7mw7262HU1WlS9uFzsV6JxIHNmUCy0QS9e077JGRFbG65z3/dOKB/Zk+yDdKpUmdXjn/aS3N5nv4fK7bMHHmPlHd4E2+iTbV5rpzScRnxk6KARuDTJ8Q1LpK2mP8gj1EbuJ9RIyY+EWK4hCiIDBAS1Tm2IEXAFfgKPgdL9O6mAa06wjCcUAL6EsxPQWO9VNegBPm/0GgkZbDxCynxujX/92vmGcjZRMAY45puak2sFLCLSwXpEsyy5fnF0jGJBhm+fNSHKKUUfy+276A7/feLOFxxUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/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="; 32782 }, 32783 {} 32784 ], 32785 6: [ 32786 function(require2, module2, exports2) { 32787 var data = require2("./dictionary-browser"); 32788 exports2.init = function() { 32789 exports2.dictionary = data.init(); 32790 }; 32791 exports2.offsetsByLength = new Uint32Array([ 32792 0, 32793 0, 32794 0, 32795 0, 32796 0, 32797 4096, 32798 9216, 32799 21504, 32800 35840, 32801 44032, 32802 53248, 32803 63488, 32804 74752, 32805 87040, 32806 93696, 32807 100864, 32808 104704, 32809 106752, 32810 108928, 32811 113536, 32812 115968, 32813 118528, 32814 119872, 32815 121280, 32816 122016 32817 ]); 32818 exports2.sizeBitsByLength = new Uint8Array([ 32819 0, 32820 0, 32821 0, 32822 0, 32823 10, 32824 10, 32825 11, 32826 11, 32827 10, 32828 10, 32829 10, 32830 10, 32831 10, 32832 9, 32833 9, 32834 8, 32835 7, 32836 7, 32837 8, 32838 7, 32839 7, 32840 6, 32841 6, 32842 5, 32843 5 32844 ]); 32845 exports2.minDictionaryWordLength = 4; 32846 exports2.maxDictionaryWordLength = 24; 32847 }, 32848 { "./dictionary-browser": 4 } 32849 ], 32850 7: [ 32851 function(require2, module2, exports2) { 32852 function HuffmanCode(bits, value) { 32853 this.bits = bits; 32854 this.value = value; 32855 } 32856 exports2.HuffmanCode = HuffmanCode; 32857 var MAX_LENGTH = 15; 32858 function GetNextKey(key, len) { 32859 var step = 1 << len - 1; 32860 while (key & step) { 32861 step >>= 1; 32862 } 32863 return (key & step - 1) + step; 32864 } 32865 function ReplicateValue(table, i, step, end, code) { 32866 do { 32867 end -= step; 32868 table[i + end] = new HuffmanCode( 32869 code.bits, 32870 code.value 32871 ); 32872 } while (end > 0); 32873 } 32874 function NextTableBitSize(count, len, root_bits) { 32875 var left = 1 << len - root_bits; 32876 while (len < MAX_LENGTH) { 32877 left -= count[len]; 32878 if (left <= 0) break; 32879 ++len; 32880 left <<= 1; 32881 } 32882 return len - root_bits; 32883 } 32884 exports2.BrotliBuildHuffmanTable = function(root_table, table, root_bits, code_lengths, code_lengths_size) { 32885 var start_table = table; 32886 var code; 32887 var len; 32888 var symbol; 32889 var key; 32890 var step; 32891 var low; 32892 var mask; 32893 var table_bits; 32894 var table_size; 32895 var total_size; 32896 var sorted; 32897 var count = new Int32Array( 32898 MAX_LENGTH + 1 32899 ); 32900 var offset4 = new Int32Array( 32901 MAX_LENGTH + 1 32902 ); 32903 sorted = new Int32Array(code_lengths_size); 32904 for (symbol = 0; symbol < code_lengths_size; symbol++) { 32905 count[code_lengths[symbol]]++; 32906 } 32907 offset4[1] = 0; 32908 for (len = 1; len < MAX_LENGTH; len++) { 32909 offset4[len + 1] = offset4[len] + count[len]; 32910 } 32911 for (symbol = 0; symbol < code_lengths_size; symbol++) { 32912 if (code_lengths[symbol] !== 0) { 32913 sorted[offset4[code_lengths[symbol]]++] = symbol; 32914 } 32915 } 32916 table_bits = root_bits; 32917 table_size = 1 << table_bits; 32918 total_size = table_size; 32919 if (offset4[MAX_LENGTH] === 1) { 32920 for (key = 0; key < total_size; ++key) { 32921 root_table[table + key] = new HuffmanCode( 32922 0, 32923 sorted[0] & 65535 32924 ); 32925 } 32926 return total_size; 32927 } 32928 key = 0; 32929 symbol = 0; 32930 for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) { 32931 for (; count[len] > 0; --count[len]) { 32932 code = new HuffmanCode( 32933 len & 255, 32934 sorted[symbol++] & 65535 32935 ); 32936 ReplicateValue( 32937 root_table, 32938 table + key, 32939 step, 32940 table_size, 32941 code 32942 ); 32943 key = GetNextKey(key, len); 32944 } 32945 } 32946 mask = total_size - 1; 32947 low = -1; 32948 for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) { 32949 for (; count[len] > 0; --count[len]) { 32950 if ((key & mask) !== low) { 32951 table += table_size; 32952 table_bits = NextTableBitSize( 32953 count, 32954 len, 32955 root_bits 32956 ); 32957 table_size = 1 << table_bits; 32958 total_size += table_size; 32959 low = key & mask; 32960 root_table[start_table + low] = new HuffmanCode( 32961 table_bits + root_bits & 255, 32962 table - start_table - low & 65535 32963 ); 32964 } 32965 code = new HuffmanCode( 32966 len - root_bits & 255, 32967 sorted[symbol++] & 65535 32968 ); 32969 ReplicateValue( 32970 root_table, 32971 table + (key >> root_bits), 32972 step, 32973 table_size, 32974 code 32975 ); 32976 key = GetNextKey(key, len); 32977 } 32978 } 32979 return total_size; 32980 }; 32981 }, 32982 {} 32983 ], 32984 8: [ 32985 function(require2, module2, exports2) { 32986 "use strict"; 32987 exports2.byteLength = byteLength; 32988 exports2.toByteArray = toByteArray; 32989 exports2.fromByteArray = fromByteArray; 32990 var lookup = []; 32991 var revLookup = []; 32992 var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array; 32993 var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 32994 for (var i = 0, len = code.length; i < len; ++i) { 32995 lookup[i] = code[i]; 32996 revLookup[code.charCodeAt(i)] = i; 32997 } 32998 revLookup["-".charCodeAt(0)] = 62; 32999 revLookup["_".charCodeAt(0)] = 63; 33000 function getLens(b64) { 33001 var len2 = b64.length; 33002 if (len2 % 4 > 0) { 33003 throw new Error( 33004 "Invalid string. Length must be a multiple of 4" 33005 ); 33006 } 33007 var validLen = b64.indexOf("="); 33008 if (validLen === -1) validLen = len2; 33009 var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4; 33010 return [validLen, placeHoldersLen]; 33011 } 33012 function byteLength(b64) { 33013 var lens = getLens(b64); 33014 var validLen = lens[0]; 33015 var placeHoldersLen = lens[1]; 33016 return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; 33017 } 33018 function _byteLength(b64, validLen, placeHoldersLen) { 33019 return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; 33020 } 33021 function toByteArray(b64) { 33022 var tmp; 33023 var lens = getLens(b64); 33024 var validLen = lens[0]; 33025 var placeHoldersLen = lens[1]; 33026 var arr = new Arr( 33027 _byteLength(b64, validLen, placeHoldersLen) 33028 ); 33029 var curByte = 0; 33030 var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen; 33031 for (var i2 = 0; i2 < len2; i2 += 4) { 33032 tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)]; 33033 arr[curByte++] = tmp >> 16 & 255; 33034 arr[curByte++] = tmp >> 8 & 255; 33035 arr[curByte++] = tmp & 255; 33036 } 33037 if (placeHoldersLen === 2) { 33038 tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4; 33039 arr[curByte++] = tmp & 255; 33040 } 33041 if (placeHoldersLen === 1) { 33042 tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2; 33043 arr[curByte++] = tmp >> 8 & 255; 33044 arr[curByte++] = tmp & 255; 33045 } 33046 return arr; 33047 } 33048 function tripletToBase64(num) { 33049 return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63]; 33050 } 33051 function encodeChunk(uint8, start, end) { 33052 var tmp; 33053 var output = []; 33054 for (var i2 = start; i2 < end; i2 += 3) { 33055 tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255); 33056 output.push(tripletToBase64(tmp)); 33057 } 33058 return output.join(""); 33059 } 33060 function fromByteArray(uint8) { 33061 var tmp; 33062 var len2 = uint8.length; 33063 var extraBytes = len2 % 3; 33064 var parts = []; 33065 var maxChunkLength = 16383; 33066 for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) { 33067 parts.push( 33068 encodeChunk( 33069 uint8, 33070 i2, 33071 i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength 33072 ) 33073 ); 33074 } 33075 if (extraBytes === 1) { 33076 tmp = uint8[len2 - 1]; 33077 parts.push( 33078 lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==" 33079 ); 33080 } else if (extraBytes === 2) { 33081 tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1]; 33082 parts.push( 33083 lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "=" 33084 ); 33085 } 33086 return parts.join(""); 33087 } 33088 }, 33089 {} 33090 ], 33091 9: [ 33092 function(require2, module2, exports2) { 33093 function PrefixCodeRange(offset4, nbits) { 33094 this.offset = offset4; 33095 this.nbits = nbits; 33096 } 33097 exports2.kBlockLengthPrefixCode = [ 33098 new PrefixCodeRange(1, 2), 33099 new PrefixCodeRange(5, 2), 33100 new PrefixCodeRange(9, 2), 33101 new PrefixCodeRange(13, 2), 33102 new PrefixCodeRange(17, 3), 33103 new PrefixCodeRange(25, 3), 33104 new PrefixCodeRange(33, 3), 33105 new PrefixCodeRange(41, 3), 33106 new PrefixCodeRange(49, 4), 33107 new PrefixCodeRange(65, 4), 33108 new PrefixCodeRange(81, 4), 33109 new PrefixCodeRange(97, 4), 33110 new PrefixCodeRange(113, 5), 33111 new PrefixCodeRange(145, 5), 33112 new PrefixCodeRange(177, 5), 33113 new PrefixCodeRange(209, 5), 33114 new PrefixCodeRange(241, 6), 33115 new PrefixCodeRange(305, 6), 33116 new PrefixCodeRange(369, 7), 33117 new PrefixCodeRange(497, 8), 33118 new PrefixCodeRange(753, 9), 33119 new PrefixCodeRange(1265, 10), 33120 new PrefixCodeRange(2289, 11), 33121 new PrefixCodeRange(4337, 12), 33122 new PrefixCodeRange(8433, 13), 33123 new PrefixCodeRange(16625, 24) 33124 ]; 33125 exports2.kInsertLengthPrefixCode = [ 33126 new PrefixCodeRange(0, 0), 33127 new PrefixCodeRange(1, 0), 33128 new PrefixCodeRange(2, 0), 33129 new PrefixCodeRange(3, 0), 33130 new PrefixCodeRange(4, 0), 33131 new PrefixCodeRange(5, 0), 33132 new PrefixCodeRange(6, 1), 33133 new PrefixCodeRange(8, 1), 33134 new PrefixCodeRange(10, 2), 33135 new PrefixCodeRange(14, 2), 33136 new PrefixCodeRange(18, 3), 33137 new PrefixCodeRange(26, 3), 33138 new PrefixCodeRange(34, 4), 33139 new PrefixCodeRange(50, 4), 33140 new PrefixCodeRange(66, 5), 33141 new PrefixCodeRange(98, 5), 33142 new PrefixCodeRange(130, 6), 33143 new PrefixCodeRange(194, 7), 33144 new PrefixCodeRange(322, 8), 33145 new PrefixCodeRange(578, 9), 33146 new PrefixCodeRange(1090, 10), 33147 new PrefixCodeRange(2114, 12), 33148 new PrefixCodeRange(6210, 14), 33149 new PrefixCodeRange(22594, 24) 33150 ]; 33151 exports2.kCopyLengthPrefixCode = [ 33152 new PrefixCodeRange(2, 0), 33153 new PrefixCodeRange(3, 0), 33154 new PrefixCodeRange(4, 0), 33155 new PrefixCodeRange(5, 0), 33156 new PrefixCodeRange(6, 0), 33157 new PrefixCodeRange(7, 0), 33158 new PrefixCodeRange(8, 0), 33159 new PrefixCodeRange(9, 0), 33160 new PrefixCodeRange(10, 1), 33161 new PrefixCodeRange(12, 1), 33162 new PrefixCodeRange(14, 2), 33163 new PrefixCodeRange(18, 2), 33164 new PrefixCodeRange(22, 3), 33165 new PrefixCodeRange(30, 3), 33166 new PrefixCodeRange(38, 4), 33167 new PrefixCodeRange(54, 4), 33168 new PrefixCodeRange(70, 5), 33169 new PrefixCodeRange(102, 5), 33170 new PrefixCodeRange(134, 6), 33171 new PrefixCodeRange(198, 7), 33172 new PrefixCodeRange(326, 8), 33173 new PrefixCodeRange(582, 9), 33174 new PrefixCodeRange(1094, 10), 33175 new PrefixCodeRange(2118, 24) 33176 ]; 33177 exports2.kInsertRangeLut = [0, 0, 8, 8, 0, 16, 8, 16, 16]; 33178 exports2.kCopyRangeLut = [0, 8, 0, 8, 16, 0, 16, 8, 16]; 33179 }, 33180 {} 33181 ], 33182 10: [ 33183 function(require2, module2, exports2) { 33184 function BrotliInput(buffer) { 33185 this.buffer = buffer; 33186 this.pos = 0; 33187 } 33188 BrotliInput.prototype.read = function(buf, i, count) { 33189 if (this.pos + count > this.buffer.length) { 33190 count = this.buffer.length - this.pos; 33191 } 33192 for (var p3 = 0; p3 < count; p3++) 33193 buf[i + p3] = this.buffer[this.pos + p3]; 33194 this.pos += count; 33195 return count; 33196 }; 33197 exports2.BrotliInput = BrotliInput; 33198 function BrotliOutput(buf) { 33199 this.buffer = buf; 33200 this.pos = 0; 33201 } 33202 BrotliOutput.prototype.write = function(buf, count) { 33203 if (this.pos + count > this.buffer.length) 33204 throw new Error( 33205 "Output buffer is not large enough" 33206 ); 33207 this.buffer.set(buf.subarray(0, count), this.pos); 33208 this.pos += count; 33209 return count; 33210 }; 33211 exports2.BrotliOutput = BrotliOutput; 33212 }, 33213 {} 33214 ], 33215 11: [ 33216 function(require2, module2, exports2) { 33217 var BrotliDictionary = require2("./dictionary"); 33218 var kIdentity = 0; 33219 var kOmitLast1 = 1; 33220 var kOmitLast2 = 2; 33221 var kOmitLast3 = 3; 33222 var kOmitLast4 = 4; 33223 var kOmitLast5 = 5; 33224 var kOmitLast6 = 6; 33225 var kOmitLast7 = 7; 33226 var kOmitLast8 = 8; 33227 var kOmitLast9 = 9; 33228 var kUppercaseFirst = 10; 33229 var kUppercaseAll = 11; 33230 var kOmitFirst1 = 12; 33231 var kOmitFirst2 = 13; 33232 var kOmitFirst3 = 14; 33233 var kOmitFirst4 = 15; 33234 var kOmitFirst5 = 16; 33235 var kOmitFirst6 = 17; 33236 var kOmitFirst7 = 18; 33237 var kOmitFirst8 = 19; 33238 var kOmitFirst9 = 20; 33239 function Transform(prefix, transform, suffix) { 33240 this.prefix = new Uint8Array(prefix.length); 33241 this.transform = transform; 33242 this.suffix = new Uint8Array(suffix.length); 33243 for (var i = 0; i < prefix.length; i++) 33244 this.prefix[i] = prefix.charCodeAt(i); 33245 for (var i = 0; i < suffix.length; i++) 33246 this.suffix[i] = suffix.charCodeAt(i); 33247 } 33248 var kTransforms = [ 33249 new Transform("", kIdentity, ""), 33250 new Transform("", kIdentity, " "), 33251 new Transform(" ", kIdentity, " "), 33252 new Transform("", kOmitFirst1, ""), 33253 new Transform("", kUppercaseFirst, " "), 33254 new Transform("", kIdentity, " the "), 33255 new Transform(" ", kIdentity, ""), 33256 new Transform("s ", kIdentity, " "), 33257 new Transform("", kIdentity, " of "), 33258 new Transform("", kUppercaseFirst, ""), 33259 new Transform("", kIdentity, " and "), 33260 new Transform("", kOmitFirst2, ""), 33261 new Transform("", kOmitLast1, ""), 33262 new Transform(", ", kIdentity, " "), 33263 new Transform("", kIdentity, ", "), 33264 new Transform(" ", kUppercaseFirst, " "), 33265 new Transform("", kIdentity, " in "), 33266 new Transform("", kIdentity, " to "), 33267 new Transform("e ", kIdentity, " "), 33268 new Transform("", kIdentity, '"'), 33269 new Transform("", kIdentity, "."), 33270 new Transform("", kIdentity, '">'), 33271 new Transform("", kIdentity, "\n"), 33272 new Transform("", kOmitLast3, ""), 33273 new Transform("", kIdentity, "]"), 33274 new Transform("", kIdentity, " for "), 33275 new Transform("", kOmitFirst3, ""), 33276 new Transform("", kOmitLast2, ""), 33277 new Transform("", kIdentity, " a "), 33278 new Transform("", kIdentity, " that "), 33279 new Transform(" ", kUppercaseFirst, ""), 33280 new Transform("", kIdentity, ". "), 33281 new Transform(".", kIdentity, ""), 33282 new Transform(" ", kIdentity, ", "), 33283 new Transform("", kOmitFirst4, ""), 33284 new Transform("", kIdentity, " with "), 33285 new Transform("", kIdentity, "'"), 33286 new Transform("", kIdentity, " from "), 33287 new Transform("", kIdentity, " by "), 33288 new Transform("", kOmitFirst5, ""), 33289 new Transform("", kOmitFirst6, ""), 33290 new Transform(" the ", kIdentity, ""), 33291 new Transform("", kOmitLast4, ""), 33292 new Transform("", kIdentity, ". The "), 33293 new Transform("", kUppercaseAll, ""), 33294 new Transform("", kIdentity, " on "), 33295 new Transform("", kIdentity, " as "), 33296 new Transform("", kIdentity, " is "), 33297 new Transform("", kOmitLast7, ""), 33298 new Transform("", kOmitLast1, "ing "), 33299 new Transform("", kIdentity, "\n "), 33300 new Transform("", kIdentity, ":"), 33301 new Transform(" ", kIdentity, ". "), 33302 new Transform("", kIdentity, "ed "), 33303 new Transform("", kOmitFirst9, ""), 33304 new Transform("", kOmitFirst7, ""), 33305 new Transform("", kOmitLast6, ""), 33306 new Transform("", kIdentity, "("), 33307 new Transform("", kUppercaseFirst, ", "), 33308 new Transform("", kOmitLast8, ""), 33309 new Transform("", kIdentity, " at "), 33310 new Transform("", kIdentity, "ly "), 33311 new Transform(" the ", kIdentity, " of "), 33312 new Transform("", kOmitLast5, ""), 33313 new Transform("", kOmitLast9, ""), 33314 new Transform(" ", kUppercaseFirst, ", "), 33315 new Transform("", kUppercaseFirst, '"'), 33316 new Transform(".", kIdentity, "("), 33317 new Transform("", kUppercaseAll, " "), 33318 new Transform("", kUppercaseFirst, '">'), 33319 new Transform("", kIdentity, '="'), 33320 new Transform(" ", kIdentity, "."), 33321 new Transform(".com/", kIdentity, ""), 33322 new Transform(" the ", kIdentity, " of the "), 33323 new Transform("", kUppercaseFirst, "'"), 33324 new Transform("", kIdentity, ". This "), 33325 new Transform("", kIdentity, ","), 33326 new Transform(".", kIdentity, " "), 33327 new Transform("", kUppercaseFirst, "("), 33328 new Transform("", kUppercaseFirst, "."), 33329 new Transform("", kIdentity, " not "), 33330 new Transform(" ", kIdentity, '="'), 33331 new Transform("", kIdentity, "er "), 33332 new Transform(" ", kUppercaseAll, " "), 33333 new Transform("", kIdentity, "al "), 33334 new Transform(" ", kUppercaseAll, ""), 33335 new Transform("", kIdentity, "='"), 33336 new Transform("", kUppercaseAll, '"'), 33337 new Transform("", kUppercaseFirst, ". "), 33338 new Transform(" ", kIdentity, "("), 33339 new Transform("", kIdentity, "ful "), 33340 new Transform(" ", kUppercaseFirst, ". "), 33341 new Transform("", kIdentity, "ive "), 33342 new Transform("", kIdentity, "less "), 33343 new Transform("", kUppercaseAll, "'"), 33344 new Transform("", kIdentity, "est "), 33345 new Transform(" ", kUppercaseFirst, "."), 33346 new Transform("", kUppercaseAll, '">'), 33347 new Transform(" ", kIdentity, "='"), 33348 new Transform("", kUppercaseFirst, ","), 33349 new Transform("", kIdentity, "ize "), 33350 new Transform("", kUppercaseAll, "."), 33351 new Transform("\xC2\xA0", kIdentity, ""), 33352 new Transform(" ", kIdentity, ","), 33353 new Transform("", kUppercaseFirst, '="'), 33354 new Transform("", kUppercaseAll, '="'), 33355 new Transform("", kIdentity, "ous "), 33356 new Transform("", kUppercaseAll, ", "), 33357 new Transform("", kUppercaseFirst, "='"), 33358 new Transform(" ", kUppercaseFirst, ","), 33359 new Transform(" ", kUppercaseAll, '="'), 33360 new Transform(" ", kUppercaseAll, ", "), 33361 new Transform("", kUppercaseAll, ","), 33362 new Transform("", kUppercaseAll, "("), 33363 new Transform("", kUppercaseAll, ". "), 33364 new Transform(" ", kUppercaseAll, "."), 33365 new Transform("", kUppercaseAll, "='"), 33366 new Transform(" ", kUppercaseAll, ". "), 33367 new Transform(" ", kUppercaseFirst, '="'), 33368 new Transform(" ", kUppercaseAll, "='"), 33369 new Transform(" ", kUppercaseFirst, "='") 33370 ]; 33371 exports2.kTransforms = kTransforms; 33372 exports2.kNumTransforms = kTransforms.length; 33373 function ToUpperCase(p3, i) { 33374 if (p3[i] < 192) { 33375 if (p3[i] >= 97 && p3[i] <= 122) { 33376 p3[i] ^= 32; 33377 } 33378 return 1; 33379 } 33380 if (p3[i] < 224) { 33381 p3[i + 1] ^= 32; 33382 return 2; 33383 } 33384 p3[i + 2] ^= 5; 33385 return 3; 33386 } 33387 exports2.transformDictionaryWord = function(dst, idx, word, len, transform) { 33388 var prefix = kTransforms[transform].prefix; 33389 var suffix = kTransforms[transform].suffix; 33390 var t = kTransforms[transform].transform; 33391 var skip = t < kOmitFirst1 ? 0 : t - (kOmitFirst1 - 1); 33392 var i = 0; 33393 var start_idx = idx; 33394 var uppercase; 33395 if (skip > len) { 33396 skip = len; 33397 } 33398 var prefix_pos = 0; 33399 while (prefix_pos < prefix.length) { 33400 dst[idx++] = prefix[prefix_pos++]; 33401 } 33402 word += skip; 33403 len -= skip; 33404 if (t <= kOmitLast9) { 33405 len -= t; 33406 } 33407 for (i = 0; i < len; i++) { 33408 dst[idx++] = BrotliDictionary.dictionary[word + i]; 33409 } 33410 uppercase = idx - len; 33411 if (t === kUppercaseFirst) { 33412 ToUpperCase(dst, uppercase); 33413 } else if (t === kUppercaseAll) { 33414 while (len > 0) { 33415 var step = ToUpperCase(dst, uppercase); 33416 uppercase += step; 33417 len -= step; 33418 } 33419 } 33420 var suffix_pos = 0; 33421 while (suffix_pos < suffix.length) { 33422 dst[idx++] = suffix[suffix_pos++]; 33423 } 33424 return idx - start_idx; 33425 }; 33426 }, 33427 { "./dictionary": 6 } 33428 ], 33429 12: [ 33430 function(require2, module2, exports2) { 33431 module2.exports = require2("./dec/decode").BrotliDecompressBuffer; 33432 }, 33433 { "./dec/decode": 3 } 33434 ] 33435 }, 33436 {}, 33437 [12] 33438 )(12); 33439 })(); 33440 33441 // packages/global-styles-ui/build-module/font-library/lib/inflate.mjs 33442 var __require3 = /* @__PURE__ */ ((x2) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x2, { 33443 get: (a, b) => (typeof __require !== "undefined" ? __require : a)[b] 33444 }) : x2)(function(x2) { 33445 if (typeof __require !== "undefined") return __require.apply(this, arguments); 33446 throw Error('Dynamic require of "' + x2 + '" is not supported'); 33447 }); 33448 var inflate_default = (function() { 33449 var define, module, exports; 33450 return (/* @__PURE__ */ (function() { 33451 function r2(e, n, t) { 33452 function o(i2, f) { 33453 if (!n[i2]) { 33454 if (!e[i2]) { 33455 var c2 = "function" == typeof __require3 && __require3; 33456 if (!f && c2) return c2(i2, true); 33457 if (u) return u(i2, true); 33458 var a = new Error("Cannot find module '" + i2 + "'"); 33459 throw a.code = "MODULE_NOT_FOUND", a; 33460 } 33461 var p3 = n[i2] = { exports: {} }; 33462 e[i2][0].call( 33463 p3.exports, 33464 function(r22) { 33465 var n2 = e[i2][1][r22]; 33466 return o(n2 || r22); 33467 }, 33468 p3, 33469 p3.exports, 33470 r2, 33471 e, 33472 n, 33473 t 33474 ); 33475 } 33476 return n[i2].exports; 33477 } 33478 for (var u = "function" == typeof __require3 && __require3, i = 0; i < t.length; i++) 33479 o(t[i]); 33480 return o; 33481 } 33482 return r2; 33483 })())( 33484 { 33485 1: [ 33486 function(require2, module2, exports2) { 33487 "use strict"; 33488 var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined"; 33489 function _has(obj, key) { 33490 return Object.prototype.hasOwnProperty.call(obj, key); 33491 } 33492 exports2.assign = function(obj) { 33493 var sources = Array.prototype.slice.call( 33494 arguments, 33495 1 33496 ); 33497 while (sources.length) { 33498 var source = sources.shift(); 33499 if (!source) { 33500 continue; 33501 } 33502 if (typeof source !== "object") { 33503 throw new TypeError( 33504 source + "must be non-object" 33505 ); 33506 } 33507 for (var p3 in source) { 33508 if (_has(source, p3)) { 33509 obj[p3] = source[p3]; 33510 } 33511 } 33512 } 33513 return obj; 33514 }; 33515 exports2.shrinkBuf = function(buf, size4) { 33516 if (buf.length === size4) { 33517 return buf; 33518 } 33519 if (buf.subarray) { 33520 return buf.subarray(0, size4); 33521 } 33522 buf.length = size4; 33523 return buf; 33524 }; 33525 var fnTyped = { 33526 arraySet: function(dest, src, src_offs, len, dest_offs) { 33527 if (src.subarray && dest.subarray) { 33528 dest.set( 33529 src.subarray(src_offs, src_offs + len), 33530 dest_offs 33531 ); 33532 return; 33533 } 33534 for (var i = 0; i < len; i++) { 33535 dest[dest_offs + i] = src[src_offs + i]; 33536 } 33537 }, 33538 // Join array of chunks to single array. 33539 flattenChunks: function(chunks) { 33540 var i, l2, len, pos, chunk, result; 33541 len = 0; 33542 for (i = 0, l2 = chunks.length; i < l2; i++) { 33543 len += chunks[i].length; 33544 } 33545 result = new Uint8Array(len); 33546 pos = 0; 33547 for (i = 0, l2 = chunks.length; i < l2; i++) { 33548 chunk = chunks[i]; 33549 result.set(chunk, pos); 33550 pos += chunk.length; 33551 } 33552 return result; 33553 } 33554 }; 33555 var fnUntyped = { 33556 arraySet: function(dest, src, src_offs, len, dest_offs) { 33557 for (var i = 0; i < len; i++) { 33558 dest[dest_offs + i] = src[src_offs + i]; 33559 } 33560 }, 33561 // Join array of chunks to single array. 33562 flattenChunks: function(chunks) { 33563 return [].concat.apply([], chunks); 33564 } 33565 }; 33566 exports2.setTyped = function(on) { 33567 if (on) { 33568 exports2.Buf8 = Uint8Array; 33569 exports2.Buf16 = Uint16Array; 33570 exports2.Buf32 = Int32Array; 33571 exports2.assign(exports2, fnTyped); 33572 } else { 33573 exports2.Buf8 = Array; 33574 exports2.Buf16 = Array; 33575 exports2.Buf32 = Array; 33576 exports2.assign(exports2, fnUntyped); 33577 } 33578 }; 33579 exports2.setTyped(TYPED_OK); 33580 }, 33581 {} 33582 ], 33583 2: [ 33584 function(require2, module2, exports2) { 33585 "use strict"; 33586 var utils = require2("./common"); 33587 var STR_APPLY_OK = true; 33588 var STR_APPLY_UIA_OK = true; 33589 try { 33590 String.fromCharCode.apply(null, [0]); 33591 } catch (__53) { 33592 STR_APPLY_OK = false; 33593 } 33594 try { 33595 String.fromCharCode.apply(null, new Uint8Array(1)); 33596 } catch (__53) { 33597 STR_APPLY_UIA_OK = false; 33598 } 33599 var _utf8len = new utils.Buf8(256); 33600 for (var q2 = 0; q2 < 256; q2++) { 33601 _utf8len[q2] = q2 >= 252 ? 6 : q2 >= 248 ? 5 : q2 >= 240 ? 4 : q2 >= 224 ? 3 : q2 >= 192 ? 2 : 1; 33602 } 33603 _utf8len[254] = _utf8len[254] = 1; 33604 exports2.string2buf = function(str) { 33605 var buf, c2, c22, m_pos, i, str_len = str.length, buf_len = 0; 33606 for (m_pos = 0; m_pos < str_len; m_pos++) { 33607 c2 = str.charCodeAt(m_pos); 33608 if ((c2 & 64512) === 55296 && m_pos + 1 < str_len) { 33609 c22 = str.charCodeAt(m_pos + 1); 33610 if ((c22 & 64512) === 56320) { 33611 c2 = 65536 + (c2 - 55296 << 10) + (c22 - 56320); 33612 m_pos++; 33613 } 33614 } 33615 buf_len += c2 < 128 ? 1 : c2 < 2048 ? 2 : c2 < 65536 ? 3 : 4; 33616 } 33617 buf = new utils.Buf8(buf_len); 33618 for (i = 0, m_pos = 0; i < buf_len; m_pos++) { 33619 c2 = str.charCodeAt(m_pos); 33620 if ((c2 & 64512) === 55296 && m_pos + 1 < str_len) { 33621 c22 = str.charCodeAt(m_pos + 1); 33622 if ((c22 & 64512) === 56320) { 33623 c2 = 65536 + (c2 - 55296 << 10) + (c22 - 56320); 33624 m_pos++; 33625 } 33626 } 33627 if (c2 < 128) { 33628 buf[i++] = c2; 33629 } else if (c2 < 2048) { 33630 buf[i++] = 192 | c2 >>> 6; 33631 buf[i++] = 128 | c2 & 63; 33632 } else if (c2 < 65536) { 33633 buf[i++] = 224 | c2 >>> 12; 33634 buf[i++] = 128 | c2 >>> 6 & 63; 33635 buf[i++] = 128 | c2 & 63; 33636 } else { 33637 buf[i++] = 240 | c2 >>> 18; 33638 buf[i++] = 128 | c2 >>> 12 & 63; 33639 buf[i++] = 128 | c2 >>> 6 & 63; 33640 buf[i++] = 128 | c2 & 63; 33641 } 33642 } 33643 return buf; 33644 }; 33645 function buf2binstring(buf, len) { 33646 if (len < 65534) { 33647 if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) { 33648 return String.fromCharCode.apply( 33649 null, 33650 utils.shrinkBuf(buf, len) 33651 ); 33652 } 33653 } 33654 var result = ""; 33655 for (var i = 0; i < len; i++) { 33656 result += String.fromCharCode(buf[i]); 33657 } 33658 return result; 33659 } 33660 exports2.buf2binstring = function(buf) { 33661 return buf2binstring(buf, buf.length); 33662 }; 33663 exports2.binstring2buf = function(str) { 33664 var buf = new utils.Buf8(str.length); 33665 for (var i = 0, len = buf.length; i < len; i++) { 33666 buf[i] = str.charCodeAt(i); 33667 } 33668 return buf; 33669 }; 33670 exports2.buf2string = function(buf, max2) { 33671 var i, out, c2, c_len; 33672 var len = max2 || buf.length; 33673 var utf16buf = new Array(len * 2); 33674 for (out = 0, i = 0; i < len; ) { 33675 c2 = buf[i++]; 33676 if (c2 < 128) { 33677 utf16buf[out++] = c2; 33678 continue; 33679 } 33680 c_len = _utf8len[c2]; 33681 if (c_len > 4) { 33682 utf16buf[out++] = 65533; 33683 i += c_len - 1; 33684 continue; 33685 } 33686 c2 &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7; 33687 while (c_len > 1 && i < len) { 33688 c2 = c2 << 6 | buf[i++] & 63; 33689 c_len--; 33690 } 33691 if (c_len > 1) { 33692 utf16buf[out++] = 65533; 33693 continue; 33694 } 33695 if (c2 < 65536) { 33696 utf16buf[out++] = c2; 33697 } else { 33698 c2 -= 65536; 33699 utf16buf[out++] = 55296 | c2 >> 10 & 1023; 33700 utf16buf[out++] = 56320 | c2 & 1023; 33701 } 33702 } 33703 return buf2binstring(utf16buf, out); 33704 }; 33705 exports2.utf8border = function(buf, max2) { 33706 var pos; 33707 max2 = max2 || buf.length; 33708 if (max2 > buf.length) { 33709 max2 = buf.length; 33710 } 33711 pos = max2 - 1; 33712 while (pos >= 0 && (buf[pos] & 192) === 128) { 33713 pos--; 33714 } 33715 if (pos < 0) { 33716 return max2; 33717 } 33718 if (pos === 0) { 33719 return max2; 33720 } 33721 return pos + _utf8len[buf[pos]] > max2 ? pos : max2; 33722 }; 33723 }, 33724 { "./common": 1 } 33725 ], 33726 3: [ 33727 function(require2, module2, exports2) { 33728 "use strict"; 33729 function adler32(adler, buf, len, pos) { 33730 var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0; 33731 while (len !== 0) { 33732 n = len > 2e3 ? 2e3 : len; 33733 len -= n; 33734 do { 33735 s1 = s1 + buf[pos++] | 0; 33736 s2 = s2 + s1 | 0; 33737 } while (--n); 33738 s1 %= 65521; 33739 s2 %= 65521; 33740 } 33741 return s1 | s2 << 16 | 0; 33742 } 33743 module2.exports = adler32; 33744 }, 33745 {} 33746 ], 33747 4: [ 33748 function(require2, module2, exports2) { 33749 "use strict"; 33750 module2.exports = { 33751 /* Allowed flush values; see deflate() and inflate() below for details */ 33752 Z_NO_FLUSH: 0, 33753 Z_PARTIAL_FLUSH: 1, 33754 Z_SYNC_FLUSH: 2, 33755 Z_FULL_FLUSH: 3, 33756 Z_FINISH: 4, 33757 Z_BLOCK: 5, 33758 Z_TREES: 6, 33759 /* Return codes for the compression/decompression functions. Negative values 33760 * are errors, positive values are used for special but normal events. 33761 */ 33762 Z_OK: 0, 33763 Z_STREAM_END: 1, 33764 Z_NEED_DICT: 2, 33765 Z_ERRNO: -1, 33766 Z_STREAM_ERROR: -2, 33767 Z_DATA_ERROR: -3, 33768 //Z_MEM_ERROR: -4, 33769 Z_BUF_ERROR: -5, 33770 //Z_VERSION_ERROR: -6, 33771 /* compression levels */ 33772 Z_NO_COMPRESSION: 0, 33773 Z_BEST_SPEED: 1, 33774 Z_BEST_COMPRESSION: 9, 33775 Z_DEFAULT_COMPRESSION: -1, 33776 Z_FILTERED: 1, 33777 Z_HUFFMAN_ONLY: 2, 33778 Z_RLE: 3, 33779 Z_FIXED: 4, 33780 Z_DEFAULT_STRATEGY: 0, 33781 /* Possible values of the data_type field (though see inflate()) */ 33782 Z_BINARY: 0, 33783 Z_TEXT: 1, 33784 //Z_ASCII: 1, // = Z_TEXT (deprecated) 33785 Z_UNKNOWN: 2, 33786 /* The deflate compression method */ 33787 Z_DEFLATED: 8 33788 //Z_NULL: null // Use -1 or null inline, depending on var type 33789 }; 33790 }, 33791 {} 33792 ], 33793 5: [ 33794 function(require2, module2, exports2) { 33795 "use strict"; 33796 function makeTable() { 33797 var c2, table = []; 33798 for (var n = 0; n < 256; n++) { 33799 c2 = n; 33800 for (var k2 = 0; k2 < 8; k2++) { 33801 c2 = c2 & 1 ? 3988292384 ^ c2 >>> 1 : c2 >>> 1; 33802 } 33803 table[n] = c2; 33804 } 33805 return table; 33806 } 33807 var crcTable = makeTable(); 33808 function crc32(crc, buf, len, pos) { 33809 var t = crcTable, end = pos + len; 33810 crc ^= -1; 33811 for (var i = pos; i < end; i++) { 33812 crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255]; 33813 } 33814 return crc ^ -1; 33815 } 33816 module2.exports = crc32; 33817 }, 33818 {} 33819 ], 33820 6: [ 33821 function(require2, module2, exports2) { 33822 "use strict"; 33823 function GZheader() { 33824 this.text = 0; 33825 this.time = 0; 33826 this.xflags = 0; 33827 this.os = 0; 33828 this.extra = null; 33829 this.extra_len = 0; 33830 this.name = ""; 33831 this.comment = ""; 33832 this.hcrc = 0; 33833 this.done = false; 33834 } 33835 module2.exports = GZheader; 33836 }, 33837 {} 33838 ], 33839 7: [ 33840 function(require2, module2, exports2) { 33841 "use strict"; 33842 var BAD = 30; 33843 var TYPE = 12; 33844 module2.exports = function inflate_fast(strm, start) { 33845 var state; 33846 var _in; 33847 var last; 33848 var _out; 33849 var beg; 33850 var end; 33851 var dmax; 33852 var wsize; 33853 var whave; 33854 var wnext; 33855 var s_window; 33856 var hold; 33857 var bits; 33858 var lcode; 33859 var dcode; 33860 var lmask; 33861 var dmask; 33862 var here; 33863 var op; 33864 var len; 33865 var dist; 33866 var from; 33867 var from_source; 33868 var input, output; 33869 state = strm.state; 33870 _in = strm.next_in; 33871 input = strm.input; 33872 last = _in + (strm.avail_in - 5); 33873 _out = strm.next_out; 33874 output = strm.output; 33875 beg = _out - (start - strm.avail_out); 33876 end = _out + (strm.avail_out - 257); 33877 dmax = state.dmax; 33878 wsize = state.wsize; 33879 whave = state.whave; 33880 wnext = state.wnext; 33881 s_window = state.window; 33882 hold = state.hold; 33883 bits = state.bits; 33884 lcode = state.lencode; 33885 dcode = state.distcode; 33886 lmask = (1 << state.lenbits) - 1; 33887 dmask = (1 << state.distbits) - 1; 33888 top: do { 33889 if (bits < 15) { 33890 hold += input[_in++] << bits; 33891 bits += 8; 33892 hold += input[_in++] << bits; 33893 bits += 8; 33894 } 33895 here = lcode[hold & lmask]; 33896 dolen: for (; ; ) { 33897 op = here >>> 24; 33898 hold >>>= op; 33899 bits -= op; 33900 op = here >>> 16 & 255; 33901 if (op === 0) { 33902 output[_out++] = here & 65535; 33903 } else if (op & 16) { 33904 len = here & 65535; 33905 op &= 15; 33906 if (op) { 33907 if (bits < op) { 33908 hold += input[_in++] << bits; 33909 bits += 8; 33910 } 33911 len += hold & (1 << op) - 1; 33912 hold >>>= op; 33913 bits -= op; 33914 } 33915 if (bits < 15) { 33916 hold += input[_in++] << bits; 33917 bits += 8; 33918 hold += input[_in++] << bits; 33919 bits += 8; 33920 } 33921 here = dcode[hold & dmask]; 33922 dodist: for (; ; ) { 33923 op = here >>> 24; 33924 hold >>>= op; 33925 bits -= op; 33926 op = here >>> 16 & 255; 33927 if (op & 16) { 33928 dist = here & 65535; 33929 op &= 15; 33930 if (bits < op) { 33931 hold += input[_in++] << bits; 33932 bits += 8; 33933 if (bits < op) { 33934 hold += input[_in++] << bits; 33935 bits += 8; 33936 } 33937 } 33938 dist += hold & (1 << op) - 1; 33939 if (dist > dmax) { 33940 strm.msg = "invalid distance too far back"; 33941 state.mode = BAD; 33942 break top; 33943 } 33944 hold >>>= op; 33945 bits -= op; 33946 op = _out - beg; 33947 if (dist > op) { 33948 op = dist - op; 33949 if (op > whave) { 33950 if (state.sane) { 33951 strm.msg = "invalid distance too far back"; 33952 state.mode = BAD; 33953 break top; 33954 } 33955 } 33956 from = 0; 33957 from_source = s_window; 33958 if (wnext === 0) { 33959 from += wsize - op; 33960 if (op < len) { 33961 len -= op; 33962 do { 33963 output[_out++] = s_window[from++]; 33964 } while (--op); 33965 from = _out - dist; 33966 from_source = output; 33967 } 33968 } else if (wnext < op) { 33969 from += wsize + wnext - op; 33970 op -= wnext; 33971 if (op < len) { 33972 len -= op; 33973 do { 33974 output[_out++] = s_window[from++]; 33975 } while (--op); 33976 from = 0; 33977 if (wnext < len) { 33978 op = wnext; 33979 len -= op; 33980 do { 33981 output[_out++] = s_window[from++]; 33982 } while (--op); 33983 from = _out - dist; 33984 from_source = output; 33985 } 33986 } 33987 } else { 33988 from += wnext - op; 33989 if (op < len) { 33990 len -= op; 33991 do { 33992 output[_out++] = s_window[from++]; 33993 } while (--op); 33994 from = _out - dist; 33995 from_source = output; 33996 } 33997 } 33998 while (len > 2) { 33999 output[_out++] = from_source[from++]; 34000 output[_out++] = from_source[from++]; 34001 output[_out++] = from_source[from++]; 34002 len -= 3; 34003 } 34004 if (len) { 34005 output[_out++] = from_source[from++]; 34006 if (len > 1) { 34007 output[_out++] = from_source[from++]; 34008 } 34009 } 34010 } else { 34011 from = _out - dist; 34012 do { 34013 output[_out++] = output[from++]; 34014 output[_out++] = output[from++]; 34015 output[_out++] = output[from++]; 34016 len -= 3; 34017 } while (len > 2); 34018 if (len) { 34019 output[_out++] = output[from++]; 34020 if (len > 1) { 34021 output[_out++] = output[from++]; 34022 } 34023 } 34024 } 34025 } else if ((op & 64) === 0) { 34026 here = dcode[(here & 65535) + (hold & (1 << op) - 1)]; 34027 continue dodist; 34028 } else { 34029 strm.msg = "invalid distance code"; 34030 state.mode = BAD; 34031 break top; 34032 } 34033 break; 34034 } 34035 } else if ((op & 64) === 0) { 34036 here = lcode[(here & 65535) + (hold & (1 << op) - 1)]; 34037 continue dolen; 34038 } else if (op & 32) { 34039 state.mode = TYPE; 34040 break top; 34041 } else { 34042 strm.msg = "invalid literal/length code"; 34043 state.mode = BAD; 34044 break top; 34045 } 34046 break; 34047 } 34048 } while (_in < last && _out < end); 34049 len = bits >> 3; 34050 _in -= len; 34051 bits -= len << 3; 34052 hold &= (1 << bits) - 1; 34053 strm.next_in = _in; 34054 strm.next_out = _out; 34055 strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last); 34056 strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end); 34057 state.hold = hold; 34058 state.bits = bits; 34059 return; 34060 }; 34061 }, 34062 {} 34063 ], 34064 8: [ 34065 function(require2, module2, exports2) { 34066 "use strict"; 34067 var utils = require2("../utils/common"); 34068 var adler32 = require2("./adler32"); 34069 var crc32 = require2("./crc32"); 34070 var inflate_fast = require2("./inffast"); 34071 var inflate_table = require2("./inftrees"); 34072 var CODES = 0; 34073 var LENS = 1; 34074 var DISTS = 2; 34075 var Z_FINISH = 4; 34076 var Z_BLOCK = 5; 34077 var Z_TREES = 6; 34078 var Z_OK = 0; 34079 var Z_STREAM_END = 1; 34080 var Z_NEED_DICT = 2; 34081 var Z_STREAM_ERROR = -2; 34082 var Z_DATA_ERROR = -3; 34083 var Z_MEM_ERROR = -4; 34084 var Z_BUF_ERROR = -5; 34085 var Z_DEFLATED = 8; 34086 var HEAD = 1; 34087 var FLAGS = 2; 34088 var TIME = 3; 34089 var OS = 4; 34090 var EXLEN = 5; 34091 var EXTRA = 6; 34092 var NAME = 7; 34093 var COMMENT = 8; 34094 var HCRC = 9; 34095 var DICTID = 10; 34096 var DICT = 11; 34097 var TYPE = 12; 34098 var TYPEDO = 13; 34099 var STORED = 14; 34100 var COPY_ = 15; 34101 var COPY = 16; 34102 var TABLE = 17; 34103 var LENLENS = 18; 34104 var CODELENS = 19; 34105 var LEN_ = 20; 34106 var LEN = 21; 34107 var LENEXT = 22; 34108 var DIST = 23; 34109 var DISTEXT = 24; 34110 var MATCH = 25; 34111 var LIT = 26; 34112 var CHECK = 27; 34113 var LENGTH = 28; 34114 var DONE = 29; 34115 var BAD = 30; 34116 var MEM = 31; 34117 var SYNC = 32; 34118 var ENOUGH_LENS = 852; 34119 var ENOUGH_DISTS = 592; 34120 var MAX_WBITS = 15; 34121 var DEF_WBITS = MAX_WBITS; 34122 function zswap32(q2) { 34123 return (q2 >>> 24 & 255) + (q2 >>> 8 & 65280) + ((q2 & 65280) << 8) + ((q2 & 255) << 24); 34124 } 34125 function InflateState() { 34126 this.mode = 0; 34127 this.last = false; 34128 this.wrap = 0; 34129 this.havedict = false; 34130 this.flags = 0; 34131 this.dmax = 0; 34132 this.check = 0; 34133 this.total = 0; 34134 this.head = null; 34135 this.wbits = 0; 34136 this.wsize = 0; 34137 this.whave = 0; 34138 this.wnext = 0; 34139 this.window = null; 34140 this.hold = 0; 34141 this.bits = 0; 34142 this.length = 0; 34143 this.offset = 0; 34144 this.extra = 0; 34145 this.lencode = null; 34146 this.distcode = null; 34147 this.lenbits = 0; 34148 this.distbits = 0; 34149 this.ncode = 0; 34150 this.nlen = 0; 34151 this.ndist = 0; 34152 this.have = 0; 34153 this.next = null; 34154 this.lens = new utils.Buf16( 34155 320 34156 ); 34157 this.work = new utils.Buf16( 34158 288 34159 ); 34160 this.lendyn = null; 34161 this.distdyn = null; 34162 this.sane = 0; 34163 this.back = 0; 34164 this.was = 0; 34165 } 34166 function inflateResetKeep(strm) { 34167 var state; 34168 if (!strm || !strm.state) { 34169 return Z_STREAM_ERROR; 34170 } 34171 state = strm.state; 34172 strm.total_in = strm.total_out = state.total = 0; 34173 strm.msg = ""; 34174 if (state.wrap) { 34175 strm.adler = state.wrap & 1; 34176 } 34177 state.mode = HEAD; 34178 state.last = 0; 34179 state.havedict = 0; 34180 state.dmax = 32768; 34181 state.head = null; 34182 state.hold = 0; 34183 state.bits = 0; 34184 state.lencode = state.lendyn = new utils.Buf32( 34185 ENOUGH_LENS 34186 ); 34187 state.distcode = state.distdyn = new utils.Buf32( 34188 ENOUGH_DISTS 34189 ); 34190 state.sane = 1; 34191 state.back = -1; 34192 return Z_OK; 34193 } 34194 function inflateReset(strm) { 34195 var state; 34196 if (!strm || !strm.state) { 34197 return Z_STREAM_ERROR; 34198 } 34199 state = strm.state; 34200 state.wsize = 0; 34201 state.whave = 0; 34202 state.wnext = 0; 34203 return inflateResetKeep(strm); 34204 } 34205 function inflateReset2(strm, windowBits) { 34206 var wrap; 34207 var state; 34208 if (!strm || !strm.state) { 34209 return Z_STREAM_ERROR; 34210 } 34211 state = strm.state; 34212 if (windowBits < 0) { 34213 wrap = 0; 34214 windowBits = -windowBits; 34215 } else { 34216 wrap = (windowBits >> 4) + 1; 34217 if (windowBits < 48) { 34218 windowBits &= 15; 34219 } 34220 } 34221 if (windowBits && (windowBits < 8 || windowBits > 15)) { 34222 return Z_STREAM_ERROR; 34223 } 34224 if (state.window !== null && state.wbits !== windowBits) { 34225 state.window = null; 34226 } 34227 state.wrap = wrap; 34228 state.wbits = windowBits; 34229 return inflateReset(strm); 34230 } 34231 function inflateInit2(strm, windowBits) { 34232 var ret; 34233 var state; 34234 if (!strm) { 34235 return Z_STREAM_ERROR; 34236 } 34237 state = new InflateState(); 34238 strm.state = state; 34239 state.window = null; 34240 ret = inflateReset2(strm, windowBits); 34241 if (ret !== Z_OK) { 34242 strm.state = null; 34243 } 34244 return ret; 34245 } 34246 function inflateInit(strm) { 34247 return inflateInit2(strm, DEF_WBITS); 34248 } 34249 var virgin = true; 34250 var lenfix, distfix; 34251 function fixedtables(state) { 34252 if (virgin) { 34253 var sym; 34254 lenfix = new utils.Buf32(512); 34255 distfix = new utils.Buf32(32); 34256 sym = 0; 34257 while (sym < 144) { 34258 state.lens[sym++] = 8; 34259 } 34260 while (sym < 256) { 34261 state.lens[sym++] = 9; 34262 } 34263 while (sym < 280) { 34264 state.lens[sym++] = 7; 34265 } 34266 while (sym < 288) { 34267 state.lens[sym++] = 8; 34268 } 34269 inflate_table( 34270 LENS, 34271 state.lens, 34272 0, 34273 288, 34274 lenfix, 34275 0, 34276 state.work, 34277 { bits: 9 } 34278 ); 34279 sym = 0; 34280 while (sym < 32) { 34281 state.lens[sym++] = 5; 34282 } 34283 inflate_table( 34284 DISTS, 34285 state.lens, 34286 0, 34287 32, 34288 distfix, 34289 0, 34290 state.work, 34291 { bits: 5 } 34292 ); 34293 virgin = false; 34294 } 34295 state.lencode = lenfix; 34296 state.lenbits = 9; 34297 state.distcode = distfix; 34298 state.distbits = 5; 34299 } 34300 function updatewindow(strm, src, end, copy) { 34301 var dist; 34302 var state = strm.state; 34303 if (state.window === null) { 34304 state.wsize = 1 << state.wbits; 34305 state.wnext = 0; 34306 state.whave = 0; 34307 state.window = new utils.Buf8(state.wsize); 34308 } 34309 if (copy >= state.wsize) { 34310 utils.arraySet( 34311 state.window, 34312 src, 34313 end - state.wsize, 34314 state.wsize, 34315 0 34316 ); 34317 state.wnext = 0; 34318 state.whave = state.wsize; 34319 } else { 34320 dist = state.wsize - state.wnext; 34321 if (dist > copy) { 34322 dist = copy; 34323 } 34324 utils.arraySet( 34325 state.window, 34326 src, 34327 end - copy, 34328 dist, 34329 state.wnext 34330 ); 34331 copy -= dist; 34332 if (copy) { 34333 utils.arraySet( 34334 state.window, 34335 src, 34336 end - copy, 34337 copy, 34338 0 34339 ); 34340 state.wnext = copy; 34341 state.whave = state.wsize; 34342 } else { 34343 state.wnext += dist; 34344 if (state.wnext === state.wsize) { 34345 state.wnext = 0; 34346 } 34347 if (state.whave < state.wsize) { 34348 state.whave += dist; 34349 } 34350 } 34351 } 34352 return 0; 34353 } 34354 function inflate(strm, flush) { 34355 var state; 34356 var input, output; 34357 var next; 34358 var put; 34359 var have, left; 34360 var hold; 34361 var bits; 34362 var _in, _out; 34363 var copy; 34364 var from; 34365 var from_source; 34366 var here = 0; 34367 var here_bits, here_op, here_val; 34368 var last_bits, last_op, last_val; 34369 var len; 34370 var ret; 34371 var hbuf = new utils.Buf8( 34372 4 34373 ); 34374 var opts; 34375 var n; 34376 var order = ( 34377 /* permutation of code lengths */ 34378 [ 34379 16, 34380 17, 34381 18, 34382 0, 34383 8, 34384 7, 34385 9, 34386 6, 34387 10, 34388 5, 34389 11, 34390 4, 34391 12, 34392 3, 34393 13, 34394 2, 34395 14, 34396 1, 34397 15 34398 ] 34399 ); 34400 if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) { 34401 return Z_STREAM_ERROR; 34402 } 34403 state = strm.state; 34404 if (state.mode === TYPE) { 34405 state.mode = TYPEDO; 34406 } 34407 put = strm.next_out; 34408 output = strm.output; 34409 left = strm.avail_out; 34410 next = strm.next_in; 34411 input = strm.input; 34412 have = strm.avail_in; 34413 hold = state.hold; 34414 bits = state.bits; 34415 _in = have; 34416 _out = left; 34417 ret = Z_OK; 34418 inf_leave: for (; ; ) { 34419 switch (state.mode) { 34420 case HEAD: 34421 if (state.wrap === 0) { 34422 state.mode = TYPEDO; 34423 break; 34424 } 34425 while (bits < 16) { 34426 if (have === 0) { 34427 break inf_leave; 34428 } 34429 have--; 34430 hold += input[next++] << bits; 34431 bits += 8; 34432 } 34433 if (state.wrap & 2 && hold === 35615) { 34434 state.check = 0; 34435 hbuf[0] = hold & 255; 34436 hbuf[1] = hold >>> 8 & 255; 34437 state.check = crc32( 34438 state.check, 34439 hbuf, 34440 2, 34441 0 34442 ); 34443 hold = 0; 34444 bits = 0; 34445 state.mode = FLAGS; 34446 break; 34447 } 34448 state.flags = 0; 34449 if (state.head) { 34450 state.head.done = false; 34451 } 34452 if (!(state.wrap & 1) || (((hold & 255) << 8) + (hold >> 8)) % 31) { 34453 strm.msg = "incorrect header check"; 34454 state.mode = BAD; 34455 break; 34456 } 34457 if ((hold & 15) !== Z_DEFLATED) { 34458 strm.msg = "unknown compression method"; 34459 state.mode = BAD; 34460 break; 34461 } 34462 hold >>>= 4; 34463 bits -= 4; 34464 len = (hold & 15) + 8; 34465 if (state.wbits === 0) { 34466 state.wbits = len; 34467 } else if (len > state.wbits) { 34468 strm.msg = "invalid window size"; 34469 state.mode = BAD; 34470 break; 34471 } 34472 state.dmax = 1 << len; 34473 strm.adler = state.check = 1; 34474 state.mode = hold & 512 ? DICTID : TYPE; 34475 hold = 0; 34476 bits = 0; 34477 break; 34478 case FLAGS: 34479 while (bits < 16) { 34480 if (have === 0) { 34481 break inf_leave; 34482 } 34483 have--; 34484 hold += input[next++] << bits; 34485 bits += 8; 34486 } 34487 state.flags = hold; 34488 if ((state.flags & 255) !== Z_DEFLATED) { 34489 strm.msg = "unknown compression method"; 34490 state.mode = BAD; 34491 break; 34492 } 34493 if (state.flags & 57344) { 34494 strm.msg = "unknown header flags set"; 34495 state.mode = BAD; 34496 break; 34497 } 34498 if (state.head) { 34499 state.head.text = hold >> 8 & 1; 34500 } 34501 if (state.flags & 512) { 34502 hbuf[0] = hold & 255; 34503 hbuf[1] = hold >>> 8 & 255; 34504 state.check = crc32( 34505 state.check, 34506 hbuf, 34507 2, 34508 0 34509 ); 34510 } 34511 hold = 0; 34512 bits = 0; 34513 state.mode = TIME; 34514 /* falls through */ 34515 case TIME: 34516 while (bits < 32) { 34517 if (have === 0) { 34518 break inf_leave; 34519 } 34520 have--; 34521 hold += input[next++] << bits; 34522 bits += 8; 34523 } 34524 if (state.head) { 34525 state.head.time = hold; 34526 } 34527 if (state.flags & 512) { 34528 hbuf[0] = hold & 255; 34529 hbuf[1] = hold >>> 8 & 255; 34530 hbuf[2] = hold >>> 16 & 255; 34531 hbuf[3] = hold >>> 24 & 255; 34532 state.check = crc32( 34533 state.check, 34534 hbuf, 34535 4, 34536 0 34537 ); 34538 } 34539 hold = 0; 34540 bits = 0; 34541 state.mode = OS; 34542 /* falls through */ 34543 case OS: 34544 while (bits < 16) { 34545 if (have === 0) { 34546 break inf_leave; 34547 } 34548 have--; 34549 hold += input[next++] << bits; 34550 bits += 8; 34551 } 34552 if (state.head) { 34553 state.head.xflags = hold & 255; 34554 state.head.os = hold >> 8; 34555 } 34556 if (state.flags & 512) { 34557 hbuf[0] = hold & 255; 34558 hbuf[1] = hold >>> 8 & 255; 34559 state.check = crc32( 34560 state.check, 34561 hbuf, 34562 2, 34563 0 34564 ); 34565 } 34566 hold = 0; 34567 bits = 0; 34568 state.mode = EXLEN; 34569 /* falls through */ 34570 case EXLEN: 34571 if (state.flags & 1024) { 34572 while (bits < 16) { 34573 if (have === 0) { 34574 break inf_leave; 34575 } 34576 have--; 34577 hold += input[next++] << bits; 34578 bits += 8; 34579 } 34580 state.length = hold; 34581 if (state.head) { 34582 state.head.extra_len = hold; 34583 } 34584 if (state.flags & 512) { 34585 hbuf[0] = hold & 255; 34586 hbuf[1] = hold >>> 8 & 255; 34587 state.check = crc32( 34588 state.check, 34589 hbuf, 34590 2, 34591 0 34592 ); 34593 } 34594 hold = 0; 34595 bits = 0; 34596 } else if (state.head) { 34597 state.head.extra = null; 34598 } 34599 state.mode = EXTRA; 34600 /* falls through */ 34601 case EXTRA: 34602 if (state.flags & 1024) { 34603 copy = state.length; 34604 if (copy > have) { 34605 copy = have; 34606 } 34607 if (copy) { 34608 if (state.head) { 34609 len = state.head.extra_len - state.length; 34610 if (!state.head.extra) { 34611 state.head.extra = new Array( 34612 state.head.extra_len 34613 ); 34614 } 34615 utils.arraySet( 34616 state.head.extra, 34617 input, 34618 next, 34619 // extra field is limited to 65536 bytes 34620 // - no need for additional size check 34621 copy, 34622 /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ 34623 len 34624 ); 34625 } 34626 if (state.flags & 512) { 34627 state.check = crc32( 34628 state.check, 34629 input, 34630 copy, 34631 next 34632 ); 34633 } 34634 have -= copy; 34635 next += copy; 34636 state.length -= copy; 34637 } 34638 if (state.length) { 34639 break inf_leave; 34640 } 34641 } 34642 state.length = 0; 34643 state.mode = NAME; 34644 /* falls through */ 34645 case NAME: 34646 if (state.flags & 2048) { 34647 if (have === 0) { 34648 break inf_leave; 34649 } 34650 copy = 0; 34651 do { 34652 len = input[next + copy++]; 34653 if (state.head && len && state.length < 65536) { 34654 state.head.name += String.fromCharCode(len); 34655 } 34656 } while (len && copy < have); 34657 if (state.flags & 512) { 34658 state.check = crc32( 34659 state.check, 34660 input, 34661 copy, 34662 next 34663 ); 34664 } 34665 have -= copy; 34666 next += copy; 34667 if (len) { 34668 break inf_leave; 34669 } 34670 } else if (state.head) { 34671 state.head.name = null; 34672 } 34673 state.length = 0; 34674 state.mode = COMMENT; 34675 /* falls through */ 34676 case COMMENT: 34677 if (state.flags & 4096) { 34678 if (have === 0) { 34679 break inf_leave; 34680 } 34681 copy = 0; 34682 do { 34683 len = input[next + copy++]; 34684 if (state.head && len && state.length < 65536) { 34685 state.head.comment += String.fromCharCode(len); 34686 } 34687 } while (len && copy < have); 34688 if (state.flags & 512) { 34689 state.check = crc32( 34690 state.check, 34691 input, 34692 copy, 34693 next 34694 ); 34695 } 34696 have -= copy; 34697 next += copy; 34698 if (len) { 34699 break inf_leave; 34700 } 34701 } else if (state.head) { 34702 state.head.comment = null; 34703 } 34704 state.mode = HCRC; 34705 /* falls through */ 34706 case HCRC: 34707 if (state.flags & 512) { 34708 while (bits < 16) { 34709 if (have === 0) { 34710 break inf_leave; 34711 } 34712 have--; 34713 hold += input[next++] << bits; 34714 bits += 8; 34715 } 34716 if (hold !== (state.check & 65535)) { 34717 strm.msg = "header crc mismatch"; 34718 state.mode = BAD; 34719 break; 34720 } 34721 hold = 0; 34722 bits = 0; 34723 } 34724 if (state.head) { 34725 state.head.hcrc = state.flags >> 9 & 1; 34726 state.head.done = true; 34727 } 34728 strm.adler = state.check = 0; 34729 state.mode = TYPE; 34730 break; 34731 case DICTID: 34732 while (bits < 32) { 34733 if (have === 0) { 34734 break inf_leave; 34735 } 34736 have--; 34737 hold += input[next++] << bits; 34738 bits += 8; 34739 } 34740 strm.adler = state.check = zswap32(hold); 34741 hold = 0; 34742 bits = 0; 34743 state.mode = DICT; 34744 /* falls through */ 34745 case DICT: 34746 if (state.havedict === 0) { 34747 strm.next_out = put; 34748 strm.avail_out = left; 34749 strm.next_in = next; 34750 strm.avail_in = have; 34751 state.hold = hold; 34752 state.bits = bits; 34753 return Z_NEED_DICT; 34754 } 34755 strm.adler = state.check = 1; 34756 state.mode = TYPE; 34757 /* falls through */ 34758 case TYPE: 34759 if (flush === Z_BLOCK || flush === Z_TREES) { 34760 break inf_leave; 34761 } 34762 /* falls through */ 34763 case TYPEDO: 34764 if (state.last) { 34765 hold >>>= bits & 7; 34766 bits -= bits & 7; 34767 state.mode = CHECK; 34768 break; 34769 } 34770 while (bits < 3) { 34771 if (have === 0) { 34772 break inf_leave; 34773 } 34774 have--; 34775 hold += input[next++] << bits; 34776 bits += 8; 34777 } 34778 state.last = hold & 1; 34779 hold >>>= 1; 34780 bits -= 1; 34781 switch (hold & 3) { 34782 case 0: 34783 state.mode = STORED; 34784 break; 34785 case 1: 34786 fixedtables(state); 34787 state.mode = LEN_; 34788 if (flush === Z_TREES) { 34789 hold >>>= 2; 34790 bits -= 2; 34791 break inf_leave; 34792 } 34793 break; 34794 case 2: 34795 state.mode = TABLE; 34796 break; 34797 case 3: 34798 strm.msg = "invalid block type"; 34799 state.mode = BAD; 34800 } 34801 hold >>>= 2; 34802 bits -= 2; 34803 break; 34804 case STORED: 34805 hold >>>= bits & 7; 34806 bits -= bits & 7; 34807 while (bits < 32) { 34808 if (have === 0) { 34809 break inf_leave; 34810 } 34811 have--; 34812 hold += input[next++] << bits; 34813 bits += 8; 34814 } 34815 if ((hold & 65535) !== (hold >>> 16 ^ 65535)) { 34816 strm.msg = "invalid stored block lengths"; 34817 state.mode = BAD; 34818 break; 34819 } 34820 state.length = hold & 65535; 34821 hold = 0; 34822 bits = 0; 34823 state.mode = COPY_; 34824 if (flush === Z_TREES) { 34825 break inf_leave; 34826 } 34827 /* falls through */ 34828 case COPY_: 34829 state.mode = COPY; 34830 /* falls through */ 34831 case COPY: 34832 copy = state.length; 34833 if (copy) { 34834 if (copy > have) { 34835 copy = have; 34836 } 34837 if (copy > left) { 34838 copy = left; 34839 } 34840 if (copy === 0) { 34841 break inf_leave; 34842 } 34843 utils.arraySet( 34844 output, 34845 input, 34846 next, 34847 copy, 34848 put 34849 ); 34850 have -= copy; 34851 next += copy; 34852 left -= copy; 34853 put += copy; 34854 state.length -= copy; 34855 break; 34856 } 34857 state.mode = TYPE; 34858 break; 34859 case TABLE: 34860 while (bits < 14) { 34861 if (have === 0) { 34862 break inf_leave; 34863 } 34864 have--; 34865 hold += input[next++] << bits; 34866 bits += 8; 34867 } 34868 state.nlen = (hold & 31) + 257; 34869 hold >>>= 5; 34870 bits -= 5; 34871 state.ndist = (hold & 31) + 1; 34872 hold >>>= 5; 34873 bits -= 5; 34874 state.ncode = (hold & 15) + 4; 34875 hold >>>= 4; 34876 bits -= 4; 34877 if (state.nlen > 286 || state.ndist > 30) { 34878 strm.msg = "too many length or distance symbols"; 34879 state.mode = BAD; 34880 break; 34881 } 34882 state.have = 0; 34883 state.mode = LENLENS; 34884 /* falls through */ 34885 case LENLENS: 34886 while (state.have < state.ncode) { 34887 while (bits < 3) { 34888 if (have === 0) { 34889 break inf_leave; 34890 } 34891 have--; 34892 hold += input[next++] << bits; 34893 bits += 8; 34894 } 34895 state.lens[order[state.have++]] = hold & 7; 34896 hold >>>= 3; 34897 bits -= 3; 34898 } 34899 while (state.have < 19) { 34900 state.lens[order[state.have++]] = 0; 34901 } 34902 state.lencode = state.lendyn; 34903 state.lenbits = 7; 34904 opts = { bits: state.lenbits }; 34905 ret = inflate_table( 34906 CODES, 34907 state.lens, 34908 0, 34909 19, 34910 state.lencode, 34911 0, 34912 state.work, 34913 opts 34914 ); 34915 state.lenbits = opts.bits; 34916 if (ret) { 34917 strm.msg = "invalid code lengths set"; 34918 state.mode = BAD; 34919 break; 34920 } 34921 state.have = 0; 34922 state.mode = CODELENS; 34923 /* falls through */ 34924 case CODELENS: 34925 while (state.have < state.nlen + state.ndist) { 34926 for (; ; ) { 34927 here = state.lencode[hold & (1 << state.lenbits) - 1]; 34928 here_bits = here >>> 24; 34929 here_op = here >>> 16 & 255; 34930 here_val = here & 65535; 34931 if (here_bits <= bits) { 34932 break; 34933 } 34934 if (have === 0) { 34935 break inf_leave; 34936 } 34937 have--; 34938 hold += input[next++] << bits; 34939 bits += 8; 34940 } 34941 if (here_val < 16) { 34942 hold >>>= here_bits; 34943 bits -= here_bits; 34944 state.lens[state.have++] = here_val; 34945 } else { 34946 if (here_val === 16) { 34947 n = here_bits + 2; 34948 while (bits < n) { 34949 if (have === 0) { 34950 break inf_leave; 34951 } 34952 have--; 34953 hold += input[next++] << bits; 34954 bits += 8; 34955 } 34956 hold >>>= here_bits; 34957 bits -= here_bits; 34958 if (state.have === 0) { 34959 strm.msg = "invalid bit length repeat"; 34960 state.mode = BAD; 34961 break; 34962 } 34963 len = state.lens[state.have - 1]; 34964 copy = 3 + (hold & 3); 34965 hold >>>= 2; 34966 bits -= 2; 34967 } else if (here_val === 17) { 34968 n = here_bits + 3; 34969 while (bits < n) { 34970 if (have === 0) { 34971 break inf_leave; 34972 } 34973 have--; 34974 hold += input[next++] << bits; 34975 bits += 8; 34976 } 34977 hold >>>= here_bits; 34978 bits -= here_bits; 34979 len = 0; 34980 copy = 3 + (hold & 7); 34981 hold >>>= 3; 34982 bits -= 3; 34983 } else { 34984 n = here_bits + 7; 34985 while (bits < n) { 34986 if (have === 0) { 34987 break inf_leave; 34988 } 34989 have--; 34990 hold += input[next++] << bits; 34991 bits += 8; 34992 } 34993 hold >>>= here_bits; 34994 bits -= here_bits; 34995 len = 0; 34996 copy = 11 + (hold & 127); 34997 hold >>>= 7; 34998 bits -= 7; 34999 } 35000 if (state.have + copy > state.nlen + state.ndist) { 35001 strm.msg = "invalid bit length repeat"; 35002 state.mode = BAD; 35003 break; 35004 } 35005 while (copy--) { 35006 state.lens[state.have++] = len; 35007 } 35008 } 35009 } 35010 if (state.mode === BAD) { 35011 break; 35012 } 35013 if (state.lens[256] === 0) { 35014 strm.msg = "invalid code -- missing end-of-block"; 35015 state.mode = BAD; 35016 break; 35017 } 35018 state.lenbits = 9; 35019 opts = { bits: state.lenbits }; 35020 ret = inflate_table( 35021 LENS, 35022 state.lens, 35023 0, 35024 state.nlen, 35025 state.lencode, 35026 0, 35027 state.work, 35028 opts 35029 ); 35030 state.lenbits = opts.bits; 35031 if (ret) { 35032 strm.msg = "invalid literal/lengths set"; 35033 state.mode = BAD; 35034 break; 35035 } 35036 state.distbits = 6; 35037 state.distcode = state.distdyn; 35038 opts = { bits: state.distbits }; 35039 ret = inflate_table( 35040 DISTS, 35041 state.lens, 35042 state.nlen, 35043 state.ndist, 35044 state.distcode, 35045 0, 35046 state.work, 35047 opts 35048 ); 35049 state.distbits = opts.bits; 35050 if (ret) { 35051 strm.msg = "invalid distances set"; 35052 state.mode = BAD; 35053 break; 35054 } 35055 state.mode = LEN_; 35056 if (flush === Z_TREES) { 35057 break inf_leave; 35058 } 35059 /* falls through */ 35060 case LEN_: 35061 state.mode = LEN; 35062 /* falls through */ 35063 case LEN: 35064 if (have >= 6 && left >= 258) { 35065 strm.next_out = put; 35066 strm.avail_out = left; 35067 strm.next_in = next; 35068 strm.avail_in = have; 35069 state.hold = hold; 35070 state.bits = bits; 35071 inflate_fast(strm, _out); 35072 put = strm.next_out; 35073 output = strm.output; 35074 left = strm.avail_out; 35075 next = strm.next_in; 35076 input = strm.input; 35077 have = strm.avail_in; 35078 hold = state.hold; 35079 bits = state.bits; 35080 if (state.mode === TYPE) { 35081 state.back = -1; 35082 } 35083 break; 35084 } 35085 state.back = 0; 35086 for (; ; ) { 35087 here = state.lencode[hold & (1 << state.lenbits) - 1]; 35088 here_bits = here >>> 24; 35089 here_op = here >>> 16 & 255; 35090 here_val = here & 65535; 35091 if (here_bits <= bits) { 35092 break; 35093 } 35094 if (have === 0) { 35095 break inf_leave; 35096 } 35097 have--; 35098 hold += input[next++] << bits; 35099 bits += 8; 35100 } 35101 if (here_op && (here_op & 240) === 0) { 35102 last_bits = here_bits; 35103 last_op = here_op; 35104 last_val = here_val; 35105 for (; ; ) { 35106 here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; 35107 here_bits = here >>> 24; 35108 here_op = here >>> 16 & 255; 35109 here_val = here & 65535; 35110 if (last_bits + here_bits <= bits) { 35111 break; 35112 } 35113 if (have === 0) { 35114 break inf_leave; 35115 } 35116 have--; 35117 hold += input[next++] << bits; 35118 bits += 8; 35119 } 35120 hold >>>= last_bits; 35121 bits -= last_bits; 35122 state.back += last_bits; 35123 } 35124 hold >>>= here_bits; 35125 bits -= here_bits; 35126 state.back += here_bits; 35127 state.length = here_val; 35128 if (here_op === 0) { 35129 state.mode = LIT; 35130 break; 35131 } 35132 if (here_op & 32) { 35133 state.back = -1; 35134 state.mode = TYPE; 35135 break; 35136 } 35137 if (here_op & 64) { 35138 strm.msg = "invalid literal/length code"; 35139 state.mode = BAD; 35140 break; 35141 } 35142 state.extra = here_op & 15; 35143 state.mode = LENEXT; 35144 /* falls through */ 35145 case LENEXT: 35146 if (state.extra) { 35147 n = state.extra; 35148 while (bits < n) { 35149 if (have === 0) { 35150 break inf_leave; 35151 } 35152 have--; 35153 hold += input[next++] << bits; 35154 bits += 8; 35155 } 35156 state.length += hold & (1 << state.extra) - 1; 35157 hold >>>= state.extra; 35158 bits -= state.extra; 35159 state.back += state.extra; 35160 } 35161 state.was = state.length; 35162 state.mode = DIST; 35163 /* falls through */ 35164 case DIST: 35165 for (; ; ) { 35166 here = state.distcode[hold & (1 << state.distbits) - 1]; 35167 here_bits = here >>> 24; 35168 here_op = here >>> 16 & 255; 35169 here_val = here & 65535; 35170 if (here_bits <= bits) { 35171 break; 35172 } 35173 if (have === 0) { 35174 break inf_leave; 35175 } 35176 have--; 35177 hold += input[next++] << bits; 35178 bits += 8; 35179 } 35180 if ((here_op & 240) === 0) { 35181 last_bits = here_bits; 35182 last_op = here_op; 35183 last_val = here_val; 35184 for (; ; ) { 35185 here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; 35186 here_bits = here >>> 24; 35187 here_op = here >>> 16 & 255; 35188 here_val = here & 65535; 35189 if (last_bits + here_bits <= bits) { 35190 break; 35191 } 35192 if (have === 0) { 35193 break inf_leave; 35194 } 35195 have--; 35196 hold += input[next++] << bits; 35197 bits += 8; 35198 } 35199 hold >>>= last_bits; 35200 bits -= last_bits; 35201 state.back += last_bits; 35202 } 35203 hold >>>= here_bits; 35204 bits -= here_bits; 35205 state.back += here_bits; 35206 if (here_op & 64) { 35207 strm.msg = "invalid distance code"; 35208 state.mode = BAD; 35209 break; 35210 } 35211 state.offset = here_val; 35212 state.extra = here_op & 15; 35213 state.mode = DISTEXT; 35214 /* falls through */ 35215 case DISTEXT: 35216 if (state.extra) { 35217 n = state.extra; 35218 while (bits < n) { 35219 if (have === 0) { 35220 break inf_leave; 35221 } 35222 have--; 35223 hold += input[next++] << bits; 35224 bits += 8; 35225 } 35226 state.offset += hold & (1 << state.extra) - 1; 35227 hold >>>= state.extra; 35228 bits -= state.extra; 35229 state.back += state.extra; 35230 } 35231 if (state.offset > state.dmax) { 35232 strm.msg = "invalid distance too far back"; 35233 state.mode = BAD; 35234 break; 35235 } 35236 state.mode = MATCH; 35237 /* falls through */ 35238 case MATCH: 35239 if (left === 0) { 35240 break inf_leave; 35241 } 35242 copy = _out - left; 35243 if (state.offset > copy) { 35244 copy = state.offset - copy; 35245 if (copy > state.whave) { 35246 if (state.sane) { 35247 strm.msg = "invalid distance too far back"; 35248 state.mode = BAD; 35249 break; 35250 } 35251 } 35252 if (copy > state.wnext) { 35253 copy -= state.wnext; 35254 from = state.wsize - copy; 35255 } else { 35256 from = state.wnext - copy; 35257 } 35258 if (copy > state.length) { 35259 copy = state.length; 35260 } 35261 from_source = state.window; 35262 } else { 35263 from_source = output; 35264 from = put - state.offset; 35265 copy = state.length; 35266 } 35267 if (copy > left) { 35268 copy = left; 35269 } 35270 left -= copy; 35271 state.length -= copy; 35272 do { 35273 output[put++] = from_source[from++]; 35274 } while (--copy); 35275 if (state.length === 0) { 35276 state.mode = LEN; 35277 } 35278 break; 35279 case LIT: 35280 if (left === 0) { 35281 break inf_leave; 35282 } 35283 output[put++] = state.length; 35284 left--; 35285 state.mode = LEN; 35286 break; 35287 case CHECK: 35288 if (state.wrap) { 35289 while (bits < 32) { 35290 if (have === 0) { 35291 break inf_leave; 35292 } 35293 have--; 35294 hold |= input[next++] << bits; 35295 bits += 8; 35296 } 35297 _out -= left; 35298 strm.total_out += _out; 35299 state.total += _out; 35300 if (_out) { 35301 strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/ 35302 state.flags ? crc32( 35303 state.check, 35304 output, 35305 _out, 35306 put - _out 35307 ) : adler32( 35308 state.check, 35309 output, 35310 _out, 35311 put - _out 35312 ); 35313 } 35314 _out = left; 35315 if ((state.flags ? hold : zswap32(hold)) !== state.check) { 35316 strm.msg = "incorrect data check"; 35317 state.mode = BAD; 35318 break; 35319 } 35320 hold = 0; 35321 bits = 0; 35322 } 35323 state.mode = LENGTH; 35324 /* falls through */ 35325 case LENGTH: 35326 if (state.wrap && state.flags) { 35327 while (bits < 32) { 35328 if (have === 0) { 35329 break inf_leave; 35330 } 35331 have--; 35332 hold += input[next++] << bits; 35333 bits += 8; 35334 } 35335 if (hold !== (state.total & 4294967295)) { 35336 strm.msg = "incorrect length check"; 35337 state.mode = BAD; 35338 break; 35339 } 35340 hold = 0; 35341 bits = 0; 35342 } 35343 state.mode = DONE; 35344 /* falls through */ 35345 case DONE: 35346 ret = Z_STREAM_END; 35347 break inf_leave; 35348 case BAD: 35349 ret = Z_DATA_ERROR; 35350 break inf_leave; 35351 case MEM: 35352 return Z_MEM_ERROR; 35353 case SYNC: 35354 /* falls through */ 35355 default: 35356 return Z_STREAM_ERROR; 35357 } 35358 } 35359 strm.next_out = put; 35360 strm.avail_out = left; 35361 strm.next_in = next; 35362 strm.avail_in = have; 35363 state.hold = hold; 35364 state.bits = bits; 35365 if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) { 35366 if (updatewindow( 35367 strm, 35368 strm.output, 35369 strm.next_out, 35370 _out - strm.avail_out 35371 )) { 35372 state.mode = MEM; 35373 return Z_MEM_ERROR; 35374 } 35375 } 35376 _in -= strm.avail_in; 35377 _out -= strm.avail_out; 35378 strm.total_in += _in; 35379 strm.total_out += _out; 35380 state.total += _out; 35381 if (state.wrap && _out) { 35382 strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ 35383 state.flags ? crc32( 35384 state.check, 35385 output, 35386 _out, 35387 strm.next_out - _out 35388 ) : adler32( 35389 state.check, 35390 output, 35391 _out, 35392 strm.next_out - _out 35393 ); 35394 } 35395 strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); 35396 if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret === Z_OK) { 35397 ret = Z_BUF_ERROR; 35398 } 35399 return ret; 35400 } 35401 function inflateEnd(strm) { 35402 if (!strm || !strm.state) { 35403 return Z_STREAM_ERROR; 35404 } 35405 var state = strm.state; 35406 if (state.window) { 35407 state.window = null; 35408 } 35409 strm.state = null; 35410 return Z_OK; 35411 } 35412 function inflateGetHeader(strm, head2) { 35413 var state; 35414 if (!strm || !strm.state) { 35415 return Z_STREAM_ERROR; 35416 } 35417 state = strm.state; 35418 if ((state.wrap & 2) === 0) { 35419 return Z_STREAM_ERROR; 35420 } 35421 state.head = head2; 35422 head2.done = false; 35423 return Z_OK; 35424 } 35425 function inflateSetDictionary(strm, dictionary) { 35426 var dictLength = dictionary.length; 35427 var state; 35428 var dictid; 35429 var ret; 35430 if (!strm || !strm.state) { 35431 return Z_STREAM_ERROR; 35432 } 35433 state = strm.state; 35434 if (state.wrap !== 0 && state.mode !== DICT) { 35435 return Z_STREAM_ERROR; 35436 } 35437 if (state.mode === DICT) { 35438 dictid = 1; 35439 dictid = adler32( 35440 dictid, 35441 dictionary, 35442 dictLength, 35443 0 35444 ); 35445 if (dictid !== state.check) { 35446 return Z_DATA_ERROR; 35447 } 35448 } 35449 ret = updatewindow( 35450 strm, 35451 dictionary, 35452 dictLength, 35453 dictLength 35454 ); 35455 if (ret) { 35456 state.mode = MEM; 35457 return Z_MEM_ERROR; 35458 } 35459 state.havedict = 1; 35460 return Z_OK; 35461 } 35462 exports2.inflateReset = inflateReset; 35463 exports2.inflateReset2 = inflateReset2; 35464 exports2.inflateResetKeep = inflateResetKeep; 35465 exports2.inflateInit = inflateInit; 35466 exports2.inflateInit2 = inflateInit2; 35467 exports2.inflate = inflate; 35468 exports2.inflateEnd = inflateEnd; 35469 exports2.inflateGetHeader = inflateGetHeader; 35470 exports2.inflateSetDictionary = inflateSetDictionary; 35471 exports2.inflateInfo = "pako inflate (from Nodeca project)"; 35472 }, 35473 { 35474 "../utils/common": 1, 35475 "./adler32": 3, 35476 "./crc32": 5, 35477 "./inffast": 7, 35478 "./inftrees": 9 35479 } 35480 ], 35481 9: [ 35482 function(require2, module2, exports2) { 35483 "use strict"; 35484 var utils = require2("../utils/common"); 35485 var MAXBITS = 15; 35486 var ENOUGH_LENS = 852; 35487 var ENOUGH_DISTS = 592; 35488 var CODES = 0; 35489 var LENS = 1; 35490 var DISTS = 2; 35491 var lbase = [ 35492 /* Length codes 257..285 base */ 35493 3, 35494 4, 35495 5, 35496 6, 35497 7, 35498 8, 35499 9, 35500 10, 35501 11, 35502 13, 35503 15, 35504 17, 35505 19, 35506 23, 35507 27, 35508 31, 35509 35, 35510 43, 35511 51, 35512 59, 35513 67, 35514 83, 35515 99, 35516 115, 35517 131, 35518 163, 35519 195, 35520 227, 35521 258, 35522 0, 35523 0 35524 ]; 35525 var lext = [ 35526 /* Length codes 257..285 extra */ 35527 16, 35528 16, 35529 16, 35530 16, 35531 16, 35532 16, 35533 16, 35534 16, 35535 17, 35536 17, 35537 17, 35538 17, 35539 18, 35540 18, 35541 18, 35542 18, 35543 19, 35544 19, 35545 19, 35546 19, 35547 20, 35548 20, 35549 20, 35550 20, 35551 21, 35552 21, 35553 21, 35554 21, 35555 16, 35556 72, 35557 78 35558 ]; 35559 var dbase = [ 35560 /* Distance codes 0..29 base */ 35561 1, 35562 2, 35563 3, 35564 4, 35565 5, 35566 7, 35567 9, 35568 13, 35569 17, 35570 25, 35571 33, 35572 49, 35573 65, 35574 97, 35575 129, 35576 193, 35577 257, 35578 385, 35579 513, 35580 769, 35581 1025, 35582 1537, 35583 2049, 35584 3073, 35585 4097, 35586 6145, 35587 8193, 35588 12289, 35589 16385, 35590 24577, 35591 0, 35592 0 35593 ]; 35594 var dext = [ 35595 /* Distance codes 0..29 extra */ 35596 16, 35597 16, 35598 16, 35599 16, 35600 17, 35601 17, 35602 18, 35603 18, 35604 19, 35605 19, 35606 20, 35607 20, 35608 21, 35609 21, 35610 22, 35611 22, 35612 23, 35613 23, 35614 24, 35615 24, 35616 25, 35617 25, 35618 26, 35619 26, 35620 27, 35621 27, 35622 28, 35623 28, 35624 29, 35625 29, 35626 64, 35627 64 35628 ]; 35629 module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) { 35630 var bits = opts.bits; 35631 var len = 0; 35632 var sym = 0; 35633 var min2 = 0, max2 = 0; 35634 var root = 0; 35635 var curr = 0; 35636 var drop = 0; 35637 var left = 0; 35638 var used = 0; 35639 var huff = 0; 35640 var incr; 35641 var fill; 35642 var low; 35643 var mask; 35644 var next; 35645 var base = null; 35646 var base_index = 0; 35647 var end; 35648 var count = new utils.Buf16(MAXBITS + 1); 35649 var offs = new utils.Buf16(MAXBITS + 1); 35650 var extra = null; 35651 var extra_index = 0; 35652 var here_bits, here_op, here_val; 35653 for (len = 0; len <= MAXBITS; len++) { 35654 count[len] = 0; 35655 } 35656 for (sym = 0; sym < codes; sym++) { 35657 count[lens[lens_index + sym]]++; 35658 } 35659 root = bits; 35660 for (max2 = MAXBITS; max2 >= 1; max2--) { 35661 if (count[max2] !== 0) { 35662 break; 35663 } 35664 } 35665 if (root > max2) { 35666 root = max2; 35667 } 35668 if (max2 === 0) { 35669 table[table_index++] = 1 << 24 | 64 << 16 | 0; 35670 table[table_index++] = 1 << 24 | 64 << 16 | 0; 35671 opts.bits = 1; 35672 return 0; 35673 } 35674 for (min2 = 1; min2 < max2; min2++) { 35675 if (count[min2] !== 0) { 35676 break; 35677 } 35678 } 35679 if (root < min2) { 35680 root = min2; 35681 } 35682 left = 1; 35683 for (len = 1; len <= MAXBITS; len++) { 35684 left <<= 1; 35685 left -= count[len]; 35686 if (left < 0) { 35687 return -1; 35688 } 35689 } 35690 if (left > 0 && (type === CODES || max2 !== 1)) { 35691 return -1; 35692 } 35693 offs[1] = 0; 35694 for (len = 1; len < MAXBITS; len++) { 35695 offs[len + 1] = offs[len] + count[len]; 35696 } 35697 for (sym = 0; sym < codes; sym++) { 35698 if (lens[lens_index + sym] !== 0) { 35699 work[offs[lens[lens_index + sym]]++] = sym; 35700 } 35701 } 35702 if (type === CODES) { 35703 base = extra = work; 35704 end = 19; 35705 } else if (type === LENS) { 35706 base = lbase; 35707 base_index -= 257; 35708 extra = lext; 35709 extra_index -= 257; 35710 end = 256; 35711 } else { 35712 base = dbase; 35713 extra = dext; 35714 end = -1; 35715 } 35716 huff = 0; 35717 sym = 0; 35718 len = min2; 35719 next = table_index; 35720 curr = root; 35721 drop = 0; 35722 low = -1; 35723 used = 1 << root; 35724 mask = used - 1; 35725 if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { 35726 return 1; 35727 } 35728 for (; ; ) { 35729 here_bits = len - drop; 35730 if (work[sym] < end) { 35731 here_op = 0; 35732 here_val = work[sym]; 35733 } else if (work[sym] > end) { 35734 here_op = extra[extra_index + work[sym]]; 35735 here_val = base[base_index + work[sym]]; 35736 } else { 35737 here_op = 32 + 64; 35738 here_val = 0; 35739 } 35740 incr = 1 << len - drop; 35741 fill = 1 << curr; 35742 min2 = fill; 35743 do { 35744 fill -= incr; 35745 table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0; 35746 } while (fill !== 0); 35747 incr = 1 << len - 1; 35748 while (huff & incr) { 35749 incr >>= 1; 35750 } 35751 if (incr !== 0) { 35752 huff &= incr - 1; 35753 huff += incr; 35754 } else { 35755 huff = 0; 35756 } 35757 sym++; 35758 if (--count[len] === 0) { 35759 if (len === max2) { 35760 break; 35761 } 35762 len = lens[lens_index + work[sym]]; 35763 } 35764 if (len > root && (huff & mask) !== low) { 35765 if (drop === 0) { 35766 drop = root; 35767 } 35768 next += min2; 35769 curr = len - drop; 35770 left = 1 << curr; 35771 while (curr + drop < max2) { 35772 left -= count[curr + drop]; 35773 if (left <= 0) { 35774 break; 35775 } 35776 curr++; 35777 left <<= 1; 35778 } 35779 used += 1 << curr; 35780 if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { 35781 return 1; 35782 } 35783 low = huff & mask; 35784 table[low] = root << 24 | curr << 16 | next - table_index | 0; 35785 } 35786 } 35787 if (huff !== 0) { 35788 table[next + huff] = len - drop << 24 | 64 << 16 | 0; 35789 } 35790 opts.bits = root; 35791 return 0; 35792 }; 35793 }, 35794 { "../utils/common": 1 } 35795 ], 35796 10: [ 35797 function(require2, module2, exports2) { 35798 "use strict"; 35799 module2.exports = { 35800 2: "need dictionary", 35801 1: "stream end", 35802 0: "", 35803 "-1": "file error", 35804 "-2": "stream error", 35805 "-3": "data error", 35806 "-4": "insufficient memory", 35807 "-5": "buffer error", 35808 "-6": "incompatible version" 35809 }; 35810 }, 35811 {} 35812 ], 35813 11: [ 35814 function(require2, module2, exports2) { 35815 "use strict"; 35816 function ZStream() { 35817 this.input = null; 35818 this.next_in = 0; 35819 this.avail_in = 0; 35820 this.total_in = 0; 35821 this.output = null; 35822 this.next_out = 0; 35823 this.avail_out = 0; 35824 this.total_out = 0; 35825 this.msg = ""; 35826 this.state = null; 35827 this.data_type = 2; 35828 this.adler = 0; 35829 } 35830 module2.exports = ZStream; 35831 }, 35832 {} 35833 ], 35834 "/lib/inflate.js": [ 35835 function(require2, module2, exports2) { 35836 "use strict"; 35837 var zlib_inflate = require2("./zlib/inflate"); 35838 var utils = require2("./utils/common"); 35839 var strings = require2("./utils/strings"); 35840 var c2 = require2("./zlib/constants"); 35841 var msg = require2("./zlib/messages"); 35842 var ZStream = require2("./zlib/zstream"); 35843 var GZheader = require2("./zlib/gzheader"); 35844 var toString = Object.prototype.toString; 35845 function Inflate(options) { 35846 if (!(this instanceof Inflate)) 35847 return new Inflate(options); 35848 this.options = utils.assign( 35849 { 35850 chunkSize: 16384, 35851 windowBits: 0, 35852 to: "" 35853 }, 35854 options || {} 35855 ); 35856 var opt = this.options; 35857 if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) { 35858 opt.windowBits = -opt.windowBits; 35859 if (opt.windowBits === 0) { 35860 opt.windowBits = -15; 35861 } 35862 } 35863 if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) { 35864 opt.windowBits += 32; 35865 } 35866 if (opt.windowBits > 15 && opt.windowBits < 48) { 35867 if ((opt.windowBits & 15) === 0) { 35868 opt.windowBits |= 15; 35869 } 35870 } 35871 this.err = 0; 35872 this.msg = ""; 35873 this.ended = false; 35874 this.chunks = []; 35875 this.strm = new ZStream(); 35876 this.strm.avail_out = 0; 35877 var status = zlib_inflate.inflateInit2( 35878 this.strm, 35879 opt.windowBits 35880 ); 35881 if (status !== c2.Z_OK) { 35882 throw new Error(msg[status]); 35883 } 35884 this.header = new GZheader(); 35885 zlib_inflate.inflateGetHeader(this.strm, this.header); 35886 if (opt.dictionary) { 35887 if (typeof opt.dictionary === "string") { 35888 opt.dictionary = strings.string2buf( 35889 opt.dictionary 35890 ); 35891 } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") { 35892 opt.dictionary = new Uint8Array( 35893 opt.dictionary 35894 ); 35895 } 35896 if (opt.raw) { 35897 status = zlib_inflate.inflateSetDictionary( 35898 this.strm, 35899 opt.dictionary 35900 ); 35901 if (status !== c2.Z_OK) { 35902 throw new Error(msg[status]); 35903 } 35904 } 35905 } 35906 } 35907 Inflate.prototype.push = function(data, mode) { 35908 var strm = this.strm; 35909 var chunkSize = this.options.chunkSize; 35910 var dictionary = this.options.dictionary; 35911 var status, _mode; 35912 var next_out_utf8, tail, utf8str; 35913 var allowBufError = false; 35914 if (this.ended) { 35915 return false; 35916 } 35917 _mode = mode === ~~mode ? mode : mode === true ? c2.Z_FINISH : c2.Z_NO_FLUSH; 35918 if (typeof data === "string") { 35919 strm.input = strings.binstring2buf(data); 35920 } else if (toString.call(data) === "[object ArrayBuffer]") { 35921 strm.input = new Uint8Array(data); 35922 } else { 35923 strm.input = data; 35924 } 35925 strm.next_in = 0; 35926 strm.avail_in = strm.input.length; 35927 do { 35928 if (strm.avail_out === 0) { 35929 strm.output = new utils.Buf8(chunkSize); 35930 strm.next_out = 0; 35931 strm.avail_out = chunkSize; 35932 } 35933 status = zlib_inflate.inflate( 35934 strm, 35935 c2.Z_NO_FLUSH 35936 ); 35937 if (status === c2.Z_NEED_DICT && dictionary) { 35938 status = zlib_inflate.inflateSetDictionary( 35939 this.strm, 35940 dictionary 35941 ); 35942 } 35943 if (status === c2.Z_BUF_ERROR && allowBufError === true) { 35944 status = c2.Z_OK; 35945 allowBufError = false; 35946 } 35947 if (status !== c2.Z_STREAM_END && status !== c2.Z_OK) { 35948 this.onEnd(status); 35949 this.ended = true; 35950 return false; 35951 } 35952 if (strm.next_out) { 35953 if (strm.avail_out === 0 || status === c2.Z_STREAM_END || strm.avail_in === 0 && (_mode === c2.Z_FINISH || _mode === c2.Z_SYNC_FLUSH)) { 35954 if (this.options.to === "string") { 35955 next_out_utf8 = strings.utf8border( 35956 strm.output, 35957 strm.next_out 35958 ); 35959 tail = strm.next_out - next_out_utf8; 35960 utf8str = strings.buf2string( 35961 strm.output, 35962 next_out_utf8 35963 ); 35964 strm.next_out = tail; 35965 strm.avail_out = chunkSize - tail; 35966 if (tail) { 35967 utils.arraySet( 35968 strm.output, 35969 strm.output, 35970 next_out_utf8, 35971 tail, 35972 0 35973 ); 35974 } 35975 this.onData(utf8str); 35976 } else { 35977 this.onData( 35978 utils.shrinkBuf( 35979 strm.output, 35980 strm.next_out 35981 ) 35982 ); 35983 } 35984 } 35985 } 35986 if (strm.avail_in === 0 && strm.avail_out === 0) { 35987 allowBufError = true; 35988 } 35989 } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c2.Z_STREAM_END); 35990 if (status === c2.Z_STREAM_END) { 35991 _mode = c2.Z_FINISH; 35992 } 35993 if (_mode === c2.Z_FINISH) { 35994 status = zlib_inflate.inflateEnd(this.strm); 35995 this.onEnd(status); 35996 this.ended = true; 35997 return status === c2.Z_OK; 35998 } 35999 if (_mode === c2.Z_SYNC_FLUSH) { 36000 this.onEnd(c2.Z_OK); 36001 strm.avail_out = 0; 36002 return true; 36003 } 36004 return true; 36005 }; 36006 Inflate.prototype.onData = function(chunk) { 36007 this.chunks.push(chunk); 36008 }; 36009 Inflate.prototype.onEnd = function(status) { 36010 if (status === c2.Z_OK) { 36011 if (this.options.to === "string") { 36012 this.result = this.chunks.join(""); 36013 } else { 36014 this.result = utils.flattenChunks( 36015 this.chunks 36016 ); 36017 } 36018 } 36019 this.chunks = []; 36020 this.err = status; 36021 this.msg = this.strm.msg; 36022 }; 36023 function inflate(input, options) { 36024 var inflator = new Inflate(options); 36025 inflator.push(input, true); 36026 if (inflator.err) { 36027 throw inflator.msg || msg[inflator.err]; 36028 } 36029 return inflator.result; 36030 } 36031 function inflateRaw(input, options) { 36032 options = options || {}; 36033 options.raw = true; 36034 return inflate(input, options); 36035 } 36036 exports2.Inflate = Inflate; 36037 exports2.inflate = inflate; 36038 exports2.inflateRaw = inflateRaw; 36039 exports2.ungzip = inflate; 36040 }, 36041 { 36042 "./utils/common": 1, 36043 "./utils/strings": 2, 36044 "./zlib/constants": 4, 36045 "./zlib/gzheader": 6, 36046 "./zlib/inflate": 8, 36047 "./zlib/messages": 10, 36048 "./zlib/zstream": 11 36049 } 36050 ] 36051 }, 36052 {}, 36053 [] 36054 )("/lib/inflate.js"); 36055 })(); 36056 36057 // packages/global-styles-ui/build-module/font-library/lib/lib-font.browser.mjs 36058 var fetchFunction = globalThis.fetch; 36059 var Event2 = class { 36060 constructor(type, detail = {}, msg) { 36061 this.type = type; 36062 this.detail = detail; 36063 this.msg = msg; 36064 Object.defineProperty(this, `__mayPropagate`, { 36065 enumerable: false, 36066 writable: true 36067 }); 36068 this.__mayPropagate = true; 36069 } 36070 preventDefault() { 36071 } 36072 stopPropagation() { 36073 this.__mayPropagate = false; 36074 } 36075 valueOf() { 36076 return this; 36077 } 36078 toString() { 36079 return this.msg ? `[$this.type} event]: $this.msg}` : `[$this.type} event]`; 36080 } 36081 }; 36082 var EventManager = class { 36083 constructor() { 36084 this.listeners = {}; 36085 } 36086 addEventListener(type, listener, useCapture) { 36087 let bin = this.listeners[type] || []; 36088 if (useCapture) bin.unshift(listener); 36089 else bin.push(listener); 36090 this.listeners[type] = bin; 36091 } 36092 removeEventListener(type, listener) { 36093 let bin = this.listeners[type] || []; 36094 let pos = bin.findIndex((e) => e === listener); 36095 if (pos > -1) { 36096 bin.splice(pos, 1); 36097 this.listeners[type] = bin; 36098 } 36099 } 36100 dispatch(event) { 36101 let bin = this.listeners[event.type]; 36102 if (bin) { 36103 for (let l2 = 0, e = bin.length; l2 < e; l2++) { 36104 if (!event.__mayPropagate) break; 36105 bin[l2](event); 36106 } 36107 } 36108 } 36109 }; 36110 var startDate = (/* @__PURE__ */ new Date(`1904-01-01T00:00:00+0000`)).getTime(); 36111 function asText(data) { 36112 return Array.from(data).map((v2) => String.fromCharCode(v2)).join(``); 36113 } 36114 var Parser = class { 36115 constructor(dict, dataview, name2) { 36116 this.name = (name2 || dict.tag || ``).trim(); 36117 this.length = dict.length; 36118 this.start = dict.offset; 36119 this.offset = 0; 36120 this.data = dataview; 36121 [ 36122 `getInt8`, 36123 `getUint8`, 36124 `getInt16`, 36125 `getUint16`, 36126 `getInt32`, 36127 `getUint32`, 36128 `getBigInt64`, 36129 `getBigUint64` 36130 ].forEach((name3) => { 36131 let fn = name3.replace(/get(Big)?/, "").toLowerCase(); 36132 let increment = parseInt(name3.replace(/[^\d]/g, "")) / 8; 36133 Object.defineProperty(this, fn, { 36134 get: () => this.getValue(name3, increment) 36135 }); 36136 }); 36137 } 36138 get currentPosition() { 36139 return this.start + this.offset; 36140 } 36141 set currentPosition(position) { 36142 this.start = position; 36143 this.offset = 0; 36144 } 36145 skip(n = 0, bits = 8) { 36146 this.offset += n * bits / 8; 36147 } 36148 getValue(type, increment) { 36149 let pos = this.start + this.offset; 36150 this.offset += increment; 36151 try { 36152 return this.data[type](pos); 36153 } catch (e) { 36154 console.error(`parser`, type, increment, this); 36155 console.error(`parser`, this.start, this.offset); 36156 throw e; 36157 } 36158 } 36159 flags(n) { 36160 if (n === 8 || n === 16 || n === 32 || n === 64) { 36161 return this[`uint$n}`].toString(2).padStart(n, 0).split(``).map((v2) => v2 === "1"); 36162 } 36163 console.error( 36164 `Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long` 36165 ); 36166 console.trace(); 36167 } 36168 get tag() { 36169 const t = this.uint32; 36170 return asText([ 36171 t >> 24 & 255, 36172 t >> 16 & 255, 36173 t >> 8 & 255, 36174 t & 255 36175 ]); 36176 } 36177 get fixed() { 36178 let major = this.int16; 36179 let minor = Math.round(1e3 * this.uint16 / 65356); 36180 return major + minor / 1e3; 36181 } 36182 get legacyFixed() { 36183 let major = this.uint16; 36184 let minor = this.uint16.toString(16).padStart(4, 0); 36185 return parseFloat(`$major}.$minor}`); 36186 } 36187 get uint24() { 36188 return (this.uint8 << 16) + (this.uint8 << 8) + this.uint8; 36189 } 36190 get uint128() { 36191 let value = 0; 36192 for (let i = 0; i < 5; i++) { 36193 let byte = this.uint8; 36194 value = value * 128 + (byte & 127); 36195 if (byte < 128) break; 36196 } 36197 return value; 36198 } 36199 get longdatetime() { 36200 return new Date(startDate + 1e3 * parseInt(this.int64.toString())); 36201 } 36202 get fword() { 36203 return this.int16; 36204 } 36205 get ufword() { 36206 return this.uint16; 36207 } 36208 get Offset16() { 36209 return this.uint16; 36210 } 36211 get Offset32() { 36212 return this.uint32; 36213 } 36214 get F2DOT14() { 36215 const bits = p.uint16; 36216 const integer = [0, 1, -2, -1][bits >> 14]; 36217 const fraction = bits & 16383; 36218 return integer + fraction / 16384; 36219 } 36220 verifyLength() { 36221 if (this.offset != this.length) { 36222 console.error( 36223 `unexpected parsed table size ($this.offset}) for "$this.name}" (expected $this.length})` 36224 ); 36225 } 36226 } 36227 readBytes(n = 0, position = 0, bits = 8, signed = false) { 36228 n = n || this.length; 36229 if (n === 0) return []; 36230 if (position) this.currentPosition = position; 36231 const fn = `$signed ? `` : `u`}int$bits}`, slice = []; 36232 while (n--) slice.push(this[fn]); 36233 return slice; 36234 } 36235 }; 36236 var ParsedData = class { 36237 constructor(parser) { 36238 const pGetter = { enumerable: false, get: () => parser }; 36239 Object.defineProperty(this, `parser`, pGetter); 36240 const start = parser.currentPosition; 36241 const startGetter = { enumerable: false, get: () => start }; 36242 Object.defineProperty(this, `start`, startGetter); 36243 } 36244 load(struct) { 36245 Object.keys(struct).forEach((p22) => { 36246 let props = Object.getOwnPropertyDescriptor(struct, p22); 36247 if (props.get) { 36248 this[p22] = props.get.bind(this); 36249 } else if (props.value !== void 0) { 36250 this[p22] = props.value; 36251 } 36252 }); 36253 if (this.parser.length) { 36254 this.parser.verifyLength(); 36255 } 36256 } 36257 }; 36258 var SimpleTable = class extends ParsedData { 36259 constructor(dict, dataview, name2) { 36260 const { parser, start } = super( 36261 new Parser(dict, dataview, name2) 36262 ); 36263 const pGetter = { enumerable: false, get: () => parser }; 36264 Object.defineProperty(this, `p`, pGetter); 36265 const startGetter = { enumerable: false, get: () => start }; 36266 Object.defineProperty(this, `tableStart`, startGetter); 36267 } 36268 }; 36269 function lazy$1(object, property, getter) { 36270 let val; 36271 Object.defineProperty(object, property, { 36272 get: () => { 36273 if (val) return val; 36274 val = getter(); 36275 return val; 36276 }, 36277 enumerable: true 36278 }); 36279 } 36280 var SFNT = class extends SimpleTable { 36281 constructor(font2, dataview, createTable2) { 36282 const { p: p22 } = super({ offset: 0, length: 12 }, dataview, `sfnt`); 36283 this.version = p22.uint32; 36284 this.numTables = p22.uint16; 36285 this.searchRange = p22.uint16; 36286 this.entrySelector = p22.uint16; 36287 this.rangeShift = p22.uint16; 36288 p22.verifyLength(); 36289 this.directory = [...new Array(this.numTables)].map( 36290 (_) => new TableRecord(p22) 36291 ); 36292 this.tables = {}; 36293 this.directory.forEach((entry) => { 36294 const getter = () => createTable2( 36295 this.tables, 36296 { 36297 tag: entry.tag, 36298 offset: entry.offset, 36299 length: entry.length 36300 }, 36301 dataview 36302 ); 36303 lazy$1(this.tables, entry.tag.trim(), getter); 36304 }); 36305 } 36306 }; 36307 var TableRecord = class { 36308 constructor(p22) { 36309 this.tag = p22.tag; 36310 this.checksum = p22.uint32; 36311 this.offset = p22.uint32; 36312 this.length = p22.uint32; 36313 } 36314 }; 36315 var gzipDecode = inflate_default.inflate || void 0; 36316 var nativeGzipDecode = void 0; 36317 var WOFF$1 = class extends SimpleTable { 36318 constructor(font2, dataview, createTable2) { 36319 const { p: p22 } = super({ offset: 0, length: 44 }, dataview, `woff`); 36320 this.signature = p22.tag; 36321 this.flavor = p22.uint32; 36322 this.length = p22.uint32; 36323 this.numTables = p22.uint16; 36324 p22.uint16; 36325 this.totalSfntSize = p22.uint32; 36326 this.majorVersion = p22.uint16; 36327 this.minorVersion = p22.uint16; 36328 this.metaOffset = p22.uint32; 36329 this.metaLength = p22.uint32; 36330 this.metaOrigLength = p22.uint32; 36331 this.privOffset = p22.uint32; 36332 this.privLength = p22.uint32; 36333 p22.verifyLength(); 36334 this.directory = [...new Array(this.numTables)].map( 36335 (_) => new WoffTableDirectoryEntry(p22) 36336 ); 36337 buildWoffLazyLookups(this, dataview, createTable2); 36338 } 36339 }; 36340 var WoffTableDirectoryEntry = class { 36341 constructor(p22) { 36342 this.tag = p22.tag; 36343 this.offset = p22.uint32; 36344 this.compLength = p22.uint32; 36345 this.origLength = p22.uint32; 36346 this.origChecksum = p22.uint32; 36347 } 36348 }; 36349 function buildWoffLazyLookups(woff, dataview, createTable2) { 36350 woff.tables = {}; 36351 woff.directory.forEach((entry) => { 36352 lazy$1(woff.tables, entry.tag.trim(), () => { 36353 let offset4 = 0; 36354 let view = dataview; 36355 if (entry.compLength !== entry.origLength) { 36356 const data = dataview.buffer.slice( 36357 entry.offset, 36358 entry.offset + entry.compLength 36359 ); 36360 let unpacked; 36361 if (gzipDecode) { 36362 unpacked = gzipDecode(new Uint8Array(data)); 36363 } else if (nativeGzipDecode) { 36364 unpacked = nativeGzipDecode(new Uint8Array(data)); 36365 } else { 36366 const msg = `no brotli decoder available to decode WOFF2 font`; 36367 if (font.onerror) font.onerror(msg); 36368 throw new Error(msg); 36369 } 36370 view = new DataView(unpacked.buffer); 36371 } else { 36372 offset4 = entry.offset; 36373 } 36374 return createTable2( 36375 woff.tables, 36376 { tag: entry.tag, offset: offset4, length: entry.origLength }, 36377 view 36378 ); 36379 }); 36380 }); 36381 } 36382 var brotliDecode = unbrotli_default; 36383 var nativeBrotliDecode = void 0; 36384 var WOFF2$1 = class extends SimpleTable { 36385 constructor(font2, dataview, createTable2) { 36386 const { p: p22 } = super({ offset: 0, length: 48 }, dataview, `woff2`); 36387 this.signature = p22.tag; 36388 this.flavor = p22.uint32; 36389 this.length = p22.uint32; 36390 this.numTables = p22.uint16; 36391 p22.uint16; 36392 this.totalSfntSize = p22.uint32; 36393 this.totalCompressedSize = p22.uint32; 36394 this.majorVersion = p22.uint16; 36395 this.minorVersion = p22.uint16; 36396 this.metaOffset = p22.uint32; 36397 this.metaLength = p22.uint32; 36398 this.metaOrigLength = p22.uint32; 36399 this.privOffset = p22.uint32; 36400 this.privLength = p22.uint32; 36401 p22.verifyLength(); 36402 this.directory = [...new Array(this.numTables)].map( 36403 (_) => new Woff2TableDirectoryEntry(p22) 36404 ); 36405 let dictOffset = p22.currentPosition; 36406 this.directory[0].offset = 0; 36407 this.directory.forEach((e, i) => { 36408 let next = this.directory[i + 1]; 36409 if (next) { 36410 next.offset = e.offset + (e.transformLength !== void 0 ? e.transformLength : e.origLength); 36411 } 36412 }); 36413 let decoded; 36414 let buffer = dataview.buffer.slice(dictOffset); 36415 if (brotliDecode) { 36416 decoded = brotliDecode(new Uint8Array(buffer)); 36417 } else if (nativeBrotliDecode) { 36418 decoded = new Uint8Array(nativeBrotliDecode(buffer)); 36419 } else { 36420 const msg = `no brotli decoder available to decode WOFF2 font`; 36421 if (font2.onerror) font2.onerror(msg); 36422 throw new Error(msg); 36423 } 36424 buildWoff2LazyLookups(this, decoded, createTable2); 36425 } 36426 }; 36427 var Woff2TableDirectoryEntry = class { 36428 constructor(p22) { 36429 this.flags = p22.uint8; 36430 const tagNumber = this.tagNumber = this.flags & 63; 36431 if (tagNumber === 63) { 36432 this.tag = p22.tag; 36433 } else { 36434 this.tag = getWOFF2Tag(tagNumber); 36435 } 36436 const transformVersion = this.transformVersion = (this.flags & 192) >> 6; 36437 let hasTransforms = transformVersion !== 0; 36438 if (this.tag === `glyf` || this.tag === `loca`) { 36439 hasTransforms = this.transformVersion !== 3; 36440 } 36441 this.origLength = p22.uint128; 36442 if (hasTransforms) { 36443 this.transformLength = p22.uint128; 36444 } 36445 } 36446 }; 36447 function buildWoff2LazyLookups(woff2, decoded, createTable2) { 36448 woff2.tables = {}; 36449 woff2.directory.forEach((entry) => { 36450 lazy$1(woff2.tables, entry.tag.trim(), () => { 36451 const start = entry.offset; 36452 const end = start + (entry.transformLength ? entry.transformLength : entry.origLength); 36453 const data = new DataView(decoded.slice(start, end).buffer); 36454 try { 36455 return createTable2( 36456 woff2.tables, 36457 { tag: entry.tag, offset: 0, length: entry.origLength }, 36458 data 36459 ); 36460 } catch (e) { 36461 console.error(e); 36462 } 36463 }); 36464 }); 36465 } 36466 function getWOFF2Tag(flag) { 36467 return [ 36468 `cmap`, 36469 `head`, 36470 `hhea`, 36471 `hmtx`, 36472 `maxp`, 36473 `name`, 36474 `OS/2`, 36475 `post`, 36476 `cvt `, 36477 `fpgm`, 36478 `glyf`, 36479 `loca`, 36480 `prep`, 36481 `CFF `, 36482 `VORG`, 36483 `EBDT`, 36484 `EBLC`, 36485 `gasp`, 36486 `hdmx`, 36487 `kern`, 36488 `LTSH`, 36489 `PCLT`, 36490 `VDMX`, 36491 `vhea`, 36492 `vmtx`, 36493 `BASE`, 36494 `GDEF`, 36495 `GPOS`, 36496 `GSUB`, 36497 `EBSC`, 36498 `JSTF`, 36499 `MATH`, 36500 `CBDT`, 36501 `CBLC`, 36502 `COLR`, 36503 `CPAL`, 36504 `SVG `, 36505 `sbix`, 36506 `acnt`, 36507 `avar`, 36508 `bdat`, 36509 `bloc`, 36510 `bsln`, 36511 `cvar`, 36512 `fdsc`, 36513 `feat`, 36514 `fmtx`, 36515 `fvar`, 36516 `gvar`, 36517 `hsty`, 36518 `just`, 36519 `lcar`, 36520 `mort`, 36521 `morx`, 36522 `opbd`, 36523 `prop`, 36524 `trak`, 36525 `Zapf`, 36526 `Silf`, 36527 `Glat`, 36528 `Gloc`, 36529 `Feat`, 36530 `Sill` 36531 ][flag & 63]; 36532 } 36533 var tableClasses = {}; 36534 var tableClassesLoaded = false; 36535 Promise.all([ 36536 Promise.resolve().then(function() { 36537 return cmap$1; 36538 }), 36539 Promise.resolve().then(function() { 36540 return head$1; 36541 }), 36542 Promise.resolve().then(function() { 36543 return hhea$1; 36544 }), 36545 Promise.resolve().then(function() { 36546 return hmtx$1; 36547 }), 36548 Promise.resolve().then(function() { 36549 return maxp$1; 36550 }), 36551 Promise.resolve().then(function() { 36552 return name$1; 36553 }), 36554 Promise.resolve().then(function() { 36555 return OS2$1; 36556 }), 36557 Promise.resolve().then(function() { 36558 return post$1; 36559 }), 36560 Promise.resolve().then(function() { 36561 return BASE$1; 36562 }), 36563 Promise.resolve().then(function() { 36564 return GDEF$1; 36565 }), 36566 Promise.resolve().then(function() { 36567 return GSUB$1; 36568 }), 36569 Promise.resolve().then(function() { 36570 return GPOS$1; 36571 }), 36572 Promise.resolve().then(function() { 36573 return SVG$1; 36574 }), 36575 Promise.resolve().then(function() { 36576 return fvar$1; 36577 }), 36578 Promise.resolve().then(function() { 36579 return cvt$1; 36580 }), 36581 Promise.resolve().then(function() { 36582 return fpgm$1; 36583 }), 36584 Promise.resolve().then(function() { 36585 return gasp$1; 36586 }), 36587 Promise.resolve().then(function() { 36588 return glyf$1; 36589 }), 36590 Promise.resolve().then(function() { 36591 return loca$1; 36592 }), 36593 Promise.resolve().then(function() { 36594 return prep$1; 36595 }), 36596 Promise.resolve().then(function() { 36597 return CFF$1; 36598 }), 36599 Promise.resolve().then(function() { 36600 return CFF2$1; 36601 }), 36602 Promise.resolve().then(function() { 36603 return VORG$1; 36604 }), 36605 Promise.resolve().then(function() { 36606 return EBLC$1; 36607 }), 36608 Promise.resolve().then(function() { 36609 return EBDT$1; 36610 }), 36611 Promise.resolve().then(function() { 36612 return EBSC$1; 36613 }), 36614 Promise.resolve().then(function() { 36615 return CBLC$1; 36616 }), 36617 Promise.resolve().then(function() { 36618 return CBDT$1; 36619 }), 36620 Promise.resolve().then(function() { 36621 return sbix$1; 36622 }), 36623 Promise.resolve().then(function() { 36624 return COLR$1; 36625 }), 36626 Promise.resolve().then(function() { 36627 return CPAL$1; 36628 }), 36629 Promise.resolve().then(function() { 36630 return DSIG$1; 36631 }), 36632 Promise.resolve().then(function() { 36633 return hdmx$1; 36634 }), 36635 Promise.resolve().then(function() { 36636 return kern$1; 36637 }), 36638 Promise.resolve().then(function() { 36639 return LTSH$1; 36640 }), 36641 Promise.resolve().then(function() { 36642 return MERG$1; 36643 }), 36644 Promise.resolve().then(function() { 36645 return meta$1; 36646 }), 36647 Promise.resolve().then(function() { 36648 return PCLT$1; 36649 }), 36650 Promise.resolve().then(function() { 36651 return VDMX$1; 36652 }), 36653 Promise.resolve().then(function() { 36654 return vhea$1; 36655 }), 36656 Promise.resolve().then(function() { 36657 return vmtx$1; 36658 }) 36659 ]).then((data) => { 36660 data.forEach((e) => { 36661 let name2 = Object.keys(e)[0]; 36662 tableClasses[name2] = e[name2]; 36663 }); 36664 tableClassesLoaded = true; 36665 }); 36666 function createTable(tables, dict, dataview) { 36667 let name2 = dict.tag.replace(/[^\w\d]/g, ``); 36668 let Type = tableClasses[name2]; 36669 if (Type) return new Type(dict, dataview, tables); 36670 console.warn( 36671 `lib-font has no definition for $name2}. The table was skipped.` 36672 ); 36673 return {}; 36674 } 36675 function loadTableClasses() { 36676 let count = 0; 36677 function checkLoaded(resolve, reject) { 36678 if (!tableClassesLoaded) { 36679 if (count > 10) { 36680 return reject(new Error(`loading took too long`)); 36681 } 36682 count++; 36683 return setTimeout(() => checkLoaded(resolve), 250); 36684 } 36685 resolve(createTable); 36686 } 36687 return new Promise((resolve, reject) => checkLoaded(resolve)); 36688 } 36689 function getFontCSSFormat(path, errorOnStyle) { 36690 let pos = path.lastIndexOf(`.`); 36691 let ext = (path.substring(pos + 1) || ``).toLowerCase(); 36692 let format = { 36693 ttf: `truetype`, 36694 otf: `opentype`, 36695 woff: `woff`, 36696 woff2: `woff2` 36697 }[ext]; 36698 if (format) return format; 36699 let msg = { 36700 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.`, 36701 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.`, 36702 fon: `The .fon format is not supported: this is an ancient Windows bitmap font format.`, 36703 ttc: `Based on the current CSS specification, font collections are not (yet?) supported.` 36704 }[ext]; 36705 if (!msg) msg = `$path} is not a known webfont format.`; 36706 if (errorOnStyle) { 36707 throw new Error(msg); 36708 } else { 36709 console.warn(`Could not load font: $msg}`); 36710 } 36711 } 36712 async function setupFontFace(name2, url, options = {}) { 36713 if (!globalThis.document) return; 36714 let format = getFontCSSFormat(url, options.errorOnStyle); 36715 if (!format) return; 36716 let style = document.createElement(`style`); 36717 style.className = `injected-by-Font-js`; 36718 let rules = []; 36719 if (options.styleRules) { 36720 rules = Object.entries(options.styleRules).map( 36721 ([key, value]) => `$key}: $value};` 36722 ); 36723 } 36724 style.textContent = ` 36725 @font-face { 36726 font-family: "$name2}"; 36727 $rules.join( 36728 ` 36729 ` 36730 )} 36731 src: url("$url}") format("$format}"); 36732 }`; 36733 globalThis.document.head.appendChild(style); 36734 return style; 36735 } 36736 var TTF = [0, 1, 0, 0]; 36737 var OTF = [79, 84, 84, 79]; 36738 var WOFF = [119, 79, 70, 70]; 36739 var WOFF2 = [119, 79, 70, 50]; 36740 function match(ar1, ar2) { 36741 if (ar1.length !== ar2.length) return; 36742 for (let i = 0; i < ar1.length; i++) { 36743 if (ar1[i] !== ar2[i]) return; 36744 } 36745 return true; 36746 } 36747 function validFontFormat(dataview) { 36748 const LEAD_BYTES = [ 36749 dataview.getUint8(0), 36750 dataview.getUint8(1), 36751 dataview.getUint8(2), 36752 dataview.getUint8(3) 36753 ]; 36754 if (match(LEAD_BYTES, TTF) || match(LEAD_BYTES, OTF)) return `SFNT`; 36755 if (match(LEAD_BYTES, WOFF)) return `WOFF`; 36756 if (match(LEAD_BYTES, WOFF2)) return `WOFF2`; 36757 } 36758 function checkFetchResponseStatus(response) { 36759 if (!response.ok) { 36760 throw new Error( 36761 `HTTP $response.status} - $response.statusText}` 36762 ); 36763 } 36764 return response; 36765 } 36766 var Font = class extends EventManager { 36767 constructor(name2, options = {}) { 36768 super(); 36769 this.name = name2; 36770 this.options = options; 36771 this.metrics = false; 36772 } 36773 get src() { 36774 return this.__src; 36775 } 36776 set src(src) { 36777 this.__src = src; 36778 (async () => { 36779 if (globalThis.document && !this.options.skipStyleSheet) { 36780 await setupFontFace(this.name, src, this.options); 36781 } 36782 this.loadFont(src); 36783 })(); 36784 } 36785 async loadFont(url, filename) { 36786 fetch(url).then( 36787 (response) => checkFetchResponseStatus(response) && response.arrayBuffer() 36788 ).then( 36789 (buffer) => this.fromDataBuffer(buffer, filename || url) 36790 ).catch((err) => { 36791 const evt = new Event2( 36792 `error`, 36793 err, 36794 `Failed to load font at $filename || url}` 36795 ); 36796 this.dispatch(evt); 36797 if (this.onerror) this.onerror(evt); 36798 }); 36799 } 36800 async fromDataBuffer(buffer, filenameOrUrL) { 36801 this.fontData = new DataView(buffer); 36802 let type = validFontFormat(this.fontData); 36803 if (!type) { 36804 throw new Error( 36805 `$filenameOrUrL} is either an unsupported font format, or not a font at all.` 36806 ); 36807 } 36808 await this.parseBasicData(type); 36809 const evt = new Event2("load", { font: this }); 36810 this.dispatch(evt); 36811 if (this.onload) this.onload(evt); 36812 } 36813 async parseBasicData(type) { 36814 return loadTableClasses().then((createTable2) => { 36815 if (type === `SFNT`) { 36816 this.opentype = new SFNT(this, this.fontData, createTable2); 36817 } 36818 if (type === `WOFF`) { 36819 this.opentype = new WOFF$1(this, this.fontData, createTable2); 36820 } 36821 if (type === `WOFF2`) { 36822 this.opentype = new WOFF2$1(this, this.fontData, createTable2); 36823 } 36824 return this.opentype; 36825 }); 36826 } 36827 getGlyphId(char) { 36828 return this.opentype.tables.cmap.getGlyphId(char); 36829 } 36830 reverse(glyphid) { 36831 return this.opentype.tables.cmap.reverse(glyphid); 36832 } 36833 supports(char) { 36834 return this.getGlyphId(char) !== 0; 36835 } 36836 supportsVariation(variation) { 36837 return this.opentype.tables.cmap.supportsVariation(variation) !== false; 36838 } 36839 measureText(text, size4 = 16) { 36840 if (this.__unloaded) 36841 throw new Error( 36842 "Cannot measure text: font was unloaded. Please reload before calling measureText()" 36843 ); 36844 let d = document.createElement("div"); 36845 d.textContent = text; 36846 d.style.fontFamily = this.name; 36847 d.style.fontSize = `$size4}px`; 36848 d.style.color = `transparent`; 36849 d.style.background = `transparent`; 36850 d.style.top = `0`; 36851 d.style.left = `0`; 36852 d.style.position = `absolute`; 36853 document.body.appendChild(d); 36854 let bbox = d.getBoundingClientRect(); 36855 document.body.removeChild(d); 36856 const OS22 = this.opentype.tables["OS/2"]; 36857 bbox.fontSize = size4; 36858 bbox.ascender = OS22.sTypoAscender; 36859 bbox.descender = OS22.sTypoDescender; 36860 return bbox; 36861 } 36862 unload() { 36863 if (this.styleElement.parentNode) { 36864 this.styleElement.parentNode.removeElement(this.styleElement); 36865 const evt = new Event2("unload", { font: this }); 36866 this.dispatch(evt); 36867 if (this.onunload) this.onunload(evt); 36868 } 36869 this._unloaded = true; 36870 } 36871 load() { 36872 if (this.__unloaded) { 36873 delete this.__unloaded; 36874 document.head.appendChild(this.styleElement); 36875 const evt = new Event2("load", { font: this }); 36876 this.dispatch(evt); 36877 if (this.onload) this.onload(evt); 36878 } 36879 } 36880 }; 36881 globalThis.Font = Font; 36882 var Subtable = class extends ParsedData { 36883 constructor(p22, plaformID, encodingID) { 36884 super(p22); 36885 this.plaformID = plaformID; 36886 this.encodingID = encodingID; 36887 } 36888 }; 36889 var Format0 = class extends Subtable { 36890 constructor(p22, platformID, encodingID) { 36891 super(p22, platformID, encodingID); 36892 this.format = 0; 36893 this.length = p22.uint16; 36894 this.language = p22.uint16; 36895 this.glyphIdArray = [...new Array(256)].map((_) => p22.uint8); 36896 } 36897 supports(charCode) { 36898 if (charCode.charCodeAt) { 36899 charCode = -1; 36900 console.warn( 36901 `supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.` 36902 ); 36903 } 36904 return 0 <= charCode && charCode <= 255; 36905 } 36906 reverse(glyphID) { 36907 console.warn(`reverse not implemented for cmap subtable format 0`); 36908 return {}; 36909 } 36910 getSupportedCharCodes() { 36911 return [{ start: 1, end: 256 }]; 36912 } 36913 }; 36914 var Format2 = class extends Subtable { 36915 constructor(p22, platformID, encodingID) { 36916 super(p22, platformID, encodingID); 36917 this.format = 2; 36918 this.length = p22.uint16; 36919 this.language = p22.uint16; 36920 this.subHeaderKeys = [...new Array(256)].map((_) => p22.uint16); 36921 const subHeaderCount = Math.max(...this.subHeaderKeys); 36922 const subHeaderOffset = p22.currentPosition; 36923 lazy$1(this, `subHeaders`, () => { 36924 p22.currentPosition = subHeaderOffset; 36925 return [...new Array(subHeaderCount)].map( 36926 (_) => new SubHeader(p22) 36927 ); 36928 }); 36929 const glyphIndexOffset = subHeaderOffset + subHeaderCount * 8; 36930 lazy$1(this, `glyphIndexArray`, () => { 36931 p22.currentPosition = glyphIndexOffset; 36932 return [...new Array(subHeaderCount)].map((_) => p22.uint16); 36933 }); 36934 } 36935 supports(charCode) { 36936 if (charCode.charCodeAt) { 36937 charCode = -1; 36938 console.warn( 36939 `supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented.` 36940 ); 36941 } 36942 const low = charCode && 255; 36943 const high = charCode && 65280; 36944 const subHeaderKey = this.subHeaders[high]; 36945 const subheader = this.subHeaders[subHeaderKey]; 36946 const first = subheader.firstCode; 36947 const last = first + subheader.entryCount; 36948 return first <= low && low <= last; 36949 } 36950 reverse(glyphID) { 36951 console.warn(`reverse not implemented for cmap subtable format 2`); 36952 return {}; 36953 } 36954 getSupportedCharCodes(preservePropNames = false) { 36955 if (preservePropNames) { 36956 return this.subHeaders.map((h) => ({ 36957 firstCode: h.firstCode, 36958 lastCode: h.lastCode 36959 })); 36960 } 36961 return this.subHeaders.map((h) => ({ 36962 start: h.firstCode, 36963 end: h.lastCode 36964 })); 36965 } 36966 }; 36967 var SubHeader = class { 36968 constructor(p22) { 36969 this.firstCode = p22.uint16; 36970 this.entryCount = p22.uint16; 36971 this.lastCode = this.first + this.entryCount; 36972 this.idDelta = p22.int16; 36973 this.idRangeOffset = p22.uint16; 36974 } 36975 }; 36976 var Format4 = class extends Subtable { 36977 constructor(p22, platformID, encodingID) { 36978 super(p22, platformID, encodingID); 36979 this.format = 4; 36980 this.length = p22.uint16; 36981 this.language = p22.uint16; 36982 this.segCountX2 = p22.uint16; 36983 this.segCount = this.segCountX2 / 2; 36984 this.searchRange = p22.uint16; 36985 this.entrySelector = p22.uint16; 36986 this.rangeShift = p22.uint16; 36987 const endCodePosition = p22.currentPosition; 36988 lazy$1( 36989 this, 36990 `endCode`, 36991 () => p22.readBytes(this.segCount, endCodePosition, 16) 36992 ); 36993 const startCodePosition = endCodePosition + 2 + this.segCountX2; 36994 lazy$1( 36995 this, 36996 `startCode`, 36997 () => p22.readBytes(this.segCount, startCodePosition, 16) 36998 ); 36999 const idDeltaPosition = startCodePosition + this.segCountX2; 37000 lazy$1( 37001 this, 37002 `idDelta`, 37003 () => p22.readBytes(this.segCount, idDeltaPosition, 16, true) 37004 ); 37005 const idRangePosition = idDeltaPosition + this.segCountX2; 37006 lazy$1( 37007 this, 37008 `idRangeOffset`, 37009 () => p22.readBytes(this.segCount, idRangePosition, 16) 37010 ); 37011 const glyphIdArrayPosition = idRangePosition + this.segCountX2; 37012 const glyphIdArrayLength = this.length - (glyphIdArrayPosition - this.tableStart); 37013 lazy$1( 37014 this, 37015 `glyphIdArray`, 37016 () => p22.readBytes(glyphIdArrayLength, glyphIdArrayPosition, 16) 37017 ); 37018 lazy$1( 37019 this, 37020 `segments`, 37021 () => this.buildSegments(idRangePosition, glyphIdArrayPosition, p22) 37022 ); 37023 } 37024 buildSegments(idRangePosition, glyphIdArrayPosition, p22) { 37025 const build = (_, i) => { 37026 let startCode = this.startCode[i], endCode = this.endCode[i], idDelta = this.idDelta[i], idRangeOffset = this.idRangeOffset[i], idRangeOffsetPointer = idRangePosition + 2 * i, glyphIDs = []; 37027 if (idRangeOffset === 0) { 37028 for (let i2 = startCode + idDelta, e = endCode + idDelta; i2 <= e; i2++) { 37029 glyphIDs.push(i2); 37030 } 37031 } else { 37032 for (let i2 = 0, e = endCode - startCode; i2 <= e; i2++) { 37033 p22.currentPosition = idRangeOffsetPointer + idRangeOffset + i2 * 2; 37034 glyphIDs.push(p22.uint16); 37035 } 37036 } 37037 return { 37038 startCode, 37039 endCode, 37040 idDelta, 37041 idRangeOffset, 37042 glyphIDs 37043 }; 37044 }; 37045 return [...new Array(this.segCount)].map(build); 37046 } 37047 reverse(glyphID) { 37048 let s = this.segments.find((v2) => v2.glyphIDs.includes(glyphID)); 37049 if (!s) return {}; 37050 const code = s.startCode + s.glyphIDs.indexOf(glyphID); 37051 return { code, unicode: String.fromCodePoint(code) }; 37052 } 37053 getGlyphId(charCode) { 37054 if (charCode.charCodeAt) charCode = charCode.charCodeAt(0); 37055 if (55296 <= charCode && charCode <= 57343) return 0; 37056 if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535) 37057 return 0; 37058 let segment = this.segments.find( 37059 (s) => s.startCode <= charCode && charCode <= s.endCode 37060 ); 37061 if (!segment) return 0; 37062 return segment.glyphIDs[charCode - segment.startCode]; 37063 } 37064 supports(charCode) { 37065 return this.getGlyphId(charCode) !== 0; 37066 } 37067 getSupportedCharCodes(preservePropNames = false) { 37068 if (preservePropNames) return this.segments; 37069 return this.segments.map((v2) => ({ 37070 start: v2.startCode, 37071 end: v2.endCode 37072 })); 37073 } 37074 }; 37075 var Format6 = class extends Subtable { 37076 constructor(p22, platformID, encodingID) { 37077 super(p22, platformID, encodingID); 37078 this.format = 6; 37079 this.length = p22.uint16; 37080 this.language = p22.uint16; 37081 this.firstCode = p22.uint16; 37082 this.entryCount = p22.uint16; 37083 this.lastCode = this.firstCode + this.entryCount - 1; 37084 const getter = () => [...new Array(this.entryCount)].map((_) => p22.uint16); 37085 lazy$1(this, `glyphIdArray`, getter); 37086 } 37087 supports(charCode) { 37088 if (charCode.charCodeAt) { 37089 charCode = -1; 37090 console.warn( 37091 `supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.` 37092 ); 37093 } 37094 if (charCode < this.firstCode) return {}; 37095 if (charCode > this.firstCode + this.entryCount) return {}; 37096 const code = charCode - this.firstCode; 37097 return { code, unicode: String.fromCodePoint(code) }; 37098 } 37099 reverse(glyphID) { 37100 let pos = this.glyphIdArray.indexOf(glyphID); 37101 if (pos > -1) return this.firstCode + pos; 37102 } 37103 getSupportedCharCodes(preservePropNames = false) { 37104 if (preservePropNames) { 37105 return [{ firstCode: this.firstCode, lastCode: this.lastCode }]; 37106 } 37107 return [{ start: this.firstCode, end: this.lastCode }]; 37108 } 37109 }; 37110 var Format8 = class extends Subtable { 37111 constructor(p22, platformID, encodingID) { 37112 super(p22, platformID, encodingID); 37113 this.format = 8; 37114 p22.uint16; 37115 this.length = p22.uint32; 37116 this.language = p22.uint32; 37117 this.is32 = [...new Array(8192)].map((_) => p22.uint8); 37118 this.numGroups = p22.uint32; 37119 const getter = () => [...new Array(this.numGroups)].map( 37120 (_) => new SequentialMapGroup$1(p22) 37121 ); 37122 lazy$1(this, `groups`, getter); 37123 } 37124 supports(charCode) { 37125 if (charCode.charCodeAt) { 37126 charCode = -1; 37127 console.warn( 37128 `supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.` 37129 ); 37130 } 37131 return this.groups.findIndex( 37132 (s) => s.startcharCode <= charCode && charCode <= s.endcharCode 37133 ) !== -1; 37134 } 37135 reverse(glyphID) { 37136 console.warn(`reverse not implemented for cmap subtable format 8`); 37137 return {}; 37138 } 37139 getSupportedCharCodes(preservePropNames = false) { 37140 if (preservePropNames) return this.groups; 37141 return this.groups.map((v2) => ({ 37142 start: v2.startcharCode, 37143 end: v2.endcharCode 37144 })); 37145 } 37146 }; 37147 var SequentialMapGroup$1 = class { 37148 constructor(p22) { 37149 this.startcharCode = p22.uint32; 37150 this.endcharCode = p22.uint32; 37151 this.startGlyphID = p22.uint32; 37152 } 37153 }; 37154 var Format10 = class extends Subtable { 37155 constructor(p22, platformID, encodingID) { 37156 super(p22, platformID, encodingID); 37157 this.format = 10; 37158 p22.uint16; 37159 this.length = p22.uint32; 37160 this.language = p22.uint32; 37161 this.startCharCode = p22.uint32; 37162 this.numChars = p22.uint32; 37163 this.endCharCode = this.startCharCode + this.numChars; 37164 const getter = () => [...new Array(this.numChars)].map((_) => p22.uint16); 37165 lazy$1(this, `glyphs`, getter); 37166 } 37167 supports(charCode) { 37168 if (charCode.charCodeAt) { 37169 charCode = -1; 37170 console.warn( 37171 `supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.` 37172 ); 37173 } 37174 if (charCode < this.startCharCode) return false; 37175 if (charCode > this.startCharCode + this.numChars) return false; 37176 return charCode - this.startCharCode; 37177 } 37178 reverse(glyphID) { 37179 console.warn(`reverse not implemented for cmap subtable format 10`); 37180 return {}; 37181 } 37182 getSupportedCharCodes(preservePropNames = false) { 37183 if (preservePropNames) { 37184 return [ 37185 { 37186 startCharCode: this.startCharCode, 37187 endCharCode: this.endCharCode 37188 } 37189 ]; 37190 } 37191 return [{ start: this.startCharCode, end: this.endCharCode }]; 37192 } 37193 }; 37194 var Format12 = class extends Subtable { 37195 constructor(p22, platformID, encodingID) { 37196 super(p22, platformID, encodingID); 37197 this.format = 12; 37198 p22.uint16; 37199 this.length = p22.uint32; 37200 this.language = p22.uint32; 37201 this.numGroups = p22.uint32; 37202 const getter = () => [...new Array(this.numGroups)].map( 37203 (_) => new SequentialMapGroup(p22) 37204 ); 37205 lazy$1(this, `groups`, getter); 37206 } 37207 supports(charCode) { 37208 if (charCode.charCodeAt) charCode = charCode.charCodeAt(0); 37209 if (55296 <= charCode && charCode <= 57343) return 0; 37210 if ((charCode & 65534) === 65534 || (charCode & 65535) === 65535) 37211 return 0; 37212 return this.groups.findIndex( 37213 (s) => s.startCharCode <= charCode && charCode <= s.endCharCode 37214 ) !== -1; 37215 } 37216 reverse(glyphID) { 37217 for (let group of this.groups) { 37218 let start = group.startGlyphID; 37219 if (start > glyphID) continue; 37220 if (start === glyphID) return group.startCharCode; 37221 let end = start + (group.endCharCode - group.startCharCode); 37222 if (end < glyphID) continue; 37223 const code = group.startCharCode + (glyphID - start); 37224 return { code, unicode: String.fromCodePoint(code) }; 37225 } 37226 return {}; 37227 } 37228 getSupportedCharCodes(preservePropNames = false) { 37229 if (preservePropNames) return this.groups; 37230 return this.groups.map((v2) => ({ 37231 start: v2.startCharCode, 37232 end: v2.endCharCode 37233 })); 37234 } 37235 }; 37236 var SequentialMapGroup = class { 37237 constructor(p22) { 37238 this.startCharCode = p22.uint32; 37239 this.endCharCode = p22.uint32; 37240 this.startGlyphID = p22.uint32; 37241 } 37242 }; 37243 var Format13 = class extends Subtable { 37244 constructor(p22, platformID, encodingID) { 37245 super(p22, platformID, encodingID); 37246 this.format = 13; 37247 p22.uint16; 37248 this.length = p22.uint32; 37249 this.language = p22.uint32; 37250 this.numGroups = p22.uint32; 37251 const getter = [...new Array(this.numGroups)].map( 37252 (_) => new ConstantMapGroup(p22) 37253 ); 37254 lazy$1(this, `groups`, getter); 37255 } 37256 supports(charCode) { 37257 if (charCode.charCodeAt) charCode = charCode.charCodeAt(0); 37258 return this.groups.findIndex( 37259 (s) => s.startCharCode <= charCode && charCode <= s.endCharCode 37260 ) !== -1; 37261 } 37262 reverse(glyphID) { 37263 console.warn(`reverse not implemented for cmap subtable format 13`); 37264 return {}; 37265 } 37266 getSupportedCharCodes(preservePropNames = false) { 37267 if (preservePropNames) return this.groups; 37268 return this.groups.map((v2) => ({ 37269 start: v2.startCharCode, 37270 end: v2.endCharCode 37271 })); 37272 } 37273 }; 37274 var ConstantMapGroup = class { 37275 constructor(p22) { 37276 this.startCharCode = p22.uint32; 37277 this.endCharCode = p22.uint32; 37278 this.glyphID = p22.uint32; 37279 } 37280 }; 37281 var Format14 = class extends Subtable { 37282 constructor(p22, platformID, encodingID) { 37283 super(p22, platformID, encodingID); 37284 this.subTableStart = p22.currentPosition; 37285 this.format = 14; 37286 this.length = p22.uint32; 37287 this.numVarSelectorRecords = p22.uint32; 37288 lazy$1( 37289 this, 37290 `varSelectors`, 37291 () => [...new Array(this.numVarSelectorRecords)].map( 37292 (_) => new VariationSelector(p22) 37293 ) 37294 ); 37295 } 37296 supports() { 37297 console.warn(`supports not implemented for cmap subtable format 14`); 37298 return 0; 37299 } 37300 getSupportedCharCodes() { 37301 console.warn( 37302 `getSupportedCharCodes not implemented for cmap subtable format 14` 37303 ); 37304 return []; 37305 } 37306 reverse(glyphID) { 37307 console.warn(`reverse not implemented for cmap subtable format 14`); 37308 return {}; 37309 } 37310 supportsVariation(variation) { 37311 let v2 = this.varSelector.find( 37312 (uvs) => uvs.varSelector === variation 37313 ); 37314 return v2 ? v2 : false; 37315 } 37316 getSupportedVariations() { 37317 return this.varSelectors.map((v2) => v2.varSelector); 37318 } 37319 }; 37320 var VariationSelector = class { 37321 constructor(p22) { 37322 this.varSelector = p22.uint24; 37323 this.defaultUVSOffset = p22.Offset32; 37324 this.nonDefaultUVSOffset = p22.Offset32; 37325 } 37326 }; 37327 function createSubTable(parser, platformID, encodingID) { 37328 const format = parser.uint16; 37329 if (format === 0) return new Format0(parser, platformID, encodingID); 37330 if (format === 2) return new Format2(parser, platformID, encodingID); 37331 if (format === 4) return new Format4(parser, platformID, encodingID); 37332 if (format === 6) return new Format6(parser, platformID, encodingID); 37333 if (format === 8) return new Format8(parser, platformID, encodingID); 37334 if (format === 10) return new Format10(parser, platformID, encodingID); 37335 if (format === 12) return new Format12(parser, platformID, encodingID); 37336 if (format === 13) return new Format13(parser, platformID, encodingID); 37337 if (format === 14) return new Format14(parser, platformID, encodingID); 37338 return {}; 37339 } 37340 var cmap = class extends SimpleTable { 37341 constructor(dict, dataview) { 37342 const { p: p22 } = super(dict, dataview); 37343 this.version = p22.uint16; 37344 this.numTables = p22.uint16; 37345 this.encodingRecords = [...new Array(this.numTables)].map( 37346 (_) => new EncodingRecord(p22, this.tableStart) 37347 ); 37348 } 37349 getSubTable(tableID) { 37350 return this.encodingRecords[tableID].table; 37351 } 37352 getSupportedEncodings() { 37353 return this.encodingRecords.map((r2) => ({ 37354 platformID: r2.platformID, 37355 encodingId: r2.encodingID 37356 })); 37357 } 37358 getSupportedCharCodes(platformID, encodingID) { 37359 const recordID = this.encodingRecords.findIndex( 37360 (r2) => r2.platformID === platformID && r2.encodingID === encodingID 37361 ); 37362 if (recordID === -1) return false; 37363 const subtable = this.getSubTable(recordID); 37364 return subtable.getSupportedCharCodes(); 37365 } 37366 reverse(glyphid) { 37367 for (let i = 0; i < this.numTables; i++) { 37368 let code = this.getSubTable(i).reverse(glyphid); 37369 if (code) return code; 37370 } 37371 } 37372 getGlyphId(char) { 37373 let last = 0; 37374 this.encodingRecords.some((_, tableID) => { 37375 let t = this.getSubTable(tableID); 37376 if (!t.getGlyphId) return false; 37377 last = t.getGlyphId(char); 37378 return last !== 0; 37379 }); 37380 return last; 37381 } 37382 supports(char) { 37383 return this.encodingRecords.some((_, tableID) => { 37384 const t = this.getSubTable(tableID); 37385 return t.supports && t.supports(char) !== false; 37386 }); 37387 } 37388 supportsVariation(variation) { 37389 return this.encodingRecords.some((_, tableID) => { 37390 const t = this.getSubTable(tableID); 37391 return t.supportsVariation && t.supportsVariation(variation) !== false; 37392 }); 37393 } 37394 }; 37395 var EncodingRecord = class { 37396 constructor(p22, tableStart) { 37397 const platformID = this.platformID = p22.uint16; 37398 const encodingID = this.encodingID = p22.uint16; 37399 const offset4 = this.offset = p22.Offset32; 37400 lazy$1(this, `table`, () => { 37401 p22.currentPosition = tableStart + offset4; 37402 return createSubTable(p22, platformID, encodingID); 37403 }); 37404 } 37405 }; 37406 var cmap$1 = Object.freeze({ __proto__: null, cmap }); 37407 var head = class extends SimpleTable { 37408 constructor(dict, dataview) { 37409 const { p: p22 } = super(dict, dataview); 37410 this.load({ 37411 majorVersion: p22.uint16, 37412 minorVersion: p22.uint16, 37413 fontRevision: p22.fixed, 37414 checkSumAdjustment: p22.uint32, 37415 magicNumber: p22.uint32, 37416 flags: p22.flags(16), 37417 unitsPerEm: p22.uint16, 37418 created: p22.longdatetime, 37419 modified: p22.longdatetime, 37420 xMin: p22.int16, 37421 yMin: p22.int16, 37422 xMax: p22.int16, 37423 yMax: p22.int16, 37424 macStyle: p22.flags(16), 37425 lowestRecPPEM: p22.uint16, 37426 fontDirectionHint: p22.uint16, 37427 indexToLocFormat: p22.uint16, 37428 glyphDataFormat: p22.uint16 37429 }); 37430 } 37431 }; 37432 var head$1 = Object.freeze({ __proto__: null, head }); 37433 var hhea = class extends SimpleTable { 37434 constructor(dict, dataview) { 37435 const { p: p22 } = super(dict, dataview); 37436 this.majorVersion = p22.uint16; 37437 this.minorVersion = p22.uint16; 37438 this.ascender = p22.fword; 37439 this.descender = p22.fword; 37440 this.lineGap = p22.fword; 37441 this.advanceWidthMax = p22.ufword; 37442 this.minLeftSideBearing = p22.fword; 37443 this.minRightSideBearing = p22.fword; 37444 this.xMaxExtent = p22.fword; 37445 this.caretSlopeRise = p22.int16; 37446 this.caretSlopeRun = p22.int16; 37447 this.caretOffset = p22.int16; 37448 p22.int16; 37449 p22.int16; 37450 p22.int16; 37451 p22.int16; 37452 this.metricDataFormat = p22.int16; 37453 this.numberOfHMetrics = p22.uint16; 37454 p22.verifyLength(); 37455 } 37456 }; 37457 var hhea$1 = Object.freeze({ __proto__: null, hhea }); 37458 var hmtx = class extends SimpleTable { 37459 constructor(dict, dataview, tables) { 37460 const { p: p22 } = super(dict, dataview); 37461 const numberOfHMetrics = tables.hhea.numberOfHMetrics; 37462 const numGlyphs = tables.maxp.numGlyphs; 37463 const metricsStart = p22.currentPosition; 37464 lazy$1(this, `hMetrics`, () => { 37465 p22.currentPosition = metricsStart; 37466 return [...new Array(numberOfHMetrics)].map( 37467 (_) => new LongHorMetric(p22.uint16, p22.int16) 37468 ); 37469 }); 37470 if (numberOfHMetrics < numGlyphs) { 37471 const lsbStart = metricsStart + numberOfHMetrics * 4; 37472 lazy$1(this, `leftSideBearings`, () => { 37473 p22.currentPosition = lsbStart; 37474 return [...new Array(numGlyphs - numberOfHMetrics)].map( 37475 (_) => p22.int16 37476 ); 37477 }); 37478 } 37479 } 37480 }; 37481 var LongHorMetric = class { 37482 constructor(w2, b) { 37483 this.advanceWidth = w2; 37484 this.lsb = b; 37485 } 37486 }; 37487 var hmtx$1 = Object.freeze({ __proto__: null, hmtx }); 37488 var maxp = class extends SimpleTable { 37489 constructor(dict, dataview) { 37490 const { p: p22 } = super(dict, dataview); 37491 this.version = p22.legacyFixed; 37492 this.numGlyphs = p22.uint16; 37493 if (this.version === 1) { 37494 this.maxPoints = p22.uint16; 37495 this.maxContours = p22.uint16; 37496 this.maxCompositePoints = p22.uint16; 37497 this.maxCompositeContours = p22.uint16; 37498 this.maxZones = p22.uint16; 37499 this.maxTwilightPoints = p22.uint16; 37500 this.maxStorage = p22.uint16; 37501 this.maxFunctionDefs = p22.uint16; 37502 this.maxInstructionDefs = p22.uint16; 37503 this.maxStackElements = p22.uint16; 37504 this.maxSizeOfInstructions = p22.uint16; 37505 this.maxComponentElements = p22.uint16; 37506 this.maxComponentDepth = p22.uint16; 37507 } 37508 p22.verifyLength(); 37509 } 37510 }; 37511 var maxp$1 = Object.freeze({ __proto__: null, maxp }); 37512 var name = class extends SimpleTable { 37513 constructor(dict, dataview) { 37514 const { p: p22 } = super(dict, dataview); 37515 this.format = p22.uint16; 37516 this.count = p22.uint16; 37517 this.stringOffset = p22.Offset16; 37518 this.nameRecords = [...new Array(this.count)].map( 37519 (_) => new NameRecord(p22, this) 37520 ); 37521 if (this.format === 1) { 37522 this.langTagCount = p22.uint16; 37523 this.langTagRecords = [...new Array(this.langTagCount)].map( 37524 (_) => new LangTagRecord(p22.uint16, p22.Offset16) 37525 ); 37526 } 37527 this.stringStart = this.tableStart + this.stringOffset; 37528 } 37529 get(nameID) { 37530 let record = this.nameRecords.find( 37531 (record2) => record2.nameID === nameID 37532 ); 37533 if (record) return record.string; 37534 } 37535 }; 37536 var LangTagRecord = class { 37537 constructor(length, offset4) { 37538 this.length = length; 37539 this.offset = offset4; 37540 } 37541 }; 37542 var NameRecord = class { 37543 constructor(p22, nameTable) { 37544 this.platformID = p22.uint16; 37545 this.encodingID = p22.uint16; 37546 this.languageID = p22.uint16; 37547 this.nameID = p22.uint16; 37548 this.length = p22.uint16; 37549 this.offset = p22.Offset16; 37550 lazy$1(this, `string`, () => { 37551 p22.currentPosition = nameTable.stringStart + this.offset; 37552 return decodeString(p22, this); 37553 }); 37554 } 37555 }; 37556 function decodeString(p22, record) { 37557 const { platformID, length } = record; 37558 if (length === 0) return ``; 37559 if (platformID === 0 || platformID === 3) { 37560 const str2 = []; 37561 for (let i = 0, e = length / 2; i < e; i++) 37562 str2[i] = String.fromCharCode(p22.uint16); 37563 return str2.join(``); 37564 } 37565 const bytes = p22.readBytes(length); 37566 const str = []; 37567 bytes.forEach(function(b, i) { 37568 str[i] = String.fromCharCode(b); 37569 }); 37570 return str.join(``); 37571 } 37572 var name$1 = Object.freeze({ __proto__: null, name }); 37573 var OS2 = class extends SimpleTable { 37574 constructor(dict, dataview) { 37575 const { p: p22 } = super(dict, dataview); 37576 this.version = p22.uint16; 37577 this.xAvgCharWidth = p22.int16; 37578 this.usWeightClass = p22.uint16; 37579 this.usWidthClass = p22.uint16; 37580 this.fsType = p22.uint16; 37581 this.ySubscriptXSize = p22.int16; 37582 this.ySubscriptYSize = p22.int16; 37583 this.ySubscriptXOffset = p22.int16; 37584 this.ySubscriptYOffset = p22.int16; 37585 this.ySuperscriptXSize = p22.int16; 37586 this.ySuperscriptYSize = p22.int16; 37587 this.ySuperscriptXOffset = p22.int16; 37588 this.ySuperscriptYOffset = p22.int16; 37589 this.yStrikeoutSize = p22.int16; 37590 this.yStrikeoutPosition = p22.int16; 37591 this.sFamilyClass = p22.int16; 37592 this.panose = [...new Array(10)].map((_) => p22.uint8); 37593 this.ulUnicodeRange1 = p22.flags(32); 37594 this.ulUnicodeRange2 = p22.flags(32); 37595 this.ulUnicodeRange3 = p22.flags(32); 37596 this.ulUnicodeRange4 = p22.flags(32); 37597 this.achVendID = p22.tag; 37598 this.fsSelection = p22.uint16; 37599 this.usFirstCharIndex = p22.uint16; 37600 this.usLastCharIndex = p22.uint16; 37601 this.sTypoAscender = p22.int16; 37602 this.sTypoDescender = p22.int16; 37603 this.sTypoLineGap = p22.int16; 37604 this.usWinAscent = p22.uint16; 37605 this.usWinDescent = p22.uint16; 37606 if (this.version === 0) return p22.verifyLength(); 37607 this.ulCodePageRange1 = p22.flags(32); 37608 this.ulCodePageRange2 = p22.flags(32); 37609 if (this.version === 1) return p22.verifyLength(); 37610 this.sxHeight = p22.int16; 37611 this.sCapHeight = p22.int16; 37612 this.usDefaultChar = p22.uint16; 37613 this.usBreakChar = p22.uint16; 37614 this.usMaxContext = p22.uint16; 37615 if (this.version <= 4) return p22.verifyLength(); 37616 this.usLowerOpticalPointSize = p22.uint16; 37617 this.usUpperOpticalPointSize = p22.uint16; 37618 if (this.version === 5) return p22.verifyLength(); 37619 } 37620 }; 37621 var OS2$1 = Object.freeze({ __proto__: null, OS2 }); 37622 var post = class extends SimpleTable { 37623 constructor(dict, dataview) { 37624 const { p: p22 } = super(dict, dataview); 37625 this.version = p22.legacyFixed; 37626 this.italicAngle = p22.fixed; 37627 this.underlinePosition = p22.fword; 37628 this.underlineThickness = p22.fword; 37629 this.isFixedPitch = p22.uint32; 37630 this.minMemType42 = p22.uint32; 37631 this.maxMemType42 = p22.uint32; 37632 this.minMemType1 = p22.uint32; 37633 this.maxMemType1 = p22.uint32; 37634 if (this.version === 1 || this.version === 3) return p22.verifyLength(); 37635 this.numGlyphs = p22.uint16; 37636 if (this.version === 2) { 37637 this.glyphNameIndex = [...new Array(this.numGlyphs)].map( 37638 (_) => p22.uint16 37639 ); 37640 this.namesOffset = p22.currentPosition; 37641 this.glyphNameOffsets = [1]; 37642 for (let i = 0; i < this.numGlyphs; i++) { 37643 let index2 = this.glyphNameIndex[i]; 37644 if (index2 < macStrings.length) { 37645 this.glyphNameOffsets.push(this.glyphNameOffsets[i]); 37646 continue; 37647 } 37648 let bytelength = p22.int8; 37649 p22.skip(bytelength); 37650 this.glyphNameOffsets.push( 37651 this.glyphNameOffsets[i] + bytelength + 1 37652 ); 37653 } 37654 } 37655 if (this.version === 2.5) { 37656 this.offset = [...new Array(this.numGlyphs)].map( 37657 (_) => p22.int8 37658 ); 37659 } 37660 } 37661 getGlyphName(glyphid) { 37662 if (this.version !== 2) { 37663 console.warn( 37664 `post table version $this.version} does not support glyph name lookups` 37665 ); 37666 return ``; 37667 } 37668 let index2 = this.glyphNameIndex[glyphid]; 37669 if (index2 < 258) return macStrings[index2]; 37670 let offset4 = this.glyphNameOffsets[glyphid]; 37671 let next = this.glyphNameOffsets[glyphid + 1]; 37672 let len = next - offset4 - 1; 37673 if (len === 0) return `.notdef.`; 37674 this.parser.currentPosition = this.namesOffset + offset4; 37675 const data = this.parser.readBytes( 37676 len, 37677 this.namesOffset + offset4, 37678 8, 37679 true 37680 ); 37681 return data.map((b) => String.fromCharCode(b)).join(``); 37682 } 37683 }; 37684 var macStrings = [ 37685 `.notdef`, 37686 `.null`, 37687 `nonmarkingreturn`, 37688 `space`, 37689 `exclam`, 37690 `quotedbl`, 37691 `numbersign`, 37692 `dollar`, 37693 `percent`, 37694 `ampersand`, 37695 `quotesingle`, 37696 `parenleft`, 37697 `parenright`, 37698 `asterisk`, 37699 `plus`, 37700 `comma`, 37701 `hyphen`, 37702 `period`, 37703 `slash`, 37704 `zero`, 37705 `one`, 37706 `two`, 37707 `three`, 37708 `four`, 37709 `five`, 37710 `six`, 37711 `seven`, 37712 `eight`, 37713 `nine`, 37714 `colon`, 37715 `semicolon`, 37716 `less`, 37717 `equal`, 37718 `greater`, 37719 `question`, 37720 `at`, 37721 `A`, 37722 `B`, 37723 `C`, 37724 `D`, 37725 `E`, 37726 `F`, 37727 `G`, 37728 `H`, 37729 `I`, 37730 `J`, 37731 `K`, 37732 `L`, 37733 `M`, 37734 `N`, 37735 `O`, 37736 `P`, 37737 `Q`, 37738 `R`, 37739 `S`, 37740 `T`, 37741 `U`, 37742 `V`, 37743 `W`, 37744 `X`, 37745 `Y`, 37746 `Z`, 37747 `bracketleft`, 37748 `backslash`, 37749 `bracketright`, 37750 `asciicircum`, 37751 `underscore`, 37752 `grave`, 37753 `a`, 37754 `b`, 37755 `c`, 37756 `d`, 37757 `e`, 37758 `f`, 37759 `g`, 37760 `h`, 37761 `i`, 37762 `j`, 37763 `k`, 37764 `l`, 37765 `m`, 37766 `n`, 37767 `o`, 37768 `p`, 37769 `q`, 37770 `r`, 37771 `s`, 37772 `t`, 37773 `u`, 37774 `v`, 37775 `w`, 37776 `x`, 37777 `y`, 37778 `z`, 37779 `braceleft`, 37780 `bar`, 37781 `braceright`, 37782 `asciitilde`, 37783 `Adieresis`, 37784 `Aring`, 37785 `Ccedilla`, 37786 `Eacute`, 37787 `Ntilde`, 37788 `Odieresis`, 37789 `Udieresis`, 37790 `aacute`, 37791 `agrave`, 37792 `acircumflex`, 37793 `adieresis`, 37794 `atilde`, 37795 `aring`, 37796 `ccedilla`, 37797 `eacute`, 37798 `egrave`, 37799 `ecircumflex`, 37800 `edieresis`, 37801 `iacute`, 37802 `igrave`, 37803 `icircumflex`, 37804 `idieresis`, 37805 `ntilde`, 37806 `oacute`, 37807 `ograve`, 37808 `ocircumflex`, 37809 `odieresis`, 37810 `otilde`, 37811 `uacute`, 37812 `ugrave`, 37813 `ucircumflex`, 37814 `udieresis`, 37815 `dagger`, 37816 `degree`, 37817 `cent`, 37818 `sterling`, 37819 `section`, 37820 `bullet`, 37821 `paragraph`, 37822 `germandbls`, 37823 `registered`, 37824 `copyright`, 37825 `trademark`, 37826 `acute`, 37827 `dieresis`, 37828 `notequal`, 37829 `AE`, 37830 `Oslash`, 37831 `infinity`, 37832 `plusminus`, 37833 `lessequal`, 37834 `greaterequal`, 37835 `yen`, 37836 `mu`, 37837 `partialdiff`, 37838 `summation`, 37839 `product`, 37840 `pi`, 37841 `integral`, 37842 `ordfeminine`, 37843 `ordmasculine`, 37844 `Omega`, 37845 `ae`, 37846 `oslash`, 37847 `questiondown`, 37848 `exclamdown`, 37849 `logicalnot`, 37850 `radical`, 37851 `florin`, 37852 `approxequal`, 37853 `Delta`, 37854 `guillemotleft`, 37855 `guillemotright`, 37856 `ellipsis`, 37857 `nonbreakingspace`, 37858 `Agrave`, 37859 `Atilde`, 37860 `Otilde`, 37861 `OE`, 37862 `oe`, 37863 `endash`, 37864 `emdash`, 37865 `quotedblleft`, 37866 `quotedblright`, 37867 `quoteleft`, 37868 `quoteright`, 37869 `divide`, 37870 `lozenge`, 37871 `ydieresis`, 37872 `Ydieresis`, 37873 `fraction`, 37874 `currency`, 37875 `guilsinglleft`, 37876 `guilsinglright`, 37877 `fi`, 37878 `fl`, 37879 `daggerdbl`, 37880 `periodcentered`, 37881 `quotesinglbase`, 37882 `quotedblbase`, 37883 `perthousand`, 37884 `Acircumflex`, 37885 `Ecircumflex`, 37886 `Aacute`, 37887 `Edieresis`, 37888 `Egrave`, 37889 `Iacute`, 37890 `Icircumflex`, 37891 `Idieresis`, 37892 `Igrave`, 37893 `Oacute`, 37894 `Ocircumflex`, 37895 `apple`, 37896 `Ograve`, 37897 `Uacute`, 37898 `Ucircumflex`, 37899 `Ugrave`, 37900 `dotlessi`, 37901 `circumflex`, 37902 `tilde`, 37903 `macron`, 37904 `breve`, 37905 `dotaccent`, 37906 `ring`, 37907 `cedilla`, 37908 `hungarumlaut`, 37909 `ogonek`, 37910 `caron`, 37911 `Lslash`, 37912 `lslash`, 37913 `Scaron`, 37914 `scaron`, 37915 `Zcaron`, 37916 `zcaron`, 37917 `brokenbar`, 37918 `Eth`, 37919 `eth`, 37920 `Yacute`, 37921 `yacute`, 37922 `Thorn`, 37923 `thorn`, 37924 `minus`, 37925 `multiply`, 37926 `onesuperior`, 37927 `twosuperior`, 37928 `threesuperior`, 37929 `onehalf`, 37930 `onequarter`, 37931 `threequarters`, 37932 `franc`, 37933 `Gbreve`, 37934 `gbreve`, 37935 `Idotaccent`, 37936 `Scedilla`, 37937 `scedilla`, 37938 `Cacute`, 37939 `cacute`, 37940 `Ccaron`, 37941 `ccaron`, 37942 `dcroat` 37943 ]; 37944 var post$1 = Object.freeze({ __proto__: null, post }); 37945 var BASE = class extends SimpleTable { 37946 constructor(dict, dataview) { 37947 const { p: p22 } = super(dict, dataview); 37948 this.majorVersion = p22.uint16; 37949 this.minorVersion = p22.uint16; 37950 this.horizAxisOffset = p22.Offset16; 37951 this.vertAxisOffset = p22.Offset16; 37952 lazy$1( 37953 this, 37954 `horizAxis`, 37955 () => new AxisTable( 37956 { offset: dict.offset + this.horizAxisOffset }, 37957 dataview 37958 ) 37959 ); 37960 lazy$1( 37961 this, 37962 `vertAxis`, 37963 () => new AxisTable( 37964 { offset: dict.offset + this.vertAxisOffset }, 37965 dataview 37966 ) 37967 ); 37968 if (this.majorVersion === 1 && this.minorVersion === 1) { 37969 this.itemVarStoreOffset = p22.Offset32; 37970 lazy$1( 37971 this, 37972 `itemVarStore`, 37973 () => new AxisTable( 37974 { offset: dict.offset + this.itemVarStoreOffset }, 37975 dataview 37976 ) 37977 ); 37978 } 37979 } 37980 }; 37981 var AxisTable = class extends SimpleTable { 37982 constructor(dict, dataview) { 37983 const { p: p22 } = super(dict, dataview, `AxisTable`); 37984 this.baseTagListOffset = p22.Offset16; 37985 this.baseScriptListOffset = p22.Offset16; 37986 lazy$1( 37987 this, 37988 `baseTagList`, 37989 () => new BaseTagListTable( 37990 { offset: dict.offset + this.baseTagListOffset }, 37991 dataview 37992 ) 37993 ); 37994 lazy$1( 37995 this, 37996 `baseScriptList`, 37997 () => new BaseScriptListTable( 37998 { offset: dict.offset + this.baseScriptListOffset }, 37999 dataview 38000 ) 38001 ); 38002 } 38003 }; 38004 var BaseTagListTable = class extends SimpleTable { 38005 constructor(dict, dataview) { 38006 const { p: p22 } = super(dict, dataview, `BaseTagListTable`); 38007 this.baseTagCount = p22.uint16; 38008 this.baselineTags = [...new Array(this.baseTagCount)].map( 38009 (_) => p22.tag 38010 ); 38011 } 38012 }; 38013 var BaseScriptListTable = class extends SimpleTable { 38014 constructor(dict, dataview) { 38015 const { p: p22 } = super(dict, dataview, `BaseScriptListTable`); 38016 this.baseScriptCount = p22.uint16; 38017 const recordStart = p22.currentPosition; 38018 lazy$1(this, `baseScriptRecords`, () => { 38019 p22.currentPosition = recordStart; 38020 return [...new Array(this.baseScriptCount)].map( 38021 (_) => new BaseScriptRecord(this.start, p22) 38022 ); 38023 }); 38024 } 38025 }; 38026 var BaseScriptRecord = class { 38027 constructor(baseScriptListTableStart, p22) { 38028 this.baseScriptTag = p22.tag; 38029 this.baseScriptOffset = p22.Offset16; 38030 lazy$1(this, `baseScriptTable`, () => { 38031 p22.currentPosition = baseScriptListTableStart + this.baseScriptOffset; 38032 return new BaseScriptTable(p22); 38033 }); 38034 } 38035 }; 38036 var BaseScriptTable = class { 38037 constructor(p22) { 38038 this.start = p22.currentPosition; 38039 this.baseValuesOffset = p22.Offset16; 38040 this.defaultMinMaxOffset = p22.Offset16; 38041 this.baseLangSysCount = p22.uint16; 38042 this.baseLangSysRecords = [...new Array(this.baseLangSysCount)].map( 38043 (_) => new BaseLangSysRecord(this.start, p22) 38044 ); 38045 lazy$1(this, `baseValues`, () => { 38046 p22.currentPosition = this.start + this.baseValuesOffset; 38047 return new BaseValuesTable(p22); 38048 }); 38049 lazy$1(this, `defaultMinMax`, () => { 38050 p22.currentPosition = this.start + this.defaultMinMaxOffset; 38051 return new MinMaxTable(p22); 38052 }); 38053 } 38054 }; 38055 var BaseLangSysRecord = class { 38056 constructor(baseScriptTableStart, p22) { 38057 this.baseLangSysTag = p22.tag; 38058 this.minMaxOffset = p22.Offset16; 38059 lazy$1(this, `minMax`, () => { 38060 p22.currentPosition = baseScriptTableStart + this.minMaxOffset; 38061 return new MinMaxTable(p22); 38062 }); 38063 } 38064 }; 38065 var BaseValuesTable = class { 38066 constructor(p22) { 38067 this.parser = p22; 38068 this.start = p22.currentPosition; 38069 this.defaultBaselineIndex = p22.uint16; 38070 this.baseCoordCount = p22.uint16; 38071 this.baseCoords = [...new Array(this.baseCoordCount)].map( 38072 (_) => p22.Offset16 38073 ); 38074 } 38075 getTable(id) { 38076 this.parser.currentPosition = this.start + this.baseCoords[id]; 38077 return new BaseCoordTable(this.parser); 38078 } 38079 }; 38080 var MinMaxTable = class { 38081 constructor(p22) { 38082 this.minCoord = p22.Offset16; 38083 this.maxCoord = p22.Offset16; 38084 this.featMinMaxCount = p22.uint16; 38085 const recordStart = p22.currentPosition; 38086 lazy$1(this, `featMinMaxRecords`, () => { 38087 p22.currentPosition = recordStart; 38088 return [...new Array(this.featMinMaxCount)].map( 38089 (_) => new FeatMinMaxRecord(p22) 38090 ); 38091 }); 38092 } 38093 }; 38094 var FeatMinMaxRecord = class { 38095 constructor(p22) { 38096 this.featureTableTag = p22.tag; 38097 this.minCoord = p22.Offset16; 38098 this.maxCoord = p22.Offset16; 38099 } 38100 }; 38101 var BaseCoordTable = class { 38102 constructor(p22) { 38103 this.baseCoordFormat = p22.uint16; 38104 this.coordinate = p22.int16; 38105 if (this.baseCoordFormat === 2) { 38106 this.referenceGlyph = p22.uint16; 38107 this.baseCoordPoint = p22.uint16; 38108 } 38109 if (this.baseCoordFormat === 3) { 38110 this.deviceTable = p22.Offset16; 38111 } 38112 } 38113 }; 38114 var BASE$1 = Object.freeze({ __proto__: null, BASE }); 38115 var ClassDefinition = class { 38116 constructor(p22) { 38117 this.classFormat = p22.uint16; 38118 if (this.classFormat === 1) { 38119 this.startGlyphID = p22.uint16; 38120 this.glyphCount = p22.uint16; 38121 this.classValueArray = [...new Array(this.glyphCount)].map( 38122 (_) => p22.uint16 38123 ); 38124 } 38125 if (this.classFormat === 2) { 38126 this.classRangeCount = p22.uint16; 38127 this.classRangeRecords = [ 38128 ...new Array(this.classRangeCount) 38129 ].map((_) => new ClassRangeRecord(p22)); 38130 } 38131 } 38132 }; 38133 var ClassRangeRecord = class { 38134 constructor(p22) { 38135 this.startGlyphID = p22.uint16; 38136 this.endGlyphID = p22.uint16; 38137 this.class = p22.uint16; 38138 } 38139 }; 38140 var CoverageTable = class extends ParsedData { 38141 constructor(p22) { 38142 super(p22); 38143 this.coverageFormat = p22.uint16; 38144 if (this.coverageFormat === 1) { 38145 this.glyphCount = p22.uint16; 38146 this.glyphArray = [...new Array(this.glyphCount)].map( 38147 (_) => p22.uint16 38148 ); 38149 } 38150 if (this.coverageFormat === 2) { 38151 this.rangeCount = p22.uint16; 38152 this.rangeRecords = [...new Array(this.rangeCount)].map( 38153 (_) => new CoverageRangeRecord(p22) 38154 ); 38155 } 38156 } 38157 }; 38158 var CoverageRangeRecord = class { 38159 constructor(p22) { 38160 this.startGlyphID = p22.uint16; 38161 this.endGlyphID = p22.uint16; 38162 this.startCoverageIndex = p22.uint16; 38163 } 38164 }; 38165 var ItemVariationStoreTable = class { 38166 constructor(table, p22) { 38167 this.table = table; 38168 this.parser = p22; 38169 this.start = p22.currentPosition; 38170 this.format = p22.uint16; 38171 this.variationRegionListOffset = p22.Offset32; 38172 this.itemVariationDataCount = p22.uint16; 38173 this.itemVariationDataOffsets = [ 38174 ...new Array(this.itemVariationDataCount) 38175 ].map((_) => p22.Offset32); 38176 } 38177 }; 38178 var GDEF = class extends SimpleTable { 38179 constructor(dict, dataview) { 38180 const { p: p22 } = super(dict, dataview); 38181 this.majorVersion = p22.uint16; 38182 this.minorVersion = p22.uint16; 38183 this.glyphClassDefOffset = p22.Offset16; 38184 lazy$1(this, `glyphClassDefs`, () => { 38185 if (this.glyphClassDefOffset === 0) return void 0; 38186 p22.currentPosition = this.tableStart + this.glyphClassDefOffset; 38187 return new ClassDefinition(p22); 38188 }); 38189 this.attachListOffset = p22.Offset16; 38190 lazy$1(this, `attachList`, () => { 38191 if (this.attachListOffset === 0) return void 0; 38192 p22.currentPosition = this.tableStart + this.attachListOffset; 38193 return new AttachList(p22); 38194 }); 38195 this.ligCaretListOffset = p22.Offset16; 38196 lazy$1(this, `ligCaretList`, () => { 38197 if (this.ligCaretListOffset === 0) return void 0; 38198 p22.currentPosition = this.tableStart + this.ligCaretListOffset; 38199 return new LigCaretList(p22); 38200 }); 38201 this.markAttachClassDefOffset = p22.Offset16; 38202 lazy$1(this, `markAttachClassDef`, () => { 38203 if (this.markAttachClassDefOffset === 0) return void 0; 38204 p22.currentPosition = this.tableStart + this.markAttachClassDefOffset; 38205 return new ClassDefinition(p22); 38206 }); 38207 if (this.minorVersion >= 2) { 38208 this.markGlyphSetsDefOffset = p22.Offset16; 38209 lazy$1(this, `markGlyphSetsDef`, () => { 38210 if (this.markGlyphSetsDefOffset === 0) return void 0; 38211 p22.currentPosition = this.tableStart + this.markGlyphSetsDefOffset; 38212 return new MarkGlyphSetsTable(p22); 38213 }); 38214 } 38215 if (this.minorVersion === 3) { 38216 this.itemVarStoreOffset = p22.Offset32; 38217 lazy$1(this, `itemVarStore`, () => { 38218 if (this.itemVarStoreOffset === 0) return void 0; 38219 p22.currentPosition = this.tableStart + this.itemVarStoreOffset; 38220 return new ItemVariationStoreTable(p22); 38221 }); 38222 } 38223 } 38224 }; 38225 var AttachList = class extends ParsedData { 38226 constructor(p22) { 38227 super(p22); 38228 this.coverageOffset = p22.Offset16; 38229 this.glyphCount = p22.uint16; 38230 this.attachPointOffsets = [...new Array(this.glyphCount)].map( 38231 (_) => p22.Offset16 38232 ); 38233 } 38234 getPoint(pointID) { 38235 this.parser.currentPosition = this.start + this.attachPointOffsets[pointID]; 38236 return new AttachPoint(this.parser); 38237 } 38238 }; 38239 var AttachPoint = class { 38240 constructor(p22) { 38241 this.pointCount = p22.uint16; 38242 this.pointIndices = [...new Array(this.pointCount)].map( 38243 (_) => p22.uint16 38244 ); 38245 } 38246 }; 38247 var LigCaretList = class extends ParsedData { 38248 constructor(p22) { 38249 super(p22); 38250 this.coverageOffset = p22.Offset16; 38251 lazy$1(this, `coverage`, () => { 38252 p22.currentPosition = this.start + this.coverageOffset; 38253 return new CoverageTable(p22); 38254 }); 38255 this.ligGlyphCount = p22.uint16; 38256 this.ligGlyphOffsets = [...new Array(this.ligGlyphCount)].map( 38257 (_) => p22.Offset16 38258 ); 38259 } 38260 getLigGlyph(ligGlyphID) { 38261 this.parser.currentPosition = this.start + this.ligGlyphOffsets[ligGlyphID]; 38262 return new LigGlyph(this.parser); 38263 } 38264 }; 38265 var LigGlyph = class extends ParsedData { 38266 constructor(p22) { 38267 super(p22); 38268 this.caretCount = p22.uint16; 38269 this.caretValueOffsets = [...new Array(this.caretCount)].map( 38270 (_) => p22.Offset16 38271 ); 38272 } 38273 getCaretValue(caretID) { 38274 this.parser.currentPosition = this.start + this.caretValueOffsets[caretID]; 38275 return new CaretValue(this.parser); 38276 } 38277 }; 38278 var CaretValue = class { 38279 constructor(p22) { 38280 this.caretValueFormat = p22.uint16; 38281 if (this.caretValueFormat === 1) { 38282 this.coordinate = p22.int16; 38283 } 38284 if (this.caretValueFormat === 2) { 38285 this.caretValuePointIndex = p22.uint16; 38286 } 38287 if (this.caretValueFormat === 3) { 38288 this.coordinate = p22.int16; 38289 this.deviceOffset = p22.Offset16; 38290 } 38291 } 38292 }; 38293 var MarkGlyphSetsTable = class extends ParsedData { 38294 constructor(p22) { 38295 super(p22); 38296 this.markGlyphSetTableFormat = p22.uint16; 38297 this.markGlyphSetCount = p22.uint16; 38298 this.coverageOffsets = [...new Array(this.markGlyphSetCount)].map( 38299 (_) => p22.Offset32 38300 ); 38301 } 38302 getMarkGlyphSet(markGlyphSetID) { 38303 this.parser.currentPosition = this.start + this.coverageOffsets[markGlyphSetID]; 38304 return new CoverageTable(this.parser); 38305 } 38306 }; 38307 var GDEF$1 = Object.freeze({ __proto__: null, GDEF }); 38308 var ScriptList = class extends ParsedData { 38309 static EMPTY = { scriptCount: 0, scriptRecords: [] }; 38310 constructor(p22) { 38311 super(p22); 38312 this.scriptCount = p22.uint16; 38313 this.scriptRecords = [...new Array(this.scriptCount)].map( 38314 (_) => new ScriptRecord(p22) 38315 ); 38316 } 38317 }; 38318 var ScriptRecord = class { 38319 constructor(p22) { 38320 this.scriptTag = p22.tag; 38321 this.scriptOffset = p22.Offset16; 38322 } 38323 }; 38324 var ScriptTable = class extends ParsedData { 38325 constructor(p22) { 38326 super(p22); 38327 this.defaultLangSys = p22.Offset16; 38328 this.langSysCount = p22.uint16; 38329 this.langSysRecords = [...new Array(this.langSysCount)].map( 38330 (_) => new LangSysRecord(p22) 38331 ); 38332 } 38333 }; 38334 var LangSysRecord = class { 38335 constructor(p22) { 38336 this.langSysTag = p22.tag; 38337 this.langSysOffset = p22.Offset16; 38338 } 38339 }; 38340 var LangSysTable = class { 38341 constructor(p22) { 38342 this.lookupOrder = p22.Offset16; 38343 this.requiredFeatureIndex = p22.uint16; 38344 this.featureIndexCount = p22.uint16; 38345 this.featureIndices = [...new Array(this.featureIndexCount)].map( 38346 (_) => p22.uint16 38347 ); 38348 } 38349 }; 38350 var FeatureList = class extends ParsedData { 38351 static EMPTY = { featureCount: 0, featureRecords: [] }; 38352 constructor(p22) { 38353 super(p22); 38354 this.featureCount = p22.uint16; 38355 this.featureRecords = [...new Array(this.featureCount)].map( 38356 (_) => new FeatureRecord(p22) 38357 ); 38358 } 38359 }; 38360 var FeatureRecord = class { 38361 constructor(p22) { 38362 this.featureTag = p22.tag; 38363 this.featureOffset = p22.Offset16; 38364 } 38365 }; 38366 var FeatureTable = class extends ParsedData { 38367 constructor(p22) { 38368 super(p22); 38369 this.featureParams = p22.Offset16; 38370 this.lookupIndexCount = p22.uint16; 38371 this.lookupListIndices = [...new Array(this.lookupIndexCount)].map( 38372 (_) => p22.uint16 38373 ); 38374 } 38375 getFeatureParams() { 38376 if (this.featureParams > 0) { 38377 const p22 = this.parser; 38378 p22.currentPosition = this.start + this.featureParams; 38379 const tag = this.featureTag; 38380 if (tag === `size`) return new Size(p22); 38381 if (tag.startsWith(`cc`)) return new CharacterVariant(p22); 38382 if (tag.startsWith(`ss`)) return new StylisticSet(p22); 38383 } 38384 } 38385 }; 38386 var CharacterVariant = class { 38387 constructor(p22) { 38388 this.format = p22.uint16; 38389 this.featUiLabelNameId = p22.uint16; 38390 this.featUiTooltipTextNameId = p22.uint16; 38391 this.sampleTextNameId = p22.uint16; 38392 this.numNamedParameters = p22.uint16; 38393 this.firstParamUiLabelNameId = p22.uint16; 38394 this.charCount = p22.uint16; 38395 this.character = [...new Array(this.charCount)].map( 38396 (_) => p22.uint24 38397 ); 38398 } 38399 }; 38400 var Size = class { 38401 constructor(p22) { 38402 this.designSize = p22.uint16; 38403 this.subfamilyIdentifier = p22.uint16; 38404 this.subfamilyNameID = p22.uint16; 38405 this.smallEnd = p22.uint16; 38406 this.largeEnd = p22.uint16; 38407 } 38408 }; 38409 var StylisticSet = class { 38410 constructor(p22) { 38411 this.version = p22.uint16; 38412 this.UINameID = p22.uint16; 38413 } 38414 }; 38415 function undoCoverageOffsetParsing(instance) { 38416 instance.parser.currentPosition -= 2; 38417 delete instance.coverageOffset; 38418 delete instance.getCoverageTable; 38419 } 38420 var LookupType$1 = class extends ParsedData { 38421 constructor(p22) { 38422 super(p22); 38423 this.substFormat = p22.uint16; 38424 this.coverageOffset = p22.Offset16; 38425 } 38426 getCoverageTable() { 38427 let p22 = this.parser; 38428 p22.currentPosition = this.start + this.coverageOffset; 38429 return new CoverageTable(p22); 38430 } 38431 }; 38432 var SubstLookupRecord = class { 38433 constructor(p22) { 38434 this.glyphSequenceIndex = p22.uint16; 38435 this.lookupListIndex = p22.uint16; 38436 } 38437 }; 38438 var LookupType1$1 = class extends LookupType$1 { 38439 constructor(p22) { 38440 super(p22); 38441 this.deltaGlyphID = p22.int16; 38442 } 38443 }; 38444 var LookupType2$1 = class extends LookupType$1 { 38445 constructor(p22) { 38446 super(p22); 38447 this.sequenceCount = p22.uint16; 38448 this.sequenceOffsets = [...new Array(this.sequenceCount)].map( 38449 (_) => p22.Offset16 38450 ); 38451 } 38452 getSequence(index2) { 38453 let p22 = this.parser; 38454 p22.currentPosition = this.start + this.sequenceOffsets[index2]; 38455 return new SequenceTable(p22); 38456 } 38457 }; 38458 var SequenceTable = class { 38459 constructor(p22) { 38460 this.glyphCount = p22.uint16; 38461 this.substituteGlyphIDs = [...new Array(this.glyphCount)].map( 38462 (_) => p22.uint16 38463 ); 38464 } 38465 }; 38466 var LookupType3$1 = class extends LookupType$1 { 38467 constructor(p22) { 38468 super(p22); 38469 this.alternateSetCount = p22.uint16; 38470 this.alternateSetOffsets = [ 38471 ...new Array(this.alternateSetCount) 38472 ].map((_) => p22.Offset16); 38473 } 38474 getAlternateSet(index2) { 38475 let p22 = this.parser; 38476 p22.currentPosition = this.start + this.alternateSetOffsets[index2]; 38477 return new AlternateSetTable(p22); 38478 } 38479 }; 38480 var AlternateSetTable = class { 38481 constructor(p22) { 38482 this.glyphCount = p22.uint16; 38483 this.alternateGlyphIDs = [...new Array(this.glyphCount)].map( 38484 (_) => p22.uint16 38485 ); 38486 } 38487 }; 38488 var LookupType4$1 = class extends LookupType$1 { 38489 constructor(p22) { 38490 super(p22); 38491 this.ligatureSetCount = p22.uint16; 38492 this.ligatureSetOffsets = [...new Array(this.ligatureSetCount)].map( 38493 (_) => p22.Offset16 38494 ); 38495 } 38496 getLigatureSet(index2) { 38497 let p22 = this.parser; 38498 p22.currentPosition = this.start + this.ligatureSetOffsets[index2]; 38499 return new LigatureSetTable(p22); 38500 } 38501 }; 38502 var LigatureSetTable = class extends ParsedData { 38503 constructor(p22) { 38504 super(p22); 38505 this.ligatureCount = p22.uint16; 38506 this.ligatureOffsets = [...new Array(this.ligatureCount)].map( 38507 (_) => p22.Offset16 38508 ); 38509 } 38510 getLigature(index2) { 38511 let p22 = this.parser; 38512 p22.currentPosition = this.start + this.ligatureOffsets[index2]; 38513 return new LigatureTable(p22); 38514 } 38515 }; 38516 var LigatureTable = class { 38517 constructor(p22) { 38518 this.ligatureGlyph = p22.uint16; 38519 this.componentCount = p22.uint16; 38520 this.componentGlyphIDs = [ 38521 ...new Array(this.componentCount - 1) 38522 ].map((_) => p22.uint16); 38523 } 38524 }; 38525 var LookupType5$1 = class extends LookupType$1 { 38526 constructor(p22) { 38527 super(p22); 38528 if (this.substFormat === 1) { 38529 this.subRuleSetCount = p22.uint16; 38530 this.subRuleSetOffsets = [ 38531 ...new Array(this.subRuleSetCount) 38532 ].map((_) => p22.Offset16); 38533 } 38534 if (this.substFormat === 2) { 38535 this.classDefOffset = p22.Offset16; 38536 this.subClassSetCount = p22.uint16; 38537 this.subClassSetOffsets = [ 38538 ...new Array(this.subClassSetCount) 38539 ].map((_) => p22.Offset16); 38540 } 38541 if (this.substFormat === 3) { 38542 undoCoverageOffsetParsing(this); 38543 this.glyphCount = p22.uint16; 38544 this.substitutionCount = p22.uint16; 38545 this.coverageOffsets = [...new Array(this.glyphCount)].map( 38546 (_) => p22.Offset16 38547 ); 38548 this.substLookupRecords = [ 38549 ...new Array(this.substitutionCount) 38550 ].map((_) => new SubstLookupRecord(p22)); 38551 } 38552 } 38553 getSubRuleSet(index2) { 38554 if (this.substFormat !== 1) 38555 throw new Error( 38556 `lookup type 5.$this.substFormat} has no subrule sets.` 38557 ); 38558 let p22 = this.parser; 38559 p22.currentPosition = this.start + this.subRuleSetOffsets[index2]; 38560 return new SubRuleSetTable(p22); 38561 } 38562 getSubClassSet(index2) { 38563 if (this.substFormat !== 2) 38564 throw new Error( 38565 `lookup type 5.$this.substFormat} has no subclass sets.` 38566 ); 38567 let p22 = this.parser; 38568 p22.currentPosition = this.start + this.subClassSetOffsets[index2]; 38569 return new SubClassSetTable(p22); 38570 } 38571 getCoverageTable(index2) { 38572 if (this.substFormat !== 3 && !index2) 38573 return super.getCoverageTable(); 38574 if (!index2) 38575 throw new Error( 38576 `lookup type 5.$this.substFormat} requires an coverage table index.` 38577 ); 38578 let p22 = this.parser; 38579 p22.currentPosition = this.start + this.coverageOffsets[index2]; 38580 return new CoverageTable(p22); 38581 } 38582 }; 38583 var SubRuleSetTable = class extends ParsedData { 38584 constructor(p22) { 38585 super(p22); 38586 this.subRuleCount = p22.uint16; 38587 this.subRuleOffsets = [...new Array(this.subRuleCount)].map( 38588 (_) => p22.Offset16 38589 ); 38590 } 38591 getSubRule(index2) { 38592 let p22 = this.parser; 38593 p22.currentPosition = this.start + this.subRuleOffsets[index2]; 38594 return new SubRuleTable(p22); 38595 } 38596 }; 38597 var SubRuleTable = class { 38598 constructor(p22) { 38599 this.glyphCount = p22.uint16; 38600 this.substitutionCount = p22.uint16; 38601 this.inputSequence = [...new Array(this.glyphCount - 1)].map( 38602 (_) => p22.uint16 38603 ); 38604 this.substLookupRecords = [ 38605 ...new Array(this.substitutionCount) 38606 ].map((_) => new SubstLookupRecord(p22)); 38607 } 38608 }; 38609 var SubClassSetTable = class extends ParsedData { 38610 constructor(p22) { 38611 super(p22); 38612 this.subClassRuleCount = p22.uint16; 38613 this.subClassRuleOffsets = [ 38614 ...new Array(this.subClassRuleCount) 38615 ].map((_) => p22.Offset16); 38616 } 38617 getSubClass(index2) { 38618 let p22 = this.parser; 38619 p22.currentPosition = this.start + this.subClassRuleOffsets[index2]; 38620 return new SubClassRuleTable(p22); 38621 } 38622 }; 38623 var SubClassRuleTable = class extends SubRuleTable { 38624 constructor(p22) { 38625 super(p22); 38626 } 38627 }; 38628 var LookupType6$1 = class extends LookupType$1 { 38629 constructor(p22) { 38630 super(p22); 38631 if (this.substFormat === 1) { 38632 this.chainSubRuleSetCount = p22.uint16; 38633 this.chainSubRuleSetOffsets = [ 38634 ...new Array(this.chainSubRuleSetCount) 38635 ].map((_) => p22.Offset16); 38636 } 38637 if (this.substFormat === 2) { 38638 this.backtrackClassDefOffset = p22.Offset16; 38639 this.inputClassDefOffset = p22.Offset16; 38640 this.lookaheadClassDefOffset = p22.Offset16; 38641 this.chainSubClassSetCount = p22.uint16; 38642 this.chainSubClassSetOffsets = [ 38643 ...new Array(this.chainSubClassSetCount) 38644 ].map((_) => p22.Offset16); 38645 } 38646 if (this.substFormat === 3) { 38647 undoCoverageOffsetParsing(this); 38648 this.backtrackGlyphCount = p22.uint16; 38649 this.backtrackCoverageOffsets = [ 38650 ...new Array(this.backtrackGlyphCount) 38651 ].map((_) => p22.Offset16); 38652 this.inputGlyphCount = p22.uint16; 38653 this.inputCoverageOffsets = [ 38654 ...new Array(this.inputGlyphCount) 38655 ].map((_) => p22.Offset16); 38656 this.lookaheadGlyphCount = p22.uint16; 38657 this.lookaheadCoverageOffsets = [ 38658 ...new Array(this.lookaheadGlyphCount) 38659 ].map((_) => p22.Offset16); 38660 this.seqLookupCount = p22.uint16; 38661 this.seqLookupRecords = [ 38662 ...new Array(this.substitutionCount) 38663 ].map((_) => new SequenceLookupRecord(p22)); 38664 } 38665 } 38666 getChainSubRuleSet(index2) { 38667 if (this.substFormat !== 1) 38668 throw new Error( 38669 `lookup type 6.$this.substFormat} has no chainsubrule sets.` 38670 ); 38671 let p22 = this.parser; 38672 p22.currentPosition = this.start + this.chainSubRuleSetOffsets[index2]; 38673 return new ChainSubRuleSetTable(p22); 38674 } 38675 getChainSubClassSet(index2) { 38676 if (this.substFormat !== 2) 38677 throw new Error( 38678 `lookup type 6.$this.substFormat} has no chainsubclass sets.` 38679 ); 38680 let p22 = this.parser; 38681 p22.currentPosition = this.start + this.chainSubClassSetOffsets[index2]; 38682 return new ChainSubClassSetTable(p22); 38683 } 38684 getCoverageFromOffset(offset4) { 38685 if (this.substFormat !== 3) 38686 throw new Error( 38687 `lookup type 6.$this.substFormat} does not use contextual coverage offsets.` 38688 ); 38689 let p22 = this.parser; 38690 p22.currentPosition = this.start + offset4; 38691 return new CoverageTable(p22); 38692 } 38693 }; 38694 var ChainSubRuleSetTable = class extends ParsedData { 38695 constructor(p22) { 38696 super(p22); 38697 this.chainSubRuleCount = p22.uint16; 38698 this.chainSubRuleOffsets = [ 38699 ...new Array(this.chainSubRuleCount) 38700 ].map((_) => p22.Offset16); 38701 } 38702 getSubRule(index2) { 38703 let p22 = this.parser; 38704 p22.currentPosition = this.start + this.chainSubRuleOffsets[index2]; 38705 return new ChainSubRuleTable(p22); 38706 } 38707 }; 38708 var ChainSubRuleTable = class { 38709 constructor(p22) { 38710 this.backtrackGlyphCount = p22.uint16; 38711 this.backtrackSequence = [ 38712 ...new Array(this.backtrackGlyphCount) 38713 ].map((_) => p22.uint16); 38714 this.inputGlyphCount = p22.uint16; 38715 this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map( 38716 (_) => p22.uint16 38717 ); 38718 this.lookaheadGlyphCount = p22.uint16; 38719 this.lookAheadSequence = [ 38720 ...new Array(this.lookAheadGlyphCount) 38721 ].map((_) => p22.uint16); 38722 this.substitutionCount = p22.uint16; 38723 this.substLookupRecords = [...new Array(this.SubstCount)].map( 38724 (_) => new SubstLookupRecord(p22) 38725 ); 38726 } 38727 }; 38728 var ChainSubClassSetTable = class extends ParsedData { 38729 constructor(p22) { 38730 super(p22); 38731 this.chainSubClassRuleCount = p22.uint16; 38732 this.chainSubClassRuleOffsets = [ 38733 ...new Array(this.chainSubClassRuleCount) 38734 ].map((_) => p22.Offset16); 38735 } 38736 getSubClass(index2) { 38737 let p22 = this.parser; 38738 p22.currentPosition = this.start + this.chainSubRuleOffsets[index2]; 38739 return new ChainSubClassRuleTable(p22); 38740 } 38741 }; 38742 var ChainSubClassRuleTable = class { 38743 constructor(p22) { 38744 this.backtrackGlyphCount = p22.uint16; 38745 this.backtrackSequence = [ 38746 ...new Array(this.backtrackGlyphCount) 38747 ].map((_) => p22.uint16); 38748 this.inputGlyphCount = p22.uint16; 38749 this.inputSequence = [...new Array(this.inputGlyphCount - 1)].map( 38750 (_) => p22.uint16 38751 ); 38752 this.lookaheadGlyphCount = p22.uint16; 38753 this.lookAheadSequence = [ 38754 ...new Array(this.lookAheadGlyphCount) 38755 ].map((_) => p22.uint16); 38756 this.substitutionCount = p22.uint16; 38757 this.substLookupRecords = [ 38758 ...new Array(this.substitutionCount) 38759 ].map((_) => new SequenceLookupRecord(p22)); 38760 } 38761 }; 38762 var SequenceLookupRecord = class extends ParsedData { 38763 constructor(p22) { 38764 super(p22); 38765 this.sequenceIndex = p22.uint16; 38766 this.lookupListIndex = p22.uint16; 38767 } 38768 }; 38769 var LookupType7$1 = class extends ParsedData { 38770 constructor(p22) { 38771 super(p22); 38772 this.substFormat = p22.uint16; 38773 this.extensionLookupType = p22.uint16; 38774 this.extensionOffset = p22.Offset32; 38775 } 38776 }; 38777 var LookupType8$1 = class extends LookupType$1 { 38778 constructor(p22) { 38779 super(p22); 38780 this.backtrackGlyphCount = p22.uint16; 38781 this.backtrackCoverageOffsets = [ 38782 ...new Array(this.backtrackGlyphCount) 38783 ].map((_) => p22.Offset16); 38784 this.lookaheadGlyphCount = p22.uint16; 38785 this.lookaheadCoverageOffsets = [ 38786 new Array(this.lookaheadGlyphCount) 38787 ].map((_) => p22.Offset16); 38788 this.glyphCount = p22.uint16; 38789 this.substituteGlyphIDs = [...new Array(this.glyphCount)].map( 38790 (_) => p22.uint16 38791 ); 38792 } 38793 }; 38794 var GSUBtables = { 38795 buildSubtable: function(type, p22) { 38796 const subtable = new [ 38797 void 0, 38798 LookupType1$1, 38799 LookupType2$1, 38800 LookupType3$1, 38801 LookupType4$1, 38802 LookupType5$1, 38803 LookupType6$1, 38804 LookupType7$1, 38805 LookupType8$1 38806 ][type](p22); 38807 subtable.type = type; 38808 return subtable; 38809 } 38810 }; 38811 var LookupType = class extends ParsedData { 38812 constructor(p22) { 38813 super(p22); 38814 } 38815 }; 38816 var LookupType1 = class extends LookupType { 38817 constructor(p22) { 38818 super(p22); 38819 console.log(`lookup type 1`); 38820 } 38821 }; 38822 var LookupType2 = class extends LookupType { 38823 constructor(p22) { 38824 super(p22); 38825 console.log(`lookup type 2`); 38826 } 38827 }; 38828 var LookupType3 = class extends LookupType { 38829 constructor(p22) { 38830 super(p22); 38831 console.log(`lookup type 3`); 38832 } 38833 }; 38834 var LookupType4 = class extends LookupType { 38835 constructor(p22) { 38836 super(p22); 38837 console.log(`lookup type 4`); 38838 } 38839 }; 38840 var LookupType5 = class extends LookupType { 38841 constructor(p22) { 38842 super(p22); 38843 console.log(`lookup type 5`); 38844 } 38845 }; 38846 var LookupType6 = class extends LookupType { 38847 constructor(p22) { 38848 super(p22); 38849 console.log(`lookup type 6`); 38850 } 38851 }; 38852 var LookupType7 = class extends LookupType { 38853 constructor(p22) { 38854 super(p22); 38855 console.log(`lookup type 7`); 38856 } 38857 }; 38858 var LookupType8 = class extends LookupType { 38859 constructor(p22) { 38860 super(p22); 38861 console.log(`lookup type 8`); 38862 } 38863 }; 38864 var LookupType9 = class extends LookupType { 38865 constructor(p22) { 38866 super(p22); 38867 console.log(`lookup type 9`); 38868 } 38869 }; 38870 var GPOStables = { 38871 buildSubtable: function(type, p22) { 38872 const subtable = new [ 38873 void 0, 38874 LookupType1, 38875 LookupType2, 38876 LookupType3, 38877 LookupType4, 38878 LookupType5, 38879 LookupType6, 38880 LookupType7, 38881 LookupType8, 38882 LookupType9 38883 ][type](p22); 38884 subtable.type = type; 38885 return subtable; 38886 } 38887 }; 38888 var LookupList = class extends ParsedData { 38889 static EMPTY = { lookupCount: 0, lookups: [] }; 38890 constructor(p22) { 38891 super(p22); 38892 this.lookupCount = p22.uint16; 38893 this.lookups = [...new Array(this.lookupCount)].map( 38894 (_) => p22.Offset16 38895 ); 38896 } 38897 }; 38898 var LookupTable = class extends ParsedData { 38899 constructor(p22, type) { 38900 super(p22); 38901 this.ctType = type; 38902 this.lookupType = p22.uint16; 38903 this.lookupFlag = p22.uint16; 38904 this.subTableCount = p22.uint16; 38905 this.subtableOffsets = [...new Array(this.subTableCount)].map( 38906 (_) => p22.Offset16 38907 ); 38908 this.markFilteringSet = p22.uint16; 38909 } 38910 get rightToLeft() { 38911 return this.lookupFlag & true; 38912 } 38913 get ignoreBaseGlyphs() { 38914 return this.lookupFlag & true; 38915 } 38916 get ignoreLigatures() { 38917 return this.lookupFlag & true; 38918 } 38919 get ignoreMarks() { 38920 return this.lookupFlag & true; 38921 } 38922 get useMarkFilteringSet() { 38923 return this.lookupFlag & true; 38924 } 38925 get markAttachmentType() { 38926 return this.lookupFlag & true; 38927 } 38928 getSubTable(index2) { 38929 const builder = this.ctType === `GSUB` ? GSUBtables : GPOStables; 38930 this.parser.currentPosition = this.start + this.subtableOffsets[index2]; 38931 return builder.buildSubtable(this.lookupType, this.parser); 38932 } 38933 }; 38934 var CommonLayoutTable = class extends SimpleTable { 38935 constructor(dict, dataview, name2) { 38936 const { p: p22, tableStart } = super(dict, dataview, name2); 38937 this.majorVersion = p22.uint16; 38938 this.minorVersion = p22.uint16; 38939 this.scriptListOffset = p22.Offset16; 38940 this.featureListOffset = p22.Offset16; 38941 this.lookupListOffset = p22.Offset16; 38942 if (this.majorVersion === 1 && this.minorVersion === 1) { 38943 this.featureVariationsOffset = p22.Offset32; 38944 } 38945 const no_content = !(this.scriptListOffset || this.featureListOffset || this.lookupListOffset); 38946 lazy$1(this, `scriptList`, () => { 38947 if (no_content) return ScriptList.EMPTY; 38948 p22.currentPosition = tableStart + this.scriptListOffset; 38949 return new ScriptList(p22); 38950 }); 38951 lazy$1(this, `featureList`, () => { 38952 if (no_content) return FeatureList.EMPTY; 38953 p22.currentPosition = tableStart + this.featureListOffset; 38954 return new FeatureList(p22); 38955 }); 38956 lazy$1(this, `lookupList`, () => { 38957 if (no_content) return LookupList.EMPTY; 38958 p22.currentPosition = tableStart + this.lookupListOffset; 38959 return new LookupList(p22); 38960 }); 38961 if (this.featureVariationsOffset) { 38962 lazy$1(this, `featureVariations`, () => { 38963 if (no_content) return FeatureVariations.EMPTY; 38964 p22.currentPosition = tableStart + this.featureVariationsOffset; 38965 return new FeatureVariations(p22); 38966 }); 38967 } 38968 } 38969 getSupportedScripts() { 38970 return this.scriptList.scriptRecords.map((r2) => r2.scriptTag); 38971 } 38972 getScriptTable(scriptTag) { 38973 let record = this.scriptList.scriptRecords.find( 38974 (r2) => r2.scriptTag === scriptTag 38975 ); 38976 this.parser.currentPosition = this.scriptList.start + record.scriptOffset; 38977 let table = new ScriptTable(this.parser); 38978 table.scriptTag = scriptTag; 38979 return table; 38980 } 38981 ensureScriptTable(arg) { 38982 if (typeof arg === "string") { 38983 return this.getScriptTable(arg); 38984 } 38985 return arg; 38986 } 38987 getSupportedLangSys(scriptTable) { 38988 scriptTable = this.ensureScriptTable(scriptTable); 38989 const hasDefault = scriptTable.defaultLangSys !== 0; 38990 const supported = scriptTable.langSysRecords.map( 38991 (l2) => l2.langSysTag 38992 ); 38993 if (hasDefault) supported.unshift(`dflt`); 38994 return supported; 38995 } 38996 getDefaultLangSysTable(scriptTable) { 38997 scriptTable = this.ensureScriptTable(scriptTable); 38998 let offset4 = scriptTable.defaultLangSys; 38999 if (offset4 !== 0) { 39000 this.parser.currentPosition = scriptTable.start + offset4; 39001 let table = new LangSysTable(this.parser); 39002 table.langSysTag = ``; 39003 table.defaultForScript = scriptTable.scriptTag; 39004 return table; 39005 } 39006 } 39007 getLangSysTable(scriptTable, langSysTag = `dflt`) { 39008 if (langSysTag === `dflt`) 39009 return this.getDefaultLangSysTable(scriptTable); 39010 scriptTable = this.ensureScriptTable(scriptTable); 39011 let record = scriptTable.langSysRecords.find( 39012 (l2) => l2.langSysTag === langSysTag 39013 ); 39014 this.parser.currentPosition = scriptTable.start + record.langSysOffset; 39015 let table = new LangSysTable(this.parser); 39016 table.langSysTag = langSysTag; 39017 return table; 39018 } 39019 getFeatures(langSysTable) { 39020 return langSysTable.featureIndices.map( 39021 (index2) => this.getFeature(index2) 39022 ); 39023 } 39024 getFeature(indexOrTag) { 39025 let record; 39026 if (parseInt(indexOrTag) == indexOrTag) { 39027 record = this.featureList.featureRecords[indexOrTag]; 39028 } else { 39029 record = this.featureList.featureRecords.find( 39030 (f) => f.featureTag === indexOrTag 39031 ); 39032 } 39033 if (!record) return; 39034 this.parser.currentPosition = this.featureList.start + record.featureOffset; 39035 let table = new FeatureTable(this.parser); 39036 table.featureTag = record.featureTag; 39037 return table; 39038 } 39039 getLookups(featureTable) { 39040 return featureTable.lookupListIndices.map( 39041 (index2) => this.getLookup(index2) 39042 ); 39043 } 39044 getLookup(lookupIndex, type) { 39045 let lookupOffset = this.lookupList.lookups[lookupIndex]; 39046 this.parser.currentPosition = this.lookupList.start + lookupOffset; 39047 return new LookupTable(this.parser, type); 39048 } 39049 }; 39050 var GSUB = class extends CommonLayoutTable { 39051 constructor(dict, dataview) { 39052 super(dict, dataview, `GSUB`); 39053 } 39054 getLookup(lookupIndex) { 39055 return super.getLookup(lookupIndex, `GSUB`); 39056 } 39057 }; 39058 var GSUB$1 = Object.freeze({ __proto__: null, GSUB }); 39059 var GPOS = class extends CommonLayoutTable { 39060 constructor(dict, dataview) { 39061 super(dict, dataview, `GPOS`); 39062 } 39063 getLookup(lookupIndex) { 39064 return super.getLookup(lookupIndex, `GPOS`); 39065 } 39066 }; 39067 var GPOS$1 = Object.freeze({ __proto__: null, GPOS }); 39068 var SVG23 = class extends SimpleTable { 39069 constructor(dict, dataview) { 39070 const { p: p22 } = super(dict, dataview); 39071 this.version = p22.uint16; 39072 this.offsetToSVGDocumentList = p22.Offset32; 39073 p22.currentPosition = this.tableStart + this.offsetToSVGDocumentList; 39074 this.documentList = new SVGDocumentList(p22); 39075 } 39076 }; 39077 var SVGDocumentList = class extends ParsedData { 39078 constructor(p22) { 39079 super(p22); 39080 this.numEntries = p22.uint16; 39081 this.documentRecords = [...new Array(this.numEntries)].map( 39082 (_) => new SVGDocumentRecord(p22) 39083 ); 39084 } 39085 getDocument(documentID) { 39086 let record = this.documentRecords[documentID]; 39087 if (!record) return ""; 39088 let offset4 = this.start + record.svgDocOffset; 39089 this.parser.currentPosition = offset4; 39090 return this.parser.readBytes(record.svgDocLength); 39091 } 39092 getDocumentForGlyph(glyphID) { 39093 let id = this.documentRecords.findIndex( 39094 (d) => d.startGlyphID <= glyphID && glyphID <= d.endGlyphID 39095 ); 39096 if (id === -1) return ""; 39097 return this.getDocument(id); 39098 } 39099 }; 39100 var SVGDocumentRecord = class { 39101 constructor(p22) { 39102 this.startGlyphID = p22.uint16; 39103 this.endGlyphID = p22.uint16; 39104 this.svgDocOffset = p22.Offset32; 39105 this.svgDocLength = p22.uint32; 39106 } 39107 }; 39108 var SVG$1 = Object.freeze({ __proto__: null, SVG: SVG23 }); 39109 var fvar = class extends SimpleTable { 39110 constructor(dict, dataview) { 39111 const { p: p22 } = super(dict, dataview); 39112 this.majorVersion = p22.uint16; 39113 this.minorVersion = p22.uint16; 39114 this.axesArrayOffset = p22.Offset16; 39115 p22.uint16; 39116 this.axisCount = p22.uint16; 39117 this.axisSize = p22.uint16; 39118 this.instanceCount = p22.uint16; 39119 this.instanceSize = p22.uint16; 39120 const axisStart = this.tableStart + this.axesArrayOffset; 39121 lazy$1(this, `axes`, () => { 39122 p22.currentPosition = axisStart; 39123 return [...new Array(this.axisCount)].map( 39124 (_) => new VariationAxisRecord(p22) 39125 ); 39126 }); 39127 const instanceStart = axisStart + this.axisCount * this.axisSize; 39128 lazy$1(this, `instances`, () => { 39129 let instances = []; 39130 for (let i = 0; i < this.instanceCount; i++) { 39131 p22.currentPosition = instanceStart + i * this.instanceSize; 39132 instances.push( 39133 new InstanceRecord(p22, this.axisCount, this.instanceSize) 39134 ); 39135 } 39136 return instances; 39137 }); 39138 } 39139 getSupportedAxes() { 39140 return this.axes.map((a) => a.tag); 39141 } 39142 getAxis(name2) { 39143 return this.axes.find((a) => a.tag === name2); 39144 } 39145 }; 39146 var VariationAxisRecord = class { 39147 constructor(p22) { 39148 this.tag = p22.tag; 39149 this.minValue = p22.fixed; 39150 this.defaultValue = p22.fixed; 39151 this.maxValue = p22.fixed; 39152 this.flags = p22.flags(16); 39153 this.axisNameID = p22.uint16; 39154 } 39155 }; 39156 var InstanceRecord = class { 39157 constructor(p22, axisCount, size4) { 39158 let start = p22.currentPosition; 39159 this.subfamilyNameID = p22.uint16; 39160 p22.uint16; 39161 this.coordinates = [...new Array(axisCount)].map( 39162 (_) => p22.fixed 39163 ); 39164 if (p22.currentPosition - start < size4) { 39165 this.postScriptNameID = p22.uint16; 39166 } 39167 } 39168 }; 39169 var fvar$1 = Object.freeze({ __proto__: null, fvar }); 39170 var cvt = class extends SimpleTable { 39171 constructor(dict, dataview) { 39172 const { p: p22 } = super(dict, dataview); 39173 const n = dict.length / 2; 39174 lazy$1( 39175 this, 39176 `items`, 39177 () => [...new Array(n)].map((_) => p22.fword) 39178 ); 39179 } 39180 }; 39181 var cvt$1 = Object.freeze({ __proto__: null, cvt }); 39182 var fpgm = class extends SimpleTable { 39183 constructor(dict, dataview) { 39184 const { p: p22 } = super(dict, dataview); 39185 lazy$1( 39186 this, 39187 `instructions`, 39188 () => [...new Array(dict.length)].map((_) => p22.uint8) 39189 ); 39190 } 39191 }; 39192 var fpgm$1 = Object.freeze({ __proto__: null, fpgm }); 39193 var gasp = class extends SimpleTable { 39194 constructor(dict, dataview) { 39195 const { p: p22 } = super(dict, dataview); 39196 this.version = p22.uint16; 39197 this.numRanges = p22.uint16; 39198 const getter = () => [...new Array(this.numRanges)].map( 39199 (_) => new GASPRange(p22) 39200 ); 39201 lazy$1(this, `gaspRanges`, getter); 39202 } 39203 }; 39204 var GASPRange = class { 39205 constructor(p22) { 39206 this.rangeMaxPPEM = p22.uint16; 39207 this.rangeGaspBehavior = p22.uint16; 39208 } 39209 }; 39210 var gasp$1 = Object.freeze({ __proto__: null, gasp }); 39211 var glyf = class extends SimpleTable { 39212 constructor(dict, dataview) { 39213 super(dict, dataview); 39214 } 39215 getGlyphData(offset4, length) { 39216 this.parser.currentPosition = this.tableStart + offset4; 39217 return this.parser.readBytes(length); 39218 } 39219 }; 39220 var glyf$1 = Object.freeze({ __proto__: null, glyf }); 39221 var loca = class extends SimpleTable { 39222 constructor(dict, dataview, tables) { 39223 const { p: p22 } = super(dict, dataview); 39224 const n = tables.maxp.numGlyphs + 1; 39225 if (tables.head.indexToLocFormat === 0) { 39226 this.x2 = true; 39227 lazy$1( 39228 this, 39229 `offsets`, 39230 () => [...new Array(n)].map((_) => p22.Offset16) 39231 ); 39232 } else { 39233 lazy$1( 39234 this, 39235 `offsets`, 39236 () => [...new Array(n)].map((_) => p22.Offset32) 39237 ); 39238 } 39239 } 39240 getGlyphDataOffsetAndLength(glyphID) { 39241 let offset4 = this.offsets[glyphID] * this.x2 ? 2 : 1; 39242 let nextOffset = this.offsets[glyphID + 1] * this.x2 ? 2 : 1; 39243 return { offset: offset4, length: nextOffset - offset4 }; 39244 } 39245 }; 39246 var loca$1 = Object.freeze({ __proto__: null, loca }); 39247 var prep = class extends SimpleTable { 39248 constructor(dict, dataview) { 39249 const { p: p22 } = super(dict, dataview); 39250 lazy$1( 39251 this, 39252 `instructions`, 39253 () => [...new Array(dict.length)].map((_) => p22.uint8) 39254 ); 39255 } 39256 }; 39257 var prep$1 = Object.freeze({ __proto__: null, prep }); 39258 var CFF = class extends SimpleTable { 39259 constructor(dict, dataview) { 39260 const { p: p22 } = super(dict, dataview); 39261 lazy$1(this, `data`, () => p22.readBytes()); 39262 } 39263 }; 39264 var CFF$1 = Object.freeze({ __proto__: null, CFF }); 39265 var CFF2 = class extends SimpleTable { 39266 constructor(dict, dataview) { 39267 const { p: p22 } = super(dict, dataview); 39268 lazy$1(this, `data`, () => p22.readBytes()); 39269 } 39270 }; 39271 var CFF2$1 = Object.freeze({ __proto__: null, CFF2 }); 39272 var VORG = class extends SimpleTable { 39273 constructor(dict, dataview) { 39274 const { p: p22 } = super(dict, dataview); 39275 this.majorVersion = p22.uint16; 39276 this.minorVersion = p22.uint16; 39277 this.defaultVertOriginY = p22.int16; 39278 this.numVertOriginYMetrics = p22.uint16; 39279 lazy$1( 39280 this, 39281 `vertORiginYMetrics`, 39282 () => [...new Array(this.numVertOriginYMetrics)].map( 39283 (_) => new VertOriginYMetric(p22) 39284 ) 39285 ); 39286 } 39287 }; 39288 var VertOriginYMetric = class { 39289 constructor(p22) { 39290 this.glyphIndex = p22.uint16; 39291 this.vertOriginY = p22.int16; 39292 } 39293 }; 39294 var VORG$1 = Object.freeze({ __proto__: null, VORG }); 39295 var BitmapSize = class { 39296 constructor(p22) { 39297 this.indexSubTableArrayOffset = p22.Offset32; 39298 this.indexTablesSize = p22.uint32; 39299 this.numberofIndexSubTables = p22.uint32; 39300 this.colorRef = p22.uint32; 39301 this.hori = new SbitLineMetrics(p22); 39302 this.vert = new SbitLineMetrics(p22); 39303 this.startGlyphIndex = p22.uint16; 39304 this.endGlyphIndex = p22.uint16; 39305 this.ppemX = p22.uint8; 39306 this.ppemY = p22.uint8; 39307 this.bitDepth = p22.uint8; 39308 this.flags = p22.int8; 39309 } 39310 }; 39311 var BitmapScale = class { 39312 constructor(p22) { 39313 this.hori = new SbitLineMetrics(p22); 39314 this.vert = new SbitLineMetrics(p22); 39315 this.ppemX = p22.uint8; 39316 this.ppemY = p22.uint8; 39317 this.substitutePpemX = p22.uint8; 39318 this.substitutePpemY = p22.uint8; 39319 } 39320 }; 39321 var SbitLineMetrics = class { 39322 constructor(p22) { 39323 this.ascender = p22.int8; 39324 this.descender = p22.int8; 39325 this.widthMax = p22.uint8; 39326 this.caretSlopeNumerator = p22.int8; 39327 this.caretSlopeDenominator = p22.int8; 39328 this.caretOffset = p22.int8; 39329 this.minOriginSB = p22.int8; 39330 this.minAdvanceSB = p22.int8; 39331 this.maxBeforeBL = p22.int8; 39332 this.minAfterBL = p22.int8; 39333 this.pad1 = p22.int8; 39334 this.pad2 = p22.int8; 39335 } 39336 }; 39337 var EBLC = class extends SimpleTable { 39338 constructor(dict, dataview, name2) { 39339 const { p: p22 } = super(dict, dataview, name2); 39340 this.majorVersion = p22.uint16; 39341 this.minorVersion = p22.uint16; 39342 this.numSizes = p22.uint32; 39343 lazy$1( 39344 this, 39345 `bitMapSizes`, 39346 () => [...new Array(this.numSizes)].map( 39347 (_) => new BitmapSize(p22) 39348 ) 39349 ); 39350 } 39351 }; 39352 var EBLC$1 = Object.freeze({ __proto__: null, EBLC }); 39353 var EBDT = class extends SimpleTable { 39354 constructor(dict, dataview, name2) { 39355 const { p: p22 } = super(dict, dataview, name2); 39356 this.majorVersion = p22.uint16; 39357 this.minorVersion = p22.uint16; 39358 } 39359 }; 39360 var EBDT$1 = Object.freeze({ __proto__: null, EBDT }); 39361 var EBSC = class extends SimpleTable { 39362 constructor(dict, dataview) { 39363 const { p: p22 } = super(dict, dataview); 39364 this.majorVersion = p22.uint16; 39365 this.minorVersion = p22.uint16; 39366 this.numSizes = p22.uint32; 39367 lazy$1( 39368 this, 39369 `bitmapScales`, 39370 () => [...new Array(this.numSizes)].map( 39371 (_) => new BitmapScale(p22) 39372 ) 39373 ); 39374 } 39375 }; 39376 var EBSC$1 = Object.freeze({ __proto__: null, EBSC }); 39377 var CBLC = class extends EBLC { 39378 constructor(dict, dataview) { 39379 super(dict, dataview, `CBLC`); 39380 } 39381 }; 39382 var CBLC$1 = Object.freeze({ __proto__: null, CBLC }); 39383 var CBDT = class extends EBDT { 39384 constructor(dict, dataview) { 39385 super(dict, dataview, `CBDT`); 39386 } 39387 }; 39388 var CBDT$1 = Object.freeze({ __proto__: null, CBDT }); 39389 var sbix = class extends SimpleTable { 39390 constructor(dict, dataview) { 39391 const { p: p22 } = super(dict, dataview); 39392 this.version = p22.uint16; 39393 this.flags = p22.flags(16); 39394 this.numStrikes = p22.uint32; 39395 lazy$1( 39396 this, 39397 `strikeOffsets`, 39398 () => [...new Array(this.numStrikes)].map((_) => p22.Offset32) 39399 ); 39400 } 39401 }; 39402 var sbix$1 = Object.freeze({ __proto__: null, sbix }); 39403 var COLR = class extends SimpleTable { 39404 constructor(dict, dataview) { 39405 const { p: p22 } = super(dict, dataview); 39406 this.version = p22.uint16; 39407 this.numBaseGlyphRecords = p22.uint16; 39408 this.baseGlyphRecordsOffset = p22.Offset32; 39409 this.layerRecordsOffset = p22.Offset32; 39410 this.numLayerRecords = p22.uint16; 39411 } 39412 getBaseGlyphRecord(glyphID) { 39413 let start = this.tableStart + this.baseGlyphRecordsOffset; 39414 this.parser.currentPosition = start; 39415 let first = new BaseGlyphRecord(this.parser); 39416 let firstID = first.gID; 39417 let end = this.tableStart + this.layerRecordsOffset - 6; 39418 this.parser.currentPosition = end; 39419 let last = new BaseGlyphRecord(this.parser); 39420 let lastID = last.gID; 39421 if (firstID === glyphID) return first; 39422 if (lastID === glyphID) return last; 39423 while (true) { 39424 if (start === end) break; 39425 let mid = start + (end - start) / 12; 39426 this.parser.currentPosition = mid; 39427 let middle = new BaseGlyphRecord(this.parser); 39428 let midID = middle.gID; 39429 if (midID === glyphID) return middle; 39430 else if (midID > glyphID) { 39431 end = mid; 39432 } else if (midID < glyphID) { 39433 start = mid; 39434 } 39435 } 39436 return false; 39437 } 39438 getLayers(glyphID) { 39439 let record = this.getBaseGlyphRecord(glyphID); 39440 this.parser.currentPosition = this.tableStart + this.layerRecordsOffset + 4 * record.firstLayerIndex; 39441 return [...new Array(record.numLayers)].map( 39442 (_) => new LayerRecord(p) 39443 ); 39444 } 39445 }; 39446 var BaseGlyphRecord = class { 39447 constructor(p22) { 39448 this.gID = p22.uint16; 39449 this.firstLayerIndex = p22.uint16; 39450 this.numLayers = p22.uint16; 39451 } 39452 }; 39453 var LayerRecord = class { 39454 constructor(p22) { 39455 this.gID = p22.uint16; 39456 this.paletteIndex = p22.uint16; 39457 } 39458 }; 39459 var COLR$1 = Object.freeze({ __proto__: null, COLR }); 39460 var CPAL = class extends SimpleTable { 39461 constructor(dict, dataview) { 39462 const { p: p22 } = super(dict, dataview); 39463 this.version = p22.uint16; 39464 this.numPaletteEntries = p22.uint16; 39465 const numPalettes = this.numPalettes = p22.uint16; 39466 this.numColorRecords = p22.uint16; 39467 this.offsetFirstColorRecord = p22.Offset32; 39468 this.colorRecordIndices = [...new Array(this.numPalettes)].map( 39469 (_) => p22.uint16 39470 ); 39471 lazy$1(this, `colorRecords`, () => { 39472 p22.currentPosition = this.tableStart + this.offsetFirstColorRecord; 39473 return [...new Array(this.numColorRecords)].map( 39474 (_) => new ColorRecord(p22) 39475 ); 39476 }); 39477 if (this.version === 1) { 39478 this.offsetPaletteTypeArray = p22.Offset32; 39479 this.offsetPaletteLabelArray = p22.Offset32; 39480 this.offsetPaletteEntryLabelArray = p22.Offset32; 39481 lazy$1(this, `paletteTypeArray`, () => { 39482 p22.currentPosition = this.tableStart + this.offsetPaletteTypeArray; 39483 return new PaletteTypeArray(p22, numPalettes); 39484 }); 39485 lazy$1(this, `paletteLabelArray`, () => { 39486 p22.currentPosition = this.tableStart + this.offsetPaletteLabelArray; 39487 return new PaletteLabelsArray(p22, numPalettes); 39488 }); 39489 lazy$1(this, `paletteEntryLabelArray`, () => { 39490 p22.currentPosition = this.tableStart + this.offsetPaletteEntryLabelArray; 39491 return new PaletteEntryLabelArray(p22, numPalettes); 39492 }); 39493 } 39494 } 39495 }; 39496 var ColorRecord = class { 39497 constructor(p22) { 39498 this.blue = p22.uint8; 39499 this.green = p22.uint8; 39500 this.red = p22.uint8; 39501 this.alpha = p22.uint8; 39502 } 39503 }; 39504 var PaletteTypeArray = class { 39505 constructor(p22, numPalettes) { 39506 this.paletteTypes = [...new Array(numPalettes)].map( 39507 (_) => p22.uint32 39508 ); 39509 } 39510 }; 39511 var PaletteLabelsArray = class { 39512 constructor(p22, numPalettes) { 39513 this.paletteLabels = [...new Array(numPalettes)].map( 39514 (_) => p22.uint16 39515 ); 39516 } 39517 }; 39518 var PaletteEntryLabelArray = class { 39519 constructor(p22, numPalettes) { 39520 this.paletteEntryLabels = [...new Array(numPalettes)].map( 39521 (_) => p22.uint16 39522 ); 39523 } 39524 }; 39525 var CPAL$1 = Object.freeze({ __proto__: null, CPAL }); 39526 var DSIG = class extends SimpleTable { 39527 constructor(dict, dataview) { 39528 const { p: p22 } = super(dict, dataview); 39529 this.version = p22.uint32; 39530 this.numSignatures = p22.uint16; 39531 this.flags = p22.uint16; 39532 this.signatureRecords = [...new Array(this.numSignatures)].map( 39533 (_) => new SignatureRecord(p22) 39534 ); 39535 } 39536 getData(signatureID) { 39537 const record = this.signatureRecords[signatureID]; 39538 this.parser.currentPosition = this.tableStart + record.offset; 39539 return new SignatureBlockFormat1(this.parser); 39540 } 39541 }; 39542 var SignatureRecord = class { 39543 constructor(p22) { 39544 this.format = p22.uint32; 39545 this.length = p22.uint32; 39546 this.offset = p22.Offset32; 39547 } 39548 }; 39549 var SignatureBlockFormat1 = class { 39550 constructor(p22) { 39551 p22.uint16; 39552 p22.uint16; 39553 this.signatureLength = p22.uint32; 39554 this.signature = p22.readBytes(this.signatureLength); 39555 } 39556 }; 39557 var DSIG$1 = Object.freeze({ __proto__: null, DSIG }); 39558 var hdmx = class extends SimpleTable { 39559 constructor(dict, dataview, tables) { 39560 const { p: p22 } = super(dict, dataview); 39561 const numGlyphs = tables.hmtx.numGlyphs; 39562 this.version = p22.uint16; 39563 this.numRecords = p22.int16; 39564 this.sizeDeviceRecord = p22.int32; 39565 this.records = [...new Array(numRecords)].map( 39566 (_) => new DeviceRecord(p22, numGlyphs) 39567 ); 39568 } 39569 }; 39570 var DeviceRecord = class { 39571 constructor(p22, numGlyphs) { 39572 this.pixelSize = p22.uint8; 39573 this.maxWidth = p22.uint8; 39574 this.widths = p22.readBytes(numGlyphs); 39575 } 39576 }; 39577 var hdmx$1 = Object.freeze({ __proto__: null, hdmx }); 39578 var kern = class extends SimpleTable { 39579 constructor(dict, dataview) { 39580 const { p: p22 } = super(dict, dataview); 39581 this.version = p22.uint16; 39582 this.nTables = p22.uint16; 39583 lazy$1(this, `tables`, () => { 39584 let offset4 = this.tableStart + 4; 39585 const tables = []; 39586 for (let i = 0; i < this.nTables; i++) { 39587 p22.currentPosition = offset4; 39588 let subtable = new KernSubTable(p22); 39589 tables.push(subtable); 39590 offset4 += subtable; 39591 } 39592 return tables; 39593 }); 39594 } 39595 }; 39596 var KernSubTable = class { 39597 constructor(p22) { 39598 this.version = p22.uint16; 39599 this.length = p22.uint16; 39600 this.coverage = p22.flags(8); 39601 this.format = p22.uint8; 39602 if (this.format === 0) { 39603 this.nPairs = p22.uint16; 39604 this.searchRange = p22.uint16; 39605 this.entrySelector = p22.uint16; 39606 this.rangeShift = p22.uint16; 39607 lazy$1( 39608 this, 39609 `pairs`, 39610 () => [...new Array(this.nPairs)].map((_) => new Pair(p22)) 39611 ); 39612 } 39613 if (this.format === 2) { 39614 console.warn( 39615 `Kern subtable format 2 is not supported: this parser currently only parses universal table data.` 39616 ); 39617 } 39618 } 39619 get horizontal() { 39620 return this.coverage[0]; 39621 } 39622 get minimum() { 39623 return this.coverage[1]; 39624 } 39625 get crossstream() { 39626 return this.coverage[2]; 39627 } 39628 get override() { 39629 return this.coverage[3]; 39630 } 39631 }; 39632 var Pair = class { 39633 constructor(p22) { 39634 this.left = p22.uint16; 39635 this.right = p22.uint16; 39636 this.value = p22.fword; 39637 } 39638 }; 39639 var kern$1 = Object.freeze({ __proto__: null, kern }); 39640 var LTSH = class extends SimpleTable { 39641 constructor(dict, dataview) { 39642 const { p: p22 } = super(dict, dataview); 39643 this.version = p22.uint16; 39644 this.numGlyphs = p22.uint16; 39645 this.yPels = p22.readBytes(this.numGlyphs); 39646 } 39647 }; 39648 var LTSH$1 = Object.freeze({ __proto__: null, LTSH }); 39649 var MERG = class extends SimpleTable { 39650 constructor(dict, dataview) { 39651 const { p: p22 } = super(dict, dataview); 39652 this.version = p22.uint16; 39653 this.mergeClassCount = p22.uint16; 39654 this.mergeDataOffset = p22.Offset16; 39655 this.classDefCount = p22.uint16; 39656 this.offsetToClassDefOffsets = p22.Offset16; 39657 lazy$1( 39658 this, 39659 `mergeEntryMatrix`, 39660 () => [...new Array(this.mergeClassCount)].map( 39661 (_) => p22.readBytes(this.mergeClassCount) 39662 ) 39663 ); 39664 console.warn(`Full MERG parsing is currently not supported.`); 39665 console.warn( 39666 `If you need this table parsed, please file an issue, or better yet, a PR.` 39667 ); 39668 } 39669 }; 39670 var MERG$1 = Object.freeze({ __proto__: null, MERG }); 39671 var meta = class extends SimpleTable { 39672 constructor(dict, dataview) { 39673 const { p: p22 } = super(dict, dataview); 39674 this.version = p22.uint32; 39675 this.flags = p22.uint32; 39676 p22.uint32; 39677 this.dataMapsCount = p22.uint32; 39678 this.dataMaps = [...new Array(this.dataMapsCount)].map( 39679 (_) => new DataMap(this.tableStart, p22) 39680 ); 39681 } 39682 }; 39683 var DataMap = class { 39684 constructor(tableStart, p22) { 39685 this.tableStart = tableStart; 39686 this.parser = p22; 39687 this.tag = p22.tag; 39688 this.dataOffset = p22.Offset32; 39689 this.dataLength = p22.uint32; 39690 } 39691 getData() { 39692 this.parser.currentField = this.tableStart + this.dataOffset; 39693 return this.parser.readBytes(this.dataLength); 39694 } 39695 }; 39696 var meta$1 = Object.freeze({ __proto__: null, meta }); 39697 var PCLT = class extends SimpleTable { 39698 constructor(dict, dataview) { 39699 super(dict, dataview); 39700 console.warn( 39701 `This font uses a PCLT table, which is currently not supported by this parser.` 39702 ); 39703 console.warn( 39704 `If you need this table parsed, please file an issue, or better yet, a PR.` 39705 ); 39706 } 39707 }; 39708 var PCLT$1 = Object.freeze({ __proto__: null, PCLT }); 39709 var VDMX = class extends SimpleTable { 39710 constructor(dict, dataview) { 39711 const { p: p22 } = super(dict, dataview); 39712 this.version = p22.uint16; 39713 this.numRecs = p22.uint16; 39714 this.numRatios = p22.uint16; 39715 this.ratRanges = [...new Array(this.numRatios)].map( 39716 (_) => new RatioRange(p22) 39717 ); 39718 this.offsets = [...new Array(this.numRatios)].map( 39719 (_) => p22.Offset16 39720 ); 39721 this.VDMXGroups = [...new Array(this.numRecs)].map( 39722 (_) => new VDMXGroup(p22) 39723 ); 39724 } 39725 }; 39726 var RatioRange = class { 39727 constructor(p22) { 39728 this.bCharSet = p22.uint8; 39729 this.xRatio = p22.uint8; 39730 this.yStartRatio = p22.uint8; 39731 this.yEndRatio = p22.uint8; 39732 } 39733 }; 39734 var VDMXGroup = class { 39735 constructor(p22) { 39736 this.recs = p22.uint16; 39737 this.startsz = p22.uint8; 39738 this.endsz = p22.uint8; 39739 this.records = [...new Array(this.recs)].map( 39740 (_) => new vTable(p22) 39741 ); 39742 } 39743 }; 39744 var vTable = class { 39745 constructor(p22) { 39746 this.yPelHeight = p22.uint16; 39747 this.yMax = p22.int16; 39748 this.yMin = p22.int16; 39749 } 39750 }; 39751 var VDMX$1 = Object.freeze({ __proto__: null, VDMX }); 39752 var vhea = class extends SimpleTable { 39753 constructor(dict, dataview) { 39754 const { p: p22 } = super(dict, dataview); 39755 this.version = p22.fixed; 39756 this.ascent = this.vertTypoAscender = p22.int16; 39757 this.descent = this.vertTypoDescender = p22.int16; 39758 this.lineGap = this.vertTypoLineGap = p22.int16; 39759 this.advanceHeightMax = p22.int16; 39760 this.minTopSideBearing = p22.int16; 39761 this.minBottomSideBearing = p22.int16; 39762 this.yMaxExtent = p22.int16; 39763 this.caretSlopeRise = p22.int16; 39764 this.caretSlopeRun = p22.int16; 39765 this.caretOffset = p22.int16; 39766 this.reserved = p22.int16; 39767 this.reserved = p22.int16; 39768 this.reserved = p22.int16; 39769 this.reserved = p22.int16; 39770 this.metricDataFormat = p22.int16; 39771 this.numOfLongVerMetrics = p22.uint16; 39772 p22.verifyLength(); 39773 } 39774 }; 39775 var vhea$1 = Object.freeze({ __proto__: null, vhea }); 39776 var vmtx = class extends SimpleTable { 39777 constructor(dict, dataview, tables) { 39778 super(dict, dataview); 39779 const numOfLongVerMetrics = tables.vhea.numOfLongVerMetrics; 39780 const numGlyphs = tables.maxp.numGlyphs; 39781 const metricsStart = p.currentPosition; 39782 lazy(this, `vMetrics`, () => { 39783 p.currentPosition = metricsStart; 39784 return [...new Array(numOfLongVerMetrics)].map( 39785 (_) => new LongVertMetric(p.uint16, p.int16) 39786 ); 39787 }); 39788 if (numOfLongVerMetrics < numGlyphs) { 39789 const tsbStart = metricsStart + numOfLongVerMetrics * 4; 39790 lazy(this, `topSideBearings`, () => { 39791 p.currentPosition = tsbStart; 39792 return [...new Array(numGlyphs - numOfLongVerMetrics)].map( 39793 (_) => p.int16 39794 ); 39795 }); 39796 } 39797 } 39798 }; 39799 var LongVertMetric = class { 39800 constructor(h, b) { 39801 this.advanceHeight = h; 39802 this.topSideBearing = b; 39803 } 39804 }; 39805 var vmtx$1 = Object.freeze({ __proto__: null, vmtx }); 39806 39807 // packages/global-styles-ui/build-module/font-library/utils/make-families-from-faces.mjs 39808 function makeFamiliesFromFaces(fontFaces) { 39809 const fontFamiliesObject = fontFaces.reduce( 39810 (acc, item) => { 39811 if (!acc[item.fontFamily]) { 39812 acc[item.fontFamily] = { 39813 name: item.fontFamily, 39814 fontFamily: item.fontFamily, 39815 slug: kebabCase(item.fontFamily.toLowerCase()), 39816 fontFace: [] 39817 }; 39818 } 39819 acc[item.fontFamily].fontFace.push(item); 39820 return acc; 39821 }, 39822 {} 39823 ); 39824 return Object.values(fontFamiliesObject); 39825 } 39826 39827 // packages/global-styles-ui/build-module/font-library/upload-fonts.mjs 39828 var import_jsx_runtime153 = __toESM(require_jsx_runtime(), 1); 39829 function UploadFonts() { 39830 const { installFonts } = (0, import_element82.useContext)(FontLibraryContext); 39831 const [isUploading, setIsUploading] = (0, import_element82.useState)(false); 39832 const [notice, setNotice] = (0, import_element82.useState)(null); 39833 const handleDropZone = (files) => { 39834 handleFilesUpload(files); 39835 }; 39836 const onFilesUpload = (event) => { 39837 handleFilesUpload(event.target.files); 39838 }; 39839 const handleFilesUpload = async (files) => { 39840 if (!files) { 39841 return; 39842 } 39843 setNotice(null); 39844 setIsUploading(true); 39845 const uniqueFilenames = /* @__PURE__ */ new Set(); 39846 const selectedFiles = [...files]; 39847 let hasInvalidFiles = false; 39848 const checkFilesPromises = selectedFiles.map(async (file) => { 39849 const isFont = await isFontFile(file); 39850 if (!isFont) { 39851 hasInvalidFiles = true; 39852 return null; 39853 } 39854 if (uniqueFilenames.has(file.name)) { 39855 return null; 39856 } 39857 const fileExtension = (((file.name ?? "").split(".") ?? []).pop() ?? "").toLowerCase(); 39858 if (ALLOWED_FILE_EXTENSIONS.includes(fileExtension)) { 39859 uniqueFilenames.add(file.name); 39860 return file; 39861 } 39862 return null; 39863 }); 39864 const allowedFiles = (await Promise.all(checkFilesPromises)).filter((file) => null !== file); 39865 if (allowedFiles.length > 0) { 39866 loadFiles(allowedFiles); 39867 } else { 39868 const message = hasInvalidFiles ? (0, import_i18n27.__)("Sorry, you are not allowed to upload this file type.") : (0, import_i18n27.__)("No fonts found to install."); 39869 setNotice({ 39870 type: "error", 39871 message 39872 }); 39873 setIsUploading(false); 39874 } 39875 }; 39876 const loadFiles = async (files) => { 39877 const fontFacesLoaded = await Promise.all( 39878 files.map(async (fontFile) => { 39879 const fontFaceData = await getFontFaceMetadata(fontFile); 39880 await loadFontFaceInBrowser( 39881 fontFaceData, 39882 fontFaceData.file, 39883 "all" 39884 ); 39885 return fontFaceData; 39886 }) 39887 ); 39888 handleInstall(fontFacesLoaded); 39889 }; 39890 async function isFontFile(file) { 39891 const font2 = new Font("Uploaded Font"); 39892 try { 39893 const buffer = await readFileAsArrayBuffer(file); 39894 await font2.fromDataBuffer(buffer, "font"); 39895 return true; 39896 } catch { 39897 return false; 39898 } 39899 } 39900 async function readFileAsArrayBuffer(file) { 39901 return new Promise((resolve, reject) => { 39902 const reader = new window.FileReader(); 39903 reader.readAsArrayBuffer(file); 39904 reader.onload = () => resolve(reader.result); 39905 reader.onerror = reject; 39906 }); 39907 } 39908 const getFontFaceMetadata = async (fontFile) => { 39909 const buffer = await readFileAsArrayBuffer(fontFile); 39910 const fontObj = new Font("Uploaded Font"); 39911 fontObj.fromDataBuffer(buffer, fontFile.name); 39912 const onloadEvent = await new Promise( 39913 (resolve) => fontObj.onload = resolve 39914 ); 39915 const font2 = onloadEvent.detail.font; 39916 const { name: name2 } = font2.opentype.tables; 39917 const fontName = name2.get(16) || name2.get(1); 39918 const isItalic = name2.get(2).toLowerCase().includes("italic"); 39919 const fontWeight = font2.opentype.tables["OS/2"].usWeightClass || "normal"; 39920 const isVariable = !!font2.opentype.tables.fvar; 39921 const weightAxis = isVariable && font2.opentype.tables.fvar.axes.find( 39922 ({ tag }) => tag === "wght" 39923 ); 39924 const weightRange = weightAxis ? `$weightAxis.minValue} $weightAxis.maxValue}` : null; 39925 return { 39926 file: fontFile, 39927 fontFamily: fontName, 39928 fontStyle: isItalic ? "italic" : "normal", 39929 fontWeight: weightRange || fontWeight 39930 }; 39931 }; 39932 const handleInstall = async (fontFaces) => { 39933 const fontFamilies = makeFamiliesFromFaces(fontFaces); 39934 try { 39935 await installFonts(fontFamilies); 39936 setNotice({ 39937 type: "success", 39938 message: (0, import_i18n27.__)("Fonts were installed successfully.") 39939 }); 39940 } catch (error2) { 39941 const typedError = error2; 39942 setNotice({ 39943 type: "error", 39944 message: typedError.message, 39945 errors: typedError?.installationErrors 39946 }); 39947 } 39948 setIsUploading(false); 39949 }; 39950 return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("div", { className: "font-library__tabpanel-layout", children: [ 39951 /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_components26.DropZone, { onFilesDrop: handleDropZone }), 39952 /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(import_components26.__experimentalVStack, { className: "font-library__local-fonts", justify: "start", children: [ 39953 notice && /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)( 39954 import_components26.Notice, 39955 { 39956 status: notice.type, 39957 __unstableHTML: true, 39958 onRemove: () => setNotice(null), 39959 children: [ 39960 notice.message, 39961 notice.errors && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("ul", { children: notice.errors.map((error2, index2) => /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("li", { children: error2 }, index2)) }) 39962 ] 39963 } 39964 ), 39965 isUploading && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_components26.FlexItem, { children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("div", { className: "font-library__upload-area", children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)( 39966 progress_exports.Root, 39967 { 39968 value: null, 39969 "aria-label": (0, import_i18n27.__)("Uploading fonts"), 39970 children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(progress_exports.Track, { children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(progress_exports.Indicator, {}) }) 39971 } 39972 ) }) }), 39973 !isUploading && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)( 39974 import_components26.FormFileUpload, 39975 { 39976 accept: ALLOWED_FILE_EXTENSIONS.map( 39977 (ext) => `.$ext}` 39978 ).join(","), 39979 multiple: true, 39980 onChange: onFilesUpload, 39981 render: ({ openFileDialog }) => /* @__PURE__ */ (0, import_jsx_runtime153.jsx)( 39982 import_components26.Button, 39983 { 39984 __next40pxDefaultSize: true, 39985 className: "font-library__upload-area", 39986 onClick: openFileDialog, 39987 children: (0, import_i18n27.__)("Upload font") 39988 } 39989 ) 39990 } 39991 ), 39992 /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_components26.__experimentalText, { className: "font-library__upload-area__text", children: (0, import_i18n27.__)( 39993 "Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2." 39994 ) }) 39995 ] }) 39996 ] }); 39997 } 39998 var upload_fonts_default = UploadFonts; 39999 40000 // packages/global-styles-ui/build-module/font-library/modal.mjs 40001 var import_jsx_runtime154 = __toESM(require_jsx_runtime(), 1); 40002 var { Tabs } = unlock3(import_components27.privateApis); 40003 var DEFAULT_TAB = { 40004 id: "installed-fonts", 40005 title: (0, import_i18n28._x)("Library", "Font library") 40006 }; 40007 var UPLOAD_TAB = { 40008 id: "upload-fonts", 40009 title: (0, import_i18n28._x)("Upload", "noun") 40010 }; 40011 40012 // packages/global-styles-ui/build-module/font-family-item.mjs 40013 var import_i18n29 = __toESM(require_i18n(), 1); 40014 var import_components28 = __toESM(require_components(), 1); 40015 var import_element83 = __toESM(require_element(), 1); 40016 var import_jsx_runtime155 = __toESM(require_jsx_runtime(), 1); 40017 40018 // packages/global-styles-ui/build-module/font-families.mjs 40019 var import_jsx_runtime156 = __toESM(require_jsx_runtime(), 1); 40020 40021 // packages/global-styles-ui/build-module/font-sizes/font-sizes-count.mjs 40022 var import_i18n31 = __toESM(require_i18n(), 1); 40023 var import_components30 = __toESM(require_components(), 1); 40024 var import_jsx_runtime157 = __toESM(require_jsx_runtime(), 1); 40025 40026 // packages/global-styles-ui/build-module/text-shadows.mjs 40027 var import_i18n32 = __toESM(require_i18n(), 1); 40028 var import_components31 = __toESM(require_components(), 1); 40029 var import_jsx_runtime158 = __toESM(require_jsx_runtime(), 1); 40030 40031 // packages/global-styles-ui/build-module/screen-typography.mjs 40032 var import_jsx_runtime159 = __toESM(require_jsx_runtime(), 1); 40033 40034 // packages/global-styles-ui/build-module/screen-colors.mjs 40035 var import_i18n35 = __toESM(require_i18n(), 1); 40036 var import_components33 = __toESM(require_components(), 1); 40037 40038 // packages/global-styles-ui/build-module/palette.mjs 40039 var import_components32 = __toESM(require_components(), 1); 40040 var import_i18n34 = __toESM(require_i18n(), 1); 40041 var import_element86 = __toESM(require_element(), 1); 40042 40043 // packages/global-styles-ui/build-module/color-indicator-wrapper.mjs 40044 var import_jsx_runtime160 = __toESM(require_jsx_runtime(), 1); 40045 40046 // packages/global-styles-ui/build-module/palette.mjs 40047 var import_jsx_runtime161 = __toESM(require_jsx_runtime(), 1); 40048 40049 // packages/global-styles-ui/build-module/screen-colors.mjs 40050 var import_jsx_runtime162 = __toESM(require_jsx_runtime(), 1); 40051 40052 // packages/global-styles-ui/build-module/screen-color-palette.mjs 40053 var import_i18n39 = __toESM(require_i18n(), 1); 40054 40055 // packages/global-styles-ui/build-module/color-palette-panel.mjs 40056 var import_compose6 = __toESM(require_compose(), 1); 40057 var import_components36 = __toESM(require_components(), 1); 40058 var import_i18n36 = __toESM(require_i18n(), 1); 40059 40060 // packages/global-styles-ui/build-module/variations/variations-color.mjs 40061 var import_components35 = __toESM(require_components(), 1); 40062 40063 // packages/global-styles-ui/build-module/preview-colors.mjs 40064 var import_components34 = __toESM(require_components(), 1); 40065 40066 // packages/global-styles-ui/build-module/preset-colors.mjs 40067 var import_jsx_runtime163 = __toESM(require_jsx_runtime(), 1); 40068 function PresetColors() { 40069 const { paletteColors } = useStylesPreviewColors(); 40070 return paletteColors.slice(0, 4).map(({ slug, color }, index2) => /* @__PURE__ */ (0, import_jsx_runtime163.jsx)( 40071 "div", 40072 { 40073 style: { 40074 flexGrow: 1, 40075 height: "100%", 40076 background: color 40077 } 40078 }, 40079 `$slug}-$index2}` 40080 )); 40081 } 40082 40083 // packages/global-styles-ui/build-module/preview-colors.mjs 40084 var import_jsx_runtime164 = __toESM(require_jsx_runtime(), 1); 40085 var firstFrameVariants2 = { 40086 start: { 40087 scale: 1, 40088 opacity: 1 40089 }, 40090 hover: { 40091 scale: 0, 40092 opacity: 0 40093 } 40094 }; 40095 var StylesPreviewColors = ({ 40096 label, 40097 isFocused, 40098 withHoverView 40099 }) => { 40100 return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)( 40101 preview_wrapper_default, 40102 { 40103 label, 40104 isFocused, 40105 withHoverView, 40106 children: ({ key }) => /* @__PURE__ */ (0, import_jsx_runtime164.jsx)( 40107 import_components34.__unstableMotion.div, 40108 { 40109 variants: firstFrameVariants2, 40110 style: { 40111 height: "100%", 40112 overflow: "hidden" 40113 }, 40114 children: /* @__PURE__ */ (0, import_jsx_runtime164.jsx)( 40115 import_components34.__experimentalHStack, 40116 { 40117 spacing: 0, 40118 justify: "center", 40119 style: { 40120 height: "100%", 40121 overflow: "hidden" 40122 }, 40123 children: /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(PresetColors, {}) 40124 } 40125 ) 40126 }, 40127 key 40128 ) 40129 } 40130 ); 40131 }; 40132 var preview_colors_default = StylesPreviewColors; 40133 40134 // packages/global-styles-ui/build-module/variations/variations-color.mjs 40135 var import_jsx_runtime165 = __toESM(require_jsx_runtime(), 1); 40136 var propertiesToFilter2 = ["color"]; 40137 function ColorVariations({ 40138 title, 40139 gap = 2 40140 }) { 40141 const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig(propertiesToFilter2); 40142 if (colorVariations?.length <= 1) { 40143 return null; 40144 } 40145 return /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)(import_components35.__experimentalVStack, { spacing: 3, children: [ 40146 title && /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(Subtitle, { level: 3, children: title }), 40147 /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_components35.__experimentalGrid, { gap, children: colorVariations.map((variation, index2) => /* @__PURE__ */ (0, import_jsx_runtime165.jsx)( 40148 Variation, 40149 { 40150 variation, 40151 isPill: true, 40152 properties: propertiesToFilter2, 40153 showTooltip: true, 40154 children: () => /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(preview_colors_default, {}) 40155 }, 40156 index2 40157 )) }) 40158 ] }); 40159 } 40160 40161 // packages/global-styles-ui/build-module/color-palette-panel.mjs 40162 var import_jsx_runtime166 = __toESM(require_jsx_runtime(), 1); 40163 40164 // packages/global-styles-ui/build-module/gradients-palette-panel.mjs 40165 var import_compose7 = __toESM(require_compose(), 1); 40166 var import_components37 = __toESM(require_components(), 1); 40167 var import_i18n37 = __toESM(require_i18n(), 1); 40168 var import_jsx_runtime167 = __toESM(require_jsx_runtime(), 1); 40169 40170 // packages/global-styles-ui/build-module/duotone-palette-panel.mjs 40171 var import_compose8 = __toESM(require_compose(), 1); 40172 var import_element87 = __toESM(require_element(), 1); 40173 var import_components38 = __toESM(require_components(), 1); 40174 var import_i18n38 = __toESM(require_i18n(), 1); 40175 var import_jsx_runtime168 = __toESM(require_jsx_runtime(), 1); 40176 40177 // packages/global-styles-ui/build-module/screen-color-palette.mjs 40178 var import_jsx_runtime169 = __toESM(require_jsx_runtime(), 1); 40179 40180 // packages/global-styles-ui/build-module/screen-background.mjs 40181 var import_i18n40 = __toESM(require_i18n(), 1); 40182 var import_block_editor9 = __toESM(require_block_editor(), 1); 40183 var import_components39 = __toESM(require_components(), 1); 40184 40185 // packages/global-styles-ui/build-module/background-panel.mjs 40186 var import_block_editor8 = __toESM(require_block_editor(), 1); 40187 var import_jsx_runtime170 = __toESM(require_jsx_runtime(), 1); 40188 var { BackgroundPanel: StylesBackgroundPanel3 } = unlock3( 40189 import_block_editor8.privateApis 40190 ); 40191 40192 // packages/global-styles-ui/build-module/screen-background.mjs 40193 var import_jsx_runtime171 = __toESM(require_jsx_runtime(), 1); 40194 var { useHasBackgroundPanel: useHasBackgroundPanel5 } = unlock3(import_block_editor9.privateApis); 40195 40196 // packages/global-styles-ui/build-module/shadows-panel.mjs 40197 var import_i18n43 = __toESM(require_i18n(), 1); 40198 40199 // packages/global-styles-ui/build-module/presets/preset-group.mjs 40200 var import_components41 = __toESM(require_components(), 1); 40201 var import_i18n42 = __toESM(require_i18n(), 1); 40202 var import_element88 = __toESM(require_element(), 1); 40203 40204 // packages/global-styles-ui/build-module/presets/dialogs/confirm-reset-dialog.mjs 40205 var import_components40 = __toESM(require_components(), 1); 40206 var import_i18n41 = __toESM(require_i18n(), 1); 40207 var import_jsx_runtime172 = __toESM(require_jsx_runtime(), 1); 40208 40209 // packages/global-styles-ui/build-module/presets/preset-group.mjs 40210 var import_jsx_runtime173 = __toESM(require_jsx_runtime(), 1); 40211 40212 // packages/global-styles-ui/build-module/shadows-panel.mjs 40213 var import_jsx_runtime174 = __toESM(require_jsx_runtime(), 1); 40214 40215 // packages/global-styles-ui/build-module/shadows-edit-panel.mjs 40216 var import_components45 = __toESM(require_components(), 1); 40217 var import_i18n46 = __toESM(require_i18n(), 1); 40218 var import_element90 = __toESM(require_element(), 1); 40219 40220 // packages/global-styles-ui/build-module/presets/preset-edit-header.mjs 40221 var import_components42 = __toESM(require_components(), 1); 40222 var import_jsx_runtime175 = __toESM(require_jsx_runtime(), 1); 40223 40224 // packages/global-styles-ui/build-module/presets/dialogs/confirm-delete-dialog.mjs 40225 var import_components43 = __toESM(require_components(), 1); 40226 var import_i18n44 = __toESM(require_i18n(), 1); 40227 var import_jsx_runtime176 = __toESM(require_jsx_runtime(), 1); 40228 40229 // packages/global-styles-ui/build-module/presets/dialogs/rename-dialog.mjs 40230 var import_components44 = __toESM(require_components(), 1); 40231 var import_i18n45 = __toESM(require_i18n(), 1); 40232 var import_element89 = __toESM(require_element(), 1); 40233 var import_jsx_runtime177 = __toESM(require_jsx_runtime(), 1); 40234 40235 // packages/global-styles-ui/build-module/shadows-edit-panel.mjs 40236 var import_jsx_runtime178 = __toESM(require_jsx_runtime(), 1); 40237 40238 // packages/global-styles-ui/build-module/screen-shadows.mjs 40239 var import_jsx_runtime179 = __toESM(require_jsx_runtime(), 1); 40240 40241 // packages/global-styles-ui/build-module/screen-text-shadows.mjs 40242 var import_i18n47 = __toESM(require_i18n(), 1); 40243 var import_jsx_runtime180 = __toESM(require_jsx_runtime(), 1); 40244 40245 // packages/global-styles-ui/build-module/screen-text-shadows-edit.mjs 40246 var import_components46 = __toESM(require_components(), 1); 40247 var import_i18n48 = __toESM(require_i18n(), 1); 40248 var import_element91 = __toESM(require_element(), 1); 40249 var import_jsx_runtime181 = __toESM(require_jsx_runtime(), 1); 40250 40251 // packages/global-styles-ui/build-module/screen-layout.mjs 40252 var import_i18n49 = __toESM(require_i18n(), 1); 40253 var import_block_editor11 = __toESM(require_block_editor(), 1); 40254 40255 // packages/global-styles-ui/build-module/dimensions-panel.mjs 40256 var import_block_editor10 = __toESM(require_block_editor(), 1); 40257 var import_element92 = __toESM(require_element(), 1); 40258 var import_jsx_runtime182 = __toESM(require_jsx_runtime(), 1); 40259 var { useSettingsForBlockElement: useSettingsForBlockElement5, DimensionsPanel: StylesDimensionsPanel3 } = unlock3(import_block_editor10.privateApis); 40260 40261 // packages/global-styles-ui/build-module/screen-layout.mjs 40262 var import_jsx_runtime183 = __toESM(require_jsx_runtime(), 1); 40263 var { useHasDimensionsPanel: useHasDimensionsPanel5, useSettingsForBlockElement: useSettingsForBlockElement6 } = unlock3( 40264 import_block_editor11.privateApis 40265 ); 40266 40267 // packages/global-styles-ui/build-module/screen-style-variations.mjs 40268 var import_components49 = __toESM(require_components(), 1); 40269 var import_i18n52 = __toESM(require_i18n(), 1); 40270 40271 // packages/global-styles-ui/build-module/style-variations-content.mjs 40272 var import_i18n51 = __toESM(require_i18n(), 1); 40273 var import_components48 = __toESM(require_components(), 1); 40274 40275 // packages/global-styles-ui/build-module/style-variations-container.mjs 40276 var import_core_data8 = __toESM(require_core_data(), 1); 40277 var import_data9 = __toESM(require_data(), 1); 40278 var import_element93 = __toESM(require_element(), 1); 40279 var import_components47 = __toESM(require_components(), 1); 40280 var import_i18n50 = __toESM(require_i18n(), 1); 40281 var import_jsx_runtime184 = __toESM(require_jsx_runtime(), 1); 40282 function StyleVariationsContainer({ 40283 gap = 2 40284 }) { 40285 const { user } = (0, import_element93.useContext)(GlobalStylesContext); 40286 const userStyles = user?.styles; 40287 const variations = (0, import_data9.useSelect)((select) => { 40288 const result = select( 40289 import_core_data8.store 40290 ).__experimentalGetCurrentThemeGlobalStylesVariations(); 40291 return Array.isArray(result) ? result : void 0; 40292 }, []); 40293 const fullStyleVariations = variations?.filter( 40294 (variation) => { 40295 return !isVariationWithProperties(variation, ["color"]) && !isVariationWithProperties(variation, [ 40296 "typography", 40297 "spacing" 40298 ]); 40299 } 40300 ); 40301 const themeVariations = (0, import_element93.useMemo)(() => { 40302 const withEmptyVariation = [ 40303 { 40304 title: (0, import_i18n50.__)("Default"), 40305 settings: {}, 40306 styles: {} 40307 }, 40308 ...fullStyleVariations ?? [] 40309 ]; 40310 return [ 40311 ...withEmptyVariation.map((variation) => { 40312 const blockStyles = variation?.styles?.blocks ? { ...variation.styles.blocks } : {}; 40313 if (userStyles?.blocks) { 40314 Object.keys(userStyles.blocks).forEach((blockName) => { 40315 if (userStyles.blocks?.[blockName]?.css) { 40316 const variationBlockStyles = blockStyles[blockName] || {}; 40317 const customCSS = { 40318 css: `$blockStyles[blockName]?.css || ""} $userStyles.blocks?.[blockName]?.css?.trim() || ""}` 40319 }; 40320 blockStyles[blockName] = { 40321 ...variationBlockStyles, 40322 ...customCSS 40323 }; 40324 } 40325 }); 40326 } 40327 const css = userStyles?.css || variation.styles?.css ? { 40328 css: `$variation.styles?.css || ""} $userStyles?.css || ""}` 40329 } : {}; 40330 const blocks = Object.keys(blockStyles).length > 0 ? { blocks: blockStyles } : {}; 40331 const styles = { 40332 ...variation.styles, 40333 ...css, 40334 ...blocks 40335 }; 40336 return { 40337 ...variation, 40338 settings: variation.settings ?? {}, 40339 styles 40340 }; 40341 }) 40342 ]; 40343 }, [fullStyleVariations, userStyles?.blocks, userStyles?.css]); 40344 if (!fullStyleVariations || fullStyleVariations.length < 1) { 40345 return null; 40346 } 40347 return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)( 40348 import_components47.__experimentalGrid, 40349 { 40350 columns: 2, 40351 className: "global-styles-ui-style-variations-container", 40352 gap, 40353 children: themeVariations.map( 40354 (variation, index2) => /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(Variation, { variation, children: (isFocused) => /* @__PURE__ */ (0, import_jsx_runtime184.jsx)( 40355 preview_styles_default, 40356 { 40357 label: variation?.title, 40358 withHoverView: true, 40359 isFocused, 40360 variation 40361 } 40362 ) }, index2) 40363 ) 40364 } 40365 ); 40366 } 40367 var style_variations_container_default = StyleVariationsContainer; 40368 40369 // packages/global-styles-ui/build-module/style-variations-content.mjs 40370 var import_jsx_runtime185 = __toESM(require_jsx_runtime(), 1); 40371 40372 // packages/global-styles-ui/build-module/screen-style-variations.mjs 40373 var import_jsx_runtime186 = __toESM(require_jsx_runtime(), 1); 40374 40375 // packages/global-styles-ui/build-module/screen-css.mjs 40376 var import_i18n53 = __toESM(require_i18n(), 1); 40377 var import_components50 = __toESM(require_components(), 1); 40378 var import_block_editor12 = __toESM(require_block_editor(), 1); 40379 var import_jsx_runtime187 = __toESM(require_jsx_runtime(), 1); 40380 var { AdvancedPanel: StylesAdvancedPanel3 } = unlock3(import_block_editor12.privateApis); 40381 40382 // packages/global-styles-ui/build-module/screen-revisions/index.mjs 40383 var import_i18n55 = __toESM(require_i18n(), 1); 40384 var import_components51 = __toESM(require_components(), 1); 40385 var import_element96 = __toESM(require_element(), 1); 40386 40387 // packages/global-styles-ui/build-module/screen-revisions/use-global-styles-revisions.mjs 40388 var import_data10 = __toESM(require_data(), 1); 40389 var import_core_data9 = __toESM(require_core_data(), 1); 40390 var import_element94 = __toESM(require_element(), 1); 40391 40392 // packages/global-styles-ui/build-module/screen-revisions/revisions-list.mjs 40393 var import_i18n54 = __toESM(require_i18n(), 1); 40394 var import_date = __toESM(require_date(), 1); 40395 var import_core_data10 = __toESM(require_core_data(), 1); 40396 var import_data11 = __toESM(require_data(), 1); 40397 var import_element95 = __toESM(require_element(), 1); 40398 var import_jsx_runtime188 = __toESM(require_jsx_runtime(), 1); 40399 var DAY_IN_MILLISECONDS = 60 * 60 * 1e3 * 24; 40400 40401 // packages/global-styles-ui/build-module/screen-revisions/index.mjs 40402 var import_jsx_runtime189 = __toESM(require_jsx_runtime(), 1); 40403 40404 // packages/global-styles-ui/build-module/font-sizes/font-sizes.mjs 40405 var import_i18n56 = __toESM(require_i18n(), 1); 40406 var import_components52 = __toESM(require_components(), 1); 40407 var import_jsx_runtime190 = __toESM(require_jsx_runtime(), 1); 40408 40409 // packages/global-styles-ui/build-module/font-sizes/font-size.mjs 40410 var import_i18n58 = __toESM(require_i18n(), 1); 40411 var import_components54 = __toESM(require_components(), 1); 40412 var import_element97 = __toESM(require_element(), 1); 40413 40414 // packages/global-styles-ui/build-module/font-sizes/font-size-preview.mjs 40415 var import_block_editor13 = __toESM(require_block_editor(), 1); 40416 var import_i18n57 = __toESM(require_i18n(), 1); 40417 var import_jsx_runtime191 = __toESM(require_jsx_runtime(), 1); 40418 40419 // packages/global-styles-ui/build-module/size-control/index.mjs 40420 var import_components53 = __toESM(require_components(), 1); 40421 var import_jsx_runtime192 = __toESM(require_jsx_runtime(), 1); 40422 40423 // packages/global-styles-ui/build-module/font-sizes/font-size.mjs 40424 var import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1); 40425 40426 // packages/global-styles-ui/build-module/global-styles-ui.mjs 40427 var import_jsx_runtime194 = __toESM(require_jsx_runtime(), 1); 40428 40429 // packages/global-styles-ui/build-module/with-global-styles-provider.mjs 40430 var import_jsx_runtime195 = __toESM(require_jsx_runtime(), 1); 40431 function withGlobalStylesProvider(Component) { 40432 return function WrappedComponent({ 40433 value, 40434 baseValue, 40435 onChange, 40436 ...props 40437 }) { 40438 return /* @__PURE__ */ (0, import_jsx_runtime195.jsx)( 40439 GlobalStylesProvider, 40440 { 40441 value, 40442 baseValue, 40443 onChange, 40444 children: /* @__PURE__ */ (0, import_jsx_runtime195.jsx)(Component, { ...props }) 40445 } 40446 ); 40447 }; 40448 } 40449 40450 // packages/global-styles-ui/build-module/style-variations.mjs 40451 var StyleVariations = withGlobalStylesProvider(style_variations_container_default); 40452 40453 // packages/global-styles-ui/build-module/color-variations.mjs 40454 var ColorVariations2 = withGlobalStylesProvider(ColorVariations); 40455 40456 // packages/global-styles-ui/build-module/typography-variations.mjs 40457 var TypographyVariations2 = withGlobalStylesProvider(TypographyVariations); 40458 40459 // packages/global-styles-ui/build-module/font-library/font-library.mjs 40460 var import_jsx_runtime196 = __toESM(require_jsx_runtime(), 1); 40461 function FontLibrary({ 40462 value, 40463 baseValue, 40464 onChange, 40465 activeTab = "installed-fonts" 40466 }) { 40467 let content; 40468 switch (activeTab) { 40469 case "upload-fonts": 40470 content = /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(upload_fonts_default, {}); 40471 break; 40472 case "installed-fonts": 40473 content = /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(installed_fonts_default, {}); 40474 break; 40475 default: 40476 content = /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(font_collection_default, { slug: activeTab }); 40477 } 40478 return /* @__PURE__ */ (0, import_jsx_runtime196.jsx)( 40479 GlobalStylesProvider, 40480 { 40481 value, 40482 baseValue, 40483 onChange, 40484 children: /* @__PURE__ */ (0, import_jsx_runtime196.jsx)(context_default, { children: content }) 40485 } 40486 ); 40487 } 40488 40489 // routes/font-list/lock-unlock.ts 40490 var import_private_apis5 = __toESM(require_private_apis()); 40491 var { unlock: unlock4 } = (0, import_private_apis5.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( 40492 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", 40493 "@wordpress/font-list-route" 40494 ); 40495 40496 // routes/font-list/style.scss 40497 if (typeof document !== "undefined" && (typeof process === "undefined" || true) && !document.head.querySelector("style[data-wp-hash='cdd5f8ebb6']")) { 40498 const style = document.createElement("style"); 40499 style.setAttribute("data-wp-hash", "cdd5f8ebb6"); 40500 style.appendChild(document.createTextNode("@media (min-width:782px){.font-library-modal.font-library-modal{width:65vw}}.font-library-modal .components-modal__header{border-bottom:none}.font-library-modal .components-modal__content{margin-bottom:90px;padding:0}.font-library-modal .font-library__subtitle{font-size:11px;font-weight:var(--wpds-typography-font-weight-emphasis,600);text-transform:uppercase}.font-library-modal__tab-panel{height:calc(100% - 50px)}.font-library__tabpanel-layout{display:flex;flex-direction:column;height:100%}.font-library__tabpanel-layout>div{flex-grow:1}.font-library__tabpanel-layout .font-library__loading{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;left:0;padding-top:124px;position:absolute;top:0;width:100%}.font-library__footer,.font-library__tabpanel-layout .components-navigator-screen{padding:24px;width:100%}.font-library__footer{background-color:#fff;border-top:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);bottom:0;box-sizing:border-box;flex-grow:0!important;flex-shrink:0;height:90px;position:absolute}.font-library__page-selection{font-size:11px;font-weight:var(--wpds-typography-font-weight-emphasis,600);text-transform:uppercase}.font-library__page-selection-trigger{font-size:inherit}.font-library__page-selection-trigger button{font-weight:inherit}.font-library__search{width:240px}.font-library__fonts-title{font-size:11px;font-weight:var(--wpds-typography-font-weight-emphasis,600);margin-bottom:0;margin-top:0;text-transform:uppercase}.font-library__fonts-list{list-style:none;margin-bottom:0;margin-top:0;padding:0}.font-library__fonts-list-item{margin-bottom:0}.font-library__font-demo{position:relative}.font-library__font-card{border:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);box-sizing:border-box;height:auto!important;margin-top:-1px;padding:16px;width:100%}.font-library__font-card:hover{background-color:#f0f0f0}.font-library__font-card:focus{position:relative}.font-library__font-card .font-library__font-card__name{font-weight:700}.font-library__font-card .font-library__font-card__count{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.font-library__font-card .font-library__font-variant_demo-image{display:block;height:24px;width:auto}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-image{transition:opacity var(--wpds-motion-duration-lg,.3s) var(--wpds-motion-easing-subtle,cubic-bezier(.15,0,.15,1))}}.font-library__font-card .font-library__font-variant_demo-image.is-loading{left:0;opacity:0;position:absolute;top:0}.font-library__font-card .font-library__font-variant-demo-skeleton{border-radius:var(--wpds-border-radius-sm,2px);height:24px}.font-library__font-card .font-library__font-variant_demo-text{flex-shrink:0;white-space:nowrap}@media not (prefers-reduced-motion){.font-library__font-card .font-library__font-variant_demo-text{transition:opacity .3s ease-in-out}}.font-library-modal__tablist-container{background:#fff;border-bottom:1px solid var(--wpds-color-stroke-surface-neutral,#dbdbdb);position:sticky;top:0;z-index:1}.font-library__upload-area{align-items:center;display:flex;height:256px!important;justify-content:center;width:100%}button.font-library__upload-area{background-color:#f0f0f0}.font-library__local-fonts{margin:24px auto;width:80%}.font-library__local-fonts .font-library__upload-area__text{color:var(--wpds-color-foreground-content-neutral-weak,#707070)}.font-library__google-fonts-confirm{align-items:center;display:flex;justify-content:center;margin-top:64px}.font-library__google-fonts-confirm p{line-height:1.4}.font-library__google-fonts-confirm h2{font-size:1.2rem;font-weight:400}.font-library__google-fonts-confirm .components-card{padding:16px;width:400px}.font-library__google-fonts-confirm .components-button{justify-content:center;width:100%}.font-library__select-all{padding:16px 16px 16px 17px}.font-library__select-all .components-checkbox-control__label{padding-left:16px}.global-styles-ui-screen-revisions{display:flex;flex-direction:column;flex-grow:1;min-height:0}.global-styles-ui-screen-revisions__actions{margin-inline-start:auto}.global-styles-ui-screen-revisions__date{font-size:12px;font-weight:var(--wpds-typography-font-weight-emphasis,600);text-transform:uppercase}.global-styles-ui-screen-revisions__description{align-items:flex-start;display:flex;flex-direction:column;gap:8px}.global-styles-ui-screen-revisions__changes,.global-styles-ui-screen-revisions__meta{color:#2f2f2f;font-size:12px}.global-styles-ui-screen-revisions__meta{align-items:center;display:flex;justify-content:start;text-align:left;width:100%}.global-styles-ui-screen-revisions__meta img{border-radius:100%;height:16px;margin-right:8px;width:16px}.global-styles-ui-screen-revisions__changes{line-height:1.4;list-style:disc;margin:0 0 0 12px;text-align:left}.global-styles-ui-screen-revisions__changes li{margin-bottom:4px}.global-styles-ui-variations_item{box-sizing:border-box;cursor:var(--wpds-cursor-control,pointer)}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{border-radius:2px;outline:1px solid rgba(0,0,0,.1);outline-offset:-1px;overflow:hidden;position:relative}@media not (prefers-reduced-motion){.global-styles-ui-variations_item .global-styles-ui-variations_item-preview{transition:outline .1s linear}}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill{height:32px}.global-styles-ui-variations_item .global-styles-ui-variations_item-preview.is-pill .block-editor-iframe__scale-container{overflow:hidden}.global-styles-ui-variations_item:not(.is-active):hover .global-styles-ui-variations_item-preview{outline-color:rgba(0,0,0,.3)}.global-styles-ui-variations_item.is-active .global-styles-ui-variations_item-preview,.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:#1e1e1e;outline-offset:1px;outline-width:var(--wp-admin-border-width-focus)}.global-styles-ui-variations_item:focus-visible .global-styles-ui-variations_item-preview{outline-color:var(--wp-admin-theme-color)}.global-styles-ui-preview__wrapper{display:block;max-width:100%;width:100%}.global-styles-ui-preview__wrapper.is-hoverable{cursor:var(--wpds-cursor-control,pointer)}.global-styles-ui-typography-preview{align-items:center;background:#f0f0f0;border-radius:2px;display:flex;justify-content:center;margin-bottom:20px;min-height:100px;overflow:hidden}.global-styles-ui-element-preview{background:#f0f0f0;border-radius:2px;flex-shrink:0;height:120px;margin:0 16px 20px;overflow:hidden}.global-styles-ui-element-preview iframe{border:0;display:block;height:100%;width:100%}.global-styles-ui-font-size__item{line-break:anywhere;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.global-styles-ui-font-size__item-value{color:#757575}.global-styles-ui-screen-typography__indicator{align-items:center;border-radius:2px;display:flex!important;font-size:14px;height:24px;justify-content:center;width:24px}.global-styles-ui-block-types-filter{margin-bottom:16px;padding:0 16px}.global-styles-ui-block-types-search{flex-grow:1}.global-styles-ui-block-types-item-list{margin-inline:4px}.global-styles-ui-block-types-item-list .global-styles-ui-block-types-item__icon{min-width:24px}.global-styles-ui-block-types-item-list__no-results{padding-top:16px}.global-styles-ui-block-types-group+.global-styles-ui-block-types-group{margin-top:12px}.global-styles-ui-block-types-group:last-child{padding-bottom:12px}.global-styles-ui-block-types-group__title{margin-bottom:12px;padding:0 16px}.global-styles-ui-screen-typography__font-variants-count{color:#757575}.global-styles-ui-font-families__manage-fonts{justify-content:center}.global-styles-ui-screen .color-block-support-panel{border-top:none;padding-left:0;padding-right:0;padding-top:0;row-gap:12px}.global-styles-ui-header{line-height:1.9!important;margin-bottom:0!important}.global-styles-ui-subtitle{font-size:11px!important;font-weight:var(--wpds-typography-font-weight-emphasis,600)!important;margin-bottom:0!important;text-transform:uppercase}.global-styles-ui-section-title{color:#2f2f2f;font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:1.2;margin:0;padding:16px 16px 0}.global-styles-ui-icon-with-current-color{fill:currentColor}.global-styles-ui__color-indicator-wrapper{align-items:center;display:flex;flex-shrink:0;height:24px}.global-styles-ui__palette-preview{display:inline-flex}.global-styles-ui__palette-preview>*+*{margin-inline-start:-8px}.global-styles-ui__shadows-panel__options-container,.global-styles-ui__typography-panel__options-container{height:24px}.global-styles-ui__block-preview-panel{border:1px solid #ddd;border-radius:2px;overflow:hidden;position:relative;width:100%}.global-styles-ui__shadow-preview-panel,.global-styles-ui__text-shadow-preview-panel{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,8px 8px;background-size:16px 16px;border:1px solid #ddd;border-radius:2px;height:144px;overflow:auto}.global-styles-ui__shadow-preview-block{background-color:#fff;border:1px solid #ddd;border-radius:2px;height:60px;width:60%}.global-styles-ui__text-shadow-preview-panel{margin-block:-8px 16px}.global-styles-ui__text-shadow-preview-text{font-size:24px}.global-styles-ui__text-shadow-editor__header{margin-block-end:8px}.global-styles-ui__text-shadow-editor__inputs{display:grid;gap:16px;grid-template-columns:repeat(2,1fr)}.global-styles-ui__shadow-editor__dropdown-content,.global-styles-ui__text-shadow-editor__dropdown-content{width:280px}.global-styles-ui__shadow-editor-panel,.global-styles-ui__text-shadow-editor-panel{margin-bottom:4px}.global-styles-ui__shadow-editor__dropdown,.global-styles-ui__text-shadow-editor__dropdown{position:relative;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle,.global-styles-ui__text-shadow-editor__dropdown-toggle{border-radius:inherit;height:auto;padding-bottom:8px;padding-top:8px;text-align:left;width:100%}.global-styles-ui__shadow-editor__dropdown-toggle.is-open,.global-styles-ui__text-shadow-editor__dropdown-toggle.is-open{background:#f0f0f0;color:var(--wp-admin-theme-color)}.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__text-shadow-editor__remove-button{opacity:0;position:absolute;right:8px;top:8px}.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__shadow-editor__dropdown-toggle:hover+.global-styles-ui__text-shadow-editor__remove-button,.global-styles-ui__shadow-editor__remove-button:focus,.global-styles-ui__shadow-editor__remove-button:hover,.global-styles-ui__text-shadow-editor__dropdown-toggle:hover+.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__text-shadow-editor__dropdown-toggle:hover+.global-styles-ui__text-shadow-editor__remove-button,.global-styles-ui__text-shadow-editor__remove-button:focus,.global-styles-ui__text-shadow-editor__remove-button:hover{opacity:1}@media (hover:none){.global-styles-ui__shadow-editor__remove-button,.global-styles-ui__text-shadow-editor__remove-button{opacity:1}}.global-styles-ui-screen-css{display:flex;flex:1 1 auto;flex-direction:column;margin:16px}.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel{flex:1 1 auto}.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel__custom-css-input,.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel__custom-css-input .components-base-control__field{display:flex;flex:1 1 auto;flex-direction:column}.global-styles-ui-screen-css .block-editor-global-styles-advanced-panel__custom-css-input textarea{flex:1 1 auto}.global-styles-ui-screen-css-help-link{display:inline-block;margin-top:8px}.global-styles-ui-screen-variations{border-top:1px solid #ddd;margin-top:16px}.global-styles-ui-screen-variations>*{margin:24px 16px}.global-styles-ui-sidebar__navigator-provider{height:100%}.global-styles-ui-sidebar__navigator-screen{display:flex;flex-direction:column;height:100%}.global-styles-ui-color-palette__tablist-container{border-bottom:1px solid #ddd}.global-styles-ui-color-palette__tablist{margin-bottom:-1px}.global-styles-ui-sidebar__navigator-screen .single-column{grid-column:span 1}.global-styles-ui-screen-root.global-styles-ui-screen-root,.global-styles-ui-screen-style-variations.global-styles-ui-screen-style-variations{background:unset;color:inherit}.global-styles-ui-sidebar__panel .block-editor-block-icon svg{fill:currentColor}.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile,.global-styles-ui-screen-root__active-style-tile.global-styles-ui-screen-root__active-style-tile .global-styles-ui-screen-root__active-style-tile-preview{border-radius:2px}.global-styles-ui-screen-root__active-style-tile-preview{clip-path:border-box}.global-styles-ui-color-palette-panel,.global-styles-ui-duotone-palette-panel,.global-styles-ui-gradient-palette-panel{padding:16px}.font-library-page__content{display:flex;flex-direction:column;flex-grow:1;min-height:0}.font-library-page:has(.font-library__footer) .font-library-page__content{padding-bottom:90px}.font-library-page__tablist{border-bottom:1px solid #f0f0f0;flex-shrink:0;padding:0 24px}.font-library-page__tab-panel{flex-grow:1;min-height:0;overflow:auto}")); 40501 document.head.appendChild(style); 40502 } 40503 40504 // routes/font-list/stage.tsx 40505 var import_jsx_runtime197 = __toESM(require_jsx_runtime()); 40506 var { Tabs: Tabs2 } = unlock4(import_components56.privateApis); 40507 var { useGlobalStyles } = unlock4(import_editor.privateApis); 40508 function FontLibraryPage() { 40509 const { records: collections = [] } = (0, import_core_data11.useEntityRecords)("root", "fontCollection", { 40510 _fields: "slug,name,description" 40511 }); 40512 const [activeTab, setActiveTab] = (0, import_element99.useState)("installed-fonts"); 40513 const { base, user, setUser, isReady } = useGlobalStyles(); 40514 const canUserCreate = (0, import_data13.useSelect)((select) => { 40515 return select(import_core_data11.store).canUser("create", { 40516 kind: "postType", 40517 name: "wp_font_family" 40518 }); 40519 }, []); 40520 if (!isReady) { 40521 return null; 40522 } 40523 const tabs = [ 40524 { 40525 id: "installed-fonts", 40526 title: (0, import_i18n59._x)("Library", "Font library") 40527 } 40528 ]; 40529 if (canUserCreate) { 40530 tabs.push({ 40531 id: "upload-fonts", 40532 title: (0, import_i18n59._x)("Upload", "noun") 40533 }); 40534 tabs.push( 40535 ...(collections || []).map(({ slug, name: name2 }) => ({ 40536 id: slug, 40537 title: collections && collections.length === 1 && slug === "google-fonts" ? (0, import_i18n59.__)("Install Fonts") : name2 40538 })) 40539 ); 40540 } 40541 return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(page_default, { title: (0, import_i18n59.__)("Fonts"), className: "font-library-page", children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("div", { className: "font-library-page__content", children: /* @__PURE__ */ (0, import_jsx_runtime197.jsxs)( 40542 Tabs2, 40543 { 40544 selectedTabId: activeTab, 40545 onSelect: (tabId) => setActiveTab(tabId), 40546 children: [ 40547 /* @__PURE__ */ (0, import_jsx_runtime197.jsx)("div", { className: "font-library-page__tablist", children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(Tabs2.TabList, { children: tabs.map(({ id, title }) => /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(Tabs2.Tab, { tabId: id, children: title }, id)) }) }), 40548 tabs.map(({ id }) => /* @__PURE__ */ (0, import_jsx_runtime197.jsx)( 40549 Tabs2.TabPanel, 40550 { 40551 tabId: id, 40552 focusable: false, 40553 className: "font-library-page__tab-panel", 40554 children: /* @__PURE__ */ (0, import_jsx_runtime197.jsx)( 40555 FontLibrary, 40556 { 40557 value: user, 40558 baseValue: base, 40559 onChange: setUser, 40560 activeTab: id 40561 } 40562 ) 40563 }, 40564 id 40565 )) 40566 ] 40567 } 40568 ) }) }); 40569 } 40570 function Stage() { 40571 return /* @__PURE__ */ (0, import_jsx_runtime197.jsx)(FontLibraryPage, {}); 40572 } 40573 var stage = Stage; 40574 export { 40575 stage 40576 }; 40577 /*! Bundled license information: 40578 40579 use-sync-external-store/cjs/use-sync-external-store-shim.development.js: 40580 (** 40581 * @license React 40582 * use-sync-external-store-shim.development.js 40583 * 40584 * Copyright (c) Meta Platforms, Inc. and affiliates. 40585 * 40586 * This source code is licensed under the MIT license found in the 40587 * LICENSE file in the root directory of this source tree. 40588 *) 40589 40590 use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js: 40591 (** 40592 * @license React 40593 * use-sync-external-store-shim/with-selector.development.js 40594 * 40595 * Copyright (c) Meta Platforms, Inc. and affiliates. 40596 * 40597 * This source code is licensed under the MIT license found in the 40598 * LICENSE file in the root directory of this source tree. 40599 *) 40600 40601 is-plain-object/dist/is-plain-object.mjs: 40602 (*! 40603 * is-plain-object <https://github.com/jonschlinkert/is-plain-object> 40604 * 40605 * Copyright (c) 2014-2017, Jon Schlinkert. 40606 * Released under the MIT License. 40607 *) 40608 */
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Wed Nov 25 08:20:01 2026 | Cross-referenced by PHPXref |