@baseline-ui/core 0.36.0 → 0.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,46 +1,4 @@
1
- import { classNames, invariant, filterTruthyValues, getSvgPathFromStroke, getHTMLElement, getTextDimensions, getPlainText, cleanKeyFromGlobImport, getOsSpecificKeyboardShortcutLabel, isUrl } from '@baseline-ui/utils';
2
- import nt, { useMemo, useCallback, useContext, useEffect, createContext, useLayoutEffect, useState, useRef, useImperativeHandle, forwardRef, useReducer, Fragment as Fragment$1, createElement, isValidElement } from 'react';
3
- import { useControlledState, clamp } from '@react-stately/utils';
4
- import { useReducedMotion, useSpring, animated, useTransition, easings, config } from '@react-spring/web';
5
- import { useSeparator, useHover, mergeProps, useOption, useLocale, useListBox, ListKeyboardDelegate, useFocusRing, DragPreview, usePress, useTooltip, Overlay, useTooltipTrigger, useOverlayPosition, useNumberField, useNumberFormatter, useSlider, useSliderThumb, VisuallyHidden, useDialog, usePopover, DismissButton, useKeyboard, FocusScope, useSwitch, useSearchField, useMenu, useMenuTrigger, useLink, useDrop, useId, useProgressBar, useTextField, useCheckbox, useTagGroup, useFocusManager, useButton, useSelect, HiddenSelect, useTabList, useTab, useOverlayTrigger, useLabel, useField, useClipboard, useRadioGroup, useFilter, useInteractOutside, useComboBox, useObjectRef, useFocus, useGridListItem, useGridListSelectionCheckbox, useDraggableItem, useGridList, useDraggableCollection, useDroppableCollection, ListDropTargetDelegate, useDropIndicator, useListBoxSection, useToggleButton, I18nProvider, useMessageFormatter, useModalOverlay, useMenuSection, useMenuItem, useDateFormatter, useTag, useTabPanel, useRadio } from 'react-aria';
6
- export { useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
7
- import { useListState, useTooltipTriggerState, useNumberFieldState, useSliderState, useToggleState, useSearchFieldState, useTreeState, useMenuTriggerState, useSelectState, useTabListState, Item, useOverlayTriggerState, useRadioGroupState, useComboBoxState, useDraggableCollectionState, useDroppableCollectionState, Section } from 'react-stately';
8
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
- import { CheckmarkIcon, MoreIcon, QuestionmarkCircleIcon, PauseIcon, PlayIcon, AvatarIcon as AvatarIcon$1, TextIcon as TextIcon$1, HighlightTextIcon, SearchIcon as SearchIcon$1, CaretLeftIcon as CaretLeftIcon$3, CaretRightIcon as CaretRightIcon$3 } from '@baseline-ui/icons/24';
10
- import { sprinkles, lightTheme, themeVars, queries, darkTheme, layoutSprinkleValues } from '@baseline-ui/tokens';
11
- import { useGranularLayoutEffect, useGranularEffect } from 'granular-hooks';
12
- import { CaretDownIcon, MinusIcon, PlusIcon, ChevronRightIcon, XIcon as XIcon$1 } from '@baseline-ui/icons/8';
13
- import { ReadOnlyIcon, ErrorCircleFilledIcon, XCircleFilledIcon, UndoIcon, RedoIcon, TrashIcon, ArrowDownCircleFilledIcon, XIcon as XIcon$3, WarningFilledIcon, CheckmarkIcon as CheckmarkIcon$3, CheckmarkCircleFilledIcon, ErrorAltCircleFilledIcon, AvatarIcon, InfoCircleFilledIcon, CaretLeftIcon as CaretLeftIcon$1, CaretRightIcon as CaretRightIcon$1 } from '@baseline-ui/icons/16';
14
- import { FocusableProvider, useFocusable, createFocusManager, useFocusRing as useFocusRing$1 } from '@react-aria/focus';
15
- import { assignInlineVars } from '@vanilla-extract/dynamic';
16
- import _g from 'lodash/isEmpty';
17
- import { XIcon, TextIcon, BoldIcon, ItalicIcon, UnderlineIcon, AtIcon, XCircleFilledIcon as XCircleFilledIcon$1, ArrowUpCircleFilledIcon, CheckmarkIcon as CheckmarkIcon$2, CheckCircleFilledIcon, ErrorAltCircleFilledIcon as ErrorAltCircleFilledIcon$1, InfoCircleFilledIcon as InfoCircleFilledIcon$1, WarningFilledIcon as WarningFilledIcon$1, PlusIcon as PlusIcon$1, MinusIcon as MinusIcon$2, LinkIcon, SearchIcon, CaretLeftIcon as CaretLeftIcon$2, CaretRightIcon as CaretRightIcon$2 } from '@baseline-ui/icons/20';
18
- import g_, { createPortal } from 'react-dom';
19
- import { CheckmarkIcon as CheckmarkIcon$1, MinusIcon as MinusIcon$1, XIcon as XIcon$2, CaretLeftIcon, CaretRightIcon } from '@baseline-ui/icons/12';
20
- import { useInteractionModality, PressResponder } from '@react-aria/interactions';
21
- import { parseColor, useColorAreaState, useColorFieldState, useColorSliderState } from '@react-stately/color';
22
- import { useColorSwatch, useColorArea, useColorField, useColorSlider } from '@react-aria/color';
23
- import { getStroke } from 'perfect-freehand';
24
- import { makeMoveable, Draggable, Resizable, Rotatable, Snappable } from 'react-moveable';
25
- import { useToolbar } from '@react-aria/toolbar';
26
- import { take, uniqueId, flatMapDeep, camelCase, kebabCase } from 'lodash';
27
- import { createBoldPlugin, createItalicPlugin, createUnderlinePlugin, MARK_BOLD, MARK_ITALIC, MARK_UNDERLINE } from '@udecode/plate-basic-marks';
28
- import { findNodePath, removeNodes, focusEditor, Hotkeys, getPointBefore, createPointRef, moveSelection, insertNodes, PlateElement, insertText, useElement, getHandler, createPluginFactory, createPlugins, PlateLeaf, deselect, Plate, PlateContent, getEditorString, getRange, useEditorRef, useEditorSelector, isMarkActive, toggleMark, findNode, getPluginType } from '@udecode/plate-common';
29
- import { createFontColorPlugin, createFontBackgroundColorPlugin, MARK_COLOR, MARK_BG_COLOR, useColorDropdownMenuState } from '@udecode/plate-font';
30
- import { createParagraphPlugin, ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph';
31
- import { createLinkPlugin, ELEMENT_LINK, upsertLink, unwrapLink } from '@udecode/plate-link';
32
- import { withRef, withProps } from '@udecode/cn';
33
- import * as cf from 'dompurify';
34
- import { jsx as jsx$1 } from 'slate-hyperscript';
35
- import { useHTMLInputCursorState } from '@udecode/plate-combobox';
36
- import { useSelected } from 'slate-react';
37
- import rI from 'markdown-it';
38
- import { announce } from '@react-aria/live-announcer';
39
- import { useActionGroup, useActionGroupItem } from '@react-aria/actiongroup';
40
- import { ControlledTreeEnvironment, Tree } from 'react-complex-tree';
41
- import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
42
-
43
- /**
1
+ import {classNames,invariant,filterTruthyValues,getSvgPathFromStroke,getHTMLElement,getTextDimensions,getPlainText,cleanKeyFromGlobImport,getOsSpecificKeyboardShortcutLabel,isUrl,getActiveElement,isInputThatOpensKeyboard}from'@baseline-ui/utils';import ut,{useMemo,createElement,useContext,useEffect,createContext,useLayoutEffect,useCallback,useState,useRef,useImperativeHandle,forwardRef,useReducer,Fragment as Fragment$1,isValidElement}from'react';import {useControlledState,clamp}from'@react-stately/utils';import {useSeparator,useHover,mergeProps,useOption,useLocale,useListBox,ListKeyboardDelegate,useFocusRing,DragPreview,usePress,useTooltip,Overlay,useTooltipTrigger,useOverlayPosition,useNumberField,useNumberFormatter,useSlider,useSliderThumb,VisuallyHidden,useDialog,usePopover,DismissButton,useKeyboard,FocusScope,useSwitch,useSearchField,useMenu,useMenuTrigger,useLink,useDrop,useId,useProgressBar,useTextField,useCheckbox,useTagGroup,useFocusManager,useButton,useSelect,HiddenSelect,useTabList,useTab,useOverlayTrigger,useLabel,useField,useClipboard,useRadioGroup,useFilter,useInteractOutside,useComboBox,useObjectRef,useFocus,useGridListItem,useGridListSelectionCheckbox,useDraggableItem,useGridList,useDraggableCollection,useDroppableCollection,ListDropTargetDelegate,useDropIndicator,useListBoxSection,useToggleButton,I18nProvider,useMessageFormatter,useModalOverlay,useMenuSection,useMenuItem,useDateFormatter,useTag,useTabPanel,useRadio}from'react-aria';export{useCollator,useDateFormatter,useNumberFormatter}from'react-aria';import {useListState,useTooltipTriggerState,useNumberFieldState,useSliderState,useToggleState,useSearchFieldState,useTreeState,useMenuTriggerState,useSelectState,useTabListState,Item,useOverlayTriggerState,useRadioGroupState,useComboBoxState,useDraggableCollectionState,useDroppableCollectionState,Section}from'react-stately';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CheckmarkIcon,MoreIcon,QuestionmarkCircleIcon,PauseIcon,PlayIcon,AvatarIcon as AvatarIcon$1,TextIcon as TextIcon$1,HighlightTextIcon,SearchIcon as SearchIcon$1,CaretLeftIcon as CaretLeftIcon$3,CaretRightIcon as CaretRightIcon$3}from'@baseline-ui/icons/24';import {sprinkles,lightTheme,themeVars,queries,darkTheme,layoutSprinkleValues}from'@baseline-ui/tokens';import {useGranularLayoutEffect,useGranularEffect}from'granular-hooks';import {CaretDownIcon,MinusIcon,PlusIcon,ChevronRightIcon,XIcon as XIcon$1}from'@baseline-ui/icons/8';import {ReadOnlyIcon,ErrorCircleFilledIcon,XIcon as XIcon$2,UndoIcon,RedoIcon,TrashIcon,ArrowDownCircleFilledIcon,WarningFilledIcon,CheckmarkIcon as CheckmarkIcon$3,CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon,AvatarIcon,InfoCircleFilledIcon,CaretLeftIcon as CaretLeftIcon$1,CaretRightIcon as CaretRightIcon$1}from'@baseline-ui/icons/16';import {FocusableProvider,useFocusable,createFocusManager,useFocusRing as useFocusRing$1}from'@react-aria/focus';import {motion,MotionConfig,AnimatePresence,useReducedMotion}from'motion/react';export{MotionGlobalConfig}from'motion/react';import {assignInlineVars,setElementVars}from'@vanilla-extract/dynamic';import uh from'lodash/isEmpty';import {XIcon,TextIcon,BoldIcon,ItalicIcon,UnderlineIcon,AtIcon,XCircleFilledIcon,ArrowUpCircleFilledIcon,CheckmarkIcon as CheckmarkIcon$2,CheckCircleFilledIcon,ErrorAltCircleFilledIcon as ErrorAltCircleFilledIcon$1,InfoCircleFilledIcon as InfoCircleFilledIcon$1,WarningFilledIcon as WarningFilledIcon$1,PlusIcon as PlusIcon$1,MinusIcon as MinusIcon$2,LinkIcon,SearchIcon,CaretLeftIcon as CaretLeftIcon$2,CaretRightIcon as CaretRightIcon$2}from'@baseline-ui/icons/20';import T5,{createPortal}from'react-dom';import {CheckmarkIcon as CheckmarkIcon$1,MinusIcon as MinusIcon$1,XIcon as XIcon$3,CaretLeftIcon,CaretRightIcon}from'@baseline-ui/icons/12';import {useInteractionModality,PressResponder}from'@react-aria/interactions';import {parseColor,useColorAreaState,useColorFieldState,useColorSliderState}from'@react-stately/color';import {useColorSwatch,useColorArea,useColorField,useColorSlider}from'@react-aria/color';import {getStroke}from'perfect-freehand';import {makeMoveable,Draggable,Resizable,Rotatable,Snappable}from'react-moveable';import {useToolbar}from'@react-aria/toolbar';import {take,uniqueId,flatMapDeep,camelCase,kebabCase}from'lodash';import {createBoldPlugin,createItalicPlugin,createUnderlinePlugin,MARK_BOLD,MARK_ITALIC,MARK_UNDERLINE}from'@udecode/plate-basic-marks';import {findNodePath,removeNodes,focusEditor,Hotkeys,getPointBefore,createPointRef,moveSelection,insertNodes,PlateElement,insertText,useElement,getHandler,createPluginFactory,createPlugins,PlateLeaf,deselect,Plate,PlateContent,getEditorString,getRange,useEditorRef,useEditorSelector,isMarkActive,toggleMark,findNode,getPluginType}from'@udecode/plate-common';import {createFontColorPlugin,createFontBackgroundColorPlugin,MARK_COLOR,MARK_BG_COLOR,useColorDropdownMenuState}from'@udecode/plate-font';import {createParagraphPlugin,ELEMENT_PARAGRAPH}from'@udecode/plate-paragraph';import {createLinkPlugin,ELEMENT_LINK,upsertLink,unwrapLink}from'@udecode/plate-link';import {withRef,withProps}from'@udecode/cn';import*as qy from'dompurify';import {jsx as jsx$1}from'slate-hyperscript';import {useHTMLInputCursorState}from'@udecode/plate-combobox';import {useSelected}from'slate-react';import gR from'markdown-it';import {announce}from'@react-aria/live-announcer';import {useActionGroup,useActionGroupItem}from'@react-aria/actiongroup';import {ControlledTreeEnvironment,Tree}from'react-complex-tree';import {Panel,PanelGroup,PanelResizeHandle}from'react-resizable-panels';import {useToastQueue}from'@react-stately/toast';export{ToastQueue}from'@react-stately/toast';import {useToastRegion,useToast}from'@react-aria/toast';/**
44
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
45
3
  *
46
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -49,8 +7,37 @@ import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
49
7
  * This notice may not be removed from this file.
50
8
  *
51
9
  */
52
- var xe=typeof document<"u"?nt.useLayoutEffect:()=>{};function Fa(e){let t=useRef(null);return xe(()=>{t.current=e;},[e]),useCallback((...o)=>{let r=t.current;return r?.(...o)},[])}function Ha(e){let[t,o]=useState(e),r=useRef(null),a=Fa(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}t===i.value?a():o(i.value);});xe(()=>{r.current&&a();});let n=Fa(i=>{r.current=i(t),a();});return [t,n]}var sr={prefix:String(Math.round(Math.random()*1e10)),current:0},as=nt.createContext(sr),Jy=nt.createContext(!1);var e1=!!(typeof window<"u"&&window.document&&window.document.createElement),Oa=new WeakMap;function t1(e=!1){let t=useContext(as),o=useRef(null);if(o.current===null&&!e){var r,a;let n=(a=nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=Oa.get(n);i==null?Oa.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==i.state&&(t.current=i.id,Oa.delete(n));}o.current=++t.current;}return o.current}function o1(e){let t=useContext(as);t===sr&&!e1&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let o=t1(!!e),r=t===sr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${o}`}function r1(e){let t=nt.useId(),[o]=useState(ns()),r=o||process.env.NODE_ENV==="test"?"react-aria":`react-aria${sr.prefix}`;return e||`${r}-${t}`}var Aa=typeof nt.useId=="function"?r1:o1;function a1(){return !1}function n1(){return !0}function i1(e){return ()=>{}}function ns(){return typeof nt.useSyncExternalStore=="function"?nt.useSyncExternalStore(i1,a1,n1):useContext(Jy)}var d1=!!(typeof window<"u"&&window.document&&window.document.createElement),lr=new Map;function pr(e){let[t,o]=useState(e),r=useRef(null),a=Aa(t),n=useCallback(i=>{r.current=i;},[]);return d1&&lr.set(a,n),xe(()=>{let i=a;return ()=>{lr.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,o(i));}),a}function ja(e,t){if(e===t)return e;let o=lr.get(e);if(o)return o(t),t;let r=lr.get(t);return r?(r(e),e):t}function is(...e){return (...t)=>{for(let o of e)typeof o=="function"&&o(...t);}}var ue=e=>{var t;return (t=e?.ownerDocument)!==null&&t!==void 0?t:document},pe=e=>e&&"window"in e&&e.window===e?e:ue(e).defaultView||window,Oe=e=>{if(!e)return document;if(!e.isConnected)return null;let t=e.getRootNode?e.getRootNode():document;return ls(t)||ps(t)?t:null};function ss(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function ls(e){return ss(e)&&e.nodeType===Node.DOCUMENT_NODE}function ps(e){return ss(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function cs(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=cs(e[t]))&&(r&&(r+=" "),r+=o);}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function u1(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=cs(e))&&(r&&(r+=" "),r+=t);return r}var ds=u1;function xt(...e){let t={...e[0]};for(let o=1;o<e.length;o++){let r=e[o];for(let a in r){let n=t[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=is(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?t[a]=ds(n,i):a==="id"&&n&&i?t.id=ja(n,i):t[a]=i!==void 0?i:n;}}return t}function M(...e){return e.length===1&&e[0]?e[0]:t=>{for(let o of e)typeof o=="function"?o(t):o!=null&&(o.current=t);}}var m1=new Set(["id"]),f1=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),y1=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),b1=/^(data-.*)$/;function $a(e,t={}){let{labelable:o,isLink:r,propNames:a}=t,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(m1.has(i)||o&&f1.has(i)||r&&y1.has(i)||a?.has(i)||b1.test(i))&&(n[i]=e[i]);return n}function cr(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(o=>e.test(o.brand)))||e.test(window.navigator.userAgent)}function Se(e){let t=null;return ()=>(t==null&&(t=e()),t)}var yo=Se(function(){return cr(/Firefox/i)});function oe(e){let t=useRef(null);return useMemo(()=>({get current(){return t.current},set current(o){t.current=o,typeof e=="function"?e(o):e&&(e.current=o);}}),[e])}function C1(){return typeof window.ResizeObserver<"u"}function qa(e){let{ref:t,box:o,onResize:r}=e;useEffect(()=>{let a=t?.current;if(a)if(C1()){let n=new window.ResizeObserver(i=>{i.length&&r();});return n.observe(a,{box:o}),()=>{a&&n.unobserve(a);}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1);}},[r,t,o]);}function Ve(e){return !!e&&"label"in e&&!!e.label}function dr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function I1(e){return dr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:t=>jsx(Item,{textValue:t.label,children:t.label},t.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function ae(){return useCallback(e=>I1(e),[])}function ur(e,t,o){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=t.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,o);let n=useDroppableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:t.collection,disabledKeys:t.disabledKeys,ref:o,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(t.collection,o)},n,o);return {collectionProps:i,dragState:a,dropState:n}}function E1(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}function B1(e){var t=E1(e,"string");return typeof t=="symbol"?t:String(t)}function F1(e,t,o){return t=B1(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function gs(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,r);}return o}function vs(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?gs(Object(o),!0).forEach(function(r){F1(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):gs(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function _s(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var H1=(e,t,o)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=t[r])!==null&&a!==void 0?a:o[r]))return !1}return !0},z=e=>{var t=o=>{var r=e.defaultClassName,a=vs(vs({},e.defaultVariants),o);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,d]of e.compoundVariants)H1(c,a,e.defaultVariants)&&(r+=" "+d);return r};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return _s(e.variantClassNames,o=>_s(o,r=>r.split(" ")[0]))}},t};var zs=z({defaultClassName:"_6n12k9b _1yep5z6lm _1yep5z6ll _1yep5z6i6 _1yep5z6l4",variantClassNames:{isDropTarget:{true:"_1yep5z613r"},orientation:{vertical:"_1yep5z617e",horizontal:"_1yep5z617f"}},defaultVariants:{},compoundVariants:[]}),hs="_6n12k98 _1yep5z6lk _1yep5z6im _1yep5z6in _1yep5z6io",xs=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Cs=z({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6l4 _1yep5z6l7 _1yep5z6lk _1yep5z6lj _1yep5z6lh _1yep5z6le",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z613r _1yep5z617k _1yep5z617i _1yep5z617l _1yep5z6144 _1yep5z6145 _1yep5z6146"},isHovered:{true:"_1yep5z611z",false:"_1yep5z611y"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),Ps="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",ks="_6n12k90";var Is=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var A=nt.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(Is({isVertical:r==="vertical",isSecondary:o==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:t,role:a?void 0:c.role,ref:l})});A.displayName="Separator";function q1(e){return sprinkles.properties.has(e)}var L=nt.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in o)q1(l)?s[l]=o[l]:p[l]=o[l];return {sprinkleProps:s,domProps:p}},[o]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:t})});L.displayName="Box";var go=nt.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:d},m)=>{invariant(e.value&&Ve(e.value),"Item cannot be a section");let{icon:u,label:y}=e.value,{hoverProps:f,isHovered:b}=useHover({isDisabled:t}),g=filterTruthyValues({"data-selected":r,"data-disabled":t,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":o,"data-selection-mode":d.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,f,g),className:classNames(Cs({isHovered:b,isFocused:o,isFirstChild:d.collection.getFirstKey()===e.key,isLastChild:d.collection.getLastKey()===e.key,isDisabled:t}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(L,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,u?jsx(u,{size:24}):null,jsx("span",{...p,children:y})]}),i?jsx("span",{className:xs({isDisabled:t}),...s,children:i}):null]})});go.displayName="DefaultRenderOption";var Ct=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(zs({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let i=nt.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:t},i)};function Ae(e,t,o){return typeof e=="function"?e(t,o):e}function mr(e,t,o){return typeof e=="function"?e(t,o):e}function fr(e,t){return typeof e=="function"?e(t):e}function Xa(e,t){return typeof e=="function"?e(t):e}var Ss=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};Ss.displayName="DraggableListOption";var vo=nt.forwardRef(({item:e,renderOption:t=(m,u,y)=>jsx(go,{item:m,liProps:u.optionProps,...u,ref:y}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},d)=>{let m=nt.useRef(null),u=useOption({key:e.key},r,m),{value:y}=e;invariant(y&&Ve(y),"ListSection should not be passed to ListOption");let f={isFocusVisible:u.isFocusVisible,isSelected:u.isSelected,isFocused:u.isFocused,isDisabled:u.isDisabled,isPressed:u.isPressed},b={style:mr(l,y,f),className:Ae(c,y,f)};return a&&n?jsx(Ss,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:g=>t(e,{...u,showSelectedIcon:o,_state:r,optionProps:{...mergeProps(u.optionProps,g),...b}},M(m,d))}):t(e,{...u,showSelectedIcon:o,_state:r,optionProps:{...u.optionProps,...b}},M(m,d))});vo.displayName="Option";var Ds=({section:e,state:t,sectionClassName:o,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=nt.useRef(null),{itemProps:l,groupProps:c,headingProps:d}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=t.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:u}=e;invariant(u&&dr(u),"section must be a ListSection");let y=typeof r=="function"?r(u):r,f=typeof o=="function"?o(u):o;return jsxs(Fragment,{children:[e.key===t.collection.getFirstKey()?null:jsx(A,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...y},className:classNames(ks,f,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(L,{...d,className:classNames("BaselineUI-ListBox-SectionHeader",Ps),ref:p,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...m].map(b=>jsx(vo,{item:b,state:t,...s},b.key))})]})]})};function gr({type:e="listbox",handle:t},o,r){let a=useCallback(i=>e==="listbox"?r.current?.querySelector(`[data-key="${i}"][role="option"]`):r.current?.querySelector(`[data-key="${i}"][role="row"]`),[e,r]),n=useCallback((i,s)=>{let p=a(i);p&&p?.scrollIntoView({block:"nearest",inline:"nearest",...s});},[a]);useImperativeHandle(t,()=>({scrollIntoView:n,setFocusedKey:i=>{o.selectionManager.setFocused(!0),o.selectionManager.setFocusedKey(i),n(i),a(i)?.focus();}}),[n,o.selectionManager,a]),useGranularEffect(()=>{let i=Oe(r.current)instanceof ShadowRoot,s=o.selectionManager.focusedKey;i&&s&&n(s);},[o.selectionManager.focusedKey],[n,r]);}var it=nt.createContext(null),Ya=nt.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:d,listBoxHandle:m,...u},y)=>{let f=nt.useRef(null),{direction:b}=useLocale(),g=nt.useRef(null),{listBoxProps:_}=useListBox({...u,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:d.collection,ref:g,layout:t,orientation:o,direction:b,disabledKeys:d.disabledKeys})},d,g);gr({handle:m},d,g);let v=useReducedMotion(),h=useCallback(S=>{let k=ue(g.current);c&&(!v&&"startViewTransition"in k?k.startViewTransition(()=>{c(S);}):c(S));},[c,v]),{collectionProps:I,dragState:P,dropState:C}=ur({...u,onReorder:h,layout:t,orientation:o,enableReorder:i,preview:f},d,g),{isFocusVisible:x,isFocused:T,focusProps:N}=useFocusRing(),R=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":t,"data-empty":d.collection.size===0,"data-focused":T,"data-focus-visible":x,"data-orientation":o});return jsxs("ul",{...mergeProps(_,N,R,I),className:classNames(hs,"BaselineUI-ListBox",e),style:a,ref:M(y,g),children:[[...d.collection].map(S=>{let k={key:S.key,state:d,dragState:P,dropState:C,renderOption:n,renderDropIndicator:u.renderDropIndicator,renderSectionHeader:u.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:u.dropIndicatorStyle,dropIndicatorClassName:u.dropIndicatorClassName,optionStyle:u.optionStyle,optionClassName:u.optionClassName,sectionClassName:u.sectionClassName,sectionStyle:u.sectionStyle,showSectionHeader:u.showSectionHeader,withSectionHeaderPadding:u.withSectionHeaderPadding};return S.type==="section"?jsx(Ds,{...k,section:S}):jsx(vo,{...k,item:S})}),l?jsx(DragPreview,{ref:f,children:l}):null]})});Ya.displayName="ListBoxCore";var Bs=nt.forwardRef((e,t)=>{let o=ae(),r=useListState({...e,children:o});return jsx(Ya,{...e,ref:t,state:r})});Bs.displayName="ListBoxStandalone";var le=nt.forwardRef((e,t)=>{let o=useContext(it);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx(Ya,{...e,ref:t,state:o}):jsx(Bs,{...e,ref:t})});le.displayName="ListBox";var vr="uf19bsf _1yep5z6l4",Fs=z({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5 _1yep5z6lj _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6le",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6wi _1yep5z6wj _1yep5z6wk _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z6114"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6x0 _1yep5z6x1 _1yep5z6x2 _1yep5z6xo _1yep5z6xp _1yep5z6xq _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2",popover:"uf19bse _1yep5z6pl _1yep5z6pm _1yep5z6pn _1yep5z6n9 _1yep5z6na _1yep5z6nb _1yep5z6m0 _1yep5z6m1 _1yep5z6m2 _1yep5z6oc _1yep5z6od _1yep5z6oe _1yep5z6vl _1yep5z6vm _1yep5z6vn"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61nx"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61nx"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61n0"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mz _1yep5z61nx"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61n5"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61pr _1yep5z61tf _1yep5z61tj _1yep5z61tg"],[{variant:"ghost",isDisabled:!1},"_1yep5z61n4"],[{variant:"popover",size:"lg"},"_1yep5z61ic _1yep5z61id _1yep5z61ie _1yep5z61j0 _1yep5z61j1 _1yep5z61j2 _1yep5z61jo _1yep5z61jp _1yep5z61jq _1yep5z61kc _1yep5z61kd _1yep5z61ke"]]});var _o=nt.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...t})=>{let o=nt.useRef(null),r=useOverlayTriggerState(t),a=useOverlayTrigger(t,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:o}),[r,a]);return jsx(_o.Provider,{value:n,children:e})};var Os={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Vs="_1gzftth1 _1yep5z6im _1yep5z6in _1yep5z6io",As="_1gzftth6",js="_1gzftth8",$s="_1gzftth7",Us="var(--_1gzftth0)";function fN(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Ks(e){return typeof e=="object"&&typeof e.left=="number"&&typeof e.top=="number"&&(typeof e.width=="number"||e.width===void 0)&&(typeof e.height=="number"||e.height===void 0)}var _r=nt.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:t})=>{let{state:o,overlayTriggerAria:r,triggerRef:a}=useContext(_o);invariant(o,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:o.isOpen,ref:a}),[n,o.isOpen,a]);return invariant(!t&&e||t&&!e,"Either one of anchorRect or children has to be provided."),invariant(!t||Ks(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(_r.Provider,{value:i,children:t?jsx("div",{className:classNames(js,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:a,tabIndex:-1},JSON.stringify(t)):e})};var zr=({label:e,tooltip:t})=>({tooltipProps:useMemo(()=>{let r={size:"sm",variant:"inverse",text:e,includeArrow:!1,placement:"bottom start",offset:4};if(typeof t=="object")return {...r,...t};if(t)return r},[e,t])});function hr({tooltip:e,"aria-label":t,"aria-labelledby":o},r){let[a,n]=useState(t||"");useEffect(()=>{if(o){let p=ue(r.current).querySelector(`#${o}`);p&&n(p.textContent||"");}else t&&n(t);},[o,r,t]);let{tooltipProps:i}=zr({label:a,tooltip:e});return {tooltipProps:i}}var xr=e=>{let t=nt.useRef(null),{ref:o,...r}=useContext(_r)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t),{isFocusVisible:i,isFocused:s,focusProps:p}=useFocusRing(),{hoverProps:l,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:xt(a,p,l),isPressed:n,ref:M(t,o||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},Cr=(e,t)=>{let o=nt.useRef(null),{ref:r,...a}=useContext(_r)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},t,o);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=useFocusRing(),{hoverProps:c,isHovered:d}=useHover({isDisabled:e.isDisabled});return {buttonProps:xt(n,l,c),isPressed:i,ref:M(o,r||null),isFocusVisible:s,isFocused:p,isHovered:d,uiStateOptions:{isHovered:d,isFocused:p,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:t.isSelected}}};var Pr=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6dy _1yep5z6l4",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9"},isDisabled:{true:"oom8bsa"},isFocusVisible:{true:"oom8bsb"},isHovered:{true:"oom8bsc"},size:{sm:"oom8bsd",md:"oom8bse",lg:"oom8bsf"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsg"],[{variant:"secondary",isHovered:!0},"oom8bsh"],[{variant:"tertiary",isHovered:!0},"oom8bsi"],[{variant:"popover",isHovered:!0},"oom8bsj"],[{variant:"ghost",isHovered:!0},"oom8bsk"],[{variant:"success",isHovered:!0},"oom8bsl"],[{variant:"warning",isHovered:!0},"oom8bsm"],[{variant:"error",isHovered:!0},"oom8bsn"],[{variant:"primary",isFocusVisible:!0},"oom8bso"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsp"],[{variant:"success",isFocusVisible:!0},"oom8bsq"],[{variant:"warning",isFocusVisible:!0},"oom8bsr"],[{variant:"error",isFocusVisible:!0},"oom8bss"]]}),Qa=z({defaultClassName:"oom8bst _1yep5z6l4",variantClassNames:{isDisabled:{true:"oom8bsu"},isFocusVisible:{true:"oom8bsv"},isHovered:{true:"_1yep5z610z"},variant:{primary:"_1yep5z6116",secondary:"_1yep5z6112",tertiary:"_1yep5z6117",ghost:"_1yep5z6117",popover:"_1yep5z6112",toolbar:"_1yep5z6112",success:"_1yep5z6115",warning:"_1yep5z6115",error:"_1yep5z6115"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:!0},"_1yep5z61n3"],[{variant:"ghost",isHovered:!0},"_1yep5z61n5"],[{variant:"tertiary",isFocusVisible:!0},"_1yep5z61n3"],[{variant:"secondary",isDisabled:!0},"_1yep5z61n1"],[{variant:"tertiary",isDisabled:!0},"_1yep5z61n1"],[{variant:"ghost",isDisabled:!0},"_1yep5z61n1"],[{variant:"popover",isDisabled:!0},"_1yep5z61n1"],[{variant:"toolbar",isDisabled:!0},"_1yep5z61n1"]]});var Wb={sm:16,md:20,lg:24},G=nt.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...d},m)=>{let{buttonProps:u,isPressed:y,ref:f,isFocusVisible:b,isFocused:g,isHovered:_,uiStateOptions:v}=xr({...d,elementType:i,isDisabled:s}),h=Wb[p],I=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":s,"data-focused":g,"data-focus-visible":b,"data-hovered":_,"data-pressed":y});return jsxs(i,{...mergeProps(u,I),className:classNames(Pr({isDisabled:!!s,isFocusVisible:b,isHovered:_,variant:n,size:p}),"BaselineUI-ActionButton",typeof o=="function"?o(v):o),style:typeof t=="function"?t(v):t,ref:M(m,f),children:[!!r&&jsx(r,{size:h,className:Qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsx(a,{size:h,className:Qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:vr})]})});G.displayName="ActionButton";var Zs=nt.forwardRef(({className:e,style:t,node:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=nt.useRef(null);nt.useEffect(()=>{let c=s.current;return c?.append(o),()=>{c?.contains(o)&&o.remove();}},[o]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...p,className:e,style:t,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:M(i,s)})});Zs.displayName="DomNodeRenderer";var Qs="_14uvjig0 z9nup81",Js="_14uvjig7",el="_14uvjig3",tl=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),ol=z({defaultClassName:"_14uvjigf _14uvjig1",variantClassNames:{active:{true:"_14uvjigg _14uvjig2"},isDisabled:{true:"_14uvjigh"},isReadOnly:{true:"_14uvjigi"},isFocusVisible:{true:"_14uvjigj _14uvjig2"},isHovered:{true:"_14uvjigk _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),rl="_14uvjige _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",al="_14uvjig8",nl=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var It=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),kr=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),Rt=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),je="nrh1eh3",$e=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Ue=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),wt=z({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function ke({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...o,className:It({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...t,className:It({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:It({isDisabled:i,labelPosition:n}),children:r}):null}var il=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),sl="_1lnwne0";var ll=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),pl=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var on=nt.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:t.isOpen},t),d=useMemo(()=>{switch(a){case"top":return {x:0,y:4};case"bottom":return {x:0,y:-4};case"left":return {x:4,y:0};case"right":return {x:-4,y:0};default:return {x:0,y:0}}},[a]),m=useReducedMotion(),[u]=useSpring(()=>({from:{opacity:0,transform:`translate(${d.x}px, ${d.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!m})),y=a==="center"?"bottom":a;return jsxs(animated.span,{...o,style:{...u,...o.style},ref:l,"data-placement":y,children:[p?jsx("div",{className:ll({placement:y,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:pl({variant:n,size:i}),children:e})]})});on.displayName="TooltipContent";function ul({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let i=nt.useRef(null);useEffect(()=>{if(o){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{t(s);},{root:n?.current,rootMargin:a,threshold:r});},[t,o,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function ml({ref:e,onResize:t,isDisabled:o}){let r=nt.useRef(null),[a,n]=nt.useState();return nt.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),t?.(i);});},[t,o,n]),nt.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function Tt({src:e,alt:t}){let[o,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:o,hasError:a,isLoading:i,imgProps:{src:o?e:void 0,alt:t}}}function St(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var fl="SET_STATE",Rr="UNDO",wr="REDO",mg=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case fl:return {past:[...o,r],present:t.data,future:[]};case Rr:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case wr:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},yl=(e={},{isDisabled:t,onAction:o})=>{let r=St(),[a,n]=useReducer(mg,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=f=>{n({type:fl,data:f});},c=useRef(),d=()=>{c.current=Rr,n({type:Rr});},m=()=>{c.current=wr,n({type:wr});},u=!!i?.length,y=!!p?.length;return useGranularEffect(()=>{(c.current===Rr||c.current===wr)&&(o?.(s,c.current),c.current=void 0);},[s],[o,r]),{state:s,push:t?()=>{}:l,undo:t?()=>{}:d,redo:t?()=>{}:m,pastStates:i,futureStates:p,canUndo:u,canRedo:y}};var an=nt.createContext({messages:{},shouldLogMissingMessages:!0,hasMissingErrorLoggedFor:{current:new Set},setLang:()=>{}}),vl=({children:e,messages:t={},shouldLogMissingMessages:o=!0,...r})=>{let a=useRef(new Set),[n,i]=useState("");useEffect(()=>{a.current.clear();},[n,r.locale]);let s=nt.useMemo(()=>({messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:a,setLang:i}),[t,o,a,i]);return jsx(I18nProvider,{...r,children:jsx(an.Provider,{value:s,children:e})})};vl.displayName="I18nProvider";function F(e){let{messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:r}=useContext(an);useEffect(()=>{!e&&_g(t)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,t]);let a=useMemo(()=>e?cleanKeyFromGlobImport(e):t,[e,t]),n=useMessageFormatter(a),i=useLocale(),s=useCallback(l=>{o&&!r.current.has(l)&&(console.log(`BUI \u{1F30D}: Translation not found for key: \`${l}\` for locale: \`${i.locale}\`. The default message, i.e. \`${l}\`, will be used instead.`),r.current.add(l));},[r,i.locale,o]),p=useCallback((l,c)=>{if(typeof l=="object")try{return n(l.id,c)}catch{return s(l.id),l.defaultMessage||l.id}else try{return n(l,c)}catch{return s(l),l}},[n,s]);return useMemo(()=>({formatMessage:p,locale:i}),[p,i])}var K=e=>e;function lM(e,t,o){let r=nt.useRef(null);return nt.useEffect(()=>{if(e)return r.current=new MutationObserver(o),r.current.observe(e,t),()=>{r.current&&r.current.disconnect();}},[e,t,o]),r.current}function xl(e,t){let[o,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(n){return console.log(n),t}});return [o,n=>{try{let i=n instanceof Function?n(o):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function yM({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=nt.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=pe(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&o?.(i);},onPressStart(){let n=pe(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=pe(n).getSelection();l&&e.current?.contains(l.anchorNode)&&t(l);}let s=ue(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,t,r]);}function Nt(e){let t=useCallback(()=>{let a=pe(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[o,r]=nt.useState(t);return xe(()=>{let a=pe(e),n=()=>{r(t());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,t]),o}var nn=nt.createContext(void 0),Pl=({portalContainer:e,children:t})=>jsx(nn.Provider,{value:e,children:t});Pl.displayName="PortalContainerProvider";function ve(e){let t=useContext(nn);return e||t}var kl=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var Il="z9nup80",Lt="z9nup83",Rl="z9nup87";function sn(e=window){let[t,o]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=d=>{o(d.matches?"dark":"light");};return l.matches&&o("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=d=>{a(d.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=d=>{i(d.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=d=>{p(d.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:t,highContrast:r,reducedMotion:n,transparency:s}}var Mt=createContext({theme:lightTheme,setTheme:()=>{}});var wl="var(--hj25q10)";var Nr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},Dt=nt.forwardRef(({theme:e="system",children:t,setTheme:o,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:d,highContrast:m,transparency:u}=sn(),{name:y,theme:f}=useMemo(()=>{switch(e){case"system":return c==="light"?Nr.LIGHT:Nr.DARK;case"light":return Nr.LIGHT;case"dark":return Nr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=Nt(),g={"data-theme":y,"data-block-id":i,"data-block-class":s,"data-reduced-motion":d,"data-high-contrast":m,"data-transparency":u,"data-device":b},_=useMemo(()=>({theme:f,setTheme:o}),[f,o]);return jsx(Mt.Provider,{value:_,children:jsx("div",{...mergeProps(n,g),className:classNames(Il,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,f),...assignInlineVars({[wl]:l==="rtl"?"-1":"1"}),...a},ref:p,children:t})})});Dt.displayName="ThemeProvider";var Ke=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(Mt);return jsx(Overlay,{...n,children:jsx(Dt,{ref:i,theme:s,style:t,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:o})})});Ke.displayName="Portal";var re=nt.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":d,...m},u)=>{let y=nt.useRef(null),f=nt.useRef(null),b=!m.text||m.isDisabled,g=useTooltipTriggerState({...m,delay:o,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:v}=useTooltipTrigger({...m,isDisabled:b,delay:o,closeDelay:r},g,y),h=ve(s),{overlayProps:I,arrowProps:P,placement:C,updatePosition:x}=useOverlayPosition({arrowSize:i?13:0,targetRef:y,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:f,placement:t,isOpen:g.isOpen,...m});return ul({ref:f,threshold:1,onIntersect:x,isDisabled:!g.isOpen}),ml({ref:y,onResize:x,isDisabled:!g.isOpen}),jsxs(FocusableProvider,{..._,ref:y,children:[e,g.isOpen?jsx(Ke,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":d,children:jsx(on,{ref:M(u,f),state:g,arrowProps:P,overlayProps:I,placement:C,tooltipProps:v,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});re.displayName="Tooltip";var Lr=nt.forwardRef(({elementType:e,children:t,...o},r)=>{let a=oe(r),{focusableProps:n}=useFocusable(o,a);return jsx(e??"div",{ref:a,...n,children:t})});Lr.displayName="Focusable";var nv={xxs:8,xs:12,sm:16,md:20,lg:24},E=nt.forwardRef((e,t)=>{let o=oe(t),{tooltipProps:r}=hr(e,o);return r?jsx(re,{...r,children:jsx(pn,{...e,ref:o})}):jsx(pn,{...e,ref:o})});E.displayName="ActionIconButton";var pn=nt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{let l=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!l&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,c]);let{buttonProps:d,isPressed:m,ref:u,isFocusVisible:y,isFocused:f,isHovered:b,uiStateOptions:g}=xr({...s,elementType:i}),_=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":f,"data-focus-visible":y,"data-disabled":s.isDisabled,"data-hovered":b,"data-pressed":m});return jsxs(i,{...mergeProps(d,_),className:classNames(Fs({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:y,isHovered:b}),"BaselineUI-ActionIconButton",typeof e=="function"?e(g):e),ref:M(p,u),style:typeof t=="function"?t(g):t,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(o,{role:"presentation",size:nv[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:vr})]})});pn.displayName="ActionIconButtonCore";var Me=nt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=nt.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:d}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:u,isFocused:y}=useFocusRing(),{labelProps:f,decrementButtonProps:b,inputProps:g,incrementButtonProps:_,groupProps:v,descriptionProps:h,errorMessageProps:I}=useNumberField(n,l,s),P=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorCircleFilledIcon:null,[n.isInvalid,n.isReadOnly]),C=ke({description:n.description,errorMessageProps:I,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),x=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":d,"data-focused":y,"data-focus-visible":u,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:t,className:classNames(Ue({labelPosition:o}),"BaselineUI-NumberInput",e),...x,ref:i,children:[n.label?jsxs("div",{className:$e({labelPosition:o,hasMessage:!!C}),children:[jsx("label",{...f,className:je,children:n.label}),o==="start"&&C]}):null,jsxs("div",{className:classNames({[Lt]:n.isDisabled}),children:[jsxs("div",{...mergeProps(v,c),className:classNames(wt({isHovered:d,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:y,variant:r}),{[sl]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(g,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",kr({isDisabled:n.isDisabled,labelPosition:o}))}),P?jsx(P,{className:Rt({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:il({isHoveredOrFocused:d||y,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(E,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(A,{style:{height:16},orientation:"vertical"}),jsx(E,{variant:"secondary",size:"xxs",icon:PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),o==="top"&&C]})]})});Me.displayName="NumberInput";var Ft=nt.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":d,"aria-details":m,"aria-describedby":u,"data-block-id":y,"data-block-class":f,defaultValue:b,isReadOnly:g,label:_,id:v,includeNumberInput:h},I)=>{let P=nt.useRef(null),C={onChange:o===void 0?void 0:w=>{o(w[0]);},isDisabled:n||g,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:w=>{r(w[0]);},value:l===void 0?void 0:[l],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":d,"aria-details":m,"aria-describedby":u,id:v,label:_},x=useNumberFormatter(a),T=useSliderState({...C,numberFormatter:x}),{trackProps:N,groupProps:R,labelProps:S}=useSlider(C,T,P),k=jsx(Me,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":S.id,value:T.getThumbValue(0),formatOptions:a,onChange:w=>{T.setThumbValue(0,w);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...R,style:t,"data-block-id":y,"data-block-class":f,className:classNames(Qs,"BaselineUI-Slider",e),children:[_?jsxs("div",{className:el,children:[jsx("label",{...S,className:classNames(tl({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?k:null]}):null,jsxs("div",{className:Js,children:[jsx("div",{...N,className:classNames(al,"BaselineUI-Slider-Track"),ref:M(P,I),"data-testid":"track",children:jsx(Iv,{state:T,trackRef:P,isDisabled:n,isReadOnly:g})}),h&&!_?k:null]})]})});Ft.displayName="Slider";function Iv({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=nt.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:t,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:d,isHovered:m}=useHover({isDisabled:o}),u=filterTruthyValues({"data-disabled":o,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(nl({isDisabled:o,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...mergeProps(n,d,u),className:classNames(rl,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:classNames(ol({isDisabled:o,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb")}),jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})]})]})}var Hl=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610r",title:"_1yep5z610r",label:"_1yep5z610s",value:"_1yep5z610s",helper:"_1yep5z610t",body:"_1yep5z610r"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61l7"],[{type:"title",size:"md"},"_1yep5z61la"],[{type:"title",size:"lg"},"_1yep5z61ld"],[{type:"body",size:"sm"},"_1yep5z61lx"],[{type:"body",size:"md"},"_1yep5z61m0"],[{type:"body",size:"lg"},"_1yep5z61m0"],[{type:"subtitle",size:"sm"},"_1yep5z61lt"],[{type:"subtitle",size:"md"},"_1yep5z61lw"],[{type:"subtitle",size:"lg"},"_1yep5z61lw"],[{type:"label",size:"md"},"_1yep5z61lv"],[{type:"label",size:"lg"},"_1yep5z61lv"],[{type:"value",size:"md"},"_1yep5z61lv"],[{type:"value",size:"lg"},"_1yep5z61lv"],[{type:"helper",size:"sm"},"_1yep5z61lp"]]});var Q=nt.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Hl({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));Q.displayName="Text";var Ol=z({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6lv _1yep5z6lt _1yep5z6h4 _1yep5z6lk _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0",variantClassNames:{background:{subtle:"_1yep5z611y",medium:"_1yep5z611z"},isFocusVisible:{true:"_1yep5z617i _1yep5z617k _1yep5z617l _1yep5z613r"}},defaultVariants:{},compoundVariants:[]}),Vl="siobe25";var Dr=nt.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,contentStyle:l,contentClassName:c,...d},m)=>{let{formatMessage:u}=F(),y=nt.useRef(null),{dialogProps:f,titleProps:b}=useDialog(d,y),{focusProps:g,isFocusVisible:_}=useFocusRing();return jsxs("div",{...mergeProps(f,g),className:classNames(Ol({background:r,isFocusVisible:_}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:t,ref:M(m,y),children:[jsxs(L,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Vl,children:[jsx(Q,{type:"title",size:"sm",...b,className:Rl,children:a}),jsxs(L,{children:[n?jsx(E,{...n,variant:"secondary"}):null,jsx(E,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":u(Ev.close)})]})]}),jsx(A,{variant:r==="subtle"?"primary":"secondary"}),jsx(L,{display:"flex",flexDirection:"column",flex:1,style:{overflow:"auto",...l},className:classNames(c,"BaselineUI-Drawer-Content"),children:o})]})});Dr.displayName="Drawer";var Ev=K({close:{id:"close",defaultMessage:"Close"}});function Ul(e,t,o){let{isDisabled:r}=e,a=useReducedMotion(),[{y:n},i]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),s=useRef(0),p=useCallback(()=>{i.start({y:s.current,onRest:()=>{t.close();}});},[i,t]),l=useCallback(d=>{d.target.closest("[data-drawer]")||p();},[p]);useGranularLayoutEffect(()=>{s.current=o.current?.offsetHeight||0,i.set({y:s.current}),i.start({y:0,immediate:!!a});},[],[i,a]);let c=n.to({range:[0,s.current/2,s.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:n.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:c},onPointerDown:r||!e.isDismissable?void 0:l},close:p}}var Kl="aml2vl3 _1yep5z6im _1yep5z6in _1yep5z6io",ql=z({defaultClassName:"aml2vl0 _1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6id _1yep5z6ie _1yep5z6if",variantClassNames:{enableDrawer:{false:"_1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),Gl="_1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6gb _1yep5z6id _1yep5z6ie _1yep5z6if";var Ge=nt.createContext({state:null,triggerProps:{},overlayProps:{}}),Ie=({children:e,...t})=>{let o=useOverlayTriggerState(t),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},o),n=useMemo(()=>({state:o,triggerProps:r,overlayProps:a}),[o,r,a]);return jsx(Ge.Provider,{value:n,children:e})};Ie.displayName="Modal";var fn=nt.createContext({isDrawer:!1,closeDrawer:()=>{}}),yn=nt.createContext({setIsPopoverSafelyClosed:()=>{}}),Qv=animated(Dt),Jv=({children:e,className:t,style:o,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=nt.useContext(Ge),[d,m]=nt.useState(!0),u=Nt(n),y=ve(n),f=typeof s=="boolean"&&s||s==="auto"&&u==="mobile";invariant(c,"ModalContent must be a child of Modal");let b=nt.useRef(null),g=typeof r=="function"?r(f):r,_=typeof a=="function"?a(f):a,{underlayProps:v,overlayProps:h,close:I}=Ul({isDisabled:!f,isDismissable:g&&d},c,b),{modalProps:P,underlayProps:C}=useModalOverlay({isDismissable:!f&&d,isKeyboardDismissDisabled:_},c,b),{theme:x}=useContext(Mt),T=useReducedMotion(),N=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!T||i,config:{easing:easings.easeInBounce}}),R=useMemo(()=>({...P.style,...f?{...h.style,width:"100%"}:N}),[h.style,P.style,f,N]),S=useMemo(()=>({isDrawer:f,closeDrawer:I}),[f,I]),k=useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsx(Overlay,{portalContainer:y,children:jsx(fn.Provider,{value:S,children:jsx(yn.Provider,{value:k,children:jsxs(Qv,{className:classNames(ql({enableDrawer:f}),t),theme:x,"data-block-id":p,"data-block-class":l,style:o,children:[jsx(animated.div,{...mergeProps(C,v,{onPointerDown:f?v.onPointerDown:C.onPointerDown}),"data-testid":"underlay",style:v.style,className:classNames(Gl,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(P,h),style:R,ref:b,"data-drawer":f,className:classNames(f?Kl:void 0,"BaselineUI-Modal-Content"),children:typeof e=="function"?e(c):e})]})})})})},e_=animated(Jv),De=({children:e,style:t,...o})=>{let{state:r}=nt.useContext(Ge);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||o.disableAnimation})((i,s)=>s&&jsx(e_,{...o,style:{...t,...i},children:typeof e=="function"?e(r):e}))};var Zl=z({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z6131 _1yep5z617q _1yep5z617s",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2 _1yep5z617e"},isFocusVisible:{true:"_1yep5z613r _1yep5z617l _1yep5z617k _1yep5z617i"}},defaultVariants:{},compoundVariants:[]});var gn=nt.createContext({titleProps:{}}),me=nt.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let d=nt.useRef(null),m=nt.useRef(null),{isDrawer:u,closeDrawer:y}=useContext(fn),[f,b]=nt.useState(""),{focusProps:g,isFocusVisible:_}=useFocusRing();useLayoutEffect(()=>{let P=m.current?.getRootNode(),C=l["aria-label"]||"";l["aria-labelledby"]&&(C=P?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(C);},[l]);let{dialogProps:v,titleProps:h}=useDialog(l,d),I=useMemo(()=>({titleProps:h}),[h]);return u&&r?jsx(Dr,{title:f,onCloseRequest:y,className:t,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:M(m,c),background:p,children:e}):jsx(gn.Provider,{value:I,children:jsx("section",{...mergeProps(v,g),"data-block-id":i,"data-block-class":s,ref:M(d,c),style:o,className:classNames(Zl({size:u?"content":a,variant:n,isDrawer:u,isFocusVisible:_}),"BaselineUI-Dialog",t),children:e})})});me.displayName="Dialog";var Ql=nt.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(gn);return nt.isValidElement(e)?nt.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,t),style:{...e.props.style,...o}}):jsx("h3",{...a,ref:r,className:t,style:o,children:e})});Ql.displayName="DialogTitle";function Jl({placement:e,isOpen:t}){let o=useReducedMotion();return useTransition(t,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!o,config:config.stiff})}var tp=({children:e,isOpen:t,popoverContentRef:o,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,p]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(yn);useEffect(()=>{t?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[t]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let d=o.current;return useEffect(()=>{d&&p(d.getBoundingClientRect());},[d]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?g_.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var{color:_n}=themeVars,be=nt.forwardRef(({portalClassName:e,portalStyle:t,className:o,style:r,state:a,overlayProps:n,underlayClassName:i,children:s,includeArrow:p=!1,offset:l=2,portalContainer:c,contentContainerClassName:d,contentContainerStyle:m,"data-block-id":u,"data-block-class":y,...f},b)=>{let g=nt.useRef(null),_=ve(c),v=p?8:0,{underlayProps:h,popoverProps:I,placement:P,arrowProps:C}=usePopover({...f,offset:l+v,popoverRef:g,containerPadding:f.containerPadding||0},a);delete I.style?.position;let x=Jl({placement:P,isOpen:a.isOpen}),T=P==="center"?"bottom":P,N=useMemo(()=>({isOpen:a.isOpen}),[a.isOpen]),R=useMemo(()=>({...I.style,...assignInlineVars({[Us]:`${f.triggerRef?.current?.offsetWidth}px`}),...Xa(r,N)}),[I.style,f.triggerRef,r,N]);return jsx(tp,{isOpen:a.isOpen,popoverContentRef:g,portalContainer:_,style:I.style,children:x((S,k)=>k&&jsxs(Ke,{portalContainer:_,style:t,className:e,ref:b,"data-block-id":u,"data-block-class":y,children:[!f.isNonModal&&jsx("div",{...h,className:classNames($s,fr(i,N),"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...I,style:{...R,...S},ref:M(g,b),className:classNames(Vs,"BaselineUI-Popover-Content",fr(o,N)),"data-placement":["top","bottom","left","right"].filter(w=>P?.includes(w)),children:[p?jsxs("svg",{className:classNames(Os[T],"BaselineUI-PopoverContent-Arrow"),...C,style:{...C.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:_n.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:_n.background.primary.subtle,stroke:_n.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:a.close}),jsx("div",{...n,style:Xa(m,N),className:classNames(As,fr(d,N)),children:typeof s=="function"?s(a):s}),jsx(DismissButton,{onDismiss:a.close})]})]}))})});be.displayName="PopoverContentCore";var Re=nt.forwardRef((e,t)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(_o);return invariant(a),o?jsx(be,{ref:t,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:o}):null});Re.displayName="PopoverContent";var np=z({defaultClassName:"_1mdhlqv8",variantClassNames:{isOpen:{true:"_1mdhlqv9"}},defaultVariants:{},compoundVariants:[]}),We="_1mdhlqvb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",ip=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isOpen:{true:"_1mdhlqv2"},isDisabled:{true:"z9nup83 _1yep5z6ey"},isHovered:{true:"_1mdhlqv4"},variant:{primary:"_1mdhlqv5",ghost:"_1mdhlqv6"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"_1mdhlqv7"]]}),Hr="_1mdhlqvc _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1",sp="_1yep5z66x _1yep5z66y _1yep5z66z",lp="_1mdhlqva _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69i _1yep5z69j _1yep5z69k";var up=nt.forwardRef(({className:e,style:t,onChange:o,"data-block-id":r,icon:a,formatValue:n=d=>d,tooltipProps:i,popoverContentProps:s,isDisabled:p,...l},c)=>{let d=oe(c),[m,u]=useControlledState(l.value,l.defaultValue||0,o),[y,f]=nt.useState(!1),{keyboardProps:b}=useKeyboard({onKeyDown:v=>{(v.key==="Enter"||v.key==="Escape")&&f(!1);}}),g=n(m||0),_=i?.isDisabled||l["aria-label"]?`${l["aria-label"]}, ${g}`:g.toString();return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:t,ref:d,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:y,onOpenChange:f,children:[jsx(Le,{children:jsx(re,{text:l["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:p,...i,children:jsx(G,{label:g,variant:"popover","aria-label":_,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(Re,{placement:"bottom start",...s,className:classNames(We,s?.className),children:jsx(me,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(L,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...b,children:jsx(Ft,{...l,onChange:v=>{u(v),o?.(v);},value:m})})})})})]})]})});up.displayName="IconSlider";var mp=z({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),fp=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),yp="bpklwad",bp=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),gp="bpklwa6",vp=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var xp=nt.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=nt.useRef(null),c=useToggleState(s),{inputProps:d,isPressed:m}=useSwitch(s,c,l),{isFocusVisible:u,focusProps:y}=useFocusRing(),{hoverProps:f,isHovered:b}=useHover({isDisabled:s.isDisabled}),g=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":u,"data-disabled":s.isDisabled,"data-focus-visible":u,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":b,"data-pressed":m}),_=jsx("div",{className:classNames(mp({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:u,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(fp({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(g,f),className:classNames(bp({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:p,children:[t?jsx("span",{className:classNames(yp,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,y),ref:l})}),r?jsxs("div",{className:vp({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",gp),children:c.isSelected?r.on:r.off}),_]}):_]})});xp.displayName="Switch";var Cp="_19n40yy9",Pp=z({defaultClassName:"_19n40yy0",variantClassNames:{size:{lg:"_19n40yy1",md:"_19n40yy2",sm:"_19n40yy3"},variant:{primary:"_19n40yy4",ghost:"_19n40yy5"},isFocused:{true:"_19n40yy6"},hasText:{true:"_19n40yy7"},isDisabled:{true:"_19n40yy8"}},defaultVariants:{},compoundVariants:[]});var W_={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},Rp=nt.forwardRef(({className:e,size:t="md",variant:o="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=nt.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:d}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:u,isFocused:y}=useFocusRing({within:!0,isTextInput:!0}),f=W_[t],b=t==="sm"?XIcon$2:XIcon$3,g=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":y,"data-disabled":i.isDisabled,"data-focus-visible":u});return jsxs("div",{...g,className:classNames(Pp({size:t,isFocused:y,variant:o,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(f,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:Cp,ref:p}),l.value!==""&&jsx(E,{icon:b,...d,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});Rp.displayName="SearchInput";var wp="xyd2ss1 _1yep5z613 _1yep5z614 _1yep5z615 _1yep5z63f _1yep5z63g _1yep5z63h _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z65r _1yep5z65s _1yep5z65t _1yep5z683 _1yep5z684 _1yep5z685 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z66x _1yep5z66y _1yep5z66z _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6lm _1yep5z6ll _1yep5z6hx _1yep5z6lp _1yep5z6g1",Tp="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var xn=({section:e,showSelectedIcon:t,state:o})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==o.collection.getFirstKey()&&jsx(A,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:Tp,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(Or,{item:i,state:o,showSelectedIcon:t},i.key)))})]})]})};xn.displayName="MenuSection";var Or=({item:e,state:t,className:o,showSelectedIcon:r})=>{let a=nt.useRef(null),n=useMenuItem({key:e.key},t,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(go,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:o}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:t,showSelectedIcon:r})};Or.displayName="MenuItem";var Pn=nt.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),i=nt.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(s,p),className:classNames(wp,e),ref:M(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(xn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(Or,{item:l,state:n,className:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});Pn.displayName="MenuContent";var Vr=nt.forwardRef(({defaultOpen:e,onOpenChange:t,isOpen:o,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:d,triggerLabel:m,renderTrigger:u=({buttonProps:g,ref:_})=>jsx(G,{...g,variant:"popover",ref:_}),portalContainer:y,...f},b)=>{let g=nt.useRef(null),_=ve(y),v=useMenuTriggerState({defaultOpen:e,isOpen:o,onOpenChange:t}),{menuTriggerProps:h,menuProps:I}=useMenuTrigger({isDisabled:r,type:"menu"},v,g),P=ae(),C=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:v.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(v.isOpen):m}),[h,r,v.isOpen,m]);return useEffect(()=>{!m&&!u&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[u,m]),jsxs(Fragment,{children:[u({buttonProps:C,ref:g}),jsx(be,{triggerRef:g,state:v,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:d||2,className:classNames(We,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsx(Pn,{className:a,...I,...f,ref:b,autoFocus:v.focusStrategy||"first",children:P})})]})});Vr.displayName="Menu";var Ar=z({defaultClassName:"_13f0naj0",variantClassNames:{variant:{default:"_13f0naj1",inline:"_13f0naj2"},isHovered:{true:"_13f0naj3"},isFocusVisible:{true:"_13f0naj4"},isDisabled:{true:"_13f0naj5"},size:{sm:"_13f0naj6",md:"_13f0naj7",lg:"_13f0naj8"},type:{body:"_13f0naj9",label:"_13f0naja"},isActive:{true:"_13f0najb"}},defaultVariants:{},compoundVariants:[[{isActive:!0,isDisabled:!1},"_13f0najc"],[{type:"body",size:"sm"},"_13f0najd"],[{type:"body",size:"md"},"_13f0naje"],[{type:"body",size:"lg"},"_13f0najf"],[{type:"label",size:"sm"},"_13f0najg"],[{type:"label",size:"md"},"_13f0najh"],[{type:"label",size:"lg"},"_13f0naji"]]});var Dp=nt.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,role:c,...d},m)=>{let u=nt.useRef(null),{linkProps:y,isPressed:f}=useLink({...d,elementType:d.onPress?"span":n},u),{isFocusVisible:b,isFocused:g,focusProps:_}=useFocusRing(),{hoverProps:v,isHovered:h}=useHover({isDisabled:d.isDisabled}),I=n,P=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-disabled":d.isDisabled,"data-focused":g,"data-pressed":f,"data-focus-visible":b,"data-hovered":h,role:c,title:l});return jsx(I,{...mergeProps(y,_,v,P),className:classNames(Ar({variant:r,isFocusVisible:b,isHovered:h,isDisabled:d.isDisabled,size:a,isActive:f,type:i}),"BaselineUI-Link",e),ref:M(u,m),style:t,children:o})});Dp.displayName="Link";function Ep({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let u=[...m.target.files||[]];t?.(u),o?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function Rn({items:e}){let t=e.filter(o=>o.kind==="file").map(async o=>(invariant(o.kind==="file"),o.getFile()));return await Promise.all(t)}var Bp=z({defaultClassName:"_180w5ed0",variantClassNames:{variant:{default:"_180w5ed1",inline:"_180w5ed2"},hoveredOrFocusedOrActive:{true:"_180w5ed3"},disabled:{true:"_180w5ed4"}},defaultVariants:{},compoundVariants:[[{variant:"inline",hoveredOrFocusedOrActive:!0},"_180w5ed5"],[{variant:"default",hoveredOrFocusedOrActive:!0},"_180w5ed6"],[{variant:"default",disabled:!0},"_180w5ed7"],[{variant:"inline",disabled:!0},"_180w5ed8"]]}),Fp=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Hp=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Op=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var $p=nt.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},i)=>{let s=nt.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=Ep(n),{dropProps:d}=useDrop({ref:s,onDrop:async({items:b})=>{let g=b.filter(v=>v.kind==="file").map(async v=>(invariant(v.kind==="file"),v.getFile())),_=await Promise.all(g);n.onValueChange?.(_);}}),{focusProps:m,isFocusVisible:u}=useFocusRing(),{hoverProps:y,isHovered:f}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(d,y,c),className:classNames(Bp({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:f||u}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,p)})}),r?jsx(r,{size:20,className:Hp({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Op({disabled:n.isDisabled,hovered:f}),children:t}),o?jsx("div",{...l,className:Fp({disabled:n.isDisabled}),children:o}):null]})]})});$p.displayName="FileUpload";var Up="_12vfhl40 z9nup81",Kp="_12vfhl41 z9nup82",qp=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Gp="_12vfhl42",Wp="_12vfhl47",Xp="_12vfhl46 z9nup82",Yp="_12vfhl45",Zp=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Qp=nt.forwardRef(({className:e,style:t,variant:o="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:d,progressBarProps:m}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:u=0,maxValue:y=100,value:f=0,label:b}=p,g=(f-u)/(y-u),_=`${Math.round(g*100)}%`,v=jsx("output",{className:Zp({hasLabel:!!b}),children:m["aria-valuetext"]}),h=o==="error"?n:a;return jsxs("div",{...m,style:t,className:classNames(Up,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Kp,children:[jsx("label",{...d,className:Gp,children:b}),r?v:null]}):null,jsxs("div",{className:Yp,children:[jsxs("div",{className:Xp,children:[jsx("div",{className:Wp,children:jsx("div",{style:{width:_},className:qp({variant:o})})}),!b&&r?v:null]}),h?jsx("div",{className:It({hasError:o==="error"}),id:c,children:h}):null]})]})});Qp.displayName="ProgressBar";function jt({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorCircleFilledIcon:t==="warning"?WarningFilledIcon:null}var Xe=nt.forwardRef(({className:e,validationState:t,variant:o="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let d=nt.useRef(null),{inputProps:m,labelProps:u,descriptionProps:y,errorMessageProps:f,validationErrors:b}=useTextField({...l,validationState:t?t==="error"?"invalid":"valid":void 0},d),g=l.errorMessage||b.join(" "),_=ke({...l,errorMessage:g,descriptionProps:y,errorMessageProps:f,labelPosition:a});g&&(t="error");let{hoverProps:v,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:I,focusProps:P,isFocusVisible:C}=useFocusRing(),x=jt({isReadOnly:l.isReadOnly,validationState:t??"valid"}),T=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":t,"data-focused":I,"data-focus-visible":C});return jsxs("div",{className:classNames(Ue({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&_?jsxs("div",{className:$e({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...u,className:je,children:l.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[Lt]:l.isDisabled}),children:[jsxs("div",{...v,className:wt({validationState:t??"valid",isHovered:h,isFocused:I,variant:o,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,P,T),className:classNames(kr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:d}),x?jsx(x,{className:Rt({validationState:t??"valid",isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Xe.displayName="TextInput";var $t=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};$t.displayName="NumberFormat";var ec="_1yep5z6ip _1yep5z6iq _1yep5z6ir",tc=z({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup83"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0,isReadOnly:!1},"_9b1tml7"],[{isSelected:!0,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml8"],[{isSelected:!1,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml9"],[{isSelected:!0,isDisabled:!0},"_9b1tmla"],[{isSelected:!0,isReadOnly:!0},"_9b1tmlb"]]}),oc=z({defaultClassName:"_9b1tmlf",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_9b1tmlk"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"_9b1tmll"],[{isSelected:!0,isDisabled:!0},"_9b1tmlm"],[{isSelected:!1,isDisabled:!0},"_9b1tmln"]]}),rc=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var ic=nt.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let d=nt.useRef(null),m=useToggleState({...s,...l}),{inputProps:u,isPressed:y,isDisabled:f,isReadOnly:b,isSelected:g}=useSwitch({...s,...l},m,d),{focusProps:_,isFocused:v,isFocusVisible:h}=useFocusRing(),{hoverProps:I,isHovered:P}=useHover({}),C=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":v,"data-focus-visible":h,"data-disabled":f,"data-hovered":P,"data-pressed":y,"data-selected":g});return jsxs("label",{ref:p,style:o,className:classNames(ec,"BaselineUI-Reaction",e),...C,children:[jsx(VisuallyHidden,{children:jsx("input",{...u,..._,ref:d})}),jsxs("div",{...I,className:tc({isSelected:g,isFocusVisible:h,isHovered:P,isReadOnly:b,isDisabled:f}),children:[jsx("div",{className:rc({isDisabled:f,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:oc({isSelected:m.isSelected,isDisabled:f,isReadOnly:b,size:r}),children:jsx($t,{value:t})})]})]})});ic.displayName="Reaction";var sc="_1azy5686",lc="_1azy5685",pc="var(--_1azy5680)",cc="_1azy5688",dc="_1azy5689",uc="_1azy5681 z9nup82",mc="_1azy5682";var fc="_1azy5687";var p5={sm:16,md:20},c5={sm:[CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon],md:[CheckCircleFilledIcon,ErrorAltCircleFilledIcon$1]},Kt=nt.forwardRef(({className:e,style:t,size:o="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=p5[o],d=c/2-2,m=2*d*Math.PI,u=c5[o][r==="success"?0:1];return jsxs("div",{className:classNames(uc,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[pc]:`${m}px`}),...t},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:mc,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:sc,cx:c/2,cy:c/2,r:d}),r==="active"&&jsx("circle",{role:"presentation",className:lc,cx:c/2,cy:c/2,r:d})]}),r==="success"&&jsx(u,{className:fc,size:c}),r==="error"&&jsx(u,{className:cc,size:c})]}),i.label?jsx("span",{...p,className:dc,children:i.label}):null]})});Kt.displayName="ProgressSpinner";var Ur=z({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kpa"],[{isSelected:!0,isDisabled:!0},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),yc=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z6114"},isSelected:{true:"_1yep5z6116"}},defaultVariants:{},compoundVariants:[]});var b5={sm:16,md:20,lg:24},Kr=nt.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=useToggleState(i),{buttonProps:l,isPressed:c,ref:d,isFocusVisible:m,isFocused:u,isHovered:y,uiStateOptions:f}=Cr(i,p),b=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":u,"data-focus-visible":m,"data-disabled":i.isDisabled,"data-hovered":y,"data-pressed":c,"data-selected":p.isSelected});return jsxs(a,{...mergeProps(l,b),className:classNames(Ur({isHovered:y,isFocusVisible:m,isSelected:p.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(f):e),style:typeof t=="function"?t(f):t,ref:M(d,s),children:[o?jsx(o,{size:b5[r],className:yc({isDisabled:i.isDisabled,isSelected:p.isSelected})}):null,i.label]})});Kr.displayName="ToggleButton";var qr=z({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),bc=z({defaultClassName:"_16vugd02 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{labelPosition:{end:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vf _1yep5z6vg _1yep5z6vh",start:"_1yep5z614y _1yep5z614z _1yep5z6150 _1yep5z616a _1yep5z616b _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),gc=z({defaultClassName:"_16vugd06",variantClassNames:{isIndeterminate:{true:"_16vugd05"},isSelected:{true:"_16vugd05"},isFocusVisible:{true:"_16vugd09"},isHovered:{true:"_16vugd0a"},isDisabled:{true:"_16vugd0b"},isReadOnly:{true:"_16vugd0c"},hasError:{true:"_16vugd0d"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0e"]]});var zc=nt.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=nt.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:d,focusProps:m}=useFocusRing(),{inputProps:u,isPressed:y,isDisabled:f,isSelected:b,isReadOnly:g}=useCheckbox({...i,children:o},l,p),{hoverProps:_,isHovered:v}=useHover({isDisabled:f}),h=filterTruthyValues({"data-disabled":f,"data-readonly":g,"data-hovered":v,"data-selected":b,"data-pressed":y,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":d,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(bc({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,m),ref:p})}),jsxs("div",{..._,className:gc({isSelected:b&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:f,isReadOnly:g,hasError:i.isInvalid,isHovered:v}),children:[b&&!i.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:qr({isDisabled:f}),children:o}):null]})});zc.displayName="Checkbox";var hc={ar:{goToPage:"\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0635\u0641\u062D\u0629",nextPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",pageXofY:"\u0635\u0641\u062D\u0629 {arg0} \u0645\u0646 {arg1}",prevPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629"},cs:{goToPage:"P\u0159ej\xEDt na stranu",nextPage:"Dal\u0161\xED str\xE1nka",pageXofY:"Strana {arg0} z {arg1}",prevPage:"P\u0159edchoz\xED strana"},cy:{goToPage:"Mynd i Dudalen",nextPage:"Tudalen Nesaf",pageXofY:"Tudalen {arg0} o {arg1}",prevPage:"Tudalen Blaenorol"},da:{goToPage:"G\xE5 til side",nextPage:"N\xE6ste side",pageXofY:"Side {arg0} af {arg1}",prevPage:"Forrige side"},de:{goToPage:"Zu Seite wechseln",nextPage:"N\xE4chste Seite",pageXofY:"Seite {arg0} von {arg1}",prevPage:"Vorherige Seite"},el:{goToPage:"\u039C\u03B5\u03C4\u03AC\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",nextPage:"\u0395\u03C0\u03CC\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",pageXofY:"\u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 {arg0} \u03B1\u03C0\u03CC {arg1}",prevPage:"\u03A0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1"},"en-GB":{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},en:{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},es:{goToPage:"Ir a la p\xE1gina",nextPage:"P\xE1gina siguiente",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},fi:{goToPage:"Mene sivulle",nextPage:"Seuraava sivu",pageXofY:"Sivu {arg0} / {arg1}",prevPage:"Edellinen sivu"},"fr-CA":{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},fr:{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},he:{goToPage:"\u05DE\u05E2\u05D1\u05E8 \u05DC\u05E2\u05DE\u05D5\u05D3",nextPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D1\u05D0",pageXofY:"\u05E2\u05DE\u05D5\u05D3 {arg0} \u05DE\u05EA\u05D5\u05DA {arg1}",prevPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05E7\u05D5\u05D3\u05DD"},hr:{goToPage:"Idi na stranicu",nextPage:"Slijede\u0107a stranica",pageXofY:"Stranica {arg0} od {arg1}",prevPage:"Prethodna stranica"},id:{goToPage:"Buka halaman",nextPage:"Halaman Berikutnya",pageXofY:"Halaman {arg0} dari {arg1}",prevPage:"Halaman Sebelumnya"},it:{goToPage:"Vai a pagina",nextPage:"Pagina successiva",pageXofY:"Pagina {arg0} di {arg1}",prevPage:"Pagina precedente"},ja:{goToPage:"\u30DA\u30FC\u30B8\u306B\u79FB\u52D5",nextPage:"\u6B21\u306E\u30DA\u30FC\u30B8",pageXofY:"\u30DA\u30FC\u30B8 {arg0}/{arg1}",prevPage:"\u524D\u306E\u30DA\u30FC\u30B8"},ko:{goToPage:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",pageXofY:"{arg0}/{arg1} \uD398\uC774\uC9C0",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0"},ms:{goToPage:"Pergi ke Halaman",nextPage:"Halaman Seterusnya",pageXofY:"Halaman {arg0} daripada {arg1}",prevPage:"Halaman Sebelumnya"},"nb-NO":{goToPage:"G\xE5 til side",nextPage:"Neste side",pageXofY:"Side {arg0} av {arg1}",prevPage:"Forrige side"},nl:{goToPage:"Ga naar pagina",nextPage:"Volgende pagina",pageXofY:"Pagina {arg0} van {arg1}",prevPage:"Vorige pagina"},pl:{goToPage:"Przejd\u017A do strony",nextPage:"Nast\u0119pna strona",pageXofY:"Strona {arg0} z {arg1}",prevPage:"Poprzednia strona"},"pt-PT":{goToPage:"Ir para p\xE1gina",nextPage:"P\xE1gina seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},pt:{goToPage:"Ir \xE0 P\xE1gina",nextPage:"P\xE1gina Seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina Anterior"},ru:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435",nextPage:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430",pageXofY:"\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 {arg0} \u0438\u0437 {arg1}",prevPage:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"},sk:{goToPage:"\xCDs\u0165 na stranu",nextPage:"Dal\u0161ia strana",pageXofY:"Strana {arg0} z {arg1}",prevPage:"Predch\xE1dzaj\xFAca strana"},sl:{goToPage:"Pojdi na stran",nextPage:"Naslednja stran",pageXofY:"Stran {arg0} od {arg1}",prevPage:"Prej\u0161nja stran"},sv:{goToPage:"G\xE5 till sida",nextPage:"N\xE4sta sida",pageXofY:"Sida {arg0} av {arg1}",prevPage:"F\xF6reg\xE5ende sida"},th:{goToPage:"\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2B\u0E19\u0E49\u0E32",nextPage:"\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",pageXofY:"\u0E2B\u0E19\u0E49\u0E32 {arg0} \u0E08\u0E32\u0E01 {arg1}",prevPage:"\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32"},tr:{goToPage:"Sayfaya Git",nextPage:"Sonraki Sayfa",pageXofY:"Sayfa {arg0}/{arg1}",prevPage:"\xD6nceki Sayfa"},uk:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0443",nextPage:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430",pageXofY:"\u0421\u0442\u043E\u0440\u0456\u043D\u043A\u0430 {arg0} \u0437 {arg1}",prevPage:"\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044F \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430"},"zh-Hans":{goToPage:"\u524D\u5F80\u9875\u9762",nextPage:"\u4E0B\u4E00\u9875",pageXofY:"\u7B2C {arg0}/{arg1} \u9875",prevPage:"\u4E0A\u4E00\u9875"},"zh-Hant":{goToPage:"\u5230\u6B64\u9801",nextPage:"\u4E0B\u4E00\u9801",pageXofY:"\u7B2C{arg0}\u9801\uFF0C\u5171{arg1}\u9801",prevPage:"\u4E0A\u4E00\u9801"}};var xc=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),Cc="_1nsi9h1f _1yep5z6ls _1yep5z6lk _1yep5z6eu",Pc=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6g1 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z6zs",sm:"_1nsi9h12 _1yep5z6zv",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6z4 _1yep5z617s _1yep5z617q _1yep5z6130",pinned:"_1yep5z617e"}},defaultVariants:{},compoundVariants:[]}),kc=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]});var K5={style:"decimal"},q5={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},Sc=nt.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...d},m)=>{let{locale:u}=useLocale(),y=F(hc),f={...d,formatOptions:K5,minValue:o,incrementAriaLabel:a||y.formatMessage("nextPage"),decrementAriaLabel:n||y.formatMessage("prevPage"),defaultValue:r,"aria-label":i||y.formatMessage("goToPage")},b=nt.useRef(null),g=useNumberFieldState({...f,locale:u}),{inputProps:_,decrementButtonProps:v,incrementButtonProps:h,groupProps:I}=useNumberField({...f,onKeyDown:D=>{D.key==="Enter"&&b.current?.blur(),d.onKeyDown?.(D);},isDisabled:c},g,b),{hoverProps:P,isHovered:C}=useHover({}),{focusProps:x,isFocused:T,isFocusVisible:N}=useFocusRing(),R=p==="floating",[S,k]=q5[s],w=filterTruthyValues({"data-focus-visible":N,"data-focused":T,"data-hovered":C,"data-block-id":d["data-block-id"],"data-block-class":d["data-block-class"]}),H=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(I,P,w),className:classNames(Pc({size:s,variant:p}),"BaselineUI-Pagination",e),style:t,ref:m,children:[l?null:jsxs(Fragment,{children:[jsx(E,{icon:S,...v,elementType:"div",size:s,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||v.isDisabled}),p==="floating"&&jsx(A,{orientation:"vertical"})]}),jsxs("div",{className:xc({isFocused:T,variant:p,size:s}),"aria-label":y.formatMessage("pageXofY",{arg0:_.value,arg1:g.maxValue}),children:[jsx("input",{...mergeProps(_,x),ref:b,className:classNames("BaselineUI-Pagination-Input",Cc),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:kc({isDisabled:c}),children:["/ ",jsx($t,{value:g.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(A,{orientation:"vertical"}),jsx(E,{icon:k,...h,elementType:"div",size:s,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||h.isDisabled})]})]})});Sc.displayName="Pagination";var Nc=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};Nc.displayName="DateFormat";var No=z({defaultClassName:"_1f789qjm",variantClassNames:{variant:{neutral:"_1yep5z6112",red:"_1yep5z610c",green:"_1yep5z610g",blue:"_1yep5z610o","high-contrast":"_1yep5z6115"},isDisabled:{true:"_1yep5z61n1"},isSelected:{true:"_1yep5z6116"}},defaultVariants:{},compoundVariants:[]}),Gr=z({defaultClassName:"_1f789qj0 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ax _1yep5z6ay _1yep5z6az _1yep5z6bl _1yep5z6bm _1yep5z6bn _1yep5z6c9 _1yep5z6ca _1yep5z6cb _1yep5z6cx _1yep5z6cy _1yep5z6cz _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6l4 _1yep5z6lk _1yep5z6l7",variantClassNames:{isFocusVisible:{true:"_1f789qj1"},variant:{neutral:"_1yep5z6122",red:"_1yep5z611h",green:"_1yep5z611l",blue:"_1yep5z611t","high-contrast":"_1yep5z6126"},isDisabled:{true:"_1f789qj7 _1yep5z6121"},allowsRemoving:{true:"_1f789qj8"},isSelected:{true:"_1yep5z612c"},allowsSelection:{true:"_1f789qja"},isHovered:{true:"_1f789qjb"},size:{md:"_1f789qjc",sm:"_1f789qjd"}},defaultVariants:{},compoundVariants:[[{allowsSelection:!0,isHovered:!0,variant:"neutral"},"_1yep5z61ny"],[{allowsSelection:!0,isHovered:!0,variant:"red"},"_1yep5z61nd"],[{allowsSelection:!0,isHovered:!0,variant:"blue"},"_1yep5z61np"],[{allowsSelection:!0,isHovered:!0,variant:"green"},"_1yep5z61nh"],[{allowsSelection:!0,isHovered:!0,variant:"high-contrast"},"_1yep5z61o2"],[{allowsSelection:!0,isSelected:!0,isHovered:!0},"_1yep5z61oa"],[{variant:"high-contrast",isDisabled:!0},"_1yep5z61ny"],[{allowsRemoving:!0,size:"md"},"_1yep5z6190 _1yep5z6191 _1yep5z6192"],[{allowsRemoving:!0,size:"sm"},"_1yep5z61a3 _1yep5z61a4 _1yep5z61a5"]]}),Lc="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69f _1yep5z69g _1yep5z69h",Mc="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z69i _1yep5z69j _1yep5z69k",Dc=z({defaultClassName:"_1f789qju",variantClassNames:{variant:{neutral:"_1f789qjv",red:"_1f789qjw",green:"_1f789qjx",blue:"_1f789qjy","high-contrast":"_1f789qjz"},isHovered:{true:"_1f789qj10"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qj11"],[{isHovered:!0,variant:"red"},"_1f789qj12"],[{isHovered:!0,variant:"blue"},"_1f789qj13"],[{isHovered:!0,variant:"green"},"_1f789qj14"],[{isHovered:!0,variant:"high-contrast"},"_1f789qj15"]]}),Wr=z({defaultClassName:"_1f789qje",variantClassNames:{variant:{neutral:"_1yep5z610r",red:"_1yep5z610c",green:"_1yep5z610g",blue:"_1yep5z610o","high-contrast":"_1yep5z610w"},isDisabled:{true:"_1yep5z61ms"},isSelected:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]});var Hc=({item:e,state:t,variant:o="neutral",size:r="md"})=>{let a=nt.useRef(null),{focusProps:n,isFocusVisible:i}=useFocusRing({within:!0}),{rowProps:s,gridCellProps:p,removeButtonProps:l,allowsRemoving:c,isDisabled:d,isSelected:m,allowsSelection:u}=useTag({item:e},t,a),y=nt.useRef(null),{buttonProps:f}=useButton(l,y),{hoverProps:b,isHovered:g}=useHover({isDisabled:d}),{hoverProps:_,isHovered:v}=useHover({isDisabled:d}),h=e.value?.icon,I=e.value?.data?.variant??o,P=r==="md"?XIcon$2:XIcon$1,C=r==="md"?CheckmarkIcon$3:CheckmarkIcon$1;return jsx("div",{...mergeProps(s,n,_),ref:a,className:classNames(Gr({isFocusVisible:i,variant:I,isDisabled:d,allowsRemoving:c,isSelected:m,allowsSelection:u,isHovered:v,size:r}),Wr({variant:I,isDisabled:d,isSelected:m}),"BaselineUI-Tag"),children:jsxs("div",{...p,className:Lc,children:[m?jsx(C,{size:r==="md"?16:12,className:classNames(No({variant:I,isDisabled:d,isSelected:m}),"BaselineUI-Tag-Icon")}):null,!m&&h?jsx(h,{size:r==="md"?16:12,className:classNames(No({variant:I,isDisabled:d,isSelected:m}),"BaselineUI-Tag-Icon")}):null,jsx(L,{paddingY:r==="md"?"sm":"none",typography:r==="sm"?"label.sm.medium":"label.md.medium",children:e.rendered}),c?jsx("button",{...mergeProps(f,b),className:Dc({variant:I,isHovered:g}),children:jsx(P,{size:r==="md"?12:8})}):null]})})};var Ac=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,size:n="md",...i},s)=>{let p=useMemo(()=>a.map(u=>({...u,data:{variant:u.variant}})),[a]),l=ae(),c=nt.useRef(null),d=useListState({...i,items:p,children:l}),{gridProps:m}=useTagGroup(i,d,c);return jsx("div",{...m,className:classNames(Mc,"BaselineUI-TagGroup",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,c),children:[...d.collection].map(u=>jsx(Hc,{state:d,item:u,variant:i.variant,size:n},u.key))})});Ac.displayName="TagGroup";var jc="_1yep5z6lh",$c=z({defaultClassName:"_1kvz17db _1yep5z6l4 _1yep5z6l6",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Uc=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6l4 _1yep5z6l5",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Kc="_1yep5z6ev _1yep5z6dy",qc=z({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6l4 _1yep5z6l7",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6g2",false:"_1yep5z6g3"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Gc="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Wc=z({defaultClassName:"_1kvz17d7 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Mn=nt.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext(Ye),{disabledKeys:n}=useContext(Ye),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=Oe(s.target),l=[...a?.keys()||[]].findIndex(y=>a?.get(y)?.current===p?.activeElement),c=a?.get(l||0),d=a?.size||0,m=y=>{let f=a.get(y-1<0?d-1:y-1);n?.has(f?.current?.getAttribute("data-key")||"")?m(y-1):f?.current?.focus();},u=y=>{let f=a.get((y+1)%d);n?.has(f?.current?.getAttribute("data-key")||"")?u(y+1):f?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),u(-1);break}case"End":{s.preventDefault(),m(d);break}case"ArrowDown":{s.preventDefault(),u(l);break}case"ArrowUp":{s.preventDefault(),m(l);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:o,className:classNames(jc,t),ref:r,children:nt.Children.map(e,(s,p)=>nt.cloneElement(s,{index:p}))})});Mn.displayName="AccordionBase";var Ye=nt.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Zc=nt.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=nt.useState(o),d=nt.useRef(new Map).current,[m,u]=nt.useState(a);useEffect(()=>{u(m);},[m]),useEffect(()=>{n?.(l);},[l,n]);let y=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:t,headers:d,expansionMode:m}),[r,l,t,d,m]);return jsx(Ye.Provider,{value:y,children:jsx(FocusScope,{children:jsx(Mn,{className:i,style:s,ref:p,children:e})})})});Zc.displayName="Accordion";var En=nt.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=nt.useRef(null),{expandedKeys:c,setExpandedKeys:d,expansionMode:m,disabledKeys:u,headers:y}=useContext(Ye),f=u?.has(r),b=useFocusManager();invariant(b);let{focusNext:g,focusPrevious:_}=b,{keyboardProps:v}=useKeyboard({onKeyDown:w=>{w.key==="ArrowRight"?g({wrap:!0}):w.key==="ArrowLeft"?_({wrap:!0}):w.continuePropagation();},isDisabled:f});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),y?.set(n,l);},[n,y]);let h=()=>{d(w=>{let B=new Set(w);return B.has(r)?B.delete(r):(m==="single"&&B.clear(),B.add(r)),B});},{buttonProps:I}=useButton({"aria-expanded":c.has(r),"aria-controls":o,onPress:h,isDisabled:f},l),{pressProps:P}=usePress({onPress:h,isDisabled:f}),{focusProps:C,isFocusVisible:x}=useFocusRing(),{hoverProps:T,isHovered:N}=useHover({isDisabled:f}),{focusProps:R,isFocusVisible:S}=useFocusRing({within:!0}),k=c.has(r);return jsxs("h3",{...mergeProps(v,P,T,R),className:qc({isFocusVisible:x,isHovered:N,isDisabled:f}),ref:p,children:[jsxs("div",{className:Wc({isDisabled:!!f}),children:[jsx(ChevronRightIcon,{className:Uc({isExpanded:k}),size:8}),jsx("button",{...mergeProps(I,C),id:a,"data-key":r,className:Gc,ref:l,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:$c({showActionsOnTriggerOnly:s,isTriggered:S||N}),children:t.map((w,B)=>jsx(E,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:f,...w},B))}):null,i?jsx("div",{className:Kc,children:i}):null]})});En.displayName="AccordionHeader";var nd=nt.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),d=useId(),{expandedKeys:m}=useContext(Ye),u=nt.useRef(null),y=m.has(r),f=St(),b=useReducedMotion(),g=useTransition(y?[r]:[],{from:!f&&!b&&{height:0,opacity:0},enter:()=>async _=>{await _({height:u.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:_=>_.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(En,{value:r,actions:t,id:d,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),g(_=>jsx(animated.div,{role:"region","aria-labelledby":d,id:c,style:{..._,overflow:"hidden"},children:jsx("div",{ref:u,className:s,style:i,children:o})}))]})});nd.displayName="AccordionItem";var Do=nt.forwardRef(({variant:e,isOpen:t,selectedIcon:o,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":p,"data-block-class":l,...c},d)=>{let m=nt.useRef(null),{buttonProps:u,isPressed:y}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:f,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:g,isFocused:_,isFocusVisible:v}=useFocusRing(),h=jt({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(u.disabled=!1);let I=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":_,"data-focus-visible":v,"data-hovered":b,"data-pressed":y,"data-open":t,"data-block-id":p,"data-block-class":l});return jsxs("button",{...mergeProps(u,f,g,I),ref:M(d,m),className:classNames(ip({isFocused:v,isDisabled:c.isDisabled,isOpen:t,isHovered:b,variant:e}),wt({variant:e,isHovered:b,isFocused:v,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:lp,children:[o?jsx(o,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(Rt({validationState:r,isReadOnly:!!c.isReadOnly}),sp),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:np({isOpen:t})})})]})});Do.displayName="SelectButton";var Yr=nt.createContext({state:null,popoverAnchorRef:null}),Hn=nt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:d,renderTrigger:m=({buttonProps:f,selectedValue:b,valueProps:g,isOpen:_,ref:v})=>{let h=b&&"icon"in b&&b.icon;return jsx(Do,{...f,className:l,style:c,isOpen:_,isReadOnly:u.isReadOnly,ref:v,variant:r,validationState:u.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:u.placeholder,valueProps:g})},...u},y)=>{let{popoverAnchorRef:f}=useContext(Yr),b=nt.useRef(null),g=ve(u.portalContainer),{labelProps:_,triggerProps:v,valueProps:h,menuProps:I,descriptionProps:P,errorMessageProps:C}=useSelect({...u,validationState:u.validationState==="error"?"invalid":"valid"},d,b),x=ke({...u,descriptionProps:P,errorMessageProps:C,labelPosition:o}),T=d.selectedItem?.value??null;return jsxs(it.Provider,{value:d,children:[jsxs("div",{style:t,className:classNames(Ue({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:y,children:[u.label||x?jsxs("div",{className:$e({labelPosition:o,hasMessage:!!x}),children:[u.label?jsx("div",{..._,className:classNames(je,"BaselineUI-Select-Label"),children:u.label}):null,o==="start"&&x]}):null,jsx(HiddenSelect,{state:d,triggerRef:b,isDisabled:u.isDisabled,label:u.label,name:u.name}),m({buttonProps:v,selectedValue:T,valueProps:h,isOpen:d.isOpen,ref:b}),o==="top"&&x]}),d?jsx(be,{placement:p,portalContainer:g,offset:u.offset||2,state:d,triggerRef:f||b,style:t,className:classNames(We,"BaselineUI-Select-Popover"),...u,children:jsx(le,{...I,label:u.label,items:u.items,showSelectedIcon:u.showSelectedIcon,className:Hr,optionStyle:i,optionClassName:s})}):null]})});Hn.displayName="SelectCore";var cd=nt.forwardRef((e,t)=>{let o=ae(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:o});return jsx(Hn,{...e,ref:t,state:r})});cd.displayName="SelectStandalone";var Qe=nt.forwardRef((e,t)=>{let{state:o}=useContext(Yr);return useEffect(()=>{invariant(o||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,o]),o?jsx(Hn,{state:o,...e,ref:t}):jsx(cd,{...e,ref:t})});Qe.displayName="Select";var ud=nt.forwardRef(({className:e,style:t,variant:o,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=nt.useRef(null),l=useCallback(({buttonProps:c,selectedValue:d,valueProps:m,isOpen:u,ref:y})=>{let f=d&&"icon"in d&&d.icon;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(Do,{...c,isOpen:u,isReadOnly:i.isReadOnly,ref:y,variant:o,validationState:i.validationState,selectedIcon:f||void 0,label:d?"label"in d&&d?.label:i.placeholder,valueProps:m})})},[i,n,o]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:t,ref:M(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(Qe,{...i,renderTrigger:l})]})});ud.displayName="IconSelect";var md="_1017q4c5",fd=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),yd="_1017q4c4";var Gz={sm:AvatarIcon,md:AvatarIcon$1},Xt=nt.forwardRef(({className:e,style:t,size:o="md",icon:r=Gz[o],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":d},m)=>{let{imgProps:u}=Tt({src:n,alt:a}),y=a?.split(" ").map(f=>f[0]).join("");return jsxs("span",{className:classNames(fd({size:o,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:t,"aria-disabled":s,"data-block-id":c,"data-block-class":d,children:[n?jsx("img",{...u,loading:l,className:yd}):null,!i&&!n&&jsx(r,{size:o==="sm"?16:24}),i&&!n?o==="sm"?y[0]:y:null,p?jsx("div",{"data-testid":"notification",className:md}):null]})});Xt.displayName="Avatar";var bd="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",gd=z({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6l4 _1yep5z6l7 _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z610r"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z610v"},variant:{primary:"_1x62fhbb _1yep5z6zs",ghost:"_1yep5z6zv"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mo"],[{variant:"primary",isSelected:!0},"_1yep5z61nv"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61mv"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61nw"]]}),vd=z({defaultClassName:"_1x62fhb3 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6vf _1yep5z6vg _1yep5z6vh"}},defaultVariants:{},compoundVariants:[]}),_d="_1x62fhbl",Vn=z({defaultClassName:"_1x62fhbf _1yep5z6f6",variantClassNames:{isHovered:{true:"_1yep5z6112"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z6114"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mz"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61n4"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1yep5z61n1"]]}),zd="_1yep5z6lo _1yep5z6ll _1yep5z6hu _1yep5z6ln",hd=z({defaultClassName:"_1x62fhb0 _1yep5z6lh _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{variant:{primary:"_1yep5z6120",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var xd=({state:e,...t})=>{let o=nt.useRef(null),{tabPanelProps:r}=useTabPanel(t,e,o),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[zd]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var $n=nt.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),d=nt.useRef(null),{tabListProps:m}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,d);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:t,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(hd({variant:a}),r),style:o,children:[jsx("div",{...m,className:vd({variant:a}),ref:d,children:[...c.collection].map(u=>(invariant(u.value,"TabItem requires a value prop"),jsx(Pd,{item:u,state:c,onRemove:i,variant:a},u.key)))}),n?.map((u,y)=>jsx("div",{className:bd,children:jsx(E,{...u,variant:"secondary",size:"sm",className:classNames(_d,u.className)})},y))]}),jsx(xd,{state:c},c.selectedItem?.key)]})});$n.displayName="TabsBase";var Pd=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,i=nt.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},o,i),{hoverProps:c,isHovered:d}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:u,titleStyle:y,titleClassName:f}=n,{focusProps:b,isFocusVisible:g,isFocused:_}=useFocusRing(),{keyboardProps:v}=useKeyboard({onKeyDown:I=>{I.key==="Backspace"&&t?t(a):I.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":d,"data-focus-visible":g});return jsxs("div",{...mergeProps(v,s,c,b,h),className:classNames(gd({isHovered:d,isSelected:p,isFocusVisible:g,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",f),style:y,ref:i,children:[u?jsx(u,{size:20,className:Vn({isHovered:d,isSelected:p,isDisabled:l,variant:r})}):null,m,t?jsx(E,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:p||_||d?1:0},className:Vn({isHovered:d,isSelected:p,isDisabled:l,variant:r})}):null]})};Pd.displayName="TabButton";var Id=nt.forwardRef(function({children:t,...o},r){let a=useMemo(()=>nt.Children.map(t,n=>!n||!nt.isValidElement(n)||typeof n.type=="string"?null:{...n.props,id:n.props.value}).filter(Boolean),[t]);return jsx($n,{...o,ref:r,items:a,children:n=>jsx(Item,{title:n.title,children:n.children},n.key)})});Id.displayName="Tabs";var Rd=({children:e,title:t,value:o})=>(invariant(o,"TabItem requires a value prop"),invariant(t,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);Rd.displayName="TabItem";var wd={ar:{close:"\u0625\u063A\u0644\u0627\u0642"},cs:{close:"Zav\u0159\xEDt"},cy:{close:"Cau"},da:{close:"Luk"},de:{close:"Schlie\xDFen"},el:{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF"},"en-GB":{close:"Close"},en:{close:"Close"},es:{close:"Cerrar"},fi:{close:"Sulje"},"fr-CA":{close:"Fermer"},fr:{close:"Fermer"},he:{close:"\u05E1\u05D2\u05D9\u05E8\u05D4"},hr:{close:"Zatvori"},id:{close:"Tutup"},it:{close:"Chiudi"},ja:{close:"\u9589\u3058\u308B"},ko:{close:"\uB2EB\uAE30"},ms:{close:"Tutup"},"nb-NO":{close:"Lukk"},nl:{close:"Sluit"},pl:{close:"Zamknij"},"pt-PT":{close:"Fechar"},pt:{close:"Fechar"},ru:{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"},sk:{close:"Zavrie\u0165"},sl:{close:"Zapri"},sv:{close:"St\xE4ng"},th:{close:"\u0E1B\u0E34\u0E14"},tr:{close:"Kapat"},uk:{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438"},"zh-Hans":{close:"\u5173\u95ED"},"zh-Hant":{close:"\u95DC\u9589"}};var Td=z({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),Sd=z({defaultClassName:"kfun6y0 z9nup82",variantClassNames:{variant:{info:"kfun6y1",warning:"kfun6y2",error:"kfun6y3",success:"kfun6y4"},arrangement:{single:"kfun6y5",multi:"kfun6y6",compact:"kfun6y7"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:!1,arrangement:"single"},"kfun6ya"],[{hasButton:!0,arrangement:"compact"},"kfun6yb"],[{hasCloseButton:!0,arrangement:"compact"},"kfun6yc"]]}),Nd=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),Ld=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Md=z({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),Dd=z({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),Ed=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var Ph={error:{sm:ErrorAltCircleFilledIcon,md:ErrorAltCircleFilledIcon$1},info:{sm:InfoCircleFilledIcon,md:InfoCircleFilledIcon$1},success:{sm:CheckmarkCircleFilledIcon,md:CheckCircleFilledIcon},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Bd=nt.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":d},m)=>{let u=F(wd),y=o&&jsx(G,{variant:s==="compact"?"tertiary":"ghost",label:o,onPress:r}),f=Ph[n][l];return jsxs("div",{className:classNames(Sd({variant:n,arrangement:s,hasButton:!!o||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":d,style:a,role:"alert",ref:m,children:[jsxs("div",{className:Ed({arrangement:s}),children:[jsx(f,{className:Md({variant:n}),size:16}),jsxs("div",{className:Td({arrangement:s}),children:[jsx("h3",{className:Dd({size:l}),children:i}),jsx("section",{className:Nd({size:l}),children:t})]}),s==="compact"&&y]}),jsxs("div",{className:Ld({arrangement:s}),children:[s!=="compact"&&y,p?jsx(E,{variant:"secondary",icon:XCircleFilledIcon,size:"sm",onPress:p,"aria-label":u.formatMessage("close")}):null]})]})});Bd.displayName="InlineAlert";var Je={ar:{add:"\u0625\u0636\u0627\u0641\u0629",addColor:"\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",cancel:"\u0625\u0644\u063A\u0627\u0621",colorFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",colorPresets:"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",customColors:"\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",newColor:"\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",noColor:"\u0644\u0627 \u064A\u0648\u062C\u062F",removeColor:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",transparent:"\u0634\u0641\u0627\u0641"},cs:{add:"P\u0159idat",addColor:"P\u0159idat barvu",cancel:"Zru\u0161it",colorFormat:"Form\xE1t barvy",colorPresets:"P\u0159edvolby barev",customColors:"Vlastn\xED barvy",newColor:"Vlastn\xED barva",noColor:"Nen\xED",removeColor:"Odebrat barvu",transparent:"Pr\u016Fhledn\xE1"},cy:{add:"Ychwanegu",addColor:"Ychwanegu Lliw",cancel:"Canslo",colorFormat:"Fformat Lliw",colorPresets:"Rhagosodiadau Lliw",customColors:"Lliwiau Custom",newColor:"Lliw Personol Newydd",noColor:"Dim",removeColor:"Tynnu Lliw",transparent:"Tryloyw"},da:{add:"Tilf\xF8j",addColor:"Tilf\xF8j Farve",cancel:"Annuller",colorFormat:"Farveformat",colorPresets:"Farvevalg",customColors:"Brugerdefinerede farver",newColor:"Ny tilpasset farve",noColor:"Ingen",removeColor:"Fjern Farve",transparent:"Transparent"},de:{add:"Hinzuf\xFCgen",addColor:"Farbe hinzuf\xFCgen",cancel:"Abbrechen",colorFormat:"Farbformat",colorPresets:"Farbvorlagen",customColors:"Benutzerdefinierte Farben",newColor:"Neue benutzerdefinierte Farbe",noColor:"Kein",removeColor:"Farbe entfernen",transparent:"Transparent"},el:{add:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",addColor:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",colorFormat:"\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",colorPresets:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",customColors:"\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",newColor:"\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",noColor:"\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",removeColor:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",transparent:"\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2"},"en-GB":{add:"Add",addColor:"Add Colour",cancel:"Cancel",colorFormat:"Colour Format",colorPresets:"Colour Presets",customColors:"Custom Colours",newColor:"New Custom Colour",noColor:"None",removeColor:"Remove Colour",transparent:"Transparent"},en:{add:"Add",addColor:"Add Color",cancel:"Cancel",colorFormat:"Color Format",colorPresets:"Color Presets",customColors:"Custom Colors",newColor:"New Custom Color",noColor:"None",removeColor:"Remove Color",transparent:"Transparent"},es:{add:"A\xF1adir",addColor:"A\xF1adir color",cancel:"Cancelar",colorFormat:"Formato de color",colorPresets:"Preajustes de color",customColors:"Colores personalizados",newColor:"Nuevo color personalizado",noColor:"Ninguna",removeColor:"Eliminar color",transparent:"Transparente"},fi:{add:"Lis\xE4\xE4",addColor:"Lis\xE4\xE4 v\xE4ri",cancel:"Kumoa",colorFormat:"V\xE4rimuoto",colorPresets:"V\xE4rin esiasetukset",customColors:"Mukautetut v\xE4rit",newColor:"Uusi muokattu v\xE4ri",noColor:"Ei mit\xE4\xE4n",removeColor:"Poista v\xE4ri",transparent:"L\xE4pin\xE4kyv\xE4"},"fr-CA":{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},fr:{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},he:{add:"\u05D4\u05D5\u05E1\u05E4\u05D4",addColor:"\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC",colorFormat:"\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",colorPresets:"\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",customColors:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",newColor:"\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",noColor:"\u05DC\u05DC\u05D0",removeColor:"\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3"},hr:{add:"Dodati",addColor:"Dodaj boju",cancel:"Otka\u017Ei",colorFormat:"Format boje",colorPresets:"Prijedlozi boja",customColors:"Prilago\u0111ene boje",newColor:"Nova prilago\u0111ena boja",noColor:"Prazno",removeColor:"Ukloni boju",transparent:"Prozirna"},id:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batalkan",colorFormat:"Format Warna",colorPresets:"Preset Warna",customColors:"Warna Kustom",newColor:"Warna Khusus Baru",noColor:"Tidak ada",removeColor:"Hapus Warna",transparent:"Transparan"},it:{add:"Aggiungi",addColor:"Aggiungi colore",cancel:"Annulla",colorFormat:"Formato del colore",colorPresets:"Colori predefiniti",customColors:"Colori personalizzati",newColor:"Nuovo colore personalizzato",noColor:"Nessuno",removeColor:"Rimuovi colore",transparent:"Trasparente"},ja:{add:"\u8FFD\u52A0",addColor:"\u8272\u3092\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorFormat:"\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",colorPresets:"\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",customColors:"\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",newColor:"\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",noColor:"\u306A\u3057",removeColor:"\u8272\u3092\u524A\u9664",transparent:"\u900F\u660E"},ko:{add:"\uCD94\uAC00",addColor:"\uC0C9\uC0C1 \uCD94\uAC00",cancel:"\uCDE8\uC18C",colorFormat:"\uC0C9\uC0C1 \uD615\uC2DD",colorPresets:"\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",customColors:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",newColor:"\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",noColor:"\uC5C6\uC74C",removeColor:"\uC0C9\uC0C1 \uC81C\uAC70",transparent:"\uD22C\uBA85"},ms:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batal",colorFormat:"Format Warna",colorPresets:"Praset Warna",customColors:"Warna Kustom",newColor:"Warna Tersuai Baharu",noColor:"Tiada",removeColor:"Buang Warna",transparent:"Lut Sinar"},"nb-NO":{add:"Legg til",addColor:"Legg til farge",cancel:"Avbryt",colorFormat:"Fargeformat",colorPresets:"Fargeinnstillinger",customColors:"Egendefinerte farger",newColor:"Ny tilpasset farge",noColor:"Ingen",removeColor:"Fjern farge",transparent:"Gjennomsiktig"},nl:{add:"Voeg toe",addColor:"Kleur toevoegen",cancel:"Annuleer",colorFormat:"Kleurformaat",colorPresets:"Kleurvoorinstellingen",customColors:"Aangepaste kleuren",newColor:"Nieuwe aangepaste kleur",noColor:"Geen",removeColor:"Kleur verwijderen",transparent:"Doorzichtig"},pl:{add:"Dodaj",addColor:"Dodaj kolor",cancel:"Anuluj",colorFormat:"Format koloru",colorPresets:"Wst\u0119pnie ustawione kolory",customColors:"Niestandardowe kolory",newColor:"Nowy kolor niestandardowy",noColor:"Brak",removeColor:"Usu\u0144 kolor",transparent:"Prze\u015Bwiecaj\u0105ce"},"pt-PT":{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Predefini\xE7\xF5es de cor",customColors:"Cores personalizadas",newColor:"Nova cor personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},pt:{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Pr\xE9-ajustes de Cores",customColors:"Cores personalizadas",newColor:"Nova Cor Personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},ru:{add:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",addColor:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",colorPresets:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",customColors:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",newColor:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",noColor:"\u041D\u0435\u0442",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",transparent:"\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439"},sk:{add:"Prida\u0165",addColor:"Prida\u0165 farbu",cancel:"Zru\u0161i\u0165",colorFormat:"Form\xE1t farby",colorPresets:"Predvo\u013Eby farieb",customColors:"Vlastn\xE9 farby",newColor:"Vlastn\xE1 farba",noColor:"\u017Diadny",removeColor:"Odstr\xE1ni\u0165 farbu",transparent:"Prieh\u013Eadn\xE1"},sl:{add:"Dodaj",addColor:"Dodaj barvo",cancel:"Prekli\u010Di",colorFormat:"Barvni format",colorPresets:"Barvne predloge",customColors:"Prilagojene barve",newColor:"Nova barva po meri",noColor:"Prazna stran",removeColor:"Odstrani barvo",transparent:"Prosojna"},sv:{add:"L\xE4gg till",addColor:"L\xE4gg till f\xE4rg",cancel:"Avbryt",colorFormat:"F\xE4rgformat",colorPresets:"F\xF6rval f\xF6r f\xE4rger",customColors:"Anpassade f\xE4rger",newColor:"Ny anpassad f\xE4rg",noColor:"Ingen",removeColor:"Ta bort f\xE4rg",transparent:"Genomskinligt"},th:{add:"\u0E40\u0E1E\u0E34\u0E48\u0E21",addColor:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",colorFormat:"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",colorPresets:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",customColors:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",newColor:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",noColor:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",removeColor:"\u0E25\u0E1A\u0E2A\u0E35",transparent:"\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A"},tr:{add:"Ekle",addColor:"Renk Ekle",cancel:"Vazge\xE7",colorFormat:"Renk Format\u0131",colorPresets:"Renk \xD6nayarlar\u0131",customColors:"\xD6zel Renkler",newColor:"Yeni \xF6zel renk",noColor:"Hi\xE7biri",removeColor:"Rengi Kald\u0131r",transparent:"\u015Eeffaf"},uk:{add:"\u0414\u043E\u0434\u0430\u0442\u0438",addColor:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",cancel:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",colorPresets:"\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",customColors:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",newColor:"\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",noColor:"\u041D\u0435\u043C\u0430\u0454",removeColor:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",transparent:"\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439"},"zh-Hans":{add:"\u6DFB\u52A0",addColor:"\u6DFB\u52A0\u989C\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u989C\u8272\u683C\u5F0F",colorPresets:"\u989C\u8272\u9884\u8BBE",customColors:"\u81EA\u5B9A\u4E49\u989C\u8272",newColor:"\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",noColor:"\u65E0",removeColor:"\u79FB\u9664\u989C\u8272",transparent:"\u900F\u660E"},"zh-Hant":{add:"\u52A0\u5165",addColor:"\u6DFB\u52A0\u984F\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u984F\u8272\u683C\u5F0F",colorPresets:"\u984F\u8272\u9810\u8A2D\u9805",customColors:"\u81EA\u8A02\u984F\u8272",newColor:"\u65B0\u81EA\u8A02\u984F\u8272",noColor:"\u7121",removeColor:"\u79FB\u9664\u984F\u8272",transparent:"\u900F\u660E"}};var ea=({children:e})=>{let{triggerProps:t}=nt.useContext(Ge);return jsx(PressResponder,{...t,children:e})};ea.displayName="ModalTrigger";var Nh=({children:e})=>{let{state:t}=nt.useContext(Ge);return jsx(PressResponder,{onPress:()=>{t?.close();},children:e})};var Fd="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lh",Hd="_1dbkl5e",Od=z({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6ls _1yep5z6lk _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6lj _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z610v"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Vd="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf",Ad=z({defaultClassName:"_1dbkl50 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6oc _1yep5z6od _1yep5z6oe",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),ta="_1dbkl5l _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z69f _1yep5z69g _1yep5z69h",jd="_1dbkl5f z9nup87",oa="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",$d="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lk",Ud="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jd _1yep5z6je _1yep5z6jf",ra=z({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6n0 _1yep5z6n1 _1yep5z6n2"}},defaultVariants:{},compoundVariants:[]}),qn="_1dbkl5v _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix",Kd=z({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lt _1yep5z6h4 _1yep5z6lk _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z612y"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z617e"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61oz"]]}),qd=z({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f5 _1yep5z6lj _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6l4 _1yep5z6l7",variantClassNames:{isHovered:{true:"_1yep5z6120"},isFocusVisible:{true:"_1yep5z617k _1yep5z617i _1yep5z617l _1yep5z613r"},isDisabled:{true:"_1yep5z6114"}},defaultVariants:{},compoundVariants:[]}),Fo="_1dbkl5u",aa="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",na="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69f _1yep5z69g _1yep5z69h",Gn="_1dbkl5x",Gd="_1dbkl5w",Wn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69l _1yep5z69m _1yep5z69n",ia=z({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lo _1yep5z6ia _1yep5z6ib _1yep5z6ic _1yep5z6lt _1yep5z6lw",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z617i _1yep5z613r _1yep5z617k"}},defaultVariants:{},compoundVariants:[]}),Xn="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6ia _1yep5z6ib _1yep5z6ic";var Wd=z({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6le _1yep5z6i6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617n"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61th _1yep5z61tf _1yep5z61po _1yep5z61tk"],[{isSelected:!0,isDisabled:!0},"_1yep5z61th _1yep5z61tf _1yep5z61po _1yep5z61tk _1yep5z61py"],[{isHovered:!0,isSelected:!1},"_1yep5z61tk _1yep5z61th _1yep5z61tf _1yep5z61ps"]]}),Xd="_1344e9q9 _1yep5z6fl";var et=nt.forwardRef(({color:e,isFocusVisible:t,isSelected:o,isInteractive:r,isDisabled:a,style:n,className:i,id:s,tooltip:p,"data-block-id":l,"data-block-class":c,...d},m)=>{let u=e&&e!==we&&(typeof e=="string"?parseColor(e):e),{formatMessage:y}=F(),f=!u,{colorSwatchProps:b}=useColorSwatch({color:f?"#000000":e}),{hoverProps:g,isHovered:_}=useHover({isDisabled:a||!r}),v=filterTruthyValues({"data-focus-visible":t,"data-selected":o,"data-hovered":_,"data-block-id":l,"data-block-class":c,"data-disabled":a,"data-interactive":r}),h=f?y(Yd.none):b["aria-label"],I=d["aria-label"]??h,{tooltipProps:P}=zr({tooltip:p,label:I}),C=jsx("div",{...mergeProps(g,v,f?{}:b),style:n,"aria-label":f?y(Yd.none):b["aria-label"],role:"img",className:classNames(Wd({removeBlendMode:f,isFocusVisible:t,isDisabled:!!a,isSelected:!!o,isHovered:_}),"BaselineUI-ColorSwatch",i),ref:m,id:s,...d,children:jsx(L,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:u?Zd(u,4):void 0,children:f?jsx("div",{className:Xd}):null})});return P&&!a?jsx(re,{...P,children:jsx(Lr,{children:C})}):C});et.displayName="ColorSwatch";var Yd=K({none:{id:"none",defaultMessage:"None"}});var Jd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Vo=parseColor("#000000").toFormat("hsla"),ie="hsla",Oo="hexa";function pt(e){return typeof e=="string"?parseColor(e).toFormat(ie):e?e.toFormat(ie):null}function eu(e,t){return e?.getChannelValue("alpha")?t?.toString(Oo)===e.toString(Oo):!t?.getChannelValue("alpha")}function tu(e,t,o){return t?.label?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var we="NONE";function ou(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString(Oo),label:a.label}))||[],r={id:we,label:e};return [...o,r]}var sa=(e,{optionProps:t,isFocusVisible:o,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...t,ref:a,className:$d,children:jsx(et,{color:e.value.id,isFocusVisible:o,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),Zd=(e,t=4)=>{let o=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:o?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${t}px ${t}px`}};var au=({value:e,...t})=>{let o=nt.useRef(null),r=nt.useRef(null),a=nt.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...t,value:e,inputXRef:o,inputYRef:r,containerRef:a},n);useEffect(()=>{o.current?.focus();},[]);let{focusProps:c,isFocusVisible:d}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(Fd,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(ia({isFocusVisible:d}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:pt(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var su=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:d=>{t(pt(d)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Vo);}}),n=nt.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(qn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:Kd({isFocused:p,isHovered:c,allowAlpha:o})}),o?jsx(pu,{color:e,setColor:t}):null]})},lu=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(qn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(Me,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("red",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("green",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),o?jsx(pu,{color:e,setColor:t}):null]})},ex={style:"percent",maximumFractionDigits:0},pu=({color:e,setColor:t})=>{let{locale:o}=useLocale(),r=useCallback(a=>{t(e.withChannelValue("alpha",a));},[e,t]);return jsx(Me,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:ex,className:Fo,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var Jn=({channel:e,...t})=>{let{locale:o}=useLocale(),r=useColorSliderState({...t,channel:e,locale:o}),a=nt.useRef(null),n=nt.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...t,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(oa,{[kl({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:Xn}),jsx("div",{className:oa,style:i.style}),jsxs("div",{className:classNames(ia({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:Xn,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:oa}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var la=({color:e,setColor:t,allowAlpha:o,onChangeEnd:r})=>{let[a,n]=nt.useState("hex"),{formatMessage:i}=F(Je);return jsxs(Fragment,{children:[jsx(au,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:t,onChangeEnd:r}),jsxs("div",{className:Wn,children:[jsx(Jn,{channel:"hue",value:e,onChange:t,onChangeEnd:r}),o?jsx(Jn,{channel:"alpha",value:e,onChange:t,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(Wn,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Qe,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Jd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(su,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o}),a==="rgb"&&jsx(lu,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o})]})]})};var bu=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Je),c=nt.useRef(null),d=Nt(c.current),[m,u]=xl(o,[]),y=nt.useRef(null),[f,b]=nt.useState(e),g=nt.useMemo(()=>m.map(C=>({id:C,label:parseColor(C).getColorName(p),description:C})),[m,p]),_=useCallback(()=>{let C=i==="active"?e:f;if(m.includes(C.toString(ie))){y.current?.querySelector(`[data-key='${C.toString(ie)}']`)?.classList.add(Gn);return}u([...m,C.toString(ie)]);},[m,e,u,f,i]);useEffect(()=>{let C=y.current;function x(T){T.animationName===Gd&&T.target?.classList.remove(Gn);}return C?.addEventListener("animationend",x),()=>{C?.removeEventListener("animationend",x);}},[]);let v=useId(),h=jsx(E,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),I=useCallback(C=>jsxs(me,{size:"content",className:ra({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(la,{color:f,setColor:b,allowAlpha:s}),jsx(A,{}),jsx(L,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(L,{display:"inline-flex",gap:"lg",children:[jsx(G,{label:l("cancel"),size:"sm",variant:"secondary",onPress:C}),jsx(G,{label:l("add"),variant:"primary",onPress:()=>{_(),C();},size:"sm"})]})})]}),[f,_,l,s]),P=useCallback(C=>{invariant(C instanceof Set,"Key must be a set");let x=[...C][0];x&&t(parseColor(x).toFormat(ie));},[t]);return jsxs(Fragment,{children:[jsx(A,{}),jsxs("div",{className:classNames(Ud,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:v,children:n}),jsxs(L,{display:"flex",children:[!!m.length&&m.includes(e.toString(ie))&&jsx(E,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{u(m.filter(C=>C!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(d==="mobile"?jsxs(Ie,{children:[jsx(ea,{children:h}),jsx(De,{style:{zIndex:1e5},children:({close:C})=>I(C)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:h}),jsx(Re,{placement:"right top",className:aa,offset:6,children:({close:C})=>I(C)})]}))]})]}),!!m.length&&jsx(le,{items:g,layout:"grid","aria-labelledby":v,className:classNames(ta,na,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:sa,ref:y,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:P})]})};var oi=nt.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Je),p=useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],d=a.find(m=>m.id===c);invariant(d,"Preset not found"),e(d.id===we?null:parseColor(d.id).toFormat(ie)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(na,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:i,children:jsx(le,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:ta,renderOption:sa,selectionMode:"single",selectedKeys:[t?.toString(Oo)||we],onSelectionChange:p})})});oi.displayName="ColorPresetList";var jo=nt.forwardRef(({color:e,colorLabel:t,colorName:o,...r},a)=>{let n=nt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:d}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l}),u=pr(),y=pr();return jsxs("button",{...mergeProps(p,i,d,m),style:r.style,className:classNames(Od({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:M(a,n),id:u,"aria-labelledby":r["aria-labelledby"]||`${u} ${y}`,children:[jsx(et,{color:e?.toString("hexa")}),t?jsx("div",{className:jd,id:y,"aria-hidden":"true",children:o}):typeof o=="string"&&jsx(VisuallyHidden,{children:o})]})});jo.displayName="ColorInputButton";var da=nt.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=nt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:d}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,d,m),ref:M(a,n),style:t,className:classNames(qd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(o,{size:16}),jsx("div",{className:Hd,style:{backgroundColor:r.color||void 0}})]})});da.displayName="IconColorInputButton";function ku({colorLabel:e,color:t,presets:o}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>o.find(p=>p.id===we?!t:t?eu(t,parseColor(p.id)):!1),[o,t]),i=useMemo(()=>typeof e=="function"?e?.(t):e?tu(t,n,r(Ix.transparent)):!1,[t,e,r,n]),s=useMemo(()=>{if(n?.label)return n.label;t?.getColorName(a);},[t,a,n?.label]);return {colorName:i,humanReadableName:s}}var Ix=K({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Qt=nt.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,onChangeEnd:l,defaultValue:c,storePickedColorKey:d="baselinePickedColor",value:m,addColorButtonLabel:u,removeColorButtonLabel:y,customColorsLabel:f,renderTriggerButton:b=({isOpen:x,color:T,ref:N,colorName:R,triggerProps:S,labelId:k})=>jsx(jo,{...mergeProps(S,{...P.label?{"aria-labelledby":k}:{"aria-label":P["aria-label"]}}),ref:N,isOpen:x,isDisabled:P.isDisabled,labelPosition:n,color:T,colorLabel:i,colorName:R}),pickerMode:g="active",offset:_=2,placement:v=n==="start"?"bottom end":"bottom start","data-block-id":h,"data-block-class":I,...P},C)=>{let x=nt.useRef(null),T=nt.useRef(null),N=useOverlayTriggerState(P),{triggerProps:R,overlayProps:S}=useOverlayTrigger({type:"listbox"},N,x),k=ve(P.portalContainer),[w,B]=useControlledState(m===void 0?void 0:pt(m),pt(c),X=>p?.(X?.toFormat("rgba")||null)),{formatMessage:H}=F(Je),D=useMemo(()=>ou(H(ua.noColor),a),[a,H]),q=useId(),{colorName:j}=ku({colorLabel:i,color:w,presets:D}),$=useMemo(()=>D.filter(X=>o||X.id!==we),[D,o]),O=u||H(ua.addColor),J=y||H(ua.removeColor),V=f||H(ua.customColors),Z=jsx(bu,{color:w||Vo,setColor:X=>{B(X),l?.(X?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:O,removeColorButtonLabel:J,customColorsLabel:V,pickerMode:g,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Vd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":I,style:t,ref:C,children:[P.label?jsx("label",{id:q,className:Ad({labelPosition:n}),children:P.label}):null,b({isOpen:N.isOpen,color:w,ref:x,colorName:j,triggerProps:R,labelId:q})]}),jsx(be,{...P,portalContainer:k,placement:v,state:N,offset:_,className:classNames(aa,"BaselineUI-ColorInput-Popover"),triggerRef:x,overlayProps:S,children:jsxs(me,{size:"content",className:ra({includesCustomColorPicker:s}),ref:T,"aria-labelledby":q,"aria-label":P["aria-label"],children:[s&&g==="active"?jsxs(Fragment,{children:[jsx(la,{color:w||Vo,setColor:B,allowAlpha:r,onChangeEnd:X=>{l?.(X?.toFormat("rgba")||null);}}),Z]}):null,!!$.length&&jsxs(Fragment,{children:[s&&g==="active"?jsx(A,{}):null,jsx(oi,{autoFocus:s&&g==="active"?!1:"first",state:N,triggerRef:x,presets:$,color:w,setColor:X=>{B(X),l?.(X?.toFormat("rgba")||null);}})]}),s&&g==="lazy"?Z:null]})})]})});Qt.displayName="ColorInput";var ua=K({addColor:{defaultMessage:"Add color",id:"addColor"},removeColor:{defaultMessage:"Remove color",id:"removeColor"},customColors:{defaultMessage:"Custom colors",id:"customColors"},noColor:{defaultMessage:"No color",id:"noColor"},transparent:{defaultMessage:"Transparent",id:"transparent"}});var Tu=nt.forwardRef(({className:e,style:t,icon:o,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=nt.useRef(null),l=useCallback(({isOpen:c,color:d,ref:m,colorName:u,triggerProps:y})=>jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(jo,{...y,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:d,colorLabel:!1,colorName:u}):jsx(da,{...y,isOpen:c,icon:TextIcon,color:d?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:t,ref:M(s,p),children:[r==="standard"&&o?jsx(o,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Qt,{...i,colorLabel:!1,renderTriggerButton:l})]})});Tu.displayName="IconColorInput";var Su={ar:{redo:"\u0625\u0639\u0627\u062F\u0629",undo:"\u062A\u0631\u0627\u062C\u0639"},cs:{redo:"Opakovat",undo:"Zru\u0161it"},cy:{redo:"Ail-wneud",undo:"Dad-wneud"},da:{redo:"Gentag",undo:"Fortryd"},de:{redo:"Wiederholen",undo:"R\xFCckg\xE4ngig machen"},el:{redo:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",undo:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7"},"en-GB":{redo:"Redo",undo:"Undo"},en:{redo:"Redo",undo:"Undo"},es:{redo:"Rehacer",undo:"Deshacer"},fi:{redo:"Tee sittenkin",undo:"Peru"},"fr-CA":{redo:"R\xE9tablir",undo:"Annuler"},fr:{redo:"R\xE9tablir",undo:"Annuler"},he:{redo:"\u05D1\u05D9\u05E6\u05D5\u05E2 \u05DE\u05D7\u05D3\u05E9",undo:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4"},hr:{redo:"Ponovi",undo:"Vrati"},id:{redo:"Ulangi",undo:"Kembalikan"},it:{redo:"Ripristina",undo:"Annulla"},ja:{redo:"\u3084\u308A\u76F4\u3059",undo:"\u53D6\u308A\u6D88\u3059"},ko:{redo:"\uC2E4\uD589\uBCF5\uADC0",undo:"\uC2E4\uD589\uCDE8\uC18C"},ms:{redo:"Buat Semula",undo:"Buat Asal"},"nb-NO":{redo:"Gj\xF8r om igjen",undo:"Angre"},nl:{redo:"Opnieuw",undo:"Herstel"},pl:{redo:"Pon\xF3w",undo:"Cofnij"},"pt-PT":{redo:"Refazer",undo:"Desfazer"},pt:{redo:"Refazer",undo:"Desfazer"},ru:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"},sk:{redo:"Opakova\u0165",undo:"Zru\u0161i\u0165"},sl:{redo:"Uveljavi",undo:"Razveljavi"},sv:{redo:"G\xF6r om",undo:"\xC5ngra"},th:{redo:"\u0E17\u0E33\u0E0B\u0E49\u0E33",undo:"\u0E16\u0E2D\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A"},tr:{redo:"Yinele",undo:"Geri Al"},uk:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",undo:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"zh-Hans":{redo:"\u91CD\u505A",undo:"\u64A4\u9500"},"zh-Hant":{redo:"\u91CD\u4F5C",undo:"\u5FA9\u539F"}};var ma=z({defaultClassName:"mnnh5s1 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6l4 _1yep5z6l7 _1yep5z6lj _1yep5z6li _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6lh",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6wi _1yep5z6wj _1yep5z6wk _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6132 _1yep5z617r _1yep5z617s",false:"_1yep5z617e _1yep5z6121"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6120"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z613a _1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"mnnh5s8 _1yep5z6z7"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61o5"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61oz"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61nx"]]}),Nu="_1yep5z6d8",fa=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Lu=z({defaultClassName:"_1i0ytqa3 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6lh _1yep5z6li _1yep5z6lk",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z6129",false:"_1yep5z612b"},isDisabled:{true:"_1i0ytqa7 _1yep5z6z7",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61ov _1yep5z61tn _1yep5z61tp"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61o6"],[{isInline:!1,isDisabled:!0},"_1yep5z61o8"]]}),Mu="_1i0ytqa0",ya=z({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6lh",variantClassNames:{isInline:{false:"_1yep5z6120"},isDisabled:{true:"_1i0ytqad _1yep5z6z7"}},defaultVariants:{},compoundVariants:[]}),Du=z({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lh",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function Eu({line:e,options:t}){let o=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/Jt),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!o.current[i])){let l=e.slice(i*Jt-(i>0?1:0),i*Jt+Jt);n=getSvgPathFromStroke(getStroke(l.map(([c,d,m])=>({x:c,y:d,pressure:m})),t)),l.length>=(i>0?Jt+1:Jt)&&(o.current[i]=n);}return n},[e,t]);return [...o.current,r]}var Jt=60*3;var oC={size:1,thinning:0,smoothing:0,streamline:0,easing:e=>e,start:{taper:0,easing:e=>e,cap:!0},end:{taper:0,easing:e=>e,cap:!0},simulatePressure:!1},Fu=nt.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:d=!0,isDisabled:m,placeholder:u,clearLabel:y,undoLabel:f,redoLabel:b,footerClassName:g,canvasRef:_,value:v,footerStyle:h,"data-block-id":I,"data-block-class":P,"aria-label":C="Drawing canvas",description:x="This is a canvas for drawing using a mouse or touch input.",...T},N)=>{let R=F(Su),S=nt.useRef(null),[k,w]=nt.useState(v||p||[]),B=nt.useMemo(()=>({...oC,...T}),[T]),[H,D]=nt.useState(),q=useId(),{labelProps:j,fieldProps:$}=useLabel({...T,"aria-label":C,labelElementType:"span"}),{isFocusVisible:O,focusProps:J}=useFocusRing({within:!0}),{hoverProps:V,isHovered:Z}=useHover({isDisabled:m}),{undo:X,redo:Ce,canRedo:Pe,canUndo:ye,push:Te}=yl(k,{onAction:Y=>{Y&&(w(Y),l?.(Y));},isDisabled:!c}),{keyboardProps:He}=useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?ht():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Pe&&Ce():ye&&X());}}),[te,de]=useState(!1),_t=useCallback(Y=>{let U=Y.currentTarget.getBoundingClientRect();D(U),Y.target.setPointerCapture(Y.pointerId);let ne=[Y.clientX-U.x,Y.clientY-U.y,Y.pressure];w(W=>[...W,[ne]]),de(!0);},[]),zt=useCallback(Y=>{if(Y.buttons!==1||!H)return;let ne=Vu(Y.nativeEvent).map(W=>[a?clamp(W.clientX-H.left,0,H.width):W.clientX-H.left,a?clamp(W.clientY-H.top,0,H.height):W.clientY-H.top,W.pressure]);w(W=>{let he=[...W];return he[W.length-1]=[...he[W.length-1],...ne],he});},[H,a]),mo=()=>{H&&(l?.(k),Te(k),de(!1));};useEffect(()=>{s?.(k);},[k,s]);let ht=()=>{w([]),s?.([]),Te([]);};return jsxs("div",{ref:M(S,N),className:classNames(Mu,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":m,"data-block-id":I,"data-block-class":P,children:[T.label||c?jsxs("div",{className:Du({isInline:d}),children:[T.label?jsx(Q,{type:"label",size:"sm",...j,children:T.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(E,{variant:"secondary",size:"sm",isDisabled:!ye||m,icon:UndoIcon,onPress:X,"aria-label":f||R.formatMessage("undo")}),jsx(E,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:RedoIcon,onPress:Ce,"aria-label":b||R.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(J,He,V,$),tabIndex:m?void 0:0,className:classNames(ma({isInline:d,isHovered:Z}),Lu({isFocusVisible:O,isInline:d,isDisabled:!!m}),o),"aria-describedby":T["aria-describedby"]||q,style:r,ref:_,children:[jsx(VisuallyHidden,{children:jsx("div",{id:q,children:x})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:_t,onPointerMove:zt,onPointerUp:mo,children:(v||k).map((Y,U,ne)=>U<ne.length-1||!te?jsx(Hu,{line:Y,options:B,strokeColor:i,strokeWidth:n},U):jsx(Ou,{line:Y,options:B,strokeColor:i,strokeWidth:n},U))})]}),u||y?jsx("div",{style:h,className:classNames(ya({isInline:d,isDisabled:m}),g),children:(k.length||!u)&&y?jsx(G,{size:"sm",variant:"ghost",label:y,isDisabled:m,onPress:ht}):jsx(G,{size:"sm",variant:"ghost",label:u,isDisabled:!0})}):null]})});Fu.displayName="FreehandCanvas";var Hu=nt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),t)),[e,t]);return jsx("path",{d:a,stroke:o,strokeWidth:r})});Hu.displayName="Stroke";var Ou=nt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=Eu({line:e,options:t});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:o,strokeWidth:r},i))})});Ou.displayName="SplitStroke";function Vu(e){if(typeof e.getCoalescedEvents=="function"){let t=e.getCoalescedEvents();return t.length>0?t.flatMap(o=>Vu(o)):[e]}return [e]}var Au="_1vac7ws0",ju=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Uu(e,t){let[o,r]=useState([]),a=()=>e?.flatMap(n=>[...t.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),o}function Ku(e){let{scrollable:t,ownerDocument:o,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(t,o);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",r),()=>{a.removeEventListener("scroll",r);}},[t,r,o]);}var _C=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Gu=nt.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:d,onDrag:m,onResizeStart:u,onResizeEnd:y,onResize:f,onRotateStart:b,onRotateEnd:g,onRotate:_,onSnap:v,isSnappable:h,elementGuidelines:I,hideAnchorOnDrag:P=!0,title:C,rotationPosition:x,autoUpdate:T,bound:N,snapRotationDegrees:R,snapRotationThreshold:S,scrollableAncestor:k,renderDirections:w,stopPropagation:B,transformOrigin:H,preventDefault:D},q)=>{let j=useRef(null),$=useRef(null),[O,J]=useState(document),V=useRef(O.createElement("div")),[Z,X]=useState({}),[Ce,Pe]=useState(!1),[ye,Te]=useState(!1),[He,te]=useState(),de=Uu(I,O);useLayoutEffect(()=>{let U=V.current;return V.current=O.createElement("div"),()=>{U.remove();}},[O]);let{keyboardProps:_t}=useKeyboard({onKeyDown:U=>{let ne=U.shiftKey?10:1,W=U.metaKey||U.ctrlKey;W&&U.shiftKey&&(ne=45);function he(fo,Ky="x"){W?$.current?.request("rotatable",{deltaRotate:fo*ne},!0):$.current?.request("draggable",Ky==="x"?{deltaX:fo*ne}:{deltaY:fo*ne},!0);}switch(U.key){case"ArrowRight":{he(1);break}case"ArrowLeft":{he(-1);break}case"ArrowUp":{he(-1,"y");break}case"ArrowDown":he(1,"y");}requestAnimationFrame(()=>{$.current?.updateRect();});}});useEffect(()=>{let U=ue(j.current);J(U);let ne=V.current;U.body.append(V.current);function W(fo){Te(fo.shiftKey);}function he(){Te(!1);}return U.addEventListener("keydown",W),U.addEventListener("keyup",he),()=>{U.removeEventListener("keydown",W),U.removeEventListener("keyup",he),ne.remove();}},[]),Ku({scrollable:k,onScroll:()=>{$.current?.updateRect();},ownerDocument:O});let zt=useCallback(U=>{X(ne=>({...ne,...U.style})),i?.(U);},[i]),mo=useCallback(U=>{if(Pe(!0),j.current?.focus(),N){let W=getHTMLElement(N,O)?.getBoundingClientRect();te({position:"client",left:W?.left??0,top:W?.top??0,right:W?.right??0,bottom:W?.bottom??0});}c?.(U);},[N,O,c]),ht=useCallback(U=>{Pe(!1),d?.(U);},[d]),Y=t({style:{...Z.width&&{width:Z.width},...Z.height&&{height:Z.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",..._t,ref:M(j,q),style:{display:"inline-block",...n,...Z},className:classNames(Au,e),onDoubleClick:l,tabIndex:0,title:C,children:Y}),createPortal(jsx(_C,{ref:$,target:j,draggable:a,resizable:r,rotatable:o,keepRatio:ye,throttleDrag:1,snappable:h||!!N,elementGuidelines:de,snapRenderThreshold:.9,className:ju({isDragging:Ce&&P}),onRender:zt,onDragStart:mo,onDragEnd:ht,useResizeObserver:T,useMutationObserver:T,onRenderEnd:p,onDrag:m,onResizeStart:u,onResizeEnd:y,onResize:f,onRotateStart:b,onRotateEnd:g,onRotate:_,onRenderStart:s,onSnap:v,rotationPosition:x,bounds:He,snapRotationDegrees:R,snapRotationThreshold:S,renderDirections:w,stopPropagation:B,preventDefault:D,transformOrigin:H}),V.current)]})});Gu.displayName="Transform";var Wu={ar:{delete:"\u062D\u0630\u0641",selectImage:"\u062A\u062D\u062F\u064A\u062F \u0635\u0648\u0631\u0629"},cs:{delete:"Smazat",selectImage:"Vybrat obr\xE1zek"},cy:{delete:"Dileu",selectImage:"Dewiswch Ddelwedd"},da:{delete:"Slet",selectImage:"V\xE6lg billede"},de:{delete:"L\xF6schen",selectImage:"Bild ausw\xE4hlen"},el:{delete:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE",selectImage:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2"},"en-GB":{delete:"Delete",selectImage:"Select Image"},en:{delete:"Delete",selectImage:"Select Image"},es:{delete:"Eliminar",selectImage:"Seleccionar imagen"},fi:{delete:"Poista",selectImage:"Valitse kuva"},"fr-CA":{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},fr:{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},he:{delete:"\u05DE\u05D7\u05D9\u05E7\u05D4",selectImage:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4"},hr:{delete:"Obri\u0161i",selectImage:"Odaberi sliku"},id:{delete:"Hapus",selectImage:"Pilih Gambar"},it:{delete:"Elimina",selectImage:"Seleziona immagine"},ja:{delete:"\u524A\u9664",selectImage:"\u30A4\u30E1\u30FC\u30B8\u3092\u9078\u629E"},ko:{delete:"\uC0AD\uC81C",selectImage:"\uC774\uBBF8\uC9C0 \uC120\uD0DD"},ms:{delete:"Padam",selectImage:"Pilih Imej"},"nb-NO":{delete:"Slett",selectImage:"Velg bilde"},nl:{delete:"Verwijder",selectImage:"Selecteer afbeelding"},pl:{delete:"Usu\u0144",selectImage:"Wybierz obraz"},"pt-PT":{delete:"Apagar",selectImage:"Selecionar imagem"},pt:{delete:"Apagar",selectImage:"Selecionar Imagem"},ru:{delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",selectImage:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440."},sk:{delete:"Zmaza\u0165",selectImage:"Vybra\u0165 obr\xE1zok"},sl:{delete:"Izbri\u0161i",selectImage:"Izberi sliko"},sv:{delete:"Radera",selectImage:"V\xE4lj bild"},th:{delete:"\u0E25\u0E1A",selectImage:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E"},tr:{delete:"Sil",selectImage:"Resim Se\xE7"},uk:{delete:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",selectImage:"\u041E\u0431\u0440\u0430\u0442\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F"},"zh-Hans":{delete:"\u5220\u9664",selectImage:"\u9009\u62E9\u56FE\u50CF"},"zh-Hant":{delete:"\u522A\u9664",selectImage:"\u9078\u53D6\u5716\u50CF"}};var Zu=nt.forwardRef(({className:e,style:t,isInline:o=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:d=!0,"data-block-id":m,"data-block-class":u,pickerButtonStyle:y,pickerButtonClassName:f,footerClassName:b,footerStyle:g,clearLabel:_,placeholder:v,labelStyle:h,labelClassName:I,...P},C)=>{let x=nt.useRef(null),T=nt.useRef(null),{formatMessage:N}=F(Wu),[R,S]=useControlledState(n,a||null,te=>{invariant(typeof te!="string"),P.onValueChange?.(te?[te]:[]);}),k=useMemo(()=>MC(R||void 0),[R]),{fieldProps:w,labelProps:B}=useField(P),{dropProps:H,isDropTarget:D}=useDrop({ref:x,onDrop:async te=>{if(p)return;let de=await Rn({items:te.items});de.length&&S(de[0]),l?.(te);},...P}),{clipboardProps:q}=useClipboard({onPaste:async te=>{if(p)return;let de=await Rn({items:te});de.length&&S(de[0]),c?.(te);},...P}),j=()=>{S(null),T.current&&(T.current.value="");},$={type:"file",onChange:te=>{let de=[...te.target.files];S(de[0]),P.onChange?.(te);},accept:r,disabled:p},{focusProps:O,isFocused:J,isFocusVisible:V}=useFocusRing({within:!0}),{hoverProps:Z,isHovered:X}=useHover({isDisabled:p}),{imgProps:Ce,isLoading:Pe,isLoaded:ye}=Tt({src:k,alt:i||""}),Te={label:s||N("selectImage"),onPress:()=>x.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(Pr({isFocusVisible:V}),{[Nu]:D&&!p},f),style:y},He=filterTruthyValues({"data-loaded":ye,"data-block-id":m,"data-block-class":u,"data-hovered":X,"data-focused":J,"data-drop-target":D,"data-disabled":p,"data-focus-visible":V});return jsxs(L,{...He,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:t,ref:C,children:[jsxs("label",{...mergeProps(H,Z,O,B),className:classNames(ma({isInline:o,isHovered:X,isDisabled:p,hasLoadedImage:!!k&&ye,showFocusRing:D||!!k&&V}),I),style:h,ref:x,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(w,q,$),ref:T})}),!k&&jsx(G,{...Te}),!!k&&(Pe?jsx(Kt,{}):jsx("img",{className:fa({isInline:o,isDisabled:p,hasLoadedImage:!!k&&ye&&d}),...Ce}))]}),v||_?jsx("div",{style:g,className:classNames(ya({isInline:o,isDisabled:p}),b),children:(k||!v)&&_?jsx(G,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:j}):jsx(G,{size:"sm",variant:"ghost",label:v,isDisabled:!0})}):null]})});Zu.displayName="ImageDropZone";function MC(e){return e instanceof File?URL.createObjectURL(e):e}var Qu="_1vm2oh49 _1yep5z6ia _1yep5z6ib _1yep5z6ic _1yep5z6g4",ci="_1vm2oh48 _1yep5z6li _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6jy _1yep5z6jz _1yep5z6k0",Ju=z({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6ln _1yep5z6ll _1yep5z6i6 _1yep5z6lo _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6l4 _1yep5z6lj _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z6131 _1yep5z617q _1yep5z617s",false:"_1yep5z612b"},isFocusVisible:{true:"_1yep5z613a _1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6z7"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61o6"],[{accent:"theme",isInline:!0},"_1yep5z61nv"],[{accent:"positive",isInline:!1},"_1yep5z61o8"],[{accent:"theme",isInline:!1},"_1yep5z61nx"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61po _1yep5z61tf _1yep5z61th _1yep5z61ti"],[{isHovered:!0,isInline:!0},"_1yep5z61ti _1yep5z61po _1yep5z61tf _1yep5z61th"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61o7"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61nz"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61nw"]]});var om=nt.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:d,addAriaLabel:m,accent:u="positive","data-block-id":y,"data-block-class":f,...b},g)=>{let{focusProps:_,isFocused:v,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:I,hoverProps:P}=useHover({isDisabled:o}),{pressProps:C}=usePress({isDisabled:o,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let x=filterTruthyValues({"data-hovered":I,"data-focus-visible":h,"data-focused":v,"data-disabled":o});return jsxs("div",{...b,className:classNames(Ju({isInline:r,isFocusVisible:h,isDisabled:o,isHovered:I,accent:u}),"BaselineUI-Preview",e),"data-block-id":y,"data-block-class":f,"aria-label":b["aria-label"]||a||s,style:t,ref:g,children:[typeof i=="string"?jsx("button",{disabled:o,...mergeProps(P,_,C,x),className:ci,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(P,_,C,x),disabled:o,style:p,"aria-label":m,className:ci,children:[n?jsx("img",{src:n,alt:a,className:fa({isInline:r,isDisabled:o})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(E,{isDisabled:o,className:Qu,"aria-label":d,size:"xs",icon:TrashIcon,onPress:c}):null]})});om.displayName="Preview";var rm="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69c _1yep5z69d _1yep5z69e",am=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),nm="cw3m0n7",im=z({defaultClassName:"cw3m0n0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{labelPosition:{end:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vf _1yep5z6vg _1yep5z6vh",start:"_1yep5z614y _1yep5z614z _1yep5z6150 _1yep5z616a _1yep5z616b _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),sm="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6le",lm=z({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var YC=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:im({labelPosition:n}),children:[jsx("div",{className:lm({isSelected:o,isFocusVisible:r,isDisabled:a}),children:o?jsx("div",{className:nm}):null}),e?jsxs("div",{className:rm,children:[jsx("span",{className:qr({isDisabled:a}),children:e}),t?jsx("span",{className:am({isDisabled:a}),children:t}):null]}):null]}),pm=({state:e,renderOption:t=YC,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(o.id),l=nt.useRef(null),{inputProps:c,isPressed:d,isSelected:m}=useRadio({...s,isDisabled:p,children:o.label,value:o.id},e,l),{focusProps:u,isFocusVisible:y,isFocused:f}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),g=filterTruthyValues({"data-selected":m,"data-focused":f,"data-focus-visible":y,"data-hovered":b,"data-disabled":p,"data-pressed":d,"data-read-only":i});return jsxs("label",{...g,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,u),ref:l})}),t(o,{isFocusVisible:y,isSelected:m,isFocused:f,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var dm=nt.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":d,"data-block-class":m,...u},y)=>{let f=useRadioGroupState(u),{radioGroupProps:b,labelProps:g,descriptionProps:_,errorMessageProps:v}=useRadioGroup({...u,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},f),h=ke({...u,descriptionProps:_,errorMessageProps:v,labelPosition:n}),I=filterTruthyValues({"data-orientation":u.orientation,"data-block-id":d,"data-block-class":m,"data-disabled":u.isDisabled,"data-readonly":u.isReadOnly});return jsxs("div",{...mergeProps(b,I),className:classNames(Ue({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:y,children:[u.label||h?jsxs("div",{className:$e({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...g,className:classNames(je,"BaselineUI-RadioGroup-Label"),children:u.label}),n==="start"&&h]}):null,jsx("div",{className:classNames(sm,{[Lt]:u.isDisabled},o),style:r,children:a.map(P=>jsx(pm,{state:f,renderOption:i,item:P,...u,value:P.id},P.id))}),n==="top"&&h]})});dm.displayName="RadioGroup";var um=({id:e,defaultMessage:t,elementType:o=Fragment$1})=>{invariant(e||t,"`id` or `defaultMessage` is required.");let r=F();return jsx(o,{children:r.formatMessage(e)||t})};um.displayName="MessageFormat";var mm=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:t,...s,ref:p,children:o})});mm.displayName="Group";var yi="UNSUPPORTED_IN_MENU";function bm(e){return useMemo(()=>nt.Children.toArray(e).map(t=>{let o=t,r=uniqueId("item"),a=Go(o,Ne),n=ym(o),i,s;if(a){let g=Go(a,Le);invariant(g),i=ym(g),s=Go(a,Re).props.children;}else n?i=n:i=o;let{onPress:p,label:l,"aria-label":c,iconStart:d,isDisabled:m,icon:u}=i.props,y=l||c||yi;invariant(typeof y=="string","ActionGroup children must have a string label");let f=`${r}-${y}`;return createElement(Item,{...{key:f,onPress:p,textValue:y,"aria-label":c,icon:d||u,dialogContent:s,isDisabled:m},key:f},o)}),[e])}function Go(e,t){return t?flatMapDeep(nt.Children.toArray(e),r=>nt.isValidElement(r)&&r.props.children?[r,...nt.Children.toArray(r.props.children)]:[r]).find(r=>nt.isValidElement(r)&&r.type===t):void 0}function ym(e){return Go(e,G)||Go(e,E)}var gm="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6lh _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6l9",vm={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var gi=nt.forwardRef(({className:e,style:t,children:o,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=F(),[d,m]=useState(),u=bm(o),y=useListState({...p,children:u}),f=oe(l),b=useRef(null),[{visibleItems:g,isMeasuring:_},v]=Ha({visibleItems:y.collection.size,isMeasuring:!1}),h=useCallback(()=>{let S=k=>{if(b.current&&f.current){let w=[...b.current.children],B=f.current.getBoundingClientRect().width,H=k<y.collection.size,D=0,q=0;if(H){let j=w.pop();j&&(D+=xm(j,!1,!0));}for(let[j,$]of w.entries())if(D+=xm($,j===0,j===w.length-1),Math.round(D)<=Math.round(B))q++;else break;return q}return k};v(function*(){yield {visibleItems:y.collection.size,isMeasuring:!0};let k=S(y.collection.size),w=k<y.collection.size&&k>0;yield {visibleItems:k,isMeasuring:w},w&&(yield {visibleItems:S(k),isMeasuring:!1});});},[v,f,y.collection.size]),I=useMemo(()=>({get current(){return f.current?.parentElement}}),[f]);qa({ref:I,onResize:h}),xe(h,[y.collection,h]);let{toolbarProps:P}=useToolbar(p,f),C=[...y.collection],x=C.slice(0,g),T=C.slice(g).filter(S=>S.textValue!==yi),N=T.length>0;useEffect(()=>{m(void 0);},[T.length]),useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:R}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(P,R),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...t,flexBasis:_?"100%":void 0},ref:f,children:jsxs("div",{ref:b,className:gm,children:[x.map(S=>S.rendered),N?jsxs(Fragment,{children:[!_&&i?jsx(L,{flexGrow:1}):null,jsx(Vr,{placement:"bottom end",renderTrigger:({buttonProps:S,ref:k})=>jsx(E,{...S,size:"md",icon:MoreIcon,"aria-label":c(CP.more),variant:"toolbar",ref:k}),...r,disabledKeys:T.filter(S=>S.props?.isDisabled).map(S=>S.key),items:T.map(S=>{let k=S.textValue||S["aria-label"];return invariant(k,"ActionItem must have a label"),{id:S.key,label:k,icon:S.props.icon}}),onAction:S=>{let k=y.collection.getItem(S);invariant(k,"Item not found");let{onPress:w,dialogContent:B}=k.props;w?.(),m(B);}})]}):null]})}),jsx(Ie,{isOpen:!!d,onOpenChange:S=>{S||m(void 0);},children:jsx(De,{enableDrawer:"auto",style:{zIndex:1e5},children:d?nt.cloneElement(d,{inheritDrawer:!0}):null})})]})});gi.displayName="CollapsibleToolbar";function xm(e,t,o){let a=pe(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:Cm(a.marginLeft))+(o?0:Cm(a.marginRight))}function Cm(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var CP=K({more:{id:"more",defaultMessage:"More"}});var vi=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=nt.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(vm[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,p),children:i.children})});vi.displayName="WrappedToolbar";var va=nt.forwardRef((e,t)=>{let o=e.isCollapsible?gi:vi;return jsx(o,{...e,ref:t})});va.displayName="Toolbar";var km=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),Im=z({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z6114"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61ti _1yep5z61th _1yep5z61tf _1yep5z61py _1yep5z61n1"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6g3"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61ti _1yep5z61th _1yep5z61po _1yep5z61tf"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61tg _1yep5z61tf _1yep5z61pp _1yep5z61n2"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61tf _1yep5z61th _1yep5z61po _1yep5z61ti"]]}),Rm=z({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617l _1yep5z617k _1yep5z613r _1yep5z617i"},isSelected:{true:"_1yep5z6113"},isDisabled:{true:"z9nup83 _1yep5z6114"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61n0"]]}),wm=z({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617l _1yep5z617k _1yep5z613r _1yep5z617i"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z6114"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61nx"],[{isSelected:!0,isDisabled:!1},"_1yep5z61nx _1yep5z61n4"],[{isSelected:!0,isDisabled:!0},"_1yep5z61nx _1yep5z61n1"]]}),Tm=z({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z6116"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61n3"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61n1"],[{isSelected:!1,isHovered:!0},"_1yep5z61nx"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61ti _1yep5z61th _1yep5z61po _1yep5z61tf"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61tg _1yep5z61tf _1yep5z61pp"]]});var FP={xxs:8,xs:12,sm:16,md:20,lg:24},ge=nt.forwardRef((e,t)=>{let o=oe(t),{tooltipProps:r}=hr(e,o);return r?jsx(re,{...r,children:jsx(_i,{...e,ref:t})}):jsx(_i,{...e,ref:t})});ge.displayName="ToggleIconButton";var _i=nt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:d,ref:m,isFocusVisible:u,isFocused:y,isHovered:f,uiStateOptions:b}=Cr(s,l),g=useMemo(()=>typeof o=="function"?o:l.isSelected?o.selected:o.unselected,[o,l.isSelected]),_={isSelected:l.isSelected,isHovered:f,isFocusVisible:u,isDisabled:!!s.isDisabled},v=filterTruthyValues({"data-hovered":f,"data-selected":l.isSelected,"data-focus-visible":u,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":y,"data-pressed":d});return jsx("button",{...mergeProps(c,v),className:classNames(a==="toolbar"&&Tm(_),a==="primary"&&Im(_),a==="secondary"&&Rm(_),a==="tertiary"&&wm(_),km({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof t=="function"?t(b):t,ref:M(m,p),children:jsx(g,{size:FP[r]})})});_i.displayName="ToggleIconButtonCore";var Nm="f6jv6bm",Lm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jm _1yep5z6jn _1yep5z6jo",oo="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Mm=z({defaultClassName:"f6jv6b0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6g1",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vi _1yep5z6vj _1yep5z6vk _1yep5z615a _1yep5z615b _1yep5z615c",false:"_1yep5z614v _1yep5z614w _1yep5z614x"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61if _1yep5z61ig _1yep5z61ih _1yep5z61j3 _1yep5z61j4 _1yep5z61j5 _1yep5z61jr _1yep5z61js _1yep5z61jt _1yep5z61kf _1yep5z61kg _1yep5z61kh _1yep5z61tp _1yep5z61tn _1yep5z61oy"]]}),_a=z({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6lk",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),Dm="f6jv6bj _1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn",Em="f6jv6bk";var Bm="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6ls _1yep5z6ln _1yep5z6ll _1yep5z6hu _1yep5z6eu",Fm=z({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lk _1yep5z6l4 _1yep5z6l7 _1yep5z6lj",variantClassNames:{isHovered:{true:"_1yep5z6120"},isDisabled:{true:"_1yep5z6z7"}},defaultVariants:{},compoundVariants:[]}),Hm="f6jv6bi _1mdhlqvb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1 _1yep5z6lm _1yep5z6ll _1yep5z6hx _1yep5z6lp",Om="_1yep5z6js _1yep5z6jt _1yep5z6ju",Vm="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6eu _1yep5z6e3 _1yep5z6lh",Am=z({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jy _1yep5z6jz _1yep5z6k0",variantClassNames:{isInline:{true:"_1yep5z6pl _1yep5z6pm _1yep5z6pn _1yep5z617s _1yep5z617q _1yep5z6131",false:"_1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6x0 _1yep5z6x1 _1yep5z6x2 _1yep5z6xo _1yep5z6xp _1yep5z6xq _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),jm="f6jv6bl",$m="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6eu",za=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),ha="f6jv6b9 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf",Xo="f6jv6bo";var Km=[["Toolbar Focus","Alt+F10"],["Bold","Ctrl+B"],["Italic","Ctrl+I"],["Underline","Ctrl+U"],["Select All","Ctrl+A"],["Cut","Ctrl+X"],["Copy","Ctrl+C"],["Paste","Ctrl+V"],["Undo","Ctrl+Z"],["Redo","Ctrl+Shift+Z"],["Submit","Ctrl+Enter"],["Open Help Dialog","Ctrl+Shift+H"]],{dialog:{row:Yo}}=layoutSprinkleValues,qm=({isOpen:e,onClose:t})=>{let{formatMessage:o}=F(),r=useId();return jsx(Ie,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(De,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(me,{"aria-labelledby":r,className:Dm,drawerBackground:"subtle",children:[jsxs(L,{paddingLeft:Yo.padding.horizontal.lg,paddingRight:Yo.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:Em,children:[jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:o(Zo.help)}),jsx(E,{icon:XIcon,size:"md",variant:"secondary","aria-label":o(Zo.close),onPress:t})]}),jsx(A,{className:jm}),jsxs(L,{paddingX:Yo.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Yo.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(Zo.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(Zo.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Km.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Yo.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:o(Zo[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==Km.length-1&&jsx(A,{})]},a))})]})]})})})},Zo=K({toolbarFocus:{id:"toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"help",defaultMessage:"Help"},close:{id:"close",defaultMessage:"Close"},action:{id:"action",defaultMessage:"Action"},shortcut:{id:"shortcut",defaultMessage:"Shortcut"},bold:{id:"bold",defaultMessage:"Bold"},italic:{id:"italic",defaultMessage:"Italic"},underline:{id:"underline",defaultMessage:"Underline"},selectAll:{id:"selectAll",defaultMessage:"Select All"},cut:{id:"cut",defaultMessage:"Cut"},copy:{id:"copy",defaultMessage:"Copy"},paste:{id:"paste",defaultMessage:"Paste"},undo:{id:"undo",defaultMessage:"Undo"},redo:{id:"redo",defaultMessage:"Redo"},openHelpDialog:{id:"openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"submit",defaultMessage:"Submit"}});var xa=nt.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:d,saveOnEnter:m,onSave:u},y)=>{let f=nt.useRef(null),[b,g]=useControlledState(e,t||"",o),_=useCallback(R=>{g(R.currentTarget.value||"");},[g]),v=useCallback(R=>{(m&&R.key==="Enter"&&!R.shiftKey||(R.ctrlKey||R.metaKey)&&R.key==="Enter")&&(R.preventDefault(),u());},[m,u]);useImperativeHandle(y,()=>({clear:()=>{g("");}}));let h=useCallback(R=>{R.currentTarget.style.height="16px",R.currentTarget.style.height=R.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let R=f.current;R&&(R.style.height="16px",R.style.height=R.scrollHeight+"px");},[s],[b]),useImperativeHandle(c,()=>({setCaretPosition:R=>{f.current&&(f.current.focus(),f.current.setSelectionRange(R,R));},focus:()=>{f.current&&f.current.focus();}}));let{focusProps:I,isFocused:P,isFocusVisible:C}=useFocusRing(),{hoverProps:x,isHovered:T}=useHover({}),N=filterTruthyValues({"data-focus-visible":C,"data-hovered":T,"data-focused":P});return jsx("textarea",{...mergeProps(I,x,N),ref:M(f,n),className:classNames(s?Vm:[_a(),za({isInline:i}),$m]),autoFocus:d,onChange:_,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:v})});xa.displayName="PlainEditor";var er="mention",Ca="mention_input",af=nt.forwardRef(({onCancel:e,editor:t,element:o,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ka),p=useSelected(),[l,c]=useState(""),{contains:d}=useFilter({sensitivity:"base"}),{formatMessage:m}=F(),u=useMemo(()=>{let w=i.filter(B=>l===""||d(B.displayName,l)).map(B=>({id:B.id,label:B.displayName,data:B}));return s?take(w,s):w},[i,s,l,d]),y=useCallback(w=>jsx(Item,{children:w.label},w.id),[]),f=useCallback((w=!1)=>{let B=findNodePath(t,o);B&&(removeNodes(t,{at:B}),w&&focusEditor(t));},[t,o]),b=useComboBoxState({items:u,children:y,menuTrigger:"focus",onSelectionChange:w=>{f(!0),r?.(w);}}),g=nt.useRef(null),_=nt.useRef(null),v=nt.useRef(null),h=nt.useRef(null),I=useHTMLInputCursorState(_);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:P,listBoxProps:C}=useComboBox({defaultItems:u,inputRef:_,buttonRef:g,listBoxRef:v,popoverRef:h,menuTrigger:"focus","aria-label":m(vk.mention)},b);useEffect(()=>{_.current?.focus();},[]);let x=useCallback((w="manual",B=!1)=>{f(B),e?.(w,b.inputValue);},[e,f,b.inputValue]),T=useRef(p);useEffect(()=>{T.current&&!p&&x("deselect"),T.current=p;},[p,x]);let N=I?.atStart??!1,R=I?.atEnd??!1,S=useCallback(w=>{w.key==="Backspace"&&N?x("backspace",!0):w.key==="Escape"?x("escape",!0):w.key==="ArrowLeft"&&N?x("arrowLeft",!0):w.key==="ArrowRight"&&R&&x("arrowRight",!0);let B=Hotkeys.isUndo(w)&&t.history.undos.length>0,H=Hotkeys.isRedo(w)&&t.history.redos.length>0;(B||H)&&(w.preventDefault(),t[B?"undo":"redo"](),focusEditor(t));},[N,R,x,t]),k=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let w=pe(_.current),B=_.current?w?.getComputedStyle(_.current).font:void 0;return {width:B?getTextDimensions({text:b.inputValue,font:B}).width+10:"4ch"}}},[b.inputValue]);return jsxs(it.Provider,{value:b,children:[jsx("input",{...mergeProps(P,{onKeyDown:S,onBlur:()=>{x("blur",!0);},onChange:w=>{c(w.target.value);}}),style:k,className:Bm,ref:M(a,_)}),jsx(be,{triggerRef:n,className:Hm,isNonModal:!0,ref:h,state:b,children:jsx(le,{...C,items:void 0,autoFocus:"first",ref:v,className:sprinkles({width:"full"}),renderOption:sf})})]})});af.displayName="MentionInputContentElement";var Pi=withRef(({className:e,...t},o)=>{let{children:r,editor:a,element:n}=t,{items:i}=useContext(ka),s=useRef(null),[p,l]=useState(null);useEffect(()=>{let m=findNodePath(a,n);if(!m)return;let u=getPointBefore(a,m);if(!u)return;let y=createPointRef(a,u);return l(y),()=>{y.unref();}},[a,n]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),yo()&&m&&focusEditor(a);},[a]),d=useCallback(m=>{if(!m)return;let u=s.current?.getRootNode()instanceof ShadowRoot,y=i.find(b=>b.id===m);invariant(y,"User not found");let f={type:er,value:y.id,displayName:y.displayName,children:[{text:""}]};insertNodes(a,[f,{text:" "}]),u?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:o,...t,children:[jsx(af,{onCancel:(m,u)=>{m!=="backspace"&&insertText(a,"@"+u,{at:p?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:d,ref:s,element:n,editor:a}),r]})});Pi.displayName="MentionInputElement";var ki=withRef(({className:e,onClick:t,children:o,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:getHandler(t,n),ref:a,...r,children:["@",n.displayName,o]})});ki.displayName="MentionElement";var nf=(e,{options:{trigger:t,triggerPreviousCharPattern:o,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===t;return e.insertText=i=>{if(!e.selection||!n(i)||r&&!r(e)){a(i);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(o?.test(s)){Pa(e);return}a(i);},e},vk=K({mention:{defaultMessage:"Mention",id:"mention"}});function pf({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("p",{children:t})})}function Dk(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}function Ek(e){return "text"in e}function Bk(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}function tr(e){if(!e)return "";function t(o){if(Ek(o)){let a=Bk(o.text);return o.bold&&(a=`<b>${a}</b>`),o.italic&&(a=`<i>${a}</i>`),o.underline&&(a=`<u>${a}</u>`),(o.color||o.backgroundColor)&&(a=`<span style="${Dk(filterTruthyValues({color:o.color||void 0,backgroundColor:o.backgroundColor||void 0}))}">${a}</span>`),a}let r=o.children?.map(tr).join("");switch(o.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${o.url}">${r}</a>`;case er:return `<span data-user-id="${o.value}">${o.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(o=>t(o)).join(""):t(e)}function Fk(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(t=>t.split(":").map(o=>o.trim())).map(([t,o])=>[camelCase(t),o]))):{}}function Si(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let t=new DOMParser().parseFromString(cf.default.sanitize(e),"text/html"),o=t.querySelectorAll("[style]");for(let a of o)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=t.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
53
- `:"<p>";return uf(t.body)}function uf(e,t){if(e.nodeType===Node.TEXT_NODE)return jsx$1("text",t,e.textContent);if(e.nodeType!==Node.ELEMENT_NODE)return null;let o={...t};switch(e.nodeName.toUpperCase()){case"B":{o.bold=!0;break}case"I":{o.italic=!0;break}case"EM":{o.italic=!0;break}case"U":{o.underline=!0;break}case"SPAN":{let a=Fk(e.getAttribute("style")||"");a["text-decoration"]==="underline"&&(o.underline=!0),a.color&&(o.color=a.color),a.backgroundColor&&(o.backgroundColor=a.backgroundColor);break}}let r=[...e.childNodes].flatMap(a=>uf(a,o));switch(r.length===0&&r.push(jsx$1("text",o,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",t,`
54
- `);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:er,value:a,displayName:e.textContent},{text:""}):r}case"P":return jsx$1("element",{type:ELEMENT_PARAGRAPH},r);case"A":return jsx$1("element",{type:ELEMENT_LINK,url:e.getAttribute("href")},r);default:return r}}function mf(e){let t=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[o]=t||[{url:""}];return o?.url}function Pa(e){let t={children:[{text:" "}],type:Ca};e.insertNode(t);}var Hk=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:er,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:Ca}],withOverrides:nf}),ff=createPlugins([createParagraphPlugin({component:pf}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:yf}),Hk({component:ki})],{components:{[Ca]:Pi}});var _f=({isDisabled:e})=>{let{formatMessage:t}=F(),o=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:jsx(E,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(ft.addLink),className:oo,preventFocusOnPress:!0})}),jsx(Re,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(me,{size:"content",style:{minWidth:240},children:jsx(qk,{close:()=>{r(),setTimeout(()=>{focusEditor(o,o.selection);},0);}})})})]})},qk=({close:e})=>{let t=useEditorRef(),{formatMessage:o}=F(),r=useEditorSelector(l=>mf(l),[]),[a,n]=nt.useState(r?"show":"add"),[i,s]=nt.useState(r||""),p=jsx(L,{padding:"lg",children:jsx(Xe,{label:o(ft.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(L,{display:"flex",justifyContent:"flex-end",padding:"lg",className:Nm,children:jsx(G,{isDisabled:!isUrl(i,!0),label:o(ft.addLink),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(L,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(G,{label:o(ft.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(G,{label:o(ft.removeLink),size:"sm",onPress:()=>{unwrapLink(t),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(G,{label:o(ft.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(G,{label:o(ft.save),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function yf({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("a",{className:Ar({size:"sm"}),children:t})})}var ft=K({addLink:{id:"addLink",defaultMessage:"Add Link",description:"Add Link"},editLink:{id:"editLink",defaultMessage:"Edit Link",description:"Edit Link"},removeLink:{id:"removeLink",defaultMessage:"Remove Link",description:"Remove Link"},cancel:{id:"cancel",defaultMessage:"Cancel",description:"Cancel"},save:{id:"save",defaultMessage:"Save",description:"Save"},link:{id:"linkAnnotation",defaultMessage:"Link",description:"Link"}});var Wk=parseColor("#ffffff00").toString("hexa"),Ni=[{label:"Red",color:"#ff0000"},{label:"Green",color:"#00ff00"},{label:"Blue",color:"#0000ff"},{label:"Yellow",color:"#ffff00"},{label:"Cyan",color:"#00ffff"},{label:"Magenta",color:"#ff00ff"},{label:"Black",color:"#000000"},{label:"White",color:"#ffffff"},{label:"Gray",color:"#808080"},{label:"Orange",color:"#ffa500"},{label:"Brown",color:"#a52a2a"},{label:"Purple",color:"#800080"}];[...Ni,{label:"Transparent",color:Wk}];var Ra=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(ge,{variant:"tertiary",isSelected:a,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},Mi=({nodeType:e,"aria-label":t,isDisabled:o})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:p,triggerProps:l})=>jsx(E,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":t,size:"md",variant:"popover",isDisabled:o,className:oo,preventFocusOnPress:!0,...l,ref:p}),[e,t,o]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Qt,{presets:Ni,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:o})};var P0=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ka=nt.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Bi=nt.forwardRef(({value:e,defaultValue:t,onChange:o,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:d,editorHandle:m,maxMentionableUsersSuggestions:u,autoFocus:y,editorRef:f,saveOnEnter:b,onSave:g},_)=>{let v=useRef(null),h=useId(),{formatMessage:I}=F(),P=useRef(null),C=P.current,x=useRef(null),T=useMemo(()=>C?.getRootNode()instanceof ShadowRoot,[C]),[N,R]=useControlledState(e?Si(e):void 0,Si(t||"<p></p>"),w=>{o&&o(tr(w));}),{keyboardProps:S}=useKeyboard({onKeyDown:w=>{(b&&w.key==="Enter"&&!w.shiftKey||(w.ctrlKey||w.metaKey)&&w.key==="Enter")&&(w.preventDefault(),g()),w.altKey&&w.key==="F10"?(w.preventDefault(),v.current&&v.current.querySelector("button")?.focus()):w.continuePropagation(),yo()&&T&&x.current&&focusEditor(x.current);}});useEffect(()=>{s&&x.current&&deselect(x.current);},[s]),useImperativeHandle(_,()=>({startMention:()=>{x.current&&!P.current?.querySelector("input[role='combobox']")&&Pa(x.current);}})),useImperativeHandle(m,()=>({setCaretPosition:w=>{x.current&&(focusEditor(x.current),moveSelection(x.current,{distance:w,unit:"character"}));},focus:()=>{x.current&&focusEditor(x.current);}}));let k=useMemo(()=>({items:d||[],containerRef:l,maxMentionableUsersSuggestions:u}),[d,l,u]);return jsx(ka.Provider,{value:k,children:jsxs(Plate,{initialValue:N||P0,plugins:ff,editorRef:M(x,f||null),onChange:w=>{R(w);},children:[jsxs(va,{className:ha,"aria-controls":h,ref:v,children:[jsxs(L,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(Ra,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:I(io.bold),isDisabled:s}),jsx(Ra,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:I(io.italic),isDisabled:s}),jsx(Ra,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:I(io.underline),isDisabled:s})]}),jsx(A,{orientation:"vertical",className:Xo}),jsx(Mi,{nodeType:MARK_COLOR,"aria-label":I(io.fontColor),isDisabled:s}),jsx(A,{orientation:"vertical",className:Xo}),jsx(Mi,{nodeType:MARK_BG_COLOR,"aria-label":I(io.backgroundColor),isDisabled:s}),jsx(A,{orientation:"vertical",className:Xo}),jsx(_f,{isDisabled:s}),jsx(A,{orientation:"vertical",className:Xo}),jsx(E,{className:oo,icon:QuestionmarkCircleIcon,size:"sm","aria-label":I(io.help),onPress:c})]}),jsx(A,{variant:"secondary"}),jsx("div",{...S,ref:P,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:y,spellCheck:a,"aria-label":p,className:classNames(_a({isDisabled:s}),za({isInline:i})),renderPlaceholder:({attributes:w,children:B})=>jsx("span",{...w,className:sprinkles({paddingY:"lg"}),children:B})})})]})})});Bi.displayName="RichEditor";var sf=({key:e,value:t},{isDisabled:o,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:o}),{label:p,data:l}=t;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:Fm({isDisabled:o,isHovered:a}),"data-active":a,ref:i,children:[jsx(Xt,{name:p,...l?.avatar}),jsxs(L,{display:"flex",flexDirection:"column",children:[jsx(Q,{type:"subtitle",size:"sm",children:p}),jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(A,{})]})},io=K({bold:{defaultMessage:"Bold",id:"bold"},italic:{defaultMessage:"Italic",id:"italic"},underline:{defaultMessage:"Underline",id:"underline"},backgroundColor:{defaultMessage:"Background color",id:"backgroundColor"},fontColor:{defaultMessage:"Font color",id:"fontColor"},help:{defaultMessage:"Help",id:"help"}});var kf=nt.memo(nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":d,"aria-describedby":m,"aria-labelledby":u,"aria-details":y,editableContentAriaLabel:f="Editing Area",footerButtons:b,clearOnCancel:g,clearOnSave:_,...v},h)=>{let I=useRef(null),{formatMessage:P}=F(),C=useRef(null),x=useRef(null),T=useRef(null),N=!a&&v.variant==="minimal",R=useRef(null),[S,k]=nt.useState(v.value||v.defaultValue),w=v.isDisabled||v.isSaveDisabled||!getPlainText(S||""),{fieldProps:B}=useLabel({"aria-label":d,"aria-labelledby":u,"aria-describedby":m,"aria-details":y,labelElementType:"div"});N&&!v.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let H=useCallback(()=>{k(""),a?I.current?.reset():x.current?.clear();},[a]),D=useCallback(()=>{w||(i?.(a?tr(I.current?.children):C.current.value),_&&H());},[H,_,a,i,w]),q=jsx(E,{variant:"ghost","aria-label":l||P(Hi.save),icon:p,isDisabled:w,size:"md",excludeFromTabOrder:N,className:N?Om:void 0,onPress:D,preventFocusOnPress:!0}),[j,$]=nt.useState(!1),{keyboardProps:O}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),$(!0));}}),J=useCallback(V=>{k(V),v.onChange?.(V);},[v]);return jsxs("div",{...mergeProps(B,a?O:{}),role:"application",ref:M(T,h),style:t,"data-block-id":o,"data-block-class":r,className:classNames(Mm({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":v.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx(Xt,{className:Lm,name:v.avatarName||""}):null,jsxs("div",{className:Am({isInline:s}),children:[jsx(xa,{isMinimal:N,textBoxRef:C,isInline:s,editableContentAriaLabel:f,...v,onChange:J,onSave:D}),q]})]}):jsxs(Fragment,{children:[a?jsx(Bi,{containerRef:T,ref:R,editorRef:I,isInline:s,editableContentAriaLabel:f,onHelpDialogOpenRequest:()=>{$(!0);},...v,onChange:J,onSave:D}):jsxs(Fragment,{children:[!s&&jsx(A,{variant:"secondary"}),jsx(xa,{onCancel:n,textBoxRef:C,ref:x,isInline:s,editableContentAriaLabel:f,...v,onChange:V=>{k(V),v.onChange?.(V);},onSave:D})]}),jsx(A,{variant:"secondary"}),jsxs("div",{className:classNames(ha,sprinkles({justifyContent:"space-between"})),children:[jsxs(L,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&v.mentionableUsers?jsx(E,{icon:AtIcon,size:"sm","aria-label":P(Hi.mention),onPress:()=>R.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:Z},X)=>V==="action"?jsx(E,{...Z,size:"sm",isDisabled:v.isDisabled||Z.isDisabled},X):jsx(ge,{...Z,size:"sm",variant:"tertiary",isDisabled:v.isDisabled||Z.isDisabled},X))]}),jsxs(L,{children:[!!n&&jsx(E,{variant:"secondary",icon:XCircleFilledIcon$1,isDisabled:v.isDisabled,size:"md",onPress:()=>{n(),g&&H();},"aria-label":c||P(Hi.cancel)}),q]})]})]}),jsx(qm,{isOpen:j,onClose:()=>{$(!1);}})]})}));kf.displayName="Editor";var Hi=K({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var Ta=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),d=animated[s];return c((m,u)=>u&&jsx(d,{className:e,"data-block-id":o,"data-block-class":r,style:{...t,...m},...p,ref:l,children:n}))});Ta.displayName="Transition";var If="_8kqf970 _1yep5z6pi _1yep5z6pj _1yep5z6pk _1yep5z614j _1yep5z614k _1yep5z614l _1yep5z614s _1yep5z614t _1yep5z614u _1yep5z615a _1yep5z615b _1yep5z615c _1yep5z6z3 _1yep5z6vc _1yep5z6vd _1yep5z6ve _1yep5z617g";var wf=2,Tf=nt.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=nt.useRef(null),d=useInteractionModality(),[m,u]=nt.useState(!1),y=useCallback(()=>{let N=r?.current||ue(c.current).body;return pe(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+wf>=0:N.scrollTop+N.clientHeight+wf>=N.scrollHeight},[r]),[f,b]=nt.useState(y),g=St(),{buttonProps:_,isPressed:v}=useButton({onPress:()=>{let N=r?.current||ue(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:h,isFocused:I,isFocusVisible:P}=useFocusRing(),{hoverProps:C,isHovered:x}=useHover({}),T=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":v,"data-focus-visible":P,"data-hovered":x,"data-focused":I});return useEffect(()=>{b(y());},[y]),useEffect(()=>{let N=r?.current||ue(c.current).body,R="onscrollend"in pe(N),S=()=>{setTimeout(()=>{u(!1),b(y());},n);},k=()=>{u(!0),R||S();};return N.addEventListener("scroll",k),N.addEventListener("scrollend",S),()=>{N.removeEventListener("scroll",k),N.removeEventListener("scrollend",S);}},[r,n,y]),jsxs(Ta,{isMounted:(o?d!=="keyboard":!0)&&!m&&!f,elementType:"button",transitions:{from:{opacity:0,transform:"translateX(-50%) translateY(10px)"},enter:{opacity:1,transform:"translateX(-50%) translateY(0)"},leave:{opacity:0,transform:"translateX(-50%) translateY(10px)"},immediate:g},...mergeProps(_,h,C,T),className:classNames(If,Gr({isFocusVisible:P,variant:"high-contrast",isHovered:x}),Wr({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:t,ref:M(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:No({variant:"high-contrast"})}),a]})});Tf.displayName="ScrollControlButton";var Vi="_1yep5z6jy _1yep5z6jz _1yep5z6k0 _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",Sf=z({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6m0 _1yep5z6m1 _1yep5z6m2 _1yep5z6oi _1yep5z6oj _1yep5z6ok"},hasNoCloseBtn:{true:"_1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oi _1yep5z6oj _1yep5z6ok _1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6nc _1yep5z6nd _1yep5z6ne"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61hf _1yep5z61hg _1yep5z61hh"]]}),Nf="_1v0p2z10";var Na=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:d=!0,onPrimaryAction:m,onCancel:u,autoFocusButton:y,isPrimaryActionDisabled:f},b)=>{let g=useId(),{formatMessage:_}=F(),v=n&&jsx(Q,{id:g,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(me,{className:e,style:t,"data-block-id":o,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":g,children:[jsxs("div",{className:Sf({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!d}),children:[jsxs(L,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&v,d?jsx(E,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(Q0.close),onPress:u}):null]}),l?v:null]}),a?jsx(L,{elementType:"section",className:Nf,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(L,{paddingX:"lg",paddingBottom:"lg",children:jsx(Xe,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(A,{}),jsxs(L,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(G,{variant:"secondary",className:Vi,label:s,onPress:u,autoFocus:y==="cancel"}):null,i?jsx(G,{className:Vi,label:i,onPress:m,autoFocus:y==="primary",isDisabled:f}):null]})]}):null]})});Na.displayName="AlertDialog";var Q0=K({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var Lf="_1t55bp71",Mf="_1yep5z6e3 _1yep5z6eu _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z69i _1yep5z69j _1yep5z69k",Df="_1t55bp70";var aI=rI(),Ef=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=o;return (!o||Array.isArray(o)&&o.length===0)&&(p=""),aI.render(p)},[o]);return jsx("div",{className:classNames(Mf,Df,{[Lf]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:t,ref:i,dangerouslySetInnerHTML:{__html:s}})});Ef.displayName="Markdown";function Of(e){let{formatMessage:t,locale:o}=F(),[r,a]=nt.useState(!1),[n,i]=nt.useState(0),[s,p]=nt.useState(0),[l,c]=nt.useState(!1);useEffect(()=>{if(!e.current)return;let u=e.current,y=()=>{a(!1),i(0);},f=()=>{l||i(u.currentTime*100/u.duration);},b=()=>{p(u.duration);};return u.addEventListener("ended",y),u.addEventListener("timeupdate",f),u.addEventListener("loadedmetadata",b),()=>{u.removeEventListener("ended",y),u.removeEventListener("timeupdate",f),u.removeEventListener("loadedmetadata",b);}},[l,e]);let d=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(t(Ff.playing),"polite")):(e.current.pause(),a(!1),announce(t(Ff.paused),"polite"))))();},[t,e]),m=useCallback(u=>{e.current&&(e.current.currentTime=u*e.current.duration/100,announce(sI(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:d,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?Hf(e.current?.currentTime):"00:00",formattedDuration:s?Hf(s):"00:00",setIsSliderDragging:c}}var Ff=K({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function sI(e,t){let o=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...o&&{hours:o},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(t,{style:"long"}).format(n)}function Hf(e){let t=Math.floor(e%3600/60),o=Math.floor(e%60);return [t,o].map(r=>r.toString().padStart(2,"0")).join(":")}var Vf="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q",Af="rta2n91 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6zv _1yep5z6vf _1yep5z6vg _1yep5z6vh _1yep5z617e _1yep5z610s",jf="rta2n90";var Kf=nt.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=nt.useRef(null),{isPlaying:l,progress:c,duration:d,togglePlay:m,seek:u,formattedDuration:y,formattedCurrentTime:f,setProgress:b,setIsSliderDragging:g}=Of(p),{formatMessage:_}=F(),v=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":d>0});return jsxs("div",{...v,...i,className:classNames(Vf,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:I})=>jsx("source",{src:h,type:I},h))})}),jsx(ge,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:o,"aria-label":_(l?ji.pause:ji.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:Af,children:[jsx("span",{"aria-hidden":!0,children:f}),jsx(Ft,{"aria-label":_(ji.audioTimeline),value:c,minValue:0,maxValue:100,className:jf,onChange:h=>{b(h),g(!0);},onChangeEnd:h=>{u(h),g(!1);}}),jsx("span",{"aria-hidden":!0,children:y})]})]})});Kf.displayName="AudioPlayer";var ji=K({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var qf="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6ia _1yep5z6ib _1yep5z6ic",Gf="_1w920rn1 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69i _1yep5z69j _1yep5z69k",Wf="_1w920rn0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6l8",Ma=z({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{isFocusVisible:{true:"_1yep5z6ln _1yep5z6ll _1yep5z6hu"},isSelected:{true:"_1yep5z6ln _1yep5z6ll _1yep5z6hu"},isLoading:{true:"_1yep5z6164 _1yep5z6165 _1yep5z6166"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn6 _1yep5z6ln _1yep5z6ll _1yep5z6hu"]]}),Xf="_1w920rnb _1yep5z6li",Yf=z({defaultClassName:"_1w920rn7 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6g5 _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6ln _1yep5z6ll _1yep5z6hu"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rna _1yep5z61tg _1yep5z61tf _1yep5z61pp"]]}),Zf="_1w920rnc";var Da=({items:e,ulRef:t,containerClassName:o,previewClassName:r,itemDataAttribute:a,showCount:n=!1})=>{let{length:i}=e,s=nt.useRef(null);return useLayoutEffect(()=>{if(!s.current)return;let p=s.current.closest(o)?.querySelector(`[${a}='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(p,"Node is not defined."),s.current?.prepend(p);},[e,t,o,a]),jsx("div",{className:r,ref:s,children:n&&i>1?jsx(L,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:Zf,children:i}):null})};function Jf(e,t){return e.find(o=>o.id===t)}function ey(e,t,o){let r=e.findIndex(i=>i.id===t),a=[...o].map(i=>e.findIndex(s=>s.id===i)),n=[...e];for(let i of a){let[s]=n.splice(i,1);n.splice(r,0,s);}return n}function ty(e,t,o){let r=e.findIndex(s=>s.id===t),a=[...o].map(s=>e.findIndex(p=>p.id===s)),n=[...e],i=0;for(let s of a){let[p]=n.splice(s-i,1);n.splice(r,0,p),i++;}return n}function $i(e){return e.map(t=>({id:t.id,label:t.label,data:{src:t.src,alt:t.alt}}))}function Ea(e){return e.map(t=>({id:t.id,label:t.label,src:t.data?.src,alt:t.data?.alt}))}var CI=({fit:e,item:t,deleteElement:o})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:n,isLoaded:i}=Tt({src:t.data?.src,alt:t.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(Kt,{"aria-label":r(ar.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Xf,children:o}))},oy=({item:e,options:{optionProps:t,isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i},liRef:s,fit:p="contain",onDelete:l,className:c,imageClassName:d,imageLabelClassName:m,imageDimensions:u,style:y,renderImage:f=(b,{deleteElement:g})=>jsx(CI,{item:b,deleteElement:g,fit:p})})=>{let b=useId(),{formatMessage:g}=F(),{value:_}=e;invariant(_&&Ve(_),"Expected value to be a list option");let v=l?jsx("div",{className:qf,children:jsx(E,{"aria-label":g(ar.delete),size:"xs",icon:XIcon$2,onPress:()=>{l(_.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,h=Ea([_])[0],I=useCallback(C=>{let x={},T=typeof C=="function"?C(h,{isSelected:r}):C;return T&&(x.width=typeof T.width=="string"?Ki[T.width]:T.width,x.aspectRatio="height"in T?`${x.width} / ${T.height}`:T?.aspectRatio?.toString()),x},[h,r]),P=useMemo(()=>({isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i}),[o,r,a,n,i]);return jsxs("li",{...t,ref:s,className:classNames(Gf,Ae(c,h,P)),"aria-labelledby":b,style:mr(y,h,P),children:[jsx(L,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(Ma({isFocusVisible:o,isSelected:r,isLoading:!0}),Ae(d,h,P)),style:I(u),"data-image-key":_.id,children:f(_,{deleteElement:v??void 0,onDelete:l})})}),jsx("span",{id:b,className:classNames(Yf({isFocusVisible:o,isSelected:r}),Ae(m,h,P)),children:_.label})]})};var SI={width:0,display:"block"};var Ki=(o=>(o[o.sm=102]="sm",o[o.md=170]="md",o))(Ki||{}),ny=nt.forwardRef(({className:e,style:t,fit:o="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:d,imageContainerClassName:m,imageClassName:u,labelClassName:y,onListChange:f,renderImage:b,imageDimensions:g={width:s,aspectRatio:p},imageContainerStyle:_,...v},h)=>{let I=nt.useRef(null),[P,C]=useState([]),{formatMessage:x}=F();useEffect(()=>{(p||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,p]);let[T,N]=useControlledState(v.selectedKeys,v.defaultSelectedKeys??[],v.onSelectionChange),[R,S]=useControlledState(l?$i(l):void 0,$i(c),f?D=>{f?.(Ea(D));}:void 0),k=useCallback(D=>{let q=D.target.key,j=D.keys;if(D.target.dropPosition==="before"){let $=ey(R,q,j);S($);}else if(D.target.dropPosition==="after"){let $=ty(R,q,j);S($);}r?.(D);},[R,r,S]),w=useCallback(()=>{i&&P.length&&(S(R.filter(D=>!P.includes(D.id))),i(new Set(P)),C([]));},[P,R,i,S]),B=useCallback((D,q,j)=>{let{value:$}=D;invariant(Ve($));let O={id:$.id,label:$.label,src:$.data?.src,alt:$.data?.alt};return jsx(oy,{item:D,options:q,liRef:j,fit:o,onDelete:i?J=>{C([J]);}:void 0,renderImage:b,className:Ae(m,O,q),imageClassName:u,imageLabelClassName:y,imageDimensions:g,style:_})},[o,i,b,m,u,y,g,_]),{keyboardProps:H}=useKeyboard({onKeyDown(D){if(d?.(D),D.key==="Backspace"||D.key==="Delete"){if(!i)return;if([...T].length)C([...T]);else {let j=D.target.dataset.key;C([j]);}}}});return jsxs("div",{...H,ref:h,style:t,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(le,{...v,selectedKeys:T,items:R,onReorder:k,layout:"grid",orientation:"vertical",className:Wf,ref:I,dropIndicatorStyle:SI,renderOption:B,renderDragPreview:D=>jsx(Da,{items:D,ulRef:I,containerClassName:".BaselineUI-ImageGallery",previewClassName:Ma(),itemDataAttribute:"data-image-key",showCount:!0}),onSelectionChange:N,getItems:D=>[...D].map(q=>{let j=Jf(R,q);return {src:j?.src||"",alt:j?.alt||"",key:q}})}),jsx(Ie,{isOpen:!![...P].length,onOpenChange:D=>{D||C([]);},children:jsx(De,{isDismissable:!0,children:jsx(Na,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:x(ar.delete),cancelLabel:x(ar.cancel),onCancel:()=>{C([]);},onPrimaryAction:w,autoFocusButton:"cancel"})})})]})});ny.displayName="ImageGallery";var ar=K({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var iy="_1sexph00",sy="_1sexph01 _1yep5z617x _1yep5z617y _1yep5z617z _1yep5z61a9 _1yep5z61aa _1yep5z61ab _1yep5z61bf _1yep5z61bg _1yep5z61bh _1yep5z6193 _1yep5z6194 _1yep5z6195 _1yep5z61ry _1yep5z61rz _1yep5z61s0";var cy=nt.forwardRef(({className:e,style:t,items:o,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:d,defaultSelected:m,onButtonSelectionChange:u,moreAriaLabel:y,optionStyle:f,optionClassName:b,triggerClassName:g,triggerStyle:_,tooltipProps:v,...h},I)=>{let{formatMessage:P}=F(),C=ae(),x=useSelectState({items:o,...h,defaultSelectedKey:h.defaultSelectedKey||o?.[0]?.id,children:C,validationState:h.validationState==="error"?"invalid":"valid"}),[T,N]=useControlledState(d,!!m,O=>{u?.({isSelected:O,selectedKey:x.selectedKey});}),{hoverProps:R,isHovered:S}=useHover({isDisabled:s}),k=useMemo(()=>{let O=x.collection.getItem(x.selectedKey),J=O?.textValue||O?.["aria-label"],V=O?.value,Z=V?.icon,X={size:i,isSelected:T,onPress:Ce=>{N(!T),c?.(Ce);},isDisabled:s,excludeFromTabOrder:l,className:typeof b=="function"?b(V,{isButton:!0,isSelected:T}):b,style:typeof f=="function"?f(V,{isButton:!0,isSelected:T}):f};return n&&Z?jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:J,placement:"bottom start",offset:4,...typeof v=="function"?v("button"):v,children:jsx(ge,{icon:Z,"aria-label":J,variant:"toolbar",...X})}):jsx(Kr,{iconStart:Z,label:J,variant:"toolbar",...X})},[l,n,T,s,c,b,f,N,i,x.collection,x.selectedKey,v]),w=h["aria-label"],B=useCallback(({buttonProps:O,ref:J})=>{delete O["aria-labelledby"];let V=y||`${P(OI.more)} ${w}`;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:V,placement:"bottom start",offset:4,...v,children:jsx(PressResponder,{...O,children:jsx(E,{"aria-label":V,ref:J,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:Z})=>classNames(Ur({isSelected:T,isFocusVisible:Z}),sy,g),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[w,l,P,T,s,y,i,v,g,_]),H=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":S,"data-selected":T,"data-disabled":s,"data-expanded":x.isOpen}),D=oe(I),q=useMemo(()=>({state:x,popoverAnchorRef:D}),[x,D]),j=useCallback(O=>typeof b=="function"?b(O,{isButton:!1,isSelected:x.selectionManager.isSelected(O.id)}):b,[b,x.selectionManager]),$=useCallback(O=>typeof f=="function"?f(O,{isButton:!1,isSelected:x.selectionManager.isSelected(O.id)}):f,[f,x.selectionManager]);return jsx(Yr.Provider,{value:q,children:jsxs(L,{...R,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(iy,"BaselineUI-ButtonSelect",e),"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],"aria-describedby":h["aria-describedby"],"aria-details":h["aria-details"],style:t,ref:D,...H,children:[k,jsx(Qe,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:o,...h,style:{width:20},optionClassName:j,optionStyle:$,variant:"ghost",renderTrigger:B})]})})});cy.displayName="ButtonSelect";var OI=K({more:{id:"more",defaultMessage:"More"}});var dy=z({defaultClassName:"_18v88n10 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6lh",variantClassNames:{labelPosition:{top:"_1yep5z614v _1yep5z614w _1yep5z614x",start:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z616a _1yep5z616b _1yep5z616c _1yep5z6vf _1yep5z6vg _1yep5z6vh"}},defaultVariants:{},compoundVariants:[]}),uy=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6lh _1yep5z6ls _1yep5z6lk _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z610v"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),my=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6le",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z610b",warning:"_1yep5z610j"},isReadOnly:{true:"_1yep5z6112"}},defaultVariants:{},compoundVariants:[]}),fy=z({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6lv _1yep5z6lt _1yep5z6h4 _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z612k",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z617s _1yep5z617q _1yep5z612y _1yep5z617j _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z613r"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61tp _1yep5z61tn _1yep5z61oy"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61oz"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61oz"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),yy=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),by=z({defaultClassName:"_18v88n19 _1yep5z6ip _1yep5z6iq _1yep5z6ir",variantClassNames:{labelPosition:{top:"_1yep5z6t3 _1yep5z6t4 _1yep5z6t5",start:"_1yep5z6n0 _1yep5z6n1 _1yep5z6n2 _1yep5z614v _1yep5z614w _1yep5z614x"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61s1 _1yep5z61s2 _1yep5z61s3"]]}),gy=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lk",variantClassNames:{isFocusVisible:{true:"_1yep5z6121 _1yep5z6143 _1yep5z617h"},isHovered:{true:"_1yep5z6121 _1yep5z6143 _1yep5z617h"},isOpen:{true:"_1yep5z6143 _1yep5z617h"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61ny _1yep5z61q0 _1yep5z61te"],[{isHovered:!0},"_1yep5z61ny _1yep5z61q0 _1yep5z61te"],[{isOpen:!0},"_1yep5z61q0 _1yep5z61te"]]});function vy({allowsCustomValue:e,onValueChange:t,inputValue:o},r,a,n,i){let[s,p]=useState(null),l=useRef(!1);useEffect(()=>{if(!t)return;let d=a.current,m=u=>{p(u.target);};return d?.addEventListener("focusin",m),()=>{d?.removeEventListener("focusin",m);}},[t,a,r.selectedKey]),useGranularEffect(()=>{r.selectedKey&&(t?.({value:r.selectedItem?.textValue,key:r.selectedKey}),l.current=!1);},[r.selectedKey],[t,r.selectedItem]),useInteractOutside({ref:n,isDisabled:!t,onInteractOutside:d=>{!i.current?.contains(d.target)&&s===n.current&&e&&l.current&&(t?.({value:n.current?.value,key:null}),l.current=!1);}}),useEffect(()=>{if(!t)return;let d=n.current,m=()=>{l.current=!0;};return d?.addEventListener("input",m),()=>{d?.removeEventListener("input",m);}},[n,t]),useEffect(()=>{l.current=!1;},[o]);let{keyboardProps:c}=useKeyboard({isDisabled:!t,onKeyDown:d=>{e&&d.key==="Enter"&&l.current?(t?.({value:n.current?.value,key:null}),l.current=!1):d.key==="Escape"&&r.close(),d.continuePropagation();}});return {inputProps:c}}var hy=nt.forwardRef(({className:e,style:t,inputStyle:o,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:d=!1,labelPosition:m="top",validationState:u="valid",variant:y="primary",toggleLabel:f,renderOption:b,showIcon:g=!0,filter:_,minValue:v,maxValue:h,inputType:I="text",onInputSubmit:P,onValueChange:C,...x},T)=>{let N=useObjectRef(T),{contains:R}=useFilter({sensitivity:"base"}),S=ae(),k=useComboBoxState({...x,defaultFilter:_||R,defaultItems:s,onSelectionChange:l,onInputChange:c,children:S,validationState:d?"invalid":"valid"}),w=nt.useRef(null),B=nt.useRef(null),H=nt.useRef(null),D=nt.useRef(null),q=nt.useRef(null),{inputProps:j}=vy({onValueChange:C,allowsCustomValue:x.allowsCustomValue,inputValue:x.inputValue},k,N,B,D),{buttonProps:$,inputProps:O,listBoxProps:J,labelProps:V,errorMessageProps:Z,descriptionProps:X,validationErrors:Ce}=useComboBox({...x,inputRef:B,defaultItems:s,buttonRef:w,listBoxRef:H,popoverRef:D,validationState:u==="error"?"invalid":"valid"},k),Pe=x.errorMessage||Ce.join(" "),ye=ke({...x,errorMessage:Pe,descriptionProps:X,errorMessageProps:Z,labelPosition:m});Pe&&(u="error");let{hoverProps:Te,isHovered:He}=useHover({isDisabled:x.isDisabled}),{isFocused:te,focusProps:de,isFocusVisible:_t}=useFocusRing(),zt=jt({isReadOnly:x.isReadOnly,validationState:u}),mo=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":u,"data-focused":te,"data-focus-visible":_t}),{labelProps:ht,fieldProps:Y}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]}),{keyboardProps:U}=useKeyboard({onKeyDown:W=>{x.allowsCustomValue&&W.key==="Enter"&&P?.(O.value?.toString()??"");}}),{focusProps:ne}=useFocus({onBlur:()=>{x.allowsCustomValue&&O.value&&P?.(O.value?.toString()??"");}});return jsx(it.Provider,{value:k,children:jsxs("div",{className:classNames(dy({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:t,ref:N,children:[i||m==="start"&&ye?jsxs("div",{className:by({labelPosition:m,hasMessage:!!ye}),children:[jsx("label",{...mergeProps(V,ht),className:yy({isDisabled:x.isDisabled}),children:i}),m==="start"&&ye]}):null,jsxs("div",{...Te,className:fy({validationState:u,isHovered:He,isFocused:te,variant:y,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:q,children:[jsx("input",{...mergeProps(O,j,de,mo,Y,ne,U,I==="number"?{type:"number",min:v,max:h,onKeyDown:W=>{(W.key==="ArrowUp"||W.key==="ArrowDown")&&W.preventDefault();}}:null),ref:B,className:classNames(uy({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:o}),zt&&g?jsx(zt,{className:my({validationState:u,isReadOnly:x.isReadOnly}),size:16}):null,jsx(G,{...$,ref:w,variant:"popover",label:f,className:gy({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&_t,isHovered:!x.isDisabled&&!x.isReadOnly&&He,isOpen:k.isOpen})})]}),jsx(be,{className:We,ref:D,triggerRef:q,state:k,children:jsx(le,{...J,items:s,ref:H,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:Hr})}),m==="top"&&ye]})})});hy.displayName="ComboBox";var xy=z({defaultClassName:"byycd01 _1yep5z6d6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{},defaultVariants:{},compoundVariants:[]});var Zi=nt.forwardRef(({enableReorder:e,...t},o)=>e?jsx(Cy,{ref:o,...t}):jsx(Qi,{ref:o,...t}));Zi.displayName="GridListItem";var Qi=nt.forwardRef(({item:e,state:t,dropState:o,renderGridItem:r,dragHandleProps:a},n)=>{let i=oe(n),s=useGridListItem({node:e},t,i),p=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:l}=useGridListSelectionCheckbox({key:e.key},t),c={...s,checkBoxProps:p?l:void 0,dragHandleProps:a};return jsxs("div",{"data-grid-list-item-key":e.key,children:[o?jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"before"},dropState:o}):null,r?r(e,c,i):null,o&&t.collection.getKeyAfter(e.key)==null?jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"after"},dropState:o}):null]},e.key)});Qi.displayName="BaseGridListItem";var Cy=nt.forwardRef(({dragState:e,item:t,...o},r)=>{let a=useDraggableItem({key:t.key,hasDragButton:!0},e);return jsx(Qi,{item:t,dragHandleProps:a,ref:r,...o})});Cy.displayName="DraggableGridListItem";var uR=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},ky=nt.forwardRef(({className:e,style:t,isEditing:o=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,onReorder:i,enableReorder:s=!1,layout:p="stack",orientation:l="vertical",renderGridItem:c,...d},m)=>{let u=ae(),y=useListState({...d,children:u}),f=nt.useRef(null),b=oe(m),{gridProps:g}=useGridList(d,y,b);gr({handle:n,type:"gridlist"},y,b);let{collectionProps:_,dragState:v,dropState:h}=ur({...d,onReorder:i,enableReorder:s,layout:p,orientation:l,preview:f,getItems:C=>[...C].map(x=>{let T=y.collection.getItem(x);return invariant(T,"Expected item to be defined."),{key:T.key.toString()}})},y,b),I=o?uR:g.onKeyDownCapture,P={state:y,dragState:v,dropState:h,enableReorder:s,renderGridItem:c};return jsxs("ul",{...mergeProps(g,_),className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:t,ref:b,"aria-rowcount":y.collection.size,onKeyDownCapture:I,children:[[...y.collection].map(C=>jsx(Zi,{item:C,...P},C.key)),s?jsx(DragPreview,{ref:f,children:C=>jsx(Da,{items:C,ulRef:b,containerClassName:".BaselineUI-GridList",previewClassName:xy(),itemDataAttribute:"data-grid-list-item-key"})}):null]})});ky.displayName="GridList";var Iy="_1yep5z6f5",Ry="_1dc3b8m0";var wy=nt.forwardRef(({className:e,selectionMode:t,style:o,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...p},l)=>{let c=oe(l),d=ae(),m=useListState({...p,selectionMode:t,suppressTextValueWarning:!0,children:d}),{actionGroupProps:u}=useActionGroup({...p,selectionMode:t,children:d},m,c),y=[...m.collection].map(f=>(invariant(f.value),jsx(hR,{item:f,state:m,isDisabled:p.isDisabled,onAction:p.onAction,tooltipProps:n,renderActionItem:s},f.key)));return i?jsxs(L,{...u,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:[jsx(i,{size:24,className:Iy}),jsx(L,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:y})]}):jsx(L,{...u,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:y})});wy.displayName="ActionGroup";var hR=({item:e,state:t,tooltipProps:o,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},t),s=n||t.selectionManager.isDisabled(e.key),p=t.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof o=="function"?o(e.value):o),[o,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(re,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(E,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[Ry]:p},"BaselineUI-ActionGroup-Item")})})})};var Ty="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",Sy="_1yep5z61qp _1yep5z61qq _1yep5z61qr _1yep5z61h9 _1yep5z61ha _1yep5z61hb";var Ly=nt.forwardRef(({className:e,style:t,items:o,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:d,labelPosition:m="top","data-block-id":u,"data-block-class":y,shouldFocusWrap:f,tooltip:b=!0,...g},_)=>{let v=useMemo(()=>o.map(I=>({id:I.color,label:I.label})),[o]),h=useId();return useEffect(()=>{!a&&!g["aria-label"]&&!g["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,g]),jsxs(L,{...$a(g),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":u,"data-block-class":y,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:t,ref:_,children:[n||a?jsxs(L,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Q,{id:h,type:"label",size:"sm",children:a}):null]}):null,jsx(le,{className:classNames(Sy,r),selectionMode:"single",items:v,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?v.map(I=>I.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:I=>{p?.([...I][0]);},optionClassName:c,optionStyle:d,renderOption:({key:I,textValue:P},{isSelected:C,isFocusVisible:x,isDisabled:T,optionProps:N},R)=>jsx("li",{...N,"data-disabled":T,className:classNames(Ty,N.className),ref:R,children:jsx(et,{isFocusVisible:x,color:I,isSelected:C,"aria-label":P,isInteractive:!0,isDisabled:T,tooltip:b})}),shouldFocusWrap:f,...g,"aria-labelledby":a?h:g["aria-labelledby"]})]})});Ly.displayName="ColorSwatchPicker";var My="_10dw1p96",Dy="_10dw1p95",Ey=z({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lk _1yep5z6l7 _1yep5z6l4",variantClassNames:{isSelected:{true:"_1yep5z6120"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z613r _1yep5z617k _1yep5z617i"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isSelected:!1,isRenaming:!1},"_1yep5z61nw _1yep5z61pu _1yep5z61tg _1yep5z61tf"]]});function Hy(e,t){if(typeof e=="function"&&!e.prototype?.isReactComponent){let o=e(t);return isValidElement(o)?e:o}return e}var Oy=({context:e,depth:t,children:o,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:p,primaryActionAriaLabel:l,secondaryActionAriaLabel:c,onRename:d,onAction:m,renderItemTitle:u=y=>y.data.label})=>{let{formatMessage:y}=F(),{hoverProps:f,isHovered:b}=useHover({}),g=useRef(null),{onKeyDown:_,...v}=e.interactiveElementProps;delete v.onFocus,delete v.onClick;let h=createFocusManager(g),I=useCallback(k=>{if(k.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))g.current?.setAttribute("tabindex","-1"),k.preventDefault(),k.stopPropagation(),h.focusNext();else switch(k.key){case"ArrowLeft":{h.focusPrevious()?(k.preventDefault(),k.stopPropagation()):(_?.(k),e.focusItem(!0));break}case"Enter":{e.toggleExpandedState();break}default:_?.(k);}},[e,h,_,r,g]),P=useMemo(()=>{let k=Hy(s,r.index),w=Hy(p,r.index),B=typeof l=="function"?l(r.index):l,H=typeof c=="function"?c(r.index):c;return k||w?jsxs(L,{display:"flex",flexDirection:"row",children:[k?jsx(ge,{icon:k,"aria-label":B,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,w?jsx(ge,{icon:w,"aria-label":H,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{n?.(r.index);},tooltip:!0}):null]}):null},[s,r.index,p,l,c,a,n]),C=useCallback(k=>{k.key==="Enter"?(d?.({key:r.index,value:k.target.value}),e.stopRenamingItem()):k.key==="Escape"?(e.stopRenamingItem(),g.current?.setAttribute("tabindex","0"),g.current?.focus()):k.key!=="ArrowRight"&&k.key!=="ArrowLeft"&&k.key!=="ArrowUp"&&k.key!=="ArrowDown"&&!k.metaKey&&k.continuePropagation();},[r.index,e,d,g]),x=r.data.icon,T=!!d,{pressProps:N}=usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:R,focusProps:S}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:I,onFocus:()=>{e.focusItem(!1);}},N,S,f,e.itemContainerWithoutChildrenProps,v),className:classNames(Dy,Ey({isHovered:b,isSelected:e.isSelected,isFocusVisible:R,isRenaming:e.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":r.index,"data-expanded":r.isFolder?e.isExpanded:void 0,"aria-expanded":r.isFolder?e.isExpanded:void 0,"data-selected":e.isSelected,"aria-selected":e.isSelected,"data-depth":t,"aria-level":t+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:g,children:jsxs(L,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?P:null,jsxs(L,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(L,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${t*2} * ${themeVars.spacing.lg})`},children:[jsx(E,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":y(e.isExpanded?rs.collapse:rs.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(My,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),x?jsx(x,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(L,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:k=>{T&&(k.stopPropagation(),k.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:k=>{k.stopPropagation();},children:jsx(Xe,{defaultValue:r.data.label,autoFocus:!0,onBlur:k=>{d?.({key:r.index,value:k.target.value}),e.stopRenamingItem();},"aria-label":y(rs.rename),onKeyDown:C,className:"BaselineUI-TreeView-RenameInput"})}):jsx(Q,{type:"label",size:"sm",className:classNames(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:u(r)}),r.data.description?jsx(Q,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.data.description}):null]})]}),i==="end"?P:null]})}),o]})},rs=K({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function qR(e,{posInset:t,setSize:o}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:t,setSize:o},isFolder:!!e.children?.length}}function GR(e,t){let o={};function r(a,n,i){if(o[a.id]=t(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),o}var $y=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,actionsPosition:m="start",onRename:u,onAction:y,renderItemTitle:f,...b},g)=>{let _=ae(),v=useRef(null),h=useTreeState({...b,selectionMode:"multiple",items:a.children,children:_}),I=useMemo(()=>Object.fromEntries(Object.entries(GR(a,qR)).map(([R,S])=>[R,{...S,canRename:!!u}])),[a,u]),P=useId(),[C,x]=nt.useState(a.children?.[0]?.id??""),T=useRef(C),N=useMemo(()=>({[`tree-${P}`]:{focusedItem:C,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[C,h.expandedKeys,h.selectionManager.selectedKeys,P]);return useEffect(()=>{if(!v.current)return;let R=Oe(v.current),S=R instanceof ShadowRoot,k=v.current?.contains(R?.activeElement??null);S&&k&&Oe(v.current)?.querySelector(`[data-rct-item-id="${C}"]`)?.focus();},[C]),jsx(ControlledTreeEnvironment,{items:I,getItemTitle:R=>R.data?.label,viewState:N,onExpandItem:R=>{h.setExpandedKeys(new Set([...h.expandedKeys,R.index])),b.onExpand?.(R.index.toString());},onFocusItem:R=>{x(R.index),R.index&&(T.current=R.index);},onCollapseItem:R=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(S=>S!==R.index))),b.onCollapse?.(R.index.toString());},onSelectItems:R=>{h.selectionManager.setSelectedKeys(new Set(R));},renderItem:R=>jsx(Oy,{...R,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:m,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,onRename:u,onAction:y,renderItemTitle:f}),renderLiveDescriptorContainer:({children:R})=>jsx(Ke,{children:jsx(VisuallyHidden,{children:R})}),renderTreeContainer:({containerProps:R,children:S})=>jsx("div",{...xt(R,{onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||k.currentTarget.querySelector(`[data-key="${T.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":o,"data-block-class":r,style:{...t,...R.style},className:classNames(e,"BaselineUI-TreeView"),ref:M(g,R.ref,v),role:"treegrid",children:S}),renderItemsContainer:({children:R})=>R,children:jsx(Tree,{treeId:`tree-${P}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});$y.displayName="TreeView";var ew=forwardRef(({className:e,isCollapsible:t=!1,...o},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:t,ref:a,id:n,...o})});ew.displayName="Panel";var sw=forwardRef(({className:e,...t},o)=>{let r=useRef(null);return useImperativeHandle(o,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...t})});sw.displayName="PanelGroup";var Uy="_6abhjk0";var dw=({className:e,isDisabled:t=!1,...o})=>jsx(PanelResizeHandle,{disabled:t,className:classNames(Uy,"BaselineUI-PanelResizeHandle",e),...o});dw.displayName="PanelResizeHandle";
10
+ var Db=Object.create;var Qs=Object.defineProperty;var Ab=Object.getOwnPropertyDescriptor;var Bb=Object.getOwnPropertyNames;var Ob=Object.getPrototypeOf,Fb=Object.prototype.hasOwnProperty;var el=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var jb=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Bb(e))!Fb.call(r,a)&&a!==t&&Qs(r,a,{get:()=>e[a],enumerable:!(o=Ab(e,a))||o.enumerable});return r};var fn=(r,e,t)=>(t=r!=null?Db(Ob(r)):{},jb(!r||!r.__esModule?Qs(t,"default",{value:r,enumerable:!0}):t,r));var Gn=el((rO,Yp)=>{var B_={},O_=B_.hasOwnProperty,F_=function(e,t){if(!e)return t;var o={};for(var a in t)o[a]=O_.call(e,a)?e[a]:t[a];return o},j_=/[ -,\.\/:-@\[-\^`\{-~]/,H_=/[ -,\.\/:-@\[\]\^`\{-~]/,V_=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Kn=function r(e,t){t=F_(t,r.options),t.quotes!="single"&&t.quotes!="double"&&(t.quotes="single");for(var o=t.quotes=="double"?'"':"'",a=t.isIdentifier,n=e.charAt(0),i="",s=0,l=e.length;s<l;){var p=e.charAt(s++),c=p.charCodeAt(),d=void 0;if(c<32||c>126){if(c>=55296&&c<=56319&&s<l){var m=e.charCodeAt(s++);(m&64512)==56320?c=((c&1023)<<10)+(m&1023)+65536:s--;}d="\\"+c.toString(16).toUpperCase()+" ";}else t.escapeEverything?j_.test(p)?d="\\"+p:d="\\"+c.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(p)?d="\\"+c.toString(16).toUpperCase()+" ":p=="\\"||!a&&(p=='"'&&o==p||p=="'"&&o==p)||a&&H_.test(p)?d="\\"+p:d=p;i+=d;}return a&&(/^-[-\d]/.test(i)?i="\\-"+i.slice(1):/\d/.test(n)&&(i="\\3"+n+" "+i.slice(1))),i=i.replace(V_,function(u,b,y){return b&&b.length%2?u:(b||"")+y}),!a&&t.wrap?o+i+o:i};Kn.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};Kn.version="3.0.0";Yp.exports=Kn;});var wc=el((WO,Pc)=>{var V6=function(e){return $6(e)&&!U6(e)};function $6(r){return !!r&&typeof r=="object"}function U6(r){var e=Object.prototype.toString.call(r);return e==="[object RegExp]"||e==="[object Date]"||G6(r)}var q6=typeof Symbol=="function"&&Symbol.for,K6=q6?Symbol.for("react.element"):60103;function G6(r){return r.$$typeof===K6}function W6(r){return Array.isArray(r)?[]:{}}function Ar(r,e){return e.clone!==!1&&e.isMergeableObject(r)?Wt(W6(r),r,e):r}function X6(r,e,t){return r.concat(e).map(function(o){return Ar(o,t)})}function Y6(r,e){if(!e.customMerge)return Wt;var t=e.customMerge(r);return typeof t=="function"?t:Wt}function Z6(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(e){return Object.propertyIsEnumerable.call(r,e)}):[]}function Cc(r){return Object.keys(r).concat(Z6(r))}function xc(r,e){try{return e in r}catch{return !1}}function J6(r,e){return xc(r,e)&&!(Object.hasOwnProperty.call(r,e)&&Object.propertyIsEnumerable.call(r,e))}function Q6(r,e,t){var o={};return t.isMergeableObject(r)&&Cc(r).forEach(function(a){o[a]=Ar(r[a],t);}),Cc(e).forEach(function(a){J6(r,a)||(xc(r,a)&&t.isMergeableObject(e[a])?o[a]=Y6(a,t)(r[a],e[a],t):o[a]=Ar(e[a],t));}),o}function Wt(r,e,t){t=t||{},t.arrayMerge=t.arrayMerge||X6,t.isMergeableObject=t.isMergeableObject||V6,t.cloneUnlessOtherwiseSpecified=Ar;var o=Array.isArray(e),a=Array.isArray(r),n=o===a;return n?o?t.arrayMerge(r,e,t):Q6(r,e,t):Ar(e,t)}Wt.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(o,a){return Wt(o,a,t)},{})};var e5=Wt;Pc.exports=e5;});var Se=typeof document<"u"?ut.useLayoutEffect:()=>{};function yn(r){let e=useRef(null);return Se(()=>{e.current=r;},[r]),useCallback((...t)=>{let o=e.current;return o?.(...t)},[])}function bn(r){let[e,t]=useState(r),o=useRef(null),a=yn(()=>{if(!o.current)return;let i=o.current.next();if(i.done){o.current=null;return}e===i.value?a():t(i.value);});Se(()=>{o.current&&a();});let n=yn(i=>{o.current=i(e),a();});return [e,n]}var ko={prefix:String(Math.round(Math.random()*1e10)),current:0},tl=ut.createContext(ko),Wb=ut.createContext(!1);var Xb=!!(typeof window<"u"&&window.document&&window.document.createElement),gn=new WeakMap;function Yb(r=!1){let e=useContext(tl),t=useRef(null);if(t.current===null&&!r){var o,a;let n=(a=ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(o=a.ReactCurrentOwner)===null||o===void 0?void 0:o.current;if(n){let i=gn.get(n);i==null?gn.set(n,{id:e.current,state:n.memoizedState}):n.memoizedState!==i.state&&(e.current=i.id,gn.delete(n));}t.current=++e.current;}return t.current}function Zb(r){let e=useContext(tl);e===ko&&!Xb&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let t=Yb(!!r),o=e===ko&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return r||`${o}-${t}`}function Jb(r){let e=ut.useId(),[t]=useState(rl()),o=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${ko.prefix}`;return r||`${o}-${e}`}var hn=typeof ut.useId=="function"?Jb:Zb;function Qb(){return !1}function eg(){return !0}function tg(r){return ()=>{}}function rl(){return typeof ut.useSyncExternalStore=="function"?ut.useSyncExternalStore(tg,Qb,eg):useContext(Wb)}var ig=!!(typeof window<"u"&&window.document&&window.document.createElement),qe=new Map;function So(r){let[e,t]=useState(r),o=useRef(null),a=hn(e),n=useCallback(i=>{o.current=i;},[]);return ig&&(qe.has(a)&&!qe.get(a).includes(n)?qe.set(a,[...qe.get(a),n]):qe.set(a,[n])),Se(()=>{let i=a;return ()=>{qe.delete(i);}},[a]),useEffect(()=>{let i=o.current;i&&(o.current=null,t(i));}),a}function _n(r,e){if(r===e)return r;let t=qe.get(r);if(t)return t.forEach(a=>a(e)),e;let o=qe.get(e);return o?(o.forEach(a=>a(r)),r):e}function ol(...r){return (...e)=>{for(let t of r)typeof t=="function"&&t(...e);}}var fe=r=>{var e;return (e=r?.ownerDocument)!==null&&e!==void 0?e:document},ae=r=>r&&"window"in r&&r.window===r?r:fe(r).defaultView||window;function sg(r){return r!==null&&typeof r=="object"&&"nodeType"in r&&typeof r.nodeType=="number"}function zn(r){return sg(r)&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in r}var Io=(r=document)=>{var e;let t=r.activeElement;for(;t&&"shadowRoot"in t&&(!((e=t.shadowRoot)===null||e===void 0)&&e.activeElement);)t=t.shadowRoot.activeElement;return t};function al(r){var e,t,o="";if(typeof r=="string"||typeof r=="number")o+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(e=0;e<a;e++)r[e]&&(t=al(r[e]))&&(o&&(o+=" "),o+=t);}else for(t in r)r[t]&&(o&&(o+=" "),o+=t);return o}function lg(){for(var r,e,t=0,o="",a=arguments.length;t<a;t++)(r=arguments[t])&&(e=al(r))&&(o&&(o+=" "),o+=e);return o}var nl=lg;function Et(...r){let e={...r[0]};for(let t=1;t<r.length;t++){let o=r[t];for(let a in o){let n=e[a],i=o[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?e[a]=ol(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?e[a]=nl(n,i):a==="id"&&n&&i?e.id=_n(n,i):e[a]=i!==void 0?i:n;}}return e}function L(...r){return r.length===1&&r[0]?r[0]:e=>{for(let t of r)typeof t=="function"?t(e):t!=null&&(t.current=e);}}var pg=new Set(["id"]),cg=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),dg=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),ug=/^(data-.*)$/;function Cn(r,e={}){let{labelable:t,isLink:o,propNames:a}=e,n={};for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&(pg.has(i)||t&&cg.has(i)||o&&dg.has(i)||a?.has(i)||ug.test(i))&&(n[i]=r[i]);return n}function Ro(r){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(t=>r.test(t.brand)))||r.test(window.navigator.userAgent)}function De(r){let e=null;return ()=>(e==null&&(e=r()),e)}var Pr=De(function(){return Ro(/Firefox/i)});function ee(r){let e=useRef(null);return useMemo(()=>({get current(){return e.current},set current(t){e.current=t,typeof r=="function"?r(t):r&&(r.current=t);}}),[r])}function hg(){return typeof window.ResizeObserver<"u"}function wn(r){let{ref:e,box:t,onResize:o}=r;useEffect(()=>{let a=e?.current;if(a)if(hg()){let n=new window.ResizeObserver(i=>{i.length&&o();});return n.observe(a,{box:t}),()=>{a&&n.unobserve(a);}}else return window.addEventListener("resize",o,!1),()=>{window.removeEventListener("resize",o,!1);}},[o,e,t]);}function Ke(r){return !!r&&"label"in r&&!!r.label}function To(r){return !!r&&"children"in r&&!!r.children&&"title"in r}function Cg(r){return To(r)?jsx(Section,{items:r.children,title:r.title,"aria-label":r.title,children:e=>jsx(Item,{textValue:e.label,children:e.label},e.id)},r.id):jsx(Item,{textValue:r.label,children:r.label},r.id)}function se(){return useCallback(r=>Cg(r),[])}function No(r,e,t){let{direction:o}=useLocale(),a=useDraggableCollectionState({...r,collection:e.collection,selectionManager:e.selectionManager,isDisabled:!r.enableReorder,getItems:r.getItems||(s=>[...s].map(l=>{let p=e.collection.getItem(l);return invariant(p,"Expected item to be defined."),{"text/plain":p.textValue}}))});useDraggableCollection(r,a,t);let n=useDroppableCollectionState({...r,collection:e.collection,selectionManager:e.selectionManager}),{collectionProps:i}=useDroppableCollection({...r,keyboardDelegate:new ListKeyboardDelegate({collection:e.collection,disabledKeys:e.disabledKeys,ref:t,orientation:r.orientation,layout:r.layout,direction:o}),dropTargetDelegate:new ListDropTargetDelegate(e.collection,t)},n,t);return {collectionProps:i,dragState:a,dropState:n}}function Ng(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var o=t.call(r,e||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(r)}function Eg(r){var e=Ng(r,"string");return typeof e=="symbol"?e:String(e)}function Lg(r,e,t){return e=Eg(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function dl(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,o);}return t}function ul(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?dl(Object(t),!0).forEach(function(o){Lg(r,o,t[o]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):dl(Object(t)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(t,o));});}return r}function ml(r,e){var t={};for(var o in r)t[o]=e(r[o],o);return t}var Mg=(r,e,t)=>{for(var o of Object.keys(r)){var a;if(r[o]!==((a=e[o])!==null&&a!==void 0?a:t[o]))return !1}return !0},C=r=>{var e=t=>{var o=r.defaultClassName,a=ul(ul({},r.defaultVariants),t);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:r.defaultVariants[n];if(s!=null){var l=s;typeof l=="boolean"&&(l=l===!0?"true":"false");var p=r.variantClassNames[n][l];p&&(o+=" "+p);}}for(var[c,d]of r.compoundVariants)Mg(c,a,r.defaultVariants)&&(o+=" "+d);return o};return e.variants=()=>Object.keys(r.variantClassNames),e.classNames={get base(){return r.defaultClassName.split(" ")[0]},get variants(){return ml(r.variantClassNames,t=>ml(t,o=>o.split(" ")[0]))}},e};var fl=C({defaultClassName:"_6n12k9b _1yep5z6lm _1yep5z6ll _1yep5z6i6 _1yep5z6l4",variantClassNames:{isDropTarget:{true:"_1yep5z613r"},orientation:{vertical:"_1yep5z617e",horizontal:"_1yep5z617f"}},defaultVariants:{},compoundVariants:[]}),yl="_6n12k98 _1yep5z6lk _1yep5z6im _1yep5z6in _1yep5z6io",bl=C({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),gl=C({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6l4 _1yep5z6l7 _1yep5z6lk _1yep5z6lj _1yep5z6lh _1yep5z6le",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z613r _1yep5z617k _1yep5z617i _1yep5z617l _1yep5z6144 _1yep5z6145 _1yep5z6146"},isHovered:{true:"_1yep5z611z",false:"_1yep5z611y"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),vl="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",hl="_6n12k90";var _l=C({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var V=ut.forwardRef(({className:r,style:e,variant:t="primary",orientation:o="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...l},p)=>{let{separatorProps:c}=useSeparator({...l,orientation:o,elementType:n});return jsx(n,{...c,className:classNames(_l({isVertical:o==="vertical",isSecondary:t==="secondary"}),"BaselineUI-Separator",r),"data-orientation":o,"data-block-id":i,"data-block-class":s,style:e,role:a?void 0:c.role,ref:p})});V.displayName="Separator";function Vg(r){return sprinkles.properties.has(r)}var E=ut.forwardRef(({elementType:r="div",children:e,...t},o)=>{let a=r,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},l={};for(let p in t)Vg(p)?s[p]=t[p]:l[p]=t[p];return {sprinkleProps:s,domProps:l}},[t]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:o,children:e})});E.displayName="Box";var kr=ut.forwardRef(({item:r,isDisabled:e,isFocusVisible:t,isSelected:o,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:l,isFocused:p,isPressed:c,_state:d},m)=>{invariant(r.value&&Ke(r.value),"Item cannot be a section");let{icon:u,label:b}=r.value,{hoverProps:y,isHovered:f}=useHover({isDisabled:e}),g=filterTruthyValues({"data-selected":o,"data-disabled":e,"data-focused":p,"data-hovered":f,"data-pressed":c,"data-focus-visible":t,"data-selection-mode":d.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,g),className:classNames(gl({isHovered:f,isFocused:t,isFirstChild:d.collection.getFirstKey()===r.key,isLastChild:d.collection.getLastKey()===r.key,isDisabled:e}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(E,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:o?jsx(CheckmarkIcon,{size:24}):null}):null,u?jsx(u,{size:24}):null,jsx("span",{...l,children:b})]}),i?jsx("span",{className:bl({isDisabled:e}),...s,children:i}):null]})});kr.displayName="DefaultRenderOption";var Lt=({dropState:r,orientation:e="vertical",dropIndicatorStyle:t,dropIndicatorClassName:o,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:l,orientation:p},c)=>s?null:jsx("li",{...l,ref:c,"data-drop-target":i,className:classNames(fl({isDropTarget:i,orientation:p}),"BaselineUI-DropIndicator",o),style:t}),...n})=>{let i=ut.useRef(null),{dropIndicatorProps:s,isHidden:l,isDropTarget:p}=useDropIndicator(n,r,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:l,isDropTarget:p,orientation:e},i)};function Ge(r,e,t){return typeof r=="function"?r(e,t):r}function Eo(r,e,t){return typeof r=="function"?r(e,t):r}function Lo(r,e){return typeof r=="function"?r(e):r}function In(r,e){return typeof r=="function"?r(e):r}var Pl=({item:r,children:e,state:t,dragState:o,...a})=>{let{dragProps:n}=useDraggableItem({key:r.key},o);return jsxs(Fragment,{children:[jsx(Lt,{target:{type:"item",key:r.key,dropPosition:"before"},...a}),e(n),t.collection.getKeyAfter(r.key)==null&&jsx(Lt,{target:{type:"item",key:r.key,dropPosition:"after"},...a})]})};Pl.displayName="DraggableListOption";var Sr=ut.forwardRef(({item:r,renderOption:e=(m,u,b)=>jsx(kr,{item:m,liProps:u.optionProps,...u,ref:b}),showSelectedIcon:t,state:o,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:l,optionStyle:p,optionClassName:c},d)=>{let m=ut.useRef(null),u=useOption({key:r.key},o,m),{value:b}=r;invariant(b&&Ke(b),"ListSection should not be passed to ListOption");let y={isFocusVisible:u.isFocusVisible,isSelected:u.isSelected,isFocused:u.isFocused,isDisabled:u.isDisabled,isPressed:u.isPressed},f={style:Eo(p,b,y),className:Ge(c,b,y)};return a&&n?jsx(Pl,{orientation:i,state:o,item:r,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:l,children:g=>e(r,{...u,showSelectedIcon:t,_state:o,optionProps:{...mergeProps(u.optionProps,g),...f}},L(m,d))}):e(r,{...u,showSelectedIcon:t,_state:o,optionProps:{...u.optionProps,...f}},L(m,d))});Sr.displayName="Option";var Il=({section:r,state:e,sectionClassName:t,sectionStyle:o,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let l=ut.useRef(null),{itemProps:p,groupProps:c,headingProps:d}=useListBoxSection({heading:a?n?.(r,l)||r.rendered:void 0,"aria-label":r["aria-label"]}),m=e.collection.getChildren?.(r.key);invariant(m,"children must be defined");let{value:u}=r;invariant(u&&To(u),"section must be a ListSection");let b=typeof o=="function"?o(u):o,y=typeof t=="function"?t(u):t;return jsxs(Fragment,{children:[r.key===e.collection.getFirstKey()?null:jsx(V,{UNSAFE_omitRole:!0}),jsxs("li",{...p,style:{...p.style,...b},className:classNames(hl,y,"BaselineUI-ListBox-Section"),children:[r.rendered&&a?n?.(r,l)||jsx(E,{...d,className:classNames("BaselineUI-ListBox-SectionHeader",vl),ref:l,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:r.rendered}):null,jsx("ul",{...c,children:[...m].map(f=>jsx(Sr,{item:f,state:e,...s},f.key))})]})]})};function Ao({type:r="listbox",handle:e},t,o){let a=useCallback(i=>r==="listbox"?o.current?.querySelector(`[data-key="${i}"][role="option"]`):o.current?.querySelector(`[data-key="${i}"][role="row"]`),[r,o]),n=useCallback((i,s)=>{let l=a(i);l&&l?.scrollIntoView({block:"nearest",inline:"nearest",...s});},[a]);useImperativeHandle(e,()=>({scrollIntoView:n,setFocusedKey:i=>{t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(i),n(i),a(i)?.focus();}}),[n,t.selectionManager,a]),useGranularEffect(()=>{let i=o.current?.getRootNode(),s=i&&zn(i),l=t.selectionManager.focusedKey;s&&l&&n(l);},[t.selectionManager.focusedKey],[n,o]);}var mt=ut.createContext(null),Rn=ut.forwardRef(({className:r,layout:e="stack",orientation:t="vertical",showSelectedIcon:o=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":l,renderDragPreview:p,onReorder:c,state:d,listBoxHandle:m,...u},b)=>{let y=ut.useRef(null),{direction:f}=useLocale(),g=ut.useRef(null),{listBoxProps:_}=useListBox({...u,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:d.collection,ref:g,layout:e,orientation:t,direction:f,disabledKeys:d.disabledKeys})},d,g);Ao({handle:m},d,g);let{collectionProps:v,dragState:h,dropState:x}=No({...u,onReorder:c,layout:e,orientation:t,enableReorder:i,preview:y},d,g),{isFocusVisible:w,isFocused:P,focusProps:z}=useFocusRing(),k=filterTruthyValues({"data-block-id":s,"data-block-class":l,"data-layout":e,"data-empty":d.collection.size===0,"data-focused":P,"data-focus-visible":w,"data-orientation":t});return jsxs("ul",{...mergeProps(_,z,k,v),className:classNames(yl,"BaselineUI-ListBox",r),style:a,ref:L(b,g),children:[[...d.collection].map(T=>{let R={key:T.key,state:d,dragState:h,dropState:x,renderOption:n,renderDropIndicator:u.renderDropIndicator,renderSectionHeader:u.renderSectionHeader,showSelectedIcon:o,orientation:t,dropIndicatorStyle:u.dropIndicatorStyle,dropIndicatorClassName:u.dropIndicatorClassName,optionStyle:u.optionStyle,optionClassName:u.optionClassName,sectionClassName:u.sectionClassName,sectionStyle:u.sectionStyle,showSectionHeader:u.showSectionHeader,withSectionHeaderPadding:u.withSectionHeaderPadding};return T.type==="section"?createElement(Il,{...R,key:T.key,section:T}):createElement(Sr,{...R,key:T.key,item:T})}),p?jsx(DragPreview,{ref:y,children:p}):null]})});Rn.displayName="ListBoxCore";var Nl=ut.forwardRef((r,e)=>{let t=se(),o=useListState({...r,children:t});return jsx(Rn,{...r,ref:e,state:o})});Nl.displayName="ListBoxStandalone";var de=ut.forwardRef((r,e)=>{let t=useContext(mt);return useEffect(()=>{if(!r.items&&!t)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[r.items,t]),t?jsx(Rn,{...r,ref:e,state:t}):jsx(Nl,{...r,ref:e})});de.displayName="ListBox";var Oo="uf19bsf _1yep5z6l4",El=C({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5 _1yep5z6lj _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6le",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6wi _1yep5z6wj _1yep5z6wk _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z6114"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6x0 _1yep5z6x1 _1yep5z6x2 _1yep5z6xo _1yep5z6xp _1yep5z6xq _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2",popover:"uf19bse _1yep5z6pl _1yep5z6pm _1yep5z6pn _1yep5z6n9 _1yep5z6na _1yep5z6nb _1yep5z6m0 _1yep5z6m1 _1yep5z6m2 _1yep5z6oc _1yep5z6od _1yep5z6oe _1yep5z6vl _1yep5z6vm _1yep5z6vn"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61nx"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61nx"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61n0"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mz _1yep5z61nx"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61n5"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61pr _1yep5z61tf _1yep5z61tj _1yep5z61tg"],[{variant:"ghost",isDisabled:!1},"_1yep5z61n4"],[{variant:"popover",size:"lg"},"_1yep5z61ic _1yep5z61id _1yep5z61ie _1yep5z61j0 _1yep5z61j1 _1yep5z61j2 _1yep5z61jo _1yep5z61jp _1yep5z61jq _1yep5z61kc _1yep5z61kd _1yep5z61ke"]]});var Ir=ut.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ae=({children:r,...e})=>{let t=ut.useRef(null),o=useOverlayTriggerState(e),a=useOverlayTrigger(e,o),n=useMemo(()=>({state:o,overlayTriggerAria:a,triggerRef:t}),[o,a]);return jsx(Ir.Provider,{value:n,children:r})};var Ml=C({defaultClassName:"_1gzftth2",variantClassNames:{placement:{bottom:"_1gzftth3",top:"_1gzftth4",right:"_1gzftth5",left:"_1gzftth6"}},defaultVariants:{},compoundVariants:[]}),Dl=C({defaultClassName:"_1gzftth7",variantClassNames:{placement:{bottom:"_1gzftth8",top:"_1gzftth9",right:"_1gzfttha",left:"_1gzftthb"}},defaultVariants:{},compoundVariants:[]}),Al="_1gzftth1 _1yep5z6im _1yep5z6in _1yep5z6io",Bl="_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jy _1yep5z6jz _1yep5z6k0 _1yep5z6d7",Ol="_1gzftthd",Fl="_1gzftthc",jl="var(--_1gzftth0)";function j2(r){return r.closest(".BaselineUI-Portal")||r.closest(".BaselineUI-Popover-Content")}function Hl(r){return typeof r=="object"&&typeof r.left=="number"&&typeof r.top=="number"&&(typeof r.width=="number"||r.width===void 0)&&(typeof r.height=="number"||r.height===void 0)}var Fo=ut.createContext({isSelected:!1,ref:void 0}),Be=({children:r,anchorRect:e})=>{let{state:t,overlayTriggerAria:o,triggerRef:a}=useContext(Ir);invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=o,i=useMemo(()=>({...n,isSelected:t.isOpen,ref:a}),[n,t.isOpen,a]);return invariant(!e&&r||e&&!r,"Either one of anchorRect or children has to be provided."),invariant(!e||Hl(e),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(Fo.Provider,{value:i,children:e?jsx("div",{className:classNames(Ol,"BaselineUI-PopoverTrigger-Hidden"),style:e,ref:a,tabIndex:-1},JSON.stringify(e)):r})};var jo=({label:r,tooltip:e})=>({tooltipProps:useMemo(()=>{let o={size:"sm",variant:"inverse",text:r,includeArrow:!1,placement:"bottom start",offset:4};if(typeof e=="object")return {...o,...e};if(e)return o},[r,e])});function Ho({tooltip:r,"aria-label":e,"aria-labelledby":t},o){let[a,n]=useState(e||"");useEffect(()=>{if(t){let l=fe(o.current).querySelector(`#${t}`);l&&n(l.textContent||"");}else e&&n(e);},[t,o,e]);let{tooltipProps:i}=jo({label:a,tooltip:r});return {tooltipProps:i}}var Vo=r=>{let e=ut.useRef(null),{ref:t,...o}=useContext(Fo)||{},{buttonProps:a,isPressed:n}=useButton({...r,...o},e),{isFocusVisible:i,isFocused:s,focusProps:l}=useFocusRing(),{hoverProps:p,isHovered:c}=useHover({isDisabled:r.isDisabled});return {buttonProps:Et(a,l,p),isPressed:n,ref:L(e,t||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:r.isDisabled,isFocusVisible:i}}},$o=(r,e)=>{let t=ut.useRef(null),{ref:o,...a}=useContext(Fo)||{},{buttonProps:n,isPressed:i}=useToggleButton({...r,...a},e,t);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:l,focusProps:p}=useFocusRing(),{hoverProps:c,isHovered:d}=useHover({isDisabled:r.isDisabled});return {buttonProps:Et(n,p,c),isPressed:i,ref:L(t,o||null),isFocusVisible:s,isFocused:l,isHovered:d,uiStateOptions:{isHovered:d,isFocused:l,isPressed:i,isDisabled:r.isDisabled,isFocusVisible:s,isSelected:e.isSelected}}};var Uo=C({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6dy _1yep5z6l4",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9"},isDisabled:{true:"oom8bsa"},isFocusVisible:{true:"oom8bsb"},isHovered:{true:"oom8bsc"},size:{sm:"oom8bsd",md:"oom8bse",lg:"oom8bsf"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsg"],[{variant:"secondary",isHovered:!0},"oom8bsh"],[{variant:"tertiary",isHovered:!0},"oom8bsi"],[{variant:"popover",isHovered:!0},"oom8bsj"],[{variant:"ghost",isHovered:!0},"oom8bsk"],[{variant:"success",isHovered:!0},"oom8bsl"],[{variant:"warning",isHovered:!0},"oom8bsm"],[{variant:"error",isHovered:!0},"oom8bsn"],[{variant:"primary",isFocusVisible:!0},"oom8bso"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsp"],[{variant:"success",isFocusVisible:!0},"oom8bsq"],[{variant:"warning",isFocusVisible:!0},"oom8bsr"],[{variant:"error",isFocusVisible:!0},"oom8bss"]]}),Nn=C({defaultClassName:"oom8bst _1yep5z6l4",variantClassNames:{isDisabled:{true:"oom8bsu"},isFocusVisible:{true:"oom8bsv"},isHovered:{true:"_1yep5z610z"},variant:{primary:"_1yep5z6116",secondary:"_1yep5z6112",tertiary:"_1yep5z6117",ghost:"_1yep5z6117",popover:"_1yep5z6112",toolbar:"_1yep5z6112",success:"_1yep5z6115",warning:"_1yep5z6115",error:"_1yep5z6115"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:!0},"_1yep5z61n3"],[{variant:"ghost",isHovered:!0},"_1yep5z61n5"],[{variant:"tertiary",isFocusVisible:!0},"_1yep5z61n3"],[{variant:"secondary",isDisabled:!0},"_1yep5z61n1"],[{variant:"tertiary",isDisabled:!0},"_1yep5z61n1"],[{variant:"ghost",isDisabled:!0},"_1yep5z61n1"],[{variant:"popover",isDisabled:!0},"_1yep5z61n1"],[{variant:"toolbar",isDisabled:!0},"_1yep5z61n1"]]});var Vv={sm:16,md:20,lg:24},G=ut.forwardRef(({label:r,style:e,className:t,iconStart:o,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:l="sm","data-block-id":p,"data-block-class":c,...d},m)=>{let{buttonProps:u,isPressed:b,ref:y,isFocusVisible:f,isFocused:g,isHovered:_,uiStateOptions:v}=Vo({...d,elementType:i,isDisabled:s}),h=Vv[l],x=filterTruthyValues({"data-block-id":p,"data-block-class":c,"data-disabled":s,"data-focused":g,"data-focus-visible":f,"data-hovered":_,"data-pressed":b});return jsxs(i,{...mergeProps(u,x),className:classNames(Uo({isDisabled:!!s,isFocusVisible:f,isHovered:_,variant:n,size:l}),"BaselineUI-ActionButton",typeof t=="function"?t(v):t),style:typeof e=="function"?e(v):e,ref:L(m,y),children:[!!o&&jsx(o,{size:h,className:Nn({variant:n,isDisabled:s,isFocusVisible:f,isHovered:_})}),r,!!a&&jsx(a,{size:h,className:Nn({variant:n,isDisabled:s,isFocusVisible:f,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:Oo})]})});G.displayName="ActionButton";var Gl=ut.forwardRef(({className:r,style:e,node:t,"data-block-id":o,"data-block-class":a,...n},i)=>{let s=ut.useRef(null);ut.useEffect(()=>{let c=s.current;return c?.append(t),()=>{c?.contains(t)&&t.remove();}},[t]);let{pressProps:l,isPressed:p}=usePress(n);return jsx("div",{...l,className:r,style:e,"data-block-id":o,"data-block-class":a,"data-pressed":p,"data-testid":"dom-node-renderer",ref:L(i,s)})});Gl.displayName="DomNodeRenderer";var Wl="_14uvjig0 z9nup81",Xl="_14uvjig7",Yl="_14uvjig3",Zl=C({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),Jl=C({defaultClassName:"_14uvjigf _14uvjig1",variantClassNames:{active:{true:"_14uvjigg _14uvjig2"},isDisabled:{true:"_14uvjigh"},isReadOnly:{true:"_14uvjigi"},isFocusVisible:{true:"_14uvjigj _14uvjig2"},isHovered:{true:"_14uvjigk _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),Ql="_14uvjige _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",ep="_14uvjig8",tp=C({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var Dt=C({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),qo=C({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),At=C({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),We="nrh1eh3",Xe=C({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Ye=C({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),Bt=C({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function Te({description:r,errorMessageProps:e,descriptionProps:t,warningMessage:o,errorMessage:a,labelPosition:n,isDisabled:i}){return r?jsx("div",{...t,className:Dt({isDisabled:i,labelPosition:n}),children:r}):a?jsx("div",{...e,className:Dt({hasError:!0,labelPosition:n}),children:a}):o?jsx("div",{className:Dt({isDisabled:i,labelPosition:n}),children:o}):null}var rp=C({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),op="_1lnwne0";var ap=C({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),np=C({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});function Ko({placement:r}){let e=useMemo(()=>{switch(r){case"top":return {x:0,y:-4};case"bottom":return {x:0,y:4};case"left":return {x:-4,y:0};case"right":return {x:4,y:0};default:return {x:0,y:4}}},[r]);return {transitionProps:{initial:{opacity:0,transform:`translate3d(${e.x}px, ${e.y}px, 0) scale(0.98)`},animate:{opacity:1,transform:"translate3d(0, 0, 0) scale(1)"},transition:{ease:"easeOut"}}}}var Dn=ut.forwardRef(({children:r,state:e,overlayProps:t,arrowProps:o,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:l},p)=>{let{tooltipProps:c}=useTooltip({isOpen:e.isOpen},e),d=a==="center"?"bottom":a,{transitionProps:m}=Ko({placement:a});return jsxs(motion.span,{...mergeProps(t,m),ref:p,"data-placement":d,children:[l?jsx("div",{className:ap({placement:d,variant:n}),...o}):null,jsx("div",{...mergeProps(c,s),className:np({variant:n,size:i}),children:r})]})});Dn.displayName="TooltipContent";var An=ut.createContext(void 0),Go=({portalContainer:r,children:e})=>jsx(An.Provider,{value:r,children:e});Go.displayName="PortalContainerProvider";var Wo="var(--lz9qs1)",lp="var(--lz9qs0)";function cp({ref:r,onIntersect:e,isDisabled:t,threshold:o,rootMargin:a,root:n}){let i=ut.useRef(null);useEffect(()=>{if(t){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{e(s);},{root:n?.current,rootMargin:a,threshold:o});},[e,t,n,a,o]),useEffect(()=>{let{current:s}=i;return r.current&&s?.observe(r.current),()=>s?.disconnect()},[r]);}function dp({ref:r,onResize:e,isDisabled:t}){let o=ut.useRef(null),[a,n]=ut.useState();return ut.useEffect(()=>{if(t){o.current?.disconnect(),o.current=null;return}o.current=new ResizeObserver(([i])=>{n(i.contentRect),e?.(i);});},[e,t,n]),ut.useEffect(()=>{let{current:i}=o;return r.current&&i?.observe(r.current),()=>i?.disconnect()},[r]),{size:a}}function Ot({src:r,alt:e}){let[t,o]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),l=()=>{o(!0),s(!1);},p=()=>{n(!0),s(!1);};return useEffect(()=>{if(!r)return;s(!0);let c=new Image;return c.src=r,c.addEventListener("load",l),c.addEventListener("error",p),()=>{c.removeEventListener("load",l),c.removeEventListener("error",p);}},[r]),{isLoaded:t,hasError:a,isLoading:i,imgProps:{src:t?r:void 0,alt:e}}}function Yo(){let r=useRef(!0);return useEffect(()=>{r.current=!1;},[]),r.current}var up="SET_STATE",Zo="UNDO",Jo="REDO",ih=(r,e)=>{let{past:t,present:o,future:a}=r;switch(e.type){case up:return {past:[...t,o],present:e.data,future:[]};case Zo:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[o,...a]};case Jo:return {past:[...t,o],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},mp=(r={},{isDisabled:e,onAction:t})=>{let o=Yo(),[a,n]=useReducer(ih,{past:[],present:r,future:[]}),{past:i,present:s,future:l}=a,p=y=>{n({type:up,data:y});},c=useRef(),d=()=>{c.current=Zo,n({type:Zo});},m=()=>{c.current=Jo,n({type:Jo});},u=!!i?.length,b=!!l?.length;return useGranularEffect(()=>{(c.current===Zo||c.current===Jo)&&(t?.(s,c.current),c.current=void 0);},[s],[t,o]),{state:s,push:e?()=>{}:p,undo:e?()=>{}:d,redo:e?()=>{}:m,pastStates:i,futureStates:l,canUndo:u,canRedo:b}};var On=ut.createContext({messages:{},shouldLogMissingMessages:!0,hasMissingErrorLoggedFor:{current:new Set},setLang:()=>{}}),bp=({children:r,messages:e={},shouldLogMissingMessages:t=!0,...o})=>{let a=useRef(new Set),[n,i]=useState(o.locale||"");useEffect(()=>{a.current.clear();},[n,o.locale]);let s=ut.useMemo(()=>({messages:e,shouldLogMissingMessages:t,hasMissingErrorLoggedFor:a,setLang:i}),[e,t,i]);return jsx(I18nProvider,{...o,children:jsx(On.Provider,{value:s,children:r})})};bp.displayName="I18nProvider";function A(r){let{messages:e,shouldLogMissingMessages:t,hasMissingErrorLoggedFor:o,setLang:a}=useContext(On);useEffect(()=>{!r&&uh(e)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[r,e]);let n=useMemo(()=>r?cleanKeyFromGlobImport(r):e,[r,e]),i=useMessageFormatter(n),s=useLocale();useEffect(()=>{a(s.locale);},[s.locale,a]);let l=useCallback(c=>{t&&!o.current.has(c)&&(console.log(`BUI \u{1F30D}: Translation not found for key: \`${c}\` for locale: \`${s.locale}\`. The default message, i.e. \`${c}\`, will be used instead.`),o.current.add(c));},[o,s.locale,t]),p=useCallback((c,d)=>{if(typeof c=="object")try{return i(c.id,d)}catch{return l(c.id),c.defaultMessage||c.id}else try{return i(c,d)}catch{return l(c),c}},[i,l]);return useMemo(()=>({formatMessage:p,locale:s}),[p,s])}var K=r=>r;function $D(r,e,t){let o=ut.useRef(null);return ut.useEffect(()=>{if(r)return o.current=new MutationObserver(t),o.current.observe(r,e),()=>{o.current&&o.current.disconnect();}},[r,e,t]),o.current}function zp(r,e){let[t,o]=useState(()=>{try{let n=window.localStorage.getItem(r);return n?JSON.parse(n):e}catch(n){return console.log(n),e}});return [t,n=>{try{let i=n instanceof Function?n(t):n;o(i),window.localStorage.setItem(r,JSON.stringify(i));}catch(i){console.log(i);}}]}function YD({ref:r,onSelectionChange:e,onSelectionEnd:t,isDisabled:o}){let a=ut.useRef(null);usePress({ref:r,isDisabled:o,onPressEnd(){let i=ae(r.current).getSelection();i&&r.current?.contains(i.anchorNode)&&t?.(i);},onPressStart(){let n=ae(r.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=r.current;if(!n||o)return;function i(){let p=ae(n).getSelection();p&&r.current?.contains(p.anchorNode)&&e(p);}let s=fe(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[r,e,o]);}function Ze(r){let e=useCallback(()=>{let a=ae(r??typeof window>"u"?void 0:document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[r]),[t,o]=ut.useState(e);return Se(()=>{let a=ae(r),n=()=>{o(e());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[r,e]),t}var kh=typeof window<"u";function Fn(){return kh?document.body:null}var ft=ut.createContext({container:null,portalContainer:null,shouldContainOverlays:!1,isContainerPositioned:!1}),Sh=({children:r,container:e=Fn(),portalContainer:t,shouldContainOverlays:o="auto"})=>{let a=Ze(),n=useMemo(()=>e===Fn()||o==="never"?!1:o==="always"?!0:a!=="mobile",[o,a,e]),[i,s]=useState(!1),l=Yo();useEffect(()=>{if(!e||l)return;let d=ae(e).getComputedStyle(e),m=!!d.position&&d.position!=="static";s(m);let u=e.getBoundingClientRect();(u.width===0||u.height===0)&&console.error("FrameProvider: container does not have a width or height. Please ensure that the container is visible and has a width and height.");function b({width:f,height:g}){e&&setElementVars(e,{[lp]:f,[Wo]:g});}let y=new ResizeObserver(f=>{for(let g of f)b({width:`${g.contentRect.width}px`,height:`${g.contentRect.height}px`});});return n&&(b({width:`${u.width}px`,height:`${u.height}px`}),y.observe(e)),e.dataset.shouldContainOverlays=n.toString(),()=>{y.disconnect(),b({width:"",height:""}),e.dataset.shouldContainOverlays="";}},[e,l,n]);let p=useMemo(()=>({container:e,portalContainer:t||e||Fn(),shouldContainOverlays:n,isContainerPositioned:i}),[e,t,n,i]);return jsx(ft.Provider,{value:p,children:jsx(Go,{portalContainer:p.portalContainer||void 0,children:r})})};function ye(r){let e=useContext(An),{portalContainer:t}=useContext(ft);return r||e||t||void 0}var kp=C({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var Sp="z9nup80",Ft="z9nup83",Ip="z9nup87";function jn(r=typeof window>"u"?void 0:window){let[e,t]=useState("light"),[o,a]=useState(!1),[n,i]=useState(!1),[s,l]=useState(!1);return useEffect(()=>{if(!r)return;let p=r.matchMedia("(prefers-color-scheme: dark)"),c=d=>{t(d.matches?"dark":"light");};return p.matches&&t("dark"),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[r]),useEffect(()=>{if(!r)return;let p=r.matchMedia("(prefers-contrast: more)"),c=d=>{a(d.matches);};return a(p.matches),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[r]),useEffect(()=>{if(!r)return;let p=r.matchMedia("(prefers-reduced-motion: reduce)"),c=d=>{i(d.matches);};return p.matches&&i(!0),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[r]),useEffect(()=>{if(!r)return;let p=r.matchMedia("(prefers-reduced-transparency: reduce)"),c=d=>{l(d.matches);};return p.matches&&l(!0),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[r]),{colorScheme:e,highContrast:o,reducedMotion:n,transparency:s}}var ta=createContext({theme:lightTheme,setTheme:()=>{}});var Rp="var(--hj25q10)";var ra={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},oa=ut.forwardRef(({theme:r="system",children:e,setTheme:t,className:o,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s,reducedMotion:l="user"},p)=>{let{direction:c}=useLocale(),{colorScheme:d,reducedMotion:m,highContrast:u,transparency:b}=jn(),{name:y,theme:f}=useMemo(()=>{switch(r){case"system":return d==="light"?ra.LIGHT:ra.DARK;case"light":return ra.LIGHT;case"dark":return ra.DARK;default:return {name:"custom",theme:r}}},[d,r]),g=Ze(),_={"data-theme":y,"data-block-id":i,"data-block-class":s,"data-reduced-motion":l==="user"?m:l==="always","data-high-contrast":u,"data-transparency":b,"data-device":g},v=useMemo(()=>({theme:f,setTheme:t}),[f,t]);return jsx(ta.Provider,{value:v,children:jsx(MotionConfig,{reducedMotion:l,children:jsx("div",{...mergeProps(n,_),className:classNames(Sp,"BaselineUI-ThemeProvider",o),style:{...assignInlineVars(themeVars,f),...assignInlineVars({[Rp]:c==="rtl"?"-1":"1"}),...a},ref:p,children:e})})})});oa.displayName="ThemeProvider";var xe=ut.forwardRef(({className:r,style:e,children:t,"data-block-id":o,"data-block-class":a,portalContainer:n,...i},s)=>{let{theme:l}=useContext(ta),p=ye();return jsx(Overlay,{...i,portalContainer:n??p,children:jsx(oa,{ref:s,theme:l,style:e,className:classNames("BaselineUI-Portal",r),"data-block-id":o,"data-block-class":a,children:t})})});xe.displayName="Portal";var ne=ut.forwardRef(({children:r,placement:e="bottom",delay:t=1e3,closeDelay:o=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:l,style:p,"data-block-id":c,"data-block-class":d,...m},u)=>{let b=ut.useRef(null),y=ut.useRef(null),f=!m.text||m.isDisabled,g=useTooltipTriggerState({...m,delay:t,closeDelay:o,isDisabled:f}),{triggerProps:_,tooltipProps:v}=useTooltipTrigger({...m,isDisabled:f,delay:t,closeDelay:o},g,b),h=ye(s),{overlayProps:x,arrowProps:w,placement:P,updatePosition:z}=useOverlayPosition({arrowSize:i?13:0,targetRef:b,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:y,placement:e,isOpen:g.isOpen,...m});return cp({ref:y,threshold:1,onIntersect:z,isDisabled:!g.isOpen}),dp({ref:b,onResize:z,isDisabled:!g.isOpen}),jsxs(FocusableProvider,{..._,ref:b,children:[r,g.isOpen?jsx(xe,{disableFocusManagement:!0,portalContainer:h,className:l,style:p,"data-block-id":c,"data-block-class":d,children:jsx(Dn,{ref:L(u,y),state:g,arrowProps:w,overlayProps:x,placement:P,tooltipProps:v,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});ne.displayName="Tooltip";var aa=ut.forwardRef(({elementType:r,children:e,...t},o)=>{let a=ee(o),{focusableProps:n}=useFocusable(t,a);return jsx(r??"div",{ref:a,...n,children:e})});aa.displayName="Focusable";var t_={xxs:8,xs:12,sm:16,md:20,lg:24},D=ut.forwardRef((r,e)=>{let t=ee(e),{tooltipProps:o}=Ho(r,t);return o?jsx(ne,{...o,children:jsx($n,{...r,ref:t})}):jsx($n,{...r,ref:t})});D.displayName="ActionIconButton";var $n=ut.forwardRef(({className:r,style:e,icon:t,size:o="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},l)=>{let p=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!p&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[p,c]);let{buttonProps:d,isPressed:m,ref:u,isFocusVisible:b,isFocused:y,isHovered:f,uiStateOptions:g}=Vo({...s,elementType:i}),_=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":y,"data-focus-visible":b,"data-disabled":s.isDisabled,"data-hovered":f,"data-pressed":m});return jsxs(i,{...mergeProps(d,_),className:classNames(El({variant:a,size:o,isDisabled:!!s.isDisabled,isFocusVisible:b,isHovered:f}),"BaselineUI-ActionIconButton",typeof r=="function"?r(g):r),ref:L(l,u),style:typeof e=="function"?e(g):e,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(t,{role:"presentation",size:t_[o]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:Oo})]})});$n.displayName="ActionIconButtonCore";var Oe=ut.forwardRef(({className:r,style:e,labelPosition:t="top",variant:o="primary",showStepper:a=!0,...n},i)=>{let s=ut.useRef(null),{locale:l}=useLocale(),p=useNumberFieldState({...n,locale:l}),{hoverProps:c,isHovered:d}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:u,isFocused:b}=useFocusRing(),{labelProps:y,decrementButtonProps:f,inputProps:g,incrementButtonProps:_,groupProps:v,descriptionProps:h,errorMessageProps:x}=useNumberField(n,p,s),w=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorCircleFilledIcon:null,[n.isInvalid,n.isReadOnly]),P=Te({description:n.description,errorMessageProps:x,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:t,isDisabled:n.isDisabled}),z=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":d,"data-focused":b,"data-focus-visible":u,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:e,className:classNames(Ye({labelPosition:t}),"BaselineUI-NumberInput",r),...z,ref:i,children:[n.label?jsxs("div",{className:Xe({labelPosition:t,hasMessage:!!P}),children:[jsx("label",{...y,className:We,children:n.label}),t==="start"&&P]}):null,jsxs("div",{className:classNames({[Ft]:n.isDisabled}),children:[jsxs("div",{...mergeProps(v,c),className:classNames(Bt({isHovered:d,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:b,variant:o}),{[op]:t==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(g,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",qo({isDisabled:n.isDisabled,labelPosition:t}))}),w?jsx(w,{className:At({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:rp({isHoveredOrFocused:d||b,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(D,{variant:"secondary",size:"xxs",icon:MinusIcon,...f,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(V,{style:{height:16},orientation:"vertical"}),jsx(D,{variant:"secondary",size:"xxs",icon:PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),t==="top"&&P]})]})});Oe.displayName="NumberInput";var Vt=ut.forwardRef(({className:r,style:e,onChange:t,onChangeEnd:o,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:l,value:p,"aria-label":c,"aria-labelledby":d,"aria-details":m,"aria-describedby":u,"data-block-id":b,"data-block-class":y,defaultValue:f,isReadOnly:g,label:_,id:v,includeNumberInput:h},x)=>{let w=ut.useRef(null),P={onChange:t===void 0?void 0:I=>{t(I[0]);},isDisabled:n||g,step:i,minValue:s,maxValue:l,onChangeEnd:o===void 0?void 0:I=>{o(I[0]);},value:p===void 0?void 0:[p],defaultValue:f===void 0?void 0:[f],"aria-label":c,"aria-labelledby":d,"aria-details":m,"aria-describedby":u,id:v,label:_},z=useNumberFormatter(a),k=useSliderState({...P,numberFormatter:z}),{trackProps:T,groupProps:R,labelProps:N}=useSlider(P,k,w),S=jsx(Oe,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":N.id,value:k.getThumbValue(0),formatOptions:a,onChange:I=>{k.setThumbValue(0,I);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...R,style:e,"data-block-id":b,"data-block-class":y,className:classNames(Wl,"BaselineUI-Slider",r),children:[_?jsxs("div",{className:Yl,children:[jsx("label",{...N,className:classNames(Zl({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?S:null]}):null,jsxs("div",{className:Xl,children:[jsx("div",{...T,className:classNames(ep,"BaselineUI-Slider-Track"),ref:L(w,x),"data-testid":"track",children:jsx(C_,{state:k,trackRef:w,isDisabled:n,isReadOnly:g})}),h&&!_?S:null]})]})});Vt.displayName="Slider";function C_({state:r,trackRef:e,isDisabled:t,isReadOnly:o}){let a=ut.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:e,inputRef:a},r),{focusProps:l,isFocused:p,isFocusVisible:c}=useFocusRing(),{hoverProps:d,isHovered:m}=useHover({isDisabled:t}),u=filterTruthyValues({"data-disabled":t,"data-readonly":o,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":p});return jsxs(Fragment,{children:[jsx("div",{className:classNames(tp({isDisabled:t,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...mergeProps(n,d,u),className:classNames(Ql,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:classNames(Jl({isDisabled:t,isFocusVisible:c,active:s,isReadOnly:o,isHovered:m}),"BaselineUI-Slider-Thumb")}),jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,l)})})]})]})}var Op=C({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610r",title:"_1yep5z610r",label:"_1yep5z610s",value:"_1yep5z610s",helper:"_1yep5z610t",body:"_1yep5z610r"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61l7"],[{type:"title",size:"md"},"_1yep5z61la"],[{type:"title",size:"lg"},"_1yep5z61ld"],[{type:"body",size:"sm"},"_1yep5z61lx"],[{type:"body",size:"md"},"_1yep5z61m0"],[{type:"body",size:"lg"},"_1yep5z61m0"],[{type:"subtitle",size:"sm"},"_1yep5z61lt"],[{type:"subtitle",size:"md"},"_1yep5z61lw"],[{type:"subtitle",size:"lg"},"_1yep5z61lw"],[{type:"label",size:"md"},"_1yep5z61lv"],[{type:"label",size:"lg"},"_1yep5z61lv"],[{type:"value",size:"md"},"_1yep5z61lv"],[{type:"value",size:"lg"},"_1yep5z61lv"],[{type:"helper",size:"sm"},"_1yep5z61lp"]]});var Q=ut.forwardRef(({elementType:r="span",type:e="title",children:t,size:o="md",...a},n)=>jsx(r,{...a,className:classNames(Op({size:o,type:e}),"BaselineUI-Text",a.className),ref:n,children:t}));Q.displayName="Text";var Fp=C({defaultClassName:"siobe20 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6lv _1yep5z6lt _1yep5z6h4 _1yep5z6lk _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0",variantClassNames:{background:{subtle:"_1yep5z611y",medium:"_1yep5z611z"},isFocusVisible:{true:"_1yep5z617i _1yep5z617k _1yep5z617l _1yep5z613r"}},defaultVariants:{},compoundVariants:[]}),jp="siobe24";var ia=ut.forwardRef(({className:r,style:e,children:t,background:o="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:l,contentStyle:p,contentClassName:c,...d},m)=>{let{formatMessage:u}=A(),b=ut.useRef(null),{dialogProps:y,titleProps:f}=useDialog(d,b),{focusProps:g,isFocusVisible:_}=useFocusRing();return jsxs("div",{...mergeProps(y,g),className:classNames(Fp({background:o,isFocusVisible:_}),"BaselineUI-Drawer",r),"data-block-id":i,"data-block-class":s,style:e,ref:L(m,b),children:[jsxs(E,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:jp,children:[jsx(Q,{type:"title",size:"sm",...f,className:Ip,children:a}),jsxs(E,{children:[n?jsx(D,{...n,variant:"secondary"}):null,jsx(D,{variant:"secondary",size:"md",icon:XIcon,onPress:l,"aria-label":u(N_.close)})]})]}),jsx(V,{variant:o==="subtle"?"primary":"secondary"}),jsx(E,{display:"flex",flexDirection:"column",flex:1,style:{overflow:"auto",...p},className:classNames(c,"BaselineUI-Drawer-Content"),children:t})]})});ia.displayName="Drawer";var N_=K({close:{id:"close",defaultMessage:"Close"}});var $p="aml2vl8 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6id _1yep5z6ie _1yep5z6if",Up="_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",qp=C({defaultClassName:"aml2vl3 _1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6im _1yep5z6in _1yep5z6io",variantClassNames:{enableDrawer:{false:"_1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",true:"aml2vl5"},shouldContainOverlays:{true:"aml2vl6",false:"aml2vl7"}},defaultVariants:{},compoundVariants:[]}),Kp=C({defaultClassName:"aml2vl0 _1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6gb",variantClassNames:{shouldContainOverlays:{true:"aml2vl1",false:"aml2vl2"}},defaultVariants:{},compoundVariants:[]});var yt=ut.createContext({state:null,triggerProps:{},overlayProps:{}}),Ne=({children:r,...e})=>{let t=useOverlayTriggerState(e),{triggerProps:o,overlayProps:a}=useOverlayTrigger({type:"dialog"},t),n=useMemo(()=>({state:t,triggerProps:o,overlayProps:a}),[t,o,a]);return jsx(yt.Provider,{value:n,children:r})};Ne.displayName="Modal";var Gp={},Wp=r=>{var{fileScope:e,css:t}=r,o=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,a=Gp[o];if(!a){var n=document.createElement("style");e.packageName&&n.setAttribute("data-package",e.packageName),n.setAttribute("data-file",e.filePath),n.setAttribute("type","text/css"),a=Gp[o]=n,document.head.appendChild(n);}a.innerHTML=t;};function Xp(r){var e=r.match(/^var\((.*)\)$/);return e?e[1]:r}var ri=fn(Gn());var Zp=class{constructor(r){let{failure:e,gotoFn:t,output:o}=this._buildTables(r);this.gotoFn=t,this.output=o,this.failure=e;}_buildTables(r){let e={0:{}},t={},o=0;for(let i of r){let s=0;for(let l of i)e[s]&&l in e[s]?s=e[s][l]:(o++,e[s][l]=o,e[o]={},s=o,t[o]=[]);t[s].push(i);}let a={},n=[];for(let i in e[0]){let s=e[0][i];a[s]=0,n.push(s);}for(;n.length>0;){let i=n.shift();if(i!==void 0)for(let s in e[i]){let l=e[i][s];n.push(l);let p=a[i];for(;p>0&&!(s in e[p]);)p=a[p];if(s in e[p]){let c=e[p][s];a[l]=c,t[l]=[...t[l],...t[c]];}else a[l]=0;}}return {gotoFn:e,output:t,failure:a}}search(r){let e=0,t=[];for(let o=0;o<r.length;o++){let a=r[o];for(;e>0&&!(a in this.gotoFn[e]);)e=this.failure[e];if(a in this.gotoFn[e]&&(e=this.gotoFn[e][a],this.output[e].length>0)){let n=this.output[e];t.push([o,n]);}}return t}match(r){let e=0;for(let t=0;t<r.length;t++){let o=r[t];for(;e>0&&!(o in this.gotoFn[e]);)e=this.failure[e];if(o in this.gotoFn[e]&&(e=this.gotoFn[e][o],this.output[e].length>0))return !0}return !1}};var $_={appendCss:()=>{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>process.env.NODE_ENV==="production"?"short":"debug"},sa=[$_],U_=()=>{if(sa.length<1)throw new Error("No adapter configured");return sa[sa.length-1]},Jp=!1,Qp=r=>{Jp||q_(r);},q_=r=>{if(!r)throw new Error('No adapter provided when calling "setAdapter"');Jp=!0,sa.push(r);};var Wn=function(){return U_().markCompositionUsed(...arguments)};function la(r,e){return e||(e=r.slice(0)),Object.freeze(Object.defineProperties(r,{raw:{value:Object.freeze(e)}}))}var J;(function(r){r.Attribute="attribute",r.Pseudo="pseudo",r.PseudoElement="pseudo-element",r.Tag="tag",r.Universal="universal",r.Adjacent="adjacent",r.Child="child",r.Descendant="descendant",r.Parent="parent",r.Sibling="sibling",r.ColumnCombinator="column-combinator";})(J||(J={}));var _e;(function(r){r.Any="any",r.Element="element",r.End="end",r.Equals="equals",r.Exists="exists",r.Hyphen="hyphen",r.Not="not",r.Start="start";})(_e||(_e={}));var ec=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,K_=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,G_=new Map([[126,_e.Element],[94,_e.Start],[36,_e.End],[42,_e.Any],[33,_e.Not],[124,_e.Hyphen]]),W_=new Set(["has","not","matches","is","where","host","host-context"]);function rc(r){switch(r.type){case J.Adjacent:case J.Child:case J.Descendant:case J.Parent:case J.Sibling:case J.ColumnCombinator:return !0;default:return !1}}var X_=new Set(["contains","icontains"]);function Y_(r,e,t){let o=parseInt(e,16)-65536;return o!==o||t?e:o<0?String.fromCharCode(o+65536):String.fromCharCode(o>>10|55296,o&1023|56320)}function Lr(r){return r.replace(K_,Y_)}function Xn(r){return r===39||r===34}function tc(r){return r===32||r===9||r===10||r===12||r===13}function Yn(r){let e=[],t=oc(e,`${r}`,0);if(t<r.length)throw new Error(`Unmatched selector: ${r.slice(t)}`);return e}function oc(r,e,t){let o=[];function a(m){let u=e.slice(t+m).match(ec);if(!u)throw new Error(`Expected name, found ${e.slice(t)}`);let[b]=u;return t+=m+b.length,Lr(b)}function n(m){for(t+=m;t<e.length&&tc(e.charCodeAt(t));)t++;}function i(){t+=1;let m=t,u=1;for(;u>0&&t<e.length;t++)e.charCodeAt(t)===40&&!s(t)?u++:e.charCodeAt(t)===41&&!s(t)&&u--;if(u)throw new Error("Parenthesis not matched");return Lr(e.slice(m,t-1))}function s(m){let u=0;for(;e.charCodeAt(--m)===92;)u++;return (u&1)===1}function l(){if(o.length>0&&rc(o[o.length-1]))throw new Error("Did not expect successive traversals.")}function p(m){if(o.length>0&&o[o.length-1].type===J.Descendant){o[o.length-1].type=m;return}l(),o.push({type:m});}function c(m,u){o.push({type:J.Attribute,name:m,action:u,value:a(1),namespace:null,ignoreCase:"quirks"});}function d(){if(o.length&&o[o.length-1].type===J.Descendant&&o.pop(),o.length===0)throw new Error("Empty sub-selector");r.push(o);}if(n(0),e.length===t)return t;e:for(;t<e.length;){let m=e.charCodeAt(t);switch(m){case 32:case 9:case 10:case 12:case 13:{(o.length===0||o[0].type!==J.Descendant)&&(l(),o.push({type:J.Descendant})),n(1);break}case 62:{p(J.Child),n(1);break}case 60:{p(J.Parent),n(1);break}case 126:{p(J.Sibling),n(1);break}case 43:{p(J.Adjacent),n(1);break}case 46:{c("class",_e.Element);break}case 35:{c("id",_e.Equals);break}case 91:{n(1);let u,b=null;e.charCodeAt(t)===124?u=a(1):e.startsWith("*|",t)?(b="*",u=a(2)):(u=a(0),e.charCodeAt(t)===124&&e.charCodeAt(t+1)!==61&&(b=u,u=a(1))),n(0);let y=_e.Exists,f=G_.get(e.charCodeAt(t));if(f){if(y=f,e.charCodeAt(t+1)!==61)throw new Error("Expected `=`");n(2);}else e.charCodeAt(t)===61&&(y=_e.Equals,n(1));let g="",_=null;if(y!=="exists"){if(Xn(e.charCodeAt(t))){let x=e.charCodeAt(t),w=t+1;for(;w<e.length&&(e.charCodeAt(w)!==x||s(w));)w+=1;if(e.charCodeAt(w)!==x)throw new Error("Attribute value didn't end");g=Lr(e.slice(t+1,w)),t=w+1;}else {let x=t;for(;t<e.length&&(!tc(e.charCodeAt(t))&&e.charCodeAt(t)!==93||s(t));)t+=1;g=Lr(e.slice(x,t));}n(0);let h=e.charCodeAt(t)|32;h===115?(_=!1,n(1)):h===105&&(_=!0,n(1));}if(e.charCodeAt(t)!==93)throw new Error("Attribute selector didn't terminate");t+=1;let v={type:J.Attribute,name:u,action:y,value:g,namespace:b,ignoreCase:_};o.push(v);break}case 58:{if(e.charCodeAt(t+1)===58){o.push({type:J.PseudoElement,name:a(2).toLowerCase(),data:e.charCodeAt(t)===40?i():null});continue}let u=a(1).toLowerCase(),b=null;if(e.charCodeAt(t)===40)if(W_.has(u)){if(Xn(e.charCodeAt(t+1)))throw new Error(`Pseudo-selector ${u} cannot be quoted`);if(b=[],t=oc(b,e,t+1),e.charCodeAt(t)!==41)throw new Error(`Missing closing parenthesis in :${u} (${e})`);t+=1;}else {if(b=i(),X_.has(u)){let y=b.charCodeAt(0);y===b.charCodeAt(b.length-1)&&Xn(y)&&(b=b.slice(1,-1));}b=Lr(b);}o.push({type:J.Pseudo,name:u,data:b});break}case 44:{d(),o=[],n(1);break}default:{if(e.startsWith("/*",t)){let y=e.indexOf("*/",t+2);if(y<0)throw new Error("Comment was not terminated");t=y+2,o.length===0&&n(0);break}let u=null,b;if(m===42)t+=1,b="*";else if(m===124){if(b="",e.charCodeAt(t+1)===124){p(J.ColumnCombinator),n(2);break}}else if(ec.test(e.slice(t)))b=a(0);else break e;e.charCodeAt(t)===124&&e.charCodeAt(t+1)!==124&&(u=b,e.charCodeAt(t+1)===42?(b="*",t+=2):b=a(1)),o.push(b==="*"?{type:J.Universal,namespace:u}:{type:J.Tag,name:b,namespace:u});}}}return d(),t}function ac(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,o);}return t}function nc(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ac(Object(t),!0).forEach(function(o){Z_(r,o,t[o]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ac(Object(t)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(t,o));});}return r}function Z_(r,e,t){return e=J_(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function J_(r){var e=Q_(r,"string");return typeof e=="symbol"?e:String(e)}function Q_(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var o=t.call(r,e||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(r)}var e6=ic({}),pa=e6;function ic(r){return e.withOptions=t=>ic(nc(nc({},r),t)),e;function e(t,...o){let a=typeof t=="string"?[t]:t.raw,{escapeSpecialCharacters:n=Array.isArray(t)}=r,i="";for(let p=0;p<a.length;p++){let c=a[p];n&&(c=c.replace(/\\\n[ \t]*/g,"").replace(/\\`/g,"`").replace(/\\\$/g,"$").replace(/\\\{/g,"{")),i+=c,p<o.length&&(i+=o[p]);}let s=i.split(`
11
+ `),l=null;for(let p of s){let c=p.match(/^(\s+)\S+/);if(c){let d=c[1].length;l?l=Math.min(l,d):l=d;}}if(l!==null){let p=l;i=s.map(c=>c[0]===" "||c[0]===" "?c.slice(p):c).join(`
12
+ `);}return i=i.trim(),n&&(i=i.replace(/\\n/g,`
13
+ `)),i}}var da=function(){return da=Object.assign||function(e){for(var t,o=1,a=arguments.length;o<a;o++){t=arguments[o];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);}return e},da.apply(this,arguments)};function Jn(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]]);return t}function t6(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],o=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return {next:function(){return r&&o>=r.length&&(r=void 0),{value:r&&r[o++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ie(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var o=t.call(r),a,n=[],i;try{for(;(e===void 0||e-- >0)&&!(a=o.next()).done;)n.push(a.value);}catch(s){i={error:s};}finally{try{a&&!a.done&&(t=o.return)&&t.call(o);}finally{if(i)throw i.error}}return n}var r6=/(\u000D|\u000C|\u000D\u000A)/g,o6=/[\u0000\uD800-\uDFFF]/g,a6=/(\/\*)[\s\S]*?(\*\/)/g,n6=function(e,t){t===void 0&&(t=0),e=e.replace(r6,`
14
+ `).replace(o6,"\uFFFD"),e=e.replace(a6,"");for(var o=[];t<e.length;t+=1){var a=e.charCodeAt(t);if(a===9||a===32||a===10){for(var n=e.charCodeAt(++t);n===9||n===32||n===10;)n=e.charCodeAt(++t);t-=1,o.push({type:"<whitespace-token>"});}else if(a===34){var i=sc(e,t);if(i===null)return null;var s=ie(i,2),l=s[0],p=s[1];o.push({type:"<string-token>",value:p}),t=l;}else if(a===35){if(t+1<e.length){var c=e.charCodeAt(t+1);if(c===95||c>=65&&c<=90||c>=97&&c<=122||c>=128||c>=48&&c<=57||c===92&&t+2<e.length&&e.charCodeAt(t+2)!==10){var d=pc(e,t+1)?"id":"unrestricted",i=s6(e,t+1);if(i!==null){var m=ie(i,2),l=m[0],p=m[1];o.push({type:"<hash-token>",value:p.toLowerCase(),flag:d}),t=l;continue}}}o.push({type:"<delim-token>",value:a});}else if(a===39){var i=sc(e,t);if(i===null)return null;var u=ie(i,2),l=u[0],p=u[1];o.push({type:"<string-token>",value:p}),t=l;}else if(a===40)o.push({type:"<(-token>"});else if(a===41)o.push({type:"<)-token>"});else if(a===43){var b=ca(e,t);if(b===null)o.push({type:"<delim-token>",value:a});else {var y=ie(b,2),l=y[0],f=y[1];f[0]==="<dimension-token>"?o.push({type:"<dimension-token>",value:f[1],unit:f[2].toLowerCase(),flag:"number"}):f[0]==="<number-token>"?o.push({type:f[0],value:f[1],flag:f[2]}):o.push({type:f[0],value:f[1],flag:"number"}),t=l;}}else if(a===44)o.push({type:"<comma-token>"});else if(a===45){var g=ca(e,t);if(g!==null){var _=ie(g,2),l=_[0],f=_[1];f[0]==="<dimension-token>"?o.push({type:"<dimension-token>",value:f[1],unit:f[2].toLowerCase(),flag:"number"}):f[0]==="<number-token>"?o.push({type:f[0],value:f[1],flag:f[2]}):o.push({type:f[0],value:f[1],flag:"number"}),t=l;continue}if(t+2<e.length){var c=e.charCodeAt(t+1),v=e.charCodeAt(t+2);if(c===45&&v===62){o.push({type:"<CDC-token>"}),t+=2;continue}}var i=lc(e,t);if(i!==null){var h=ie(i,3),l=h[0],p=h[1],x=h[2];o.push({type:x,value:p}),t=l;continue}o.push({type:"<delim-token>",value:a});}else if(a===46){var g=ca(e,t);if(g===null)o.push({type:"<delim-token>",value:a});else {var w=ie(g,2),l=w[0],f=w[1];f[0]==="<dimension-token>"?o.push({type:"<dimension-token>",value:f[1],unit:f[2].toLowerCase(),flag:"number"}):f[0]==="<number-token>"?o.push({type:f[0],value:f[1],flag:f[2]}):o.push({type:f[0],value:f[1],flag:"number"}),t=l;continue}}else if(a===58)o.push({type:"<colon-token>"});else if(a===59)o.push({type:"<semicolon-token>"});else if(a===60){if(t+3<e.length){var c=e.charCodeAt(t+1),v=e.charCodeAt(t+2),P=e.charCodeAt(t+3);if(c===33&&v===45&&P===45){o.push({type:"<CDO-token>"}),t+=3;continue}}o.push({type:"<delim-token>",value:a});}else if(a===64){var i=Qn(e,t+1);if(i!==null){var z=ie(i,2),l=z[0],p=z[1];o.push({type:"<at-keyword-token>",value:p.toLowerCase()}),t=l;continue}o.push({type:"<delim-token>",value:a});}else if(a===91)o.push({type:"<[-token>"});else if(a===92){var i=Mr(e,t);if(i===null)return null;var k=ie(i,2),l=k[0],p=k[1];e=e.slice(0,t)+p+e.slice(l+1),t-=1;}else if(a===93)o.push({type:"<]-token>"});else if(a===123)o.push({type:"<{-token>"});else if(a===125)o.push({type:"<}-token>"});else if(a>=48&&a<=57){var i=ca(e,t),T=ie(i,2),l=T[0],f=T[1];f[0]==="<dimension-token>"?o.push({type:"<dimension-token>",value:f[1],unit:f[2].toLowerCase(),flag:"number"}):f[0]==="<number-token>"?o.push({type:f[0],value:f[1],flag:f[2]}):o.push({type:f[0],value:f[1],flag:"number"}),t=l;}else if(a===95||a>=65&&a<=90||a>=97&&a<=122||a>=128){var i=lc(e,t);if(i===null)return null;var R=ie(i,3),l=R[0],p=R[1],x=R[2];o.push({type:x,value:p}),t=l;}else o.push({type:"<delim-token>",value:a});}return o.push({type:"<EOF-token>"}),o},sc=function(e,t){if(e.length<=t+1)return null;for(var o=e.charCodeAt(t),a=[],n=t+1;n<e.length;n+=1){var i=e.charCodeAt(n);if(i===o)return [n,String.fromCharCode.apply(null,a)];if(i===92){var s=Mr(e,n);if(s===null)return null;var l=ie(s,2),p=l[0],c=l[1];a.push(c),n=p;}else {if(i===10)return null;a.push(i);}}return null},pc=function(e,t){if(e.length<=t)return !1;var o=e.charCodeAt(t);if(o===45){if(e.length<=t+1)return !1;var a=e.charCodeAt(t+1);if(a===45||a===95||a>=65&&a<=90||a>=97&&a<=122||a>=128)return !0;if(a===92){if(e.length<=t+2)return !1;var n=e.charCodeAt(t+2);return n!==10}else return !1}else {if(o===95||o>=65&&o<=90||o>=97&&o<=122||o>=128)return !0;if(o===92){if(e.length<=t+1)return !1;var a=e.charCodeAt(t+1);return a!==10}else return !1}},Mr=function(e,t){if(e.length<=t+1||e.charCodeAt(t)!==92)return null;var o=e.charCodeAt(t+1);if(o===10)return null;if(o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102){for(var a=[o],n=Math.min(t+7,e.length),i=t+2;i<n;i+=1){var s=e.charCodeAt(i);if(s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102)a.push(s);else break}if(i<e.length){var l=e.charCodeAt(i);(l===9||l===32||l===10)&&(i+=1);}return [i-1,parseInt(String.fromCharCode.apply(null,a),16)]}else return [t+1,o]},ca=function(e,t){var o=i6(e,t);if(o===null)return null;var a=ie(o,3),n=a[0],i=a[1],s=a[2],l=Qn(e,n+1);if(l!==null){var p=ie(l,2),c=p[0],d=p[1];return [c,["<dimension-token>",i,d]]}return n+1<e.length&&e.charCodeAt(n+1)===37?[n+1,["<percentage-token>",i]]:[n,["<number-token>",i,s]]},i6=function(e,t){if(e.length<=t)return null;var o="integer",a=[],n=e.charCodeAt(t);for((n===43||n===45)&&(t+=1,n===45&&a.push(45));t<e.length;){var i=e.charCodeAt(t);if(i>=48&&i<=57)a.push(i),t+=1;else break}if(t+1<e.length){var s=e.charCodeAt(t),l=e.charCodeAt(t+1);if(s===46&&l>=48&&l<=57)for(a.push(s,l),o="number",t+=2;t<e.length;){var i=e.charCodeAt(t);if(i>=48&&i<=57)a.push(i),t+=1;else break}}if(t+1<e.length){var s=e.charCodeAt(t),l=e.charCodeAt(t+1),p=e.charCodeAt(t+2);if(s===69||s===101){var c=l>=48&&l<=57;if(c||(l===43||l===45)&&p>=48&&p<=57)for(o="number",c?(a.push(69,l),t+=2):l===45?(a.push(69,45,p),t+=3):(a.push(69,p),t+=3);t<e.length;){var i=e.charCodeAt(t);if(i>=48&&i<=57)a.push(i),t+=1;else break}}}var d=String.fromCharCode.apply(null,a),m=o==="number"?parseFloat(d):parseInt(d);return m===-0&&(m=0),Number.isNaN(m)?null:[t-1,m,o]},s6=function(e,t){if(e.length<=t)return null;for(var o=[],a=e.charCodeAt(t);t<e.length;a=e.charCodeAt(++t)){if(a===45||a===95||a>=65&&a<=90||a>=97&&a<=122||a>=128||a>=48&&a<=57){o.push(a);continue}else {var n=Mr(e,t);if(n!==null){var i=ie(n,2),s=i[0],l=i[1];o.push(l),t=s;continue}}break}return t===0?null:[t-1,String.fromCharCode.apply(null,o)]},Qn=function(e,t){if(e.length<=t||!pc(e,t))return null;for(var o=[],a=e.charCodeAt(t);t<e.length;a=e.charCodeAt(++t)){if(a===45||a===95||a>=65&&a<=90||a>=97&&a<=122||a>=128||a>=48&&a<=57){o.push(a);continue}else {var n=Mr(e,t);if(n!==null){var i=ie(n,2),s=i[0],l=i[1];o.push(l),t=s;continue}}break}return [t-1,String.fromCharCode.apply(null,o)]},l6=function(e,t){for(var o=e.charCodeAt(t);o===9||o===32||o===10;)o=e.charCodeAt(++t);for(var a=[],n=!1;t<e.length;){if(o===41)return [t,String.fromCharCode.apply(null,a)];if(o===34||o===39||o===40)return null;if(o===9||o===32||o===10)!n&&a.length!==0&&(n=!0);else if(o===92){var i=Mr(e,t);if(i===null||n)return null;var s=ie(i,2),l=s[0],p=s[1];a.push(p),t=l;}else {if(n)return null;a.push(o);}o=e.charCodeAt(++t);}return null},lc=function(e,t){var o=Qn(e,t);if(o===null)return null;var a=ie(o,2),n=a[0],i=a[1];if(i.toLowerCase()==="url"){if(e.length>n+1){var s=e.charCodeAt(n+1);if(s===40){for(var l=2;n+l<e.length;l+=1){var p=e.charCodeAt(n+l);if(p===34||p===39)return [n+1,i.toLowerCase(),"<function-token>"];if(p!==9&&p!==32&&p!==10){var c=l6(e,n+l);if(c===null)return null;var d=ie(c,2),m=d[0],u=d[1];return [m,u,"<url-token>"]}}return [n+1,i.toLowerCase(),"<function-token>"]}}}else if(e.length>n+1){var s=e.charCodeAt(n+1);if(s===40)return [n+1,i.toLowerCase(),"<function-token>"]}return [n,i.toLowerCase(),"<ident-token>"]},p6=function(e){for(var t=e.length-1;t>=0;t--)e[t]=c6(e[t]);return e},c6=function(e){if(e.mediaCondition===null)return e;var t=d6(e.mediaCondition);return t.operator===null&&t.children.length===1&&"children"in t.children[0]&&(t=t.children[0]),{mediaPrefix:e.mediaPrefix,mediaType:e.mediaType,mediaCondition:t}},d6=function r(e){for(var t=e.children.length-1;t>=0;t--){var o=e.children[t];if(!("context"in o)){var a=r(o);if(a.operator===null&&a.children.length===1)e.children[t]=a.children[0];else if(a.operator===e.operator&&(a.operator==="and"||a.operator==="or")){for(var n=[t,1],i=0;i<a.children.length;i++)n.push(a.children[i]);e.children.splice.apply(e.children,n);}}}return e},be=function(e,t){return t instanceof Error?new Error("".concat(t.message.trim(),`
15
+ `).concat(e.trim())):new Error(e.trim())},cc=function(e){return p6(u6(e))},u6=function(e){var t=n6(e.trim());if(t===null)throw be("Failed tokenizing");var o=0,a=t.length-1;if(t[0].type==="<at-keyword-token>"&&t[0].value==="media"){if(t[1].type!=="<whitespace-token>")throw be("Expected whitespace after media");o=2;for(var n=2;n<t.length-1;n++){var i=t[n];if(i.type==="<{-token>"){a=n;break}else if(i.type==="<semicolon-token>")throw be("Expected '{' in media query but found ';'")}}return t=t.slice(o,a),f6(t)},m6=function(e){for(var t=[],o=!1,a=0;a<e.length;a++)e[a].type==="<whitespace-token>"?(o=!0,t.length>0&&(t[t.length-1].wsAfter=!0)):(t.push(da(da({},e[a]),{wsBefore:o,wsAfter:!1})),o=!1);return t},f6=function(e){for(var t,o,a=[[]],n=0;n<e.length;n++){var i=e[n];i.type==="<comma-token>"?a.push([]):a[a.length-1].push(i);}var s=a.map(m6);if(s.length===1&&s[0].length===0)return [{mediaCondition:null,mediaPrefix:null,mediaType:"all"}];var l=s.map(function(u){return u.length===0?null:y6(u)}),p=[];try{for(var c=t6(l),d=c.next();!d.done;d=c.next()){var m=d.value;m!==null&&p.push(m);}}catch(u){t={error:u};}finally{try{d&&!d.done&&(o=c.return)&&o.call(c);}finally{if(t)throw t.error}}if(p.length===0)throw be("No valid media queries");return p},y6=function(e){var t=e[0];if(t.type==="<(-token>")try{return {mediaPrefix:null,mediaType:"all",mediaCondition:Zn(e,!0)}}catch(d){throw be("Expected media condition after '('",d)}else if(t.type==="<ident-token>"){var o=null,a=void 0,n=t.value;(n==="only"||n==="not")&&(o=n);var i=o===null?0:1;if(e.length<=i)throw be("Expected extra token in media query");var s=e[i];if(s.type==="<ident-token>"){var l=s.value;if(l==="all")a="all";else if(l==="print"||l==="screen")a=l;else if(l==="tty"||l==="tv"||l==="projection"||l==="handheld"||l==="braille"||l==="embossed"||l==="aural"||l==="speech")o=o==="not"?null:"not",a="all";else throw be("Unknown ident '".concat(l,"' in media query"))}else if(o==="not"&&s.type==="<(-token>"){var p=[{type:"<(-token>",wsBefore:!1,wsAfter:!1}];p.push.apply(p,e),p.push({type:"<)-token>",wsBefore:!1,wsAfter:!1});try{return {mediaPrefix:null,mediaType:"all",mediaCondition:Zn(p,!0)}}catch(d){throw be("Expected media condition after '('",d)}}else throw be("Invalid media query");if(i+1===e.length)return {mediaPrefix:o,mediaType:a,mediaCondition:null};if(i+4<e.length){var c=e[i+1];if(c.type==="<ident-token>"&&c.value==="and")try{return {mediaPrefix:o,mediaType:a,mediaCondition:Zn(e.slice(i+2),!1)}}catch(d){throw be("Expected media condition after 'and'",d)}else throw be("Expected 'and' after media prefix")}else throw be("Expected media condition after media prefix")}else throw be("Expected media condition or media prefix")},Zn=function r(e,t,o){if(o===void 0&&(o=null),e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media condition");for(var a=e.length-1,n=0,i=0,s=0;s<e.length;s++){var l=e[s];if(l.type==="<(-token>"?(i+=1,n=Math.max(n,i)):l.type==="<)-token>"&&(i-=1),i===0){a=s;break}}if(i!==0)throw new Error(`Mismatched parens
16
+ Invalid media condition`);var p,c=e.slice(0,a+1);if(n===1?p=b6(c):c[1].type==="<ident-token>"&&c[1].value==="not"?p=r(c.slice(2,-1),!0,"not"):p=r(c.slice(1,-1),!0),a===e.length-1)return {operator:o,children:[p]};var d=e[a+1];if(d.type!=="<ident-token>")throw new Error(`Invalid operator
17
+ Invalid media condition`);if(o!==null&&o!==d.value)throw new Error("'".concat(d.value,"' and '").concat(o,`' must not be at same level
18
+ Invalid media condition`));if(d.value==="or"&&!t)throw new Error(`Cannot use 'or' at top level of a media query
19
+ Invalid media condition`);if(d.value!=="and"&&d.value!=="or")throw new Error("Invalid operator: '".concat(d.value,`'
20
+ Invalid media condition`));var m=r(e.slice(a+2),t,d.value);return {operator:d.value,children:[p].concat(m.children)}},b6=function(e){if(e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media feature");for(var t=[e[0]],o=1;o<e.length;o++){if(o<e.length-2){var a=e[o],n=e[o+1],i=e[o+2];if(a.type==="<number-token>"&&a.value>0&&n.type==="<delim-token>"&&n.value===47&&i.type==="<number-token>"&&i.value>0){t.push({type:"<ratio-token>",numerator:a.value,denominator:i.value,wsBefore:a.wsBefore,wsAfter:i.wsAfter}),o+=2;continue}}t.push(e[o]);}var s=t[1];if(s.type==="<ident-token>"&&t.length===3)return {context:"boolean",feature:s.value};if(t.length===5&&t[1].type==="<ident-token>"&&t[2].type==="<colon-token>"){var l=t[3];if(l.type==="<number-token>"||l.type==="<dimension-token>"||l.type==="<ratio-token>"||l.type==="<ident-token>"){var p=t[1].value,c=null,d=p.slice(0,4);d==="min-"?(c="min",p=p.slice(4)):d==="max-"&&(c="max",p=p.slice(4)),l.wsBefore,l.wsAfter;var m=Jn(l,["wsBefore","wsAfter"]);return {context:"value",prefix:c,feature:p,value:m}}}else if(t.length>=5)try{var u=g6(t);return {context:"range",feature:u.featureName,range:u}}catch(b){throw be("Invalid media feature",b)}throw new Error("Invalid media feature")},g6=function(e){var t,o,a,n;if(e.length<5||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid range");var i={leftToken:null,leftOp:null,featureName:"",rightOp:null,rightToken:null},s=e[1].type==="<number-token>"||e[1].type==="<dimension-token>"||e[1].type==="<ratio-token>"||e[1].type==="<ident-token>"&&e[1].value==="infinite";if(e[2].type==="<delim-token>"){if(e[2].value===60)e[3].type==="<delim-token>"&&e[3].value===61&&!e[3].wsBefore?i[s?"leftOp":"rightOp"]="<=":i[s?"leftOp":"rightOp"]="<";else if(e[2].value===62)e[3].type==="<delim-token>"&&e[3].value===61&&!e[3].wsBefore?i[s?"leftOp":"rightOp"]=">=":i[s?"leftOp":"rightOp"]=">";else if(e[2].value===61)i[s?"leftOp":"rightOp"]="=";else throw new Error("Invalid range");if(s)i.leftToken=e[1];else if(e[1].type==="<ident-token>")i.featureName=e[1].value;else throw new Error("Invalid range");var l=2+((o=(t=i[s?"leftOp":"rightOp"])===null||t===void 0?void 0:t.length)!==null&&o!==void 0?o:0),p=e[l];if(s)if(p.type==="<ident-token>"){if(i.featureName=p.value,e.length>=7){var c=e[l+1],d=e[l+2];if(c.type==="<delim-token>"){var m=c.value;if(m===60)d.type==="<delim-token>"&&d.value===61&&!d.wsBefore?i.rightOp="<=":i.rightOp="<";else if(m===62)d.type==="<delim-token>"&&d.value===61&&!d.wsBefore?i.rightOp=">=":i.rightOp=">";else throw new Error("Invalid range");var u=e[l+1+((n=(a=i.rightOp)===null||a===void 0?void 0:a.length)!==null&&n!==void 0?n:0)];i.rightToken=u;}else throw new Error("Invalid range")}else if(l+2!==e.length)throw new Error("Invalid range")}else throw new Error("Invalid range");else i.rightToken=p;var b=null,y=i.leftToken,f=i.leftOp,g=i.featureName,_=i.rightOp,v=i.rightToken,h=null;if(y!==null){if(y.type==="<ident-token>"){var x=y.type,w=y.value;w==="infinite"&&(h={type:x,value:w});}else if(y.type==="<number-token>"||y.type==="<dimension-token>"||y.type==="<ratio-token>"){y.wsBefore,y.wsAfter;var P=Jn(y,["wsBefore","wsAfter"]);h=P;}}var z=null;if(v!==null){if(v.type==="<ident-token>"){var x=v.type,w=v.value;w==="infinite"&&(z={type:x,value:w});}else if(v.type==="<number-token>"||v.type==="<dimension-token>"||v.type==="<ratio-token>"){v.wsBefore,v.wsAfter;var k=Jn(v,["wsBefore","wsAfter"]);z=k;}}if(h!==null&&z!==null)if((f==="<"||f==="<=")&&(_==="<"||_==="<="))b={leftToken:h,leftOp:f,featureName:g,rightOp:_,rightToken:z};else if((f===">"||f===">=")&&(_===">"||_===">="))b={leftToken:h,leftOp:f,featureName:g,rightOp:_,rightToken:z};else throw new Error("Invalid range");else h===null&&f===null&&_!==null&&z!==null?b={leftToken:h,leftOp:f,featureName:g,rightOp:_,rightToken:z}:h!==null&&f!==null&&_===null&&z===null&&(b={leftToken:h,leftOp:f,featureName:g,rightOp:_,rightToken:z});return b}else throw new Error("Invalid range")};function v6(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var o=t.call(r,e||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(r)}function h6(r){var e=v6(r,"string");return typeof e=="symbol"?e:String(e)}function _6(r,e,t){return e=h6(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function dc(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,o);}return t}function qt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?dc(Object(t),!0).forEach(function(o){_6(r,o,t[o]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):dc(Object(t)).forEach(function(o){Object.defineProperty(r,o,Object.getOwnPropertyDescriptor(t,o));});}return r}function z6(r,e){if(r==null)return {};var t={},o=Object.keys(r),a,n;for(n=0;n<o.length;n++)a=o[n],!(e.indexOf(a)>=0)&&(t[a]=r[a]);return t}function ei(r,e){if(r==null)return {};var t=z6(r,e),o,a;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);for(a=0;a<n.length;a++)o=n[a],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(r,o)&&(t[o]=r[o]);}return t}function Dr(r,e){for(var t in r)e(r[t],t);}function $t(r,e){var t={};for(var o in r)e.indexOf(o)===-1&&(t[o]=r[o]);return t}function C6(r,e){var t={};for(var o in r)t[e(r[o],o)]=r[o];return t}var uc;function x6(r){return r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var P6=(r,e)=>{var t=()=>{var a=new RegExp(".".concat(x6((0, ri.default)(e,{isIdentifier:!0}))),"g");return r.replace(a,"&")},o;try{o=Yn(r);}catch{throw new Error("Invalid selector: ".concat(t()))}o.forEach(a=>{try{for(var n=a.length-1;n>=-1;n--){if(!a[n])throw new Error;var i=a[n];if(i.type==="child"||i.type==="parent"||i.type==="sibling"||i.type==="adjacent"||i.type==="descendant")throw new Error;if(i.type==="attribute"&&i.name==="class"&&i.value===e)return}}catch{throw new Error(pa(uc||(uc=la([`
21
+ Invalid selector: `,`
22
+
23
+ Style selectors must target the '&' character (along with any modifiers), e.g. `," or ",`.
24
+
25
+ This is to ensure that each style block only affects the styling of a single class.
26
+
27
+ If your selector is targeting another class, you should move it to the style definition for that class, e.g. given we have styles for 'parent' and 'child' elements, instead of adding a selector of `,") to 'parent', you should add ",` to 'child').
28
+
29
+ If your selector is targeting something global, use the 'globalStyle' function instead, e.g. if you wanted to write `,", you should instead write 'globalStyle(",`, { ... })'
30
+ `])),t(),"`${parent} &`","`${parent} &:hover`","`& ${child}`","`${parent} &`","`& h1`","`${parent} h1`"))}});},ua=class r{constructor(){this.ruleset=new Map,this.precedenceLookup=new Map;}findOrCreateCondition(e){var t=this.ruleset.get(e);return t||(t={query:e,rules:[],children:new r},this.ruleset.set(e,t)),t}getConditionalRulesetByPath(e){var t=this;for(var o of e){var a=t.findOrCreateCondition(o);t=a.children;}return t}addRule(e,t,o){var a=this.getConditionalRulesetByPath(o),n=a.findOrCreateCondition(t);if(!n)throw new Error("Failed to add conditional rule");n.rules.push(e);}addConditionPrecedence(e,t){for(var o=this.getConditionalRulesetByPath(e),a=0;a<t.length;a++){var n,i=t[a],s=(n=o.precedenceLookup.get(i))!==null&&n!==void 0?n:new Set;for(var l of t.slice(a+1))s.add(l);o.precedenceLookup.set(i,s);}}isCompatible(e){for(var[t,o]of this.precedenceLookup.entries())for(var a of o){var n;if((n=e.precedenceLookup.get(a))!==null&&n!==void 0&&n.has(t))return !1}for(var{query:i,children:s}of e.ruleset.values()){var l=this.ruleset.get(i);if(l&&!l.children.isCompatible(s))return !1}return !0}merge(e){for(var{query:t,rules:o,children:a}of e.ruleset.values()){var n=this.ruleset.get(t);n?(n.rules.push(...o),n.children.merge(a)):this.ruleset.set(t,{query:t,rules:o,children:a});}for(var[i,s]of e.precedenceLookup.entries()){var l,p=(l=this.precedenceLookup.get(i))!==null&&l!==void 0?l:new Set;this.precedenceLookup.set(i,new Set([...p,...s]));}}mergeIfCompatible(e){return this.isCompatible(e)?(this.merge(e),!0):!1}getSortedRuleset(){var e=this,t=[],o=function(s){var l=e.ruleset.get(a);if(!l)throw new Error("Can't find condition for ".concat(a));var p=t.findIndex(c=>s.has(c.query));p>-1?t.splice(p,0,l):t.push(l);};for(var[a,n]of this.precedenceLookup.entries())o(n);return t}renderToArray(){var e=[];for(var{query:t,rules:o,children:a}of this.getSortedRuleset()){var n={};for(var i of o)n[i.selector]=qt(qt({},n[i.selector]),i.rule);Object.assign(n,...a.renderToArray()),e.push({[t]:n});}return e}},yc={":-moz-any-link":!0,":-moz-full-screen":!0,":-moz-placeholder":!0,":-moz-read-only":!0,":-moz-read-write":!0,":-ms-fullscreen":!0,":-ms-input-placeholder":!0,":-webkit-any-link":!0,":-webkit-full-screen":!0,"::-moz-color-swatch":!0,"::-moz-list-bullet":!0,"::-moz-list-number":!0,"::-moz-page-sequence":!0,"::-moz-page":!0,"::-moz-placeholder":!0,"::-moz-progress-bar":!0,"::-moz-range-progress":!0,"::-moz-range-thumb":!0,"::-moz-range-track":!0,"::-moz-scrolled-page-sequence":!0,"::-moz-selection":!0,"::-ms-backdrop":!0,"::-ms-browse":!0,"::-ms-check":!0,"::-ms-clear":!0,"::-ms-fill-lower":!0,"::-ms-fill-upper":!0,"::-ms-fill":!0,"::-ms-reveal":!0,"::-ms-thumb":!0,"::-ms-ticks-after":!0,"::-ms-ticks-before":!0,"::-ms-tooltip":!0,"::-ms-track":!0,"::-ms-value":!0,"::-webkit-backdrop":!0,"::-webkit-calendar-picker-indicator":!0,"::-webkit-inner-spin-button":!0,"::-webkit-input-placeholder":!0,"::-webkit-meter-bar":!0,"::-webkit-meter-even-less-good-value":!0,"::-webkit-meter-inner-element":!0,"::-webkit-meter-optimum-value":!0,"::-webkit-meter-suboptimum-value":!0,"::-webkit-outer-spin-button":!0,"::-webkit-progress-bar":!0,"::-webkit-progress-inner-element":!0,"::-webkit-progress-inner-value":!0,"::-webkit-progress-value":!0,"::-webkit-resizer":!0,"::-webkit-scrollbar-button":!0,"::-webkit-scrollbar-corner":!0,"::-webkit-scrollbar-thumb":!0,"::-webkit-scrollbar-track-piece":!0,"::-webkit-scrollbar-track":!0,"::-webkit-scrollbar":!0,"::-webkit-search-cancel-button":!0,"::-webkit-search-results-button":!0,"::-webkit-slider-runnable-track":!0,"::-webkit-slider-thumb":!0,"::after":!0,"::backdrop":!0,"::before":!0,"::cue":!0,"::file-selector-button":!0,"::first-letter":!0,"::first-line":!0,"::grammar-error":!0,"::marker":!0,"::placeholder":!0,"::selection":!0,"::spelling-error":!0,"::target-text":!0,"::view-transition-group":!0,"::view-transition-image-pair":!0,"::view-transition-new":!0,"::view-transition-old":!0,"::view-transition":!0,":active":!0,":after":!0,":any-link":!0,":before":!0,":blank":!0,":checked":!0,":default":!0,":defined":!0,":disabled":!0,":empty":!0,":enabled":!0,":first-child":!0,":first-letter":!0,":first-line":!0,":first-of-type":!0,":first":!0,":focus-visible":!0,":focus-within":!0,":focus":!0,":fullscreen":!0,":hover":!0,":in-range":!0,":indeterminate":!0,":invalid":!0,":last-child":!0,":last-of-type":!0,":left":!0,":link":!0,":only-child":!0,":only-of-type":!0,":optional":!0,":out-of-range":!0,":placeholder-shown":!0,":read-only":!0,":read-write":!0,":required":!0,":right":!0,":root":!0,":scope":!0,":target":!0,":valid":!0,":visited":!0},w6=Object.keys(yc),k6=yc,mc,fc=(r,e)=>new Error(pa(mc||(mc=la([`
31
+ Invalid media query: "`,`"
32
+
33
+ `,`
55
34
 
56
- export { Zc as Accordion, nd as AccordionItem, G as ActionButton, wy as ActionGroup, hR as ActionGroupItem, E as ActionIconButton, Na as AlertDialog, Kf as AudioPlayer, Xt as Avatar, L as Box, cy as ButtonSelect, zc as Checkbox, Qt as ColorInput, et as ColorSwatch, Ly as ColorSwatchPicker, hy as ComboBox, Nc as DateFormat, me as Dialog, Ql as DialogTitle, Zs as DomNodeRenderer, Dr as Drawer, kf as Editor, $p as FileUpload, Lr as Focusable, Fu as FreehandCanvas, ky as GridList, mm as Group, vl as I18nProvider, Tu as IconColorInput, da as IconColorInputButton, ud as IconSelect, up as IconSlider, Zu as ImageDropZone, ny as ImageGallery, Bd as InlineAlert, Dp as Link, le as ListBox, Ef as Markdown, Vr as Menu, um as MessageFormat, Ie as Modal, Nh as ModalClose, De as ModalContent, ea as ModalTrigger, $t as NumberFormat, Me as NumberInput, Sc as Pagination, ew as Panel, sw as PanelGroup, dw as PanelResizeHandle, Ne as Popover, Re as PopoverContent, Le as PopoverTrigger, Ke as Portal, Pl as PortalContainerProvider, om as Preview, Qp as ProgressBar, Kt as ProgressSpinner, dm as RadioGroup, ic as Reaction, Tf as ScrollControlButton, Rp as SearchInput, Qe as Select, A as Separator, Ft as Slider, xp as Switch, Rd as TabItem, Id as Tabs, Ac as TagGroup, Q as Text, Xe as TextInput, Dt as ThemeProvider, Kr as ToggleButton, ge as ToggleIconButton, va as Toolbar, re as Tooltip, Gu as Transform, Ta as Transition, $y as TreeView, K as defineMessages, fN as isInsideOverlayContent, Ks as isRect, Nt as useDevice, F as useI18n, Tt as useImage, ul as useIntersectionObserver, St as useIsFirstRender, xl as useLocalStorage, lM as useMutationObserver, ve as usePortalContainer, ml as useResizeObserver, yM as useTextSelection, yl as useUndoRedo, sn as useUserPreferences };
35
+ Read more on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries
36
+ `])),r,e)),S6=r=>{if(r==="@media ")throw fc(r,"Query is empty");try{cc(r);}catch(e){throw fc(r,e.message)}},I6=["vars"],R6=["content"],bc="__DECLARATION",T6={animationIterationCount:!0,borderImage:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,initialLetter:!0,lineClamp:!0,lineHeight:!0,maxLines:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,WebkitLineClamp:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,maskBorder:!0,maskBorderOutset:!0,maskBorderSlice:!0,maskBorderWidth:!0,shapeImageThreshold:!0,stopOpacity:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function N6(r){return r.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function E6(r,e,t,o){var a=r.slice(0,e),n=r.slice(t);return "".concat(a).concat(o).concat(n)}var L6=" ",Ut=[...w6,"@layer","@media","@supports","@container","selectors"],ti=class{constructor(e,t){this.rules=[],this.conditionalRulesets=[new ua],this.fontFaceRules=[],this.keyframesRules=[],this.propertyRules=[],this.localClassNamesMap=new Map(e.map(o=>[o,o])),this.localClassNamesSearch=new Zp(e),this.layers=new Map,this.composedClassLists=t.map(o=>{var{identifier:a,classList:n}=o;return {identifier:a,regex:RegExp("(".concat(n,")"),"g")}}).reverse();}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="property"){this.propertyRules.push(e);return}if(e.type==="keyframes"){e.rule=Object.fromEntries(Object.entries(e.rule).map(n=>{var[i,s]=n;return [i,this.transformVars(this.transformProperties(s))]})),this.keyframesRules.push(e);return}if(this.currConditionalRuleset=new ua,e.type==="layer"){var t="@layer ".concat(e.name);this.addLayer([t]);}else {var o=$t(e.rule,Ut);this.addRule({selector:e.selector,rule:o}),this.transformLayer(e,e.rule["@layer"]),this.transformMedia(e,e.rule["@media"]),this.transformSupports(e,e.rule["@supports"]),this.transformContainer(e,e.rule["@container"]),this.transformSimplePseudos(e,e.rule),this.transformSelectors(e,e.rule);}var a=this.conditionalRulesets[this.conditionalRulesets.length-1];a.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset);}addConditionalRule(e,t){var o=this.transformVars(this.transformProperties(e.rule)),a=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var n=t[t.length-1],i=t.slice(0,t.length-1);this.currConditionalRuleset.addRule({selector:a,rule:o},n,i);}addRule(e){var t=this.transformVars(this.transformProperties(e.rule)),o=this.transformSelector(e.selector);this.rules.push({selector:o,rule:t});}addLayer(e){var t=e.join(" - ");this.layers.set(t,e);}transformProperties(e){return this.transformContent(this.pixelifyProperties(e))}pixelifyProperties(e){return Dr(e,(t,o)=>{typeof t=="number"&&t!==0&&!T6[o]&&(e[o]="".concat(t,"px"));}),e}transformVars(e){var{vars:t}=e,o=ei(e,I6);return t?qt(qt({},C6(t,(a,n)=>Xp(n))),o):o}transformContent(e){var{content:t}=e,o=ei(e,R6);if(typeof t>"u")return o;var a=Array.isArray(t)?t:[t];return qt({content:a.map(n=>n&&(n.includes('"')||n.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(n))?n:'"'.concat(n,'"'))},o)}transformClassname(e){return ".".concat((0, ri.default)(e,{isIdentifier:!0}))}transformSelector(e){var t=e,o=function(b){t=t.replace(n,()=>(Wn(b),b));};for(var{identifier:a,regex:n}of this.composedClassLists)o(a);if(this.localClassNamesMap.has(t))return this.transformClassname(t);for(var i=this.localClassNamesSearch.search(t),s=t.length,l=i.length-1;l>=0;l--){var[p,[c]]=i[l],d=p-c.length+1,m=s<=p;m||(s=d,t[d-1]!=="."&&(t=E6(t,d,p+1,this.transformClassname(c))));}return t}transformSelectors(e,t,o){Dr(t.selectors,(a,n)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var i=this.transformSelector(n.replace(RegExp("&","g"),e.selector));P6(i,e.selector);var s={selector:i,rule:$t(a,Ut)};o?this.addConditionalRule(s,o):this.addRule(s);var l={type:"selector",selector:i,rule:a};this.transformLayer(l,a["@layer"],o),this.transformSupports(l,a["@supports"],o),this.transformMedia(l,a["@media"],o),this.transformContainer(l,a["@container"],o);});}transformMedia(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t){var a;(a=this.currConditionalRuleset)===null||a===void 0||a.addConditionPrecedence(o,Object.keys(t).map(p=>"@media ".concat(p)));for(var[n,i]of Object.entries(t)){var s="@media ".concat(n);S6(s);var l=[...o,s];this.addConditionalRule({selector:e.selector,rule:$t(i,Ut)},l),e.type==="local"&&(this.transformSimplePseudos(e,i,l),this.transformSelectors(e,i,l)),this.transformLayer(e,i["@layer"],l),this.transformSupports(e,i["@supports"],l),this.transformContainer(e,i["@container"],l);}}}transformContainer(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t){var a;(a=this.currConditionalRuleset)===null||a===void 0||a.addConditionPrecedence(o,Object.keys(t).map(n=>"@container ".concat(n))),Dr(t,(n,i)=>{var s="@container ".concat(i),l=[...o,s];this.addConditionalRule({selector:e.selector,rule:$t(n,Ut)},l),e.type==="local"&&(this.transformSimplePseudos(e,n,l),this.transformSelectors(e,n,l)),this.transformLayer(e,n["@layer"],l),this.transformSupports(e,n["@supports"],l),this.transformMedia(e,n["@media"],l);});}}transformLayer(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t){var a;(a=this.currConditionalRuleset)===null||a===void 0||a.addConditionPrecedence(o,Object.keys(t).map(n=>"@layer ".concat(n))),Dr(t,(n,i)=>{var s=[...o,"@layer ".concat(i)];this.addLayer(s),this.addConditionalRule({selector:e.selector,rule:$t(n,Ut)},s),e.type==="local"&&(this.transformSimplePseudos(e,n,s),this.transformSelectors(e,n,s)),this.transformMedia(e,n["@media"],s),this.transformSupports(e,n["@supports"],s),this.transformContainer(e,n["@container"],s);});}}transformSupports(e,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t){var a;(a=this.currConditionalRuleset)===null||a===void 0||a.addConditionPrecedence(o,Object.keys(t).map(n=>"@supports ".concat(n))),Dr(t,(n,i)=>{var s=[...o,"@supports ".concat(i)];this.addConditionalRule({selector:e.selector,rule:$t(n,Ut)},s),e.type==="local"&&(this.transformSimplePseudos(e,n,s),this.transformSelectors(e,n,s)),this.transformLayer(e,n["@layer"],s),this.transformMedia(e,n["@media"],s),this.transformContainer(e,n["@container"],s);});}}transformSimplePseudos(e,t,o){for(var a of Object.keys(t))if(k6[a]){if(e.type!=="local")throw new Error("Simple pseudos are not valid in ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));o?this.addConditionalRule({selector:"".concat(e.selector).concat(a),rule:t[a]},o):this.addRule({conditions:o,selector:"".concat(e.selector).concat(a),rule:t[a]});}}toCss(){var e=[];for(var t of this.fontFaceRules)e.push(Qe({"@font-face":t}));for(var o of this.propertyRules)e.push(Qe({["@property ".concat(o.name)]:o.rule}));for(var a of this.keyframesRules)e.push(Qe({["@keyframes ".concat(a.name)]:a.rule}));for(var n of this.layers.values()){var[i,...s]=n.reverse(),l={[i]:bc};for(var p of s)l={[p]:l};e.push(Qe(l));}for(var c of this.rules)e.push(Qe({[c.selector]:c.rule}));for(var d of this.conditionalRulesets)for(var m of d.renderToArray())e.push(Qe(m));return e.filter(Boolean)}};function Qe(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t=[],o=function(i){var s=r[i];if(s&&Array.isArray(s))t.push(...s.map(p=>Qe({[i]:p},e)));else if(s&&typeof s=="object"){var l=Object.keys(s).length===0;l||t.push("".concat(e).concat(i,` {
37
+ `).concat(Qe(s,e+L6),`
38
+ `).concat(e,"}"));}else s===bc?t.push("".concat(e).concat(i,";")):t.push("".concat(e).concat(i.startsWith("--")?i:N6(i),": ").concat(s,";"));};for(var a of Object.keys(r))o(a);return t.join(`
39
+ `)}function gc(r){var{localClassNames:e,cssObjs:t,composedClassLists:o}=r,a=new ti(e,o);for(var n of t)a.processCssObj(n);return a.toCss()}var Kt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,hc=new Set,oi=typeof process=="object"&&process?process:{},_c=(r,e,t,o)=>{typeof oi.emitWarning=="function"?oi.emitWarning(r,e,t,o):console.error(`[${t}] ${e}: ${r}`);},ma=globalThis.AbortController,vc=globalThis.AbortSignal;if(typeof ma>"u"){vc=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(o,a){this._onabort.push(a);}},ma=class{constructor(){e();}signal=new vc;abort(o){if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(let a of this.signal._onabort)a(o);this.signal.onabort?.(o);}}};let r=oi.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{r&&(r=!1,_c("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e));};}var M6=r=>!hc.has(r),et=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),zc=r=>et(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?Gt:null:null,Gt=class extends Array{constructor(e){super(e),this.fill(0);}},ai=class r{heap;length;static#l=!1;static create(e){let t=zc(e);if(!t)return [];r.#l=!0;let o=new r(e,t);return r.#l=!1,o}constructor(e,t){if(!r.#l)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},fa=class r{#l;#d;#y;#b;#T;#N;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#g;#o;#r;#e;#p;#u;#s;#n;#v;#i;#h;#_;#m;#z;#k;#c;static unsafeExposeInternals(e){return {starts:e.#_,ttls:e.#m,sizes:e.#h,keyMap:e.#o,keyList:e.#r,valList:e.#e,next:e.#p,prev:e.#u,get head(){return e.#s},get tail(){return e.#n},free:e.#v,isBackgroundFetch:t=>e.#t(t),backgroundFetch:(t,o,a,n)=>e.#M(t,o,a,n),moveToTail:t=>e.#R(t),indexes:t=>e.#C(t),rindexes:t=>e.#x(t),isStale:t=>e.#f(t)}}get max(){return this.#l}get maxSize(){return this.#d}get calculatedSize(){return this.#g}get size(){return this.#a}get fetchMethod(){return this.#T}get memoMethod(){return this.#N}get dispose(){return this.#y}get disposeAfter(){return this.#b}constructor(e){let{max:t=0,ttl:o,ttlResolution:a=1,ttlAutopurge:n,updateAgeOnGet:i,updateAgeOnHas:s,allowStale:l,dispose:p,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:m,maxSize:u=0,maxEntrySize:b=0,sizeCalculation:y,fetchMethod:f,memoMethod:g,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:x,ignoreFetchAbort:w}=e;if(t!==0&&!et(t))throw new TypeError("max option must be a nonnegative integer");let P=t?zc(t):Array;if(!P)throw new Error("invalid max value: "+t);if(this.#l=t,this.#d=u,this.maxEntrySize=b||this.#d,this.sizeCalculation=y,this.sizeCalculation){if(!this.#d&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(g!==void 0&&typeof g!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#N=g,f!==void 0&&typeof f!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#T=f,this.#k=!!f,this.#o=new Map,this.#r=new Array(t).fill(void 0),this.#e=new Array(t).fill(void 0),this.#p=new P(t),this.#u=new P(t),this.#s=0,this.#n=0,this.#v=ai.create(t),this.#a=0,this.#g=0,typeof p=="function"&&(this.#y=p),typeof c=="function"?(this.#b=c,this.#i=[]):(this.#b=void 0,this.#i=void 0),this.#z=!!this.#y,this.#c=!!this.#b,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!_,this.allowStaleOnFetchRejection=!!h,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!w,this.maxEntrySize!==0){if(this.#d!==0&&!et(this.#d))throw new TypeError("maxSize must be a positive integer if specified");if(!et(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H();}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!i,this.updateAgeOnHas=!!s,this.ttlResolution=et(a)||a===0?a:1,this.ttlAutopurge=!!n,this.ttl=o||0,this.ttl){if(!et(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#D();}if(this.#l===0&&this.ttl===0&&this.#d===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#l&&!this.#d){let z="LRU_CACHE_UNBOUNDED";M6(z)&&(hc.add(z),_c("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",z,r));}}getRemainingTTL(e){return this.#o.has(e)?1/0:0}#D(){let e=new Gt(this.#l),t=new Gt(this.#l);this.#m=e,this.#_=t,this.#A=(n,i,s=Kt.now())=>{if(t[n]=i!==0?s:0,e[n]=i,i!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#f(n)&&this.#P(this.#r[n],"expire");},i+1);l.unref&&l.unref();}},this.#S=n=>{t[n]=e[n]!==0?Kt.now():0;},this.#w=(n,i)=>{if(e[i]){let s=e[i],l=t[i];if(!s||!l)return;n.ttl=s,n.start=l,n.now=o||a();let p=n.now-l;n.remainingTTL=s-p;}};let o=0,a=()=>{let n=Kt.now();if(this.ttlResolution>0){o=n;let i=setTimeout(()=>o=0,this.ttlResolution);i.unref&&i.unref();}return n};this.getRemainingTTL=n=>{let i=this.#o.get(n);if(i===void 0)return 0;let s=e[i],l=t[i];if(!s||!l)return 1/0;let p=(o||a())-l;return s-p},this.#f=n=>{let i=t[n],s=e[n];return !!s&&!!i&&(o||a())-i>s};}#S=()=>{};#w=()=>{};#A=()=>{};#f=()=>!1;#H(){let e=new Gt(this.#l);this.#g=0,this.#h=e,this.#I=t=>{this.#g-=e[t],e[t]=0;},this.#B=(t,o,a,n)=>{if(this.#t(o))return 0;if(!et(a))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(a=n(o,t),!et(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a},this.#E=(t,o,a)=>{if(e[t]=o,this.#d){let n=this.#d-e[t];for(;this.#g>n;)this.#L(!0);}this.#g+=e[t],a&&(a.entrySize=o,a.totalCalculatedSize=this.#g);};}#I=e=>{};#E=(e,t,o)=>{};#B=(e,t,o,a)=>{if(o||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#C({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#n;!(!this.#O(t)||((e||!this.#f(t))&&(yield t),t===this.#s));)t=this.#u[t];}*#x({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#s;!(!this.#O(t)||((e||!this.#f(t))&&(yield t),t===this.#n));)t=this.#p[t];}#O(e){return e!==void 0&&this.#o.get(this.#r[e])===e}*entries(){for(let e of this.#C())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*rentries(){for(let e of this.#x())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*keys(){for(let e of this.#C()){let t=this.#r[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t);}}*rkeys(){for(let e of this.#x()){let t=this.#r[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t);}}*values(){for(let e of this.#C())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}*rvalues(){for(let e of this.#x())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let o of this.#C()){let a=this.#e[o],n=this.#t(a)?a.__staleWhileFetching:a;if(n!==void 0&&e(n,this.#r[o],this))return this.get(this.#r[o],t)}}forEach(e,t=this){for(let o of this.#C()){let a=this.#e[o],n=this.#t(a)?a.__staleWhileFetching:a;n!==void 0&&e.call(t,n,this.#r[o],this);}}rforEach(e,t=this){for(let o of this.#x()){let a=this.#e[o],n=this.#t(a)?a.__staleWhileFetching:a;n!==void 0&&e.call(t,n,this.#r[o],this);}}purgeStale(){let e=!1;for(let t of this.#x({allowStale:!0}))this.#f(t)&&(this.#P(this.#r[t],"expire"),e=!0);return e}info(e){let t=this.#o.get(e);if(t===void 0)return;let o=this.#e[t],a=this.#t(o)?o.__staleWhileFetching:o;if(a===void 0)return;let n={value:a};if(this.#m&&this.#_){let i=this.#m[t],s=this.#_[t];if(i&&s){let l=i-(Kt.now()-s);n.ttl=l,n.start=Date.now();}}return this.#h&&(n.size=this.#h[t]),n}dump(){let e=[];for(let t of this.#C({allowStale:!0})){let o=this.#r[t],a=this.#e[t],n=this.#t(a)?a.__staleWhileFetching:a;if(n===void 0||o===void 0)continue;let i={value:n};if(this.#m&&this.#_){i.ttl=this.#m[t];let s=Kt.now()-this.#_[t];i.start=Math.floor(Date.now()-s);}this.#h&&(i.size=this.#h[t]),e.unshift([o,i]);}return e}load(e){this.clear();for(let[t,o]of e){if(o.start){let a=Date.now()-o.start;o.start=Kt.now()-a;}this.set(t,o.value,o);}}set(e,t,o={}){if(t===void 0)return this.delete(e),this;let{ttl:a=this.ttl,start:n,noDisposeOnSet:i=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:l}=o,{noUpdateTTL:p=this.noUpdateTTL}=o,c=this.#B(e,t,o.size||0,s);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#P(e,"set"),this;let d=this.#a===0?void 0:this.#o.get(e);if(d===void 0)d=this.#a===0?this.#n:this.#v.length!==0?this.#v.pop():this.#a===this.#l?this.#L(!1):this.#a,this.#r[d]=e,this.#e[d]=t,this.#o.set(e,d),this.#p[this.#n]=d,this.#u[d]=this.#n,this.#n=d,this.#a++,this.#E(d,c,l),l&&(l.set="add"),p=!1;else {this.#R(d);let m=this.#e[d];if(t!==m){if(this.#k&&this.#t(m)){m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:u}=m;u!==void 0&&!i&&(this.#z&&this.#y?.(u,e,"set"),this.#c&&this.#i?.push([u,e,"set"]));}else i||(this.#z&&this.#y?.(m,e,"set"),this.#c&&this.#i?.push([m,e,"set"]));if(this.#I(d),this.#E(d,c,l),this.#e[d]=t,l){l.set="replace";let u=m&&this.#t(m)?m.__staleWhileFetching:m;u!==void 0&&(l.oldValue=u);}}else l&&(l.set="update");}if(a!==0&&!this.#m&&this.#D(),this.#m&&(p||this.#A(d,a,n),l&&this.#w(l,d)),!i&&this.#c&&this.#i){let m=this.#i,u;for(;u=m?.shift();)this.#b?.(...u);}return this}pop(){try{for(;this.#a;){let e=this.#e[this.#s];if(this.#L(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#c&&this.#i){let e=this.#i,t;for(;t=e?.shift();)this.#b?.(...t);}}}#L(e){let t=this.#s,o=this.#r[t],a=this.#e[t];return this.#k&&this.#t(a)?a.__abortController.abort(new Error("evicted")):(this.#z||this.#c)&&(this.#z&&this.#y?.(a,o,"evict"),this.#c&&this.#i?.push([a,o,"evict"])),this.#I(t),e&&(this.#r[t]=void 0,this.#e[t]=void 0,this.#v.push(t)),this.#a===1?(this.#s=this.#n=0,this.#v.length=0):this.#s=this.#p[t],this.#o.delete(o),this.#a--,t}has(e,t={}){let{updateAgeOnHas:o=this.updateAgeOnHas,status:a}=t,n=this.#o.get(e);if(n!==void 0){let i=this.#e[n];if(this.#t(i)&&i.__staleWhileFetching===void 0)return !1;if(this.#f(n))a&&(a.has="stale",this.#w(a,n));else return o&&this.#S(n),a&&(a.has="hit",this.#w(a,n)),!0}else a&&(a.has="miss");return !1}peek(e,t={}){let{allowStale:o=this.allowStale}=t,a=this.#o.get(e);if(a===void 0||!o&&this.#f(a))return;let n=this.#e[a];return this.#t(n)?n.__staleWhileFetching:n}#M(e,t,o,a){let n=t===void 0?void 0:this.#e[t];if(this.#t(n))return n;let i=new ma,{signal:s}=o;s?.addEventListener("abort",()=>i.abort(s.reason),{signal:i.signal});let l={signal:i.signal,options:o,context:a},p=(y,f=!1)=>{let{aborted:g}=i.signal,_=o.ignoreFetchAbort&&y!==void 0;if(o.status&&(g&&!f?(o.status.fetchAborted=!0,o.status.fetchError=i.signal.reason,_&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),g&&!_&&!f)return d(i.signal.reason);let v=u;return this.#e[t]===u&&(y===void 0?v.__staleWhileFetching?this.#e[t]=v.__staleWhileFetching:this.#P(e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,y,l.options))),y},c=y=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=y),d(y)),d=y=>{let{aborted:f}=i.signal,g=f&&o.allowStaleOnFetchAbort,_=g||o.allowStaleOnFetchRejection,v=_||o.noDeleteOnFetchRejection,h=u;if(this.#e[t]===u&&(!v||h.__staleWhileFetching===void 0?this.#P(e,"fetch"):g||(this.#e[t]=h.__staleWhileFetching)),_)return o.status&&h.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw y},m=(y,f)=>{let g=this.#T?.(e,n,l);g&&g instanceof Promise&&g.then(_=>y(_===void 0?void 0:_),f),i.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(y(void 0),o.allowStaleOnFetchAbort&&(y=_=>p(_,!0)));});};o.status&&(o.status.fetchDispatched=!0);let u=new Promise(m).then(p,c),b=Object.assign(u,{__abortController:i,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,b,{...l.options,status:void 0}),t=this.#o.get(e)):this.#e[t]=b,b}#t(e){if(!this.#k)return !1;let t=e;return !!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof ma}async fetch(e,t={}){let{allowStale:o=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:l=0,sizeCalculation:p=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:m=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:b=this.allowStaleOnFetchAbort,context:y,forceRefresh:f=!1,status:g,signal:_}=t;if(!this.#k)return g&&(g.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:a,noDeleteOnStaleGet:n,status:g});let v={allowStale:o,updateAgeOnGet:a,noDeleteOnStaleGet:n,ttl:i,noDisposeOnSet:s,size:l,sizeCalculation:p,noUpdateTTL:c,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:b,ignoreFetchAbort:u,status:g,signal:_},h=this.#o.get(e);if(h===void 0){g&&(g.fetch="miss");let x=this.#M(e,h,v,y);return x.__returned=x}else {let x=this.#e[h];if(this.#t(x)){let T=o&&x.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",T&&(g.returnedStale=!0)),T?x.__staleWhileFetching:x.__returned=x}let w=this.#f(h);if(!f&&!w)return g&&(g.fetch="hit"),this.#R(h),a&&this.#S(h),g&&this.#w(g,h),x;let P=this.#M(e,h,v,y),k=P.__staleWhileFetching!==void 0&&o;return g&&(g.fetch=w?"stale":"refresh",k&&w&&(g.returnedStale=!0)),k?P.__staleWhileFetching:P.__returned=P}}async forceFetch(e,t={}){let o=await this.fetch(e,t);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,t={}){let o=this.#N;if(!o)throw new Error("no memoMethod provided to constructor");let{context:a,forceRefresh:n,...i}=t,s=this.get(e,i);if(!n&&s!==void 0)return s;let l=o(e,s,{options:i,context:a});return this.set(e,l,i),l}get(e,t={}){let{allowStale:o=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:i}=t,s=this.#o.get(e);if(s!==void 0){let l=this.#e[s],p=this.#t(l);return i&&this.#w(i,s),this.#f(s)?(i&&(i.get="stale"),p?(i&&o&&l.__staleWhileFetching!==void 0&&(i.returnedStale=!0),o?l.__staleWhileFetching:void 0):(n||this.#P(e,"expire"),i&&o&&(i.returnedStale=!0),o?l:void 0)):(i&&(i.get="hit"),p?l.__staleWhileFetching:(this.#R(s),a&&this.#S(s),l))}else i&&(i.get="miss");}#F(e,t){this.#u[t]=e,this.#p[e]=t;}#R(e){e!==this.#n&&(e===this.#s?this.#s=this.#p[e]:this.#F(this.#u[e],this.#p[e]),this.#F(this.#n,e),this.#n=e);}delete(e){return this.#P(e,"delete")}#P(e,t){let o=!1;if(this.#a!==0){let a=this.#o.get(e);if(a!==void 0)if(o=!0,this.#a===1)this.#j(t);else {this.#I(a);let n=this.#e[a];if(this.#t(n)?n.__abortController.abort(new Error("deleted")):(this.#z||this.#c)&&(this.#z&&this.#y?.(n,e,t),this.#c&&this.#i?.push([n,e,t])),this.#o.delete(e),this.#r[a]=void 0,this.#e[a]=void 0,a===this.#n)this.#n=this.#u[a];else if(a===this.#s)this.#s=this.#p[a];else {let i=this.#u[a];this.#p[i]=this.#p[a];let s=this.#p[a];this.#u[s]=this.#u[a];}this.#a--,this.#v.push(a);}}if(this.#c&&this.#i?.length){let a=this.#i,n;for(;n=a?.shift();)this.#b?.(...n);}return o}clear(){return this.#j("delete")}#j(e){for(let t of this.#x({allowStale:!0})){let o=this.#e[t];if(this.#t(o))o.__abortController.abort(new Error("deleted"));else {let a=this.#r[t];this.#z&&this.#y?.(o,a,e),this.#c&&this.#i?.push([o,a,e]);}}if(this.#o.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#m&&this.#_&&(this.#m.fill(0),this.#_.fill(0)),this.#h&&this.#h.fill(0),this.#s=0,this.#n=0,this.#v.length=0,this.#g=0,this.#a=0,this.#c&&this.#i){let t=this.#i,o;for(;o=t?.shift();)this.#b?.(...o);}}};fn(Gn());fn(wc());var kc=new Set,Sc=[],li=[],o5={appendCss:r=>{li.push(r);},registerClassName:r=>{kc.add(r);},registerComposition:r=>{Sc.push(r);},markCompositionUsed:()=>{},onEndFileScope:r=>{var e=gc({localClassNames:Array.from(kc),composedClassLists:Sc,cssObjs:li}).join(`
40
+ `);Wp({fileScope:r,css:e}),li=[];},getIdentOption:()=>process.env.NODE_ENV==="production"?"short":"debug"};typeof window<"u"&&Qp(o5);var Ic=(r,e)=>{for(var t=e-1;t>=0;){if(r[t]==="/")return t;t--;}return -1},a5=r=>{var e,t=r.lastIndexOf(".css");if(t===-1)return "";var o=Ic(r,t);if(e=r.slice(o+1,t),o===-1)return e;var a=Ic(r,o-1),n=r.slice(a+1,o),i=e!=="index"?e:n;return i},n5=()=>{var r=new fa({max:500});return e=>{var t=r.get(e);if(t)return t;var o=a5(e);return r.set(e,o),o}};n5();function i5(r){if(typeof r!="string"||!/^var\(--.*\)$/.test(r))throw new Error("Invalid variable name: ".concat(r))}function Rc(){for(var r="",e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.reverse().forEach(a=>{r===""?r=String(a):(i5(a),r=a.replace(/\)$/,", ".concat(r,")")));}),r}function Ec(r,e){let[t,o]=useState({}),a=useRef(!1),{container:n,shouldContainOverlays:i,isContainerPositioned:s}=useContext(ft);useEffect(()=>{if(!r)return;let c=ae(r),d=c.visualViewport,m=()=>{let u=d?.height,b=c.innerHeight-(u||0);if(a.current=b>60,a.current){let y=getActiveElement(r);y&&isInputThatOpensKeyboard(y)&&y.scrollIntoView({behavior:"smooth",block:"center"});}if(e)o({maxHeight:(u||0)*.8,bottom:b});else {let y=`${u||0}px`,f=i?`min(${y}, ${Rc(Wo,y)})`:y;o({maxHeight:`calc(${f} - (2 * ${themeVars.spacing.xl} + env(safe-area-inset-top) + env(safe-area-inset-bottom)))`,top:a.current?`calc(env(safe-area-inset-top) + ${themeVars.spacing.xl})`:void 0});}};return m(),d?.addEventListener("resize",m),c.addEventListener("resize",m),()=>{d?.removeEventListener("resize",m),c.removeEventListener("resize",m);}},[r,e,i]);let l=useMemo(()=>({...t,overflow:"auto",position:"relative"}),[t]),p=useMemo(()=>{let c=n?.getBoundingClientRect();return !e&&a.current?{alignItems:"flex-start"}:i?s?{}:{position:"absolute",left:c?.left,top:c?.top,height:c?.height,width:c?.width}:{}},[e,a.current,n,s,i]);return {dialogStyle:l,containerStyle:p}}var ci=ut.createContext({isDrawer:!1,closeDrawer:()=>{},dialogStyle:{},setDialogElement:()=>{},isWithinModal:!1}),di=ut.createContext({setIsPopoverSafelyClosed:()=>{}}),Fe=({children:r,className:e,style:t,isDismissable:o=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":l,"data-block-class":p,shouldCloseOnInteractOutside:c})=>{let{state:d}=ut.useContext(yt),[m,u]=ut.useState(!0),b=ut.useRef(null),[y,f]=ut.useState(null),{shouldContainOverlays:g,container:_}=useContext(ft),v=Ze(),h=typeof s=="boolean"&&s||s==="auto"&&v==="mobile";invariant(d,"ModalContent must be a child of Modal");let x=ut.useRef(null),w=typeof o=="function"?o(h):o,P=typeof a=="function"?a(h):a,{modalProps:z,underlayProps:k}=useModalOverlay({isDismissable:m&&w,shouldCloseOnInteractOutside:H=>!_?.contains(H)&&g?!1:c?.(H)??!0,isKeyboardDismissDisabled:P},d,x),{dialogStyle:T,containerStyle:R}=Ec(y,h),N=useMemo(()=>({isDrawer:h,closeDrawer:d.close,dialogStyle:T,dialogRef:b,setDialogElement:f,isWithinModal:!0}),[h,d.close,T,b,f]),S=useMemo(()=>({setIsPopoverSafelyClosed:u}),[u]),I={duration:.3,type:"tween",ease:"easeOut"},M={type:"spring",duration:.3},F={open:{opacity:1,transform:h?"translateY(0%)":"scale(1)"},closed:i?{opacity:1,transform:h?"translateY(0%)":"scale(1)"}:{opacity:0,transform:h?"translateY(100%)":"scale(0.95)"}};return jsx(AnimatePresence,{initial:!1,children:d.isOpen?jsx(ci.Provider,{value:N,children:jsx(di.Provider,{value:S,children:jsxs(xe,{className:classNames(qp({enableDrawer:h,shouldContainOverlays:g}),e),"data-block-id":l,"data-block-class":p,style:{...t,...R},portalContainer:n,children:[jsx(motion.div,{...k,variants:{open:{opacity:1},closed:{opacity:i?1:0}},initial:"closed",animate:"open",exit:"closed","data-testid":"underlay",transition:I,className:classNames(Kp({shouldContainOverlays:g}),"BaselineUI-Modal-Underlay")}),jsx(motion.div,{...z,ref:x,"data-drawer":h,className:classNames(h?$p:Up,"BaselineUI-Modal-Content"),variants:F,transition:h?I:M,initial:"closed",animate:"open",exit:"closed",children:typeof r=="function"?r(d):r})]})})}):null})};var Dc=C({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6lt _1yep5z6lv",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z6131",ghost:"cjv3et6"},overlayType:{modal:"cjv3et7",popover:"cjv3et8"},isDrawer:{true:"cjv3et9 _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2 _1yep5z617e"},isFocusVisible:{true:"_1yep5z61po _1yep5z61tf _1yep5z61th _1yep5z61tj"}},defaultVariants:{},compoundVariants:[]});var mi=ut.createContext({titleProps:{}}),ge=ut.forwardRef(({children:r,className:e,style:t,inheritDrawer:o,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:l,...p},c)=>{let d=ut.useRef(null),m=ut.useRef(null),{isDrawer:u,closeDrawer:b,dialogStyle:y,setDialogElement:f,isWithinModal:g}=useContext(ci),[_,v]=ut.useState(""),{focusProps:h,isFocusVisible:x}=useFocusRing();useLayoutEffect(()=>{let k=m.current?.getRootNode(),T=p["aria-label"]||"";p["aria-labelledby"]&&(T=k?.querySelector(`#${p["aria-labelledby"].replaceAll(":",String.raw`\:`)}`)?.textContent||""),v(T);},[p]);let{dialogProps:w,titleProps:P}=useDialog(p,d),z=useMemo(()=>({titleProps:P}),[P]);return u&&o?jsx(ia,{title:_,onCloseRequest:b,className:e,style:y,...p,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:L(m,c,k=>{f(k);}),background:l,children:r}):jsx(mi.Provider,{value:z,children:jsx("section",{...mergeProps(w,h),"data-block-id":i,"data-block-class":s,"data-focus-visible":x,"data-overlay-type":g?"modal":"popover",ref:L(d,c,k=>{f(k);}),style:{...y,...t},className:classNames(Dc({size:u?"content":a,variant:n,isDrawer:u,isFocusVisible:x,overlayType:g?"modal":"popover"}),"BaselineUI-Dialog",e),children:r})})});ge.displayName="Dialog";var Ac=ut.forwardRef(({children:r,className:e,style:t},o)=>{let{titleProps:a}=useContext(mi);return ut.isValidElement(r)?ut.cloneElement(r,{...a,ref:o,className:classNames(r.props.className,e),style:{...r.props.style,...t}}):jsx("h3",{...a,ref:o,className:e,style:t,children:r})});Ac.displayName="DialogTitle";var Oc=({children:r,isOpen:e,popoverContentRef:t,portalContainer:o=document.body,style:a})=>{let[n,i]=useState(!1),[s,l]=useState(null),p=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(di);useEffect(()=>{e?(i(!0),p.current&&clearTimeout(p.current)):p.current=setTimeout(()=>{i(!1);},300);},[e]),useEffect(()=>()=>{p.current&&clearTimeout(p.current);},[]);let d=t.current;return useEffect(()=>{d&&l(d.getBoundingClientRect());},[d]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?T5.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),o):null,r]})};var{color:Xt}=themeVars,ze=ut.forwardRef(({portalClassName:r,portalStyle:e,className:t,style:o,state:a,overlayProps:n,underlayClassName:i,children:s,includeArrow:l=!1,offset:p=2,portalContainer:c,contentContainerClassName:d,contentContainerStyle:m,"data-block-id":u,"data-block-class":b,...y},f)=>{let g=ut.useRef(null),_=ye(c),v=l?8:0,{underlayProps:h,popoverProps:x,placement:w,arrowProps:P}=usePopover({...y,offset:p+v,popoverRef:g,containerPadding:y.containerPadding||0},a);delete x.style?.position;let z=w==="center"?"bottom":w,k=useMemo(()=>({isOpen:a.isOpen}),[a.isOpen]),{transitionProps:T}=Ko({placement:w}),R=useMemo(()=>({...x.style,...assignInlineVars({[jl]:`${y.triggerRef?.current?.offsetWidth}px`}),...In(o,k)}),[x.style,y.triggerRef,o,k]);return jsx(Oc,{isOpen:a.isOpen,popoverContentRef:g,portalContainer:_,style:x.style,children:a.isOpen?jsxs(xe,{portalContainer:_,style:e,className:r,ref:f,"data-block-id":u,"data-block-class":b,children:[!y.isNonModal&&jsx("div",{...h,className:classNames(Fl,Lo(i,k),"BaselineUI-Popover-Underlay")}),jsxs(motion.div,{...mergeProps(x,T),style:R,ref:L(g,f),className:classNames(Al,"BaselineUI-Popover-ContentContainer",Lo(t,k)),"data-placement":["top","bottom","left","right"].filter(N=>w?.includes(N)),children:[l?jsxs(Fragment,{children:[jsxs("svg",{className:classNames(Ml({placement:z}),"BaselineUI-PopoverContent-Arrow"),...P,style:{...P.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:Xt.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:Xt.background.primary.subtle,stroke:Xt.background.primary.subtle})]}),jsxs("svg",{className:classNames(Dl({placement:z}),"BaselineUI-PopoverContent-Arrow-Focused"),width:"15",height:"11",viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...P,style:{...P.style,position:"absolute"},children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.543371 2H0V0H1.45663L7.5 6.97312L13.5434 0H15V2H14.4566L7.5 10.0269L0.543371 2Z",fill:Xt.border.interactive.enabled}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:Xt.background.primary.subtle,stroke:Xt.background.primary.subtle})]})]}):null,jsx(DismissButton,{onDismiss:a.close}),jsx("div",{...n,style:In(m,k),className:classNames(Bl,Lo(d,k),"BaselineUI-Popover-Content"),children:typeof s=="function"?s(a):s}),jsx(DismissButton,{onDismiss:a.close})]})]}):null})});ze.displayName="PopoverContentCore";var Ee=ut.forwardRef((r,e)=>{let{state:t,overlayTriggerAria:{overlayProps:o},triggerRef:a}=useContext(Ir);return invariant(a),t?jsx(ze,{ref:e,...r,triggerRef:r.triggerRef||a,overlayProps:o,state:t}):null});Ee.displayName="PopoverContent";var Uc=ut.forwardRef(({className:r,style:e,onChange:t,"data-block-id":o,icon:a,formatValue:n=d=>d,tooltipProps:i,popoverContentProps:s,isDisabled:l,...p},c)=>{let d=ee(c),[m,u]=useControlledState(p.value,p.defaultValue||0,t),[b,y]=ut.useState(!1),{keyboardProps:f}=useKeyboard({onKeyDown:v=>{(v.key==="Enter"||v.key==="Escape")&&y(!1);}}),g=n(m||0),_=i?.isDisabled||p["aria-label"]?`${p["aria-label"]}, ${g}`:g.toString();return jsxs(E,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",r),"data-block-id":o,style:e,ref:d,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ae,{type:"dialog",isOpen:b,onOpenChange:y,children:[jsx(Be,{children:jsx(ne,{text:p["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:l,...i,children:jsx(G,{label:g,variant:"popover","aria-label":_,isDisabled:l,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(Ee,{placement:"bottom start",...s,children:jsx(ge,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(E,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...f,children:jsx(Vt,{...p,onChange:v=>{u(v),t?.(v);},value:m})})})})})]})]})});Uc.displayName="IconSlider";var qc=C({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),Kc=C({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),Gc="bpklwad",Wc=C({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),Xc="bpklwa6",Yc=C({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var ed=ut.forwardRef(({className:r,label:e,labelPosition:t="top",statusLabel:o,style:a,"data-block-id":n,"data-block-class":i,...s},l)=>{let p=ut.useRef(null),c=useToggleState(s),{inputProps:d,isPressed:m}=useSwitch({...s,children:e},c,p),{isFocusVisible:u,focusProps:b}=useFocusRing(),{hoverProps:y,isHovered:f}=useHover({isDisabled:s.isDisabled}),g=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":u,"data-disabled":s.isDisabled,"data-focus-visible":u,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":f,"data-pressed":m}),_=jsx("div",{className:classNames(qc({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:u,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(Kc({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(g,y),className:classNames(Wc({labelPosition:t}),"BaselineUI-Switch",r),style:a,ref:l,children:[e?jsx("span",{className:classNames(Gc,"BaselineUI-Switch-Label"),children:e}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,b),ref:p})}),o?jsxs("div",{className:Yc({labelPosition:t}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",Xc),children:c.isSelected?o.on:o.off}),_]}):_]})});ed.displayName="Switch";var td="_19n40yy9",rd=C({defaultClassName:"_19n40yy0",variantClassNames:{size:{lg:"_19n40yy1",md:"_19n40yy2",sm:"_19n40yy3"},variant:{primary:"_19n40yy4",ghost:"_19n40yy5"},isFocused:{true:"_19n40yy6"},hasText:{true:"_19n40yy7"},isDisabled:{true:"_19n40yy8"}},defaultVariants:{},compoundVariants:[]});var cz={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},nd=ut.forwardRef(({className:r,size:e="md",variant:t="primary","data-block-id":o,"data-block-class":a,style:n,...i},s)=>{let l=ut.useRef(null),p=useSearchFieldState(i),{inputProps:c,clearButtonProps:d}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},p,l),{focusProps:m,isFocusVisible:u,isFocused:b}=useFocusRing({within:!0,isTextInput:!0}),y=cz[e],f=e==="sm"?XIcon$3:XIcon$2,g=filterTruthyValues({"data-block-id":o,"data-block-class":a,"data-focused":b,"data-disabled":i.isDisabled,"data-focus-visible":u});return jsxs("div",{...g,className:classNames(rd({size:e,isFocused:b,variant:t,hasText:!!p.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",r),style:n,ref:s,children:[jsx(y,{size:e==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:td,ref:l}),p.value!==""&&jsx(D,{icon:f,...d,size:e==="sm"?"xs":"sm",variant:"secondary"})]})});nd.displayName="SearchInput";var id="xyd2ss1 _1yep5z613 _1yep5z614 _1yep5z615 _1yep5z63f _1yep5z63g _1yep5z63h _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z65r _1yep5z65s _1yep5z65t _1yep5z683 _1yep5z684 _1yep5z685 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z66x _1yep5z66y _1yep5z66z _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6lm _1yep5z6ll _1yep5z6hx _1yep5z6lp _1yep5z6g1",sd="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var bi=({section:r,showSelectedIcon:e,state:t})=>{let{itemProps:o,groupProps:a,headingProps:n}=useMenuSection({heading:r.value?.title,"aria-label":r["aria-label"]});return jsxs(Fragment,{children:[r.key!==t.collection.getFirstKey()&&jsx(V,{elementType:"li"}),jsxs("li",{...o,children:[r.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:r.value.title})}):null,jsx("ul",{...a,className:sd,children:[...r.childNodes].map(i=>(invariant(i.type==="item"),jsx(ba,{item:i,state:t,showSelectedIcon:e},i.key)))})]})]})};bi.displayName="MenuSection";var ba=({item:r,state:e,className:t,showSelectedIcon:o})=>{let a=ut.useRef(null),n=useMenuItem({key:r.key},e,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(kr,{item:r,liProps:mergeProps(n.menuItemProps,s,{className:t}),...n,isFocusVisible:i,ref:a,description:r.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:e,showSelectedIcon:o})};ba.displayName="MenuItem";var vi=ut.forwardRef(({className:r,itemClassName:e,onContentKeyDown:t,...o},a)=>{let n=useTreeState(o),i=ut.useRef(null),{menuProps:s}=useMenu(o,n,i),{keyboardProps:l}=useKeyboard({onKeyDown:t});return jsx("ul",{...mergeProps(s,l),className:classNames(id,r),ref:L(i,a),children:[...n.collection].map(p=>p.type==="section"?jsx(bi,{section:p,state:n,showSelectedIcon:o.selectionMode==="multiple"||o.selectionMode==="single"},p.key):jsx(ba,{item:p,state:n,className:e,showSelectedIcon:o.selectionMode==="multiple"||o.selectionMode==="single"},p.key))})});vi.displayName="MenuContent";var cd=C({defaultClassName:"_1mdhlqv8",variantClassNames:{isOpen:{true:"_1mdhlqv9"}},defaultVariants:{},compoundVariants:[]}),tt="_1mdhlqvb cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6lt _1yep5z6lv _1yep5z6131 cjv3et4",dd=C({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isOpen:{true:"_1mdhlqv2"},isDisabled:{true:"z9nup83 _1yep5z6ey"},isHovered:{true:"_1mdhlqv4"},variant:{primary:"_1mdhlqv5",ghost:"_1mdhlqv6"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"_1mdhlqv7"]]}),ud="_1yep5z66x _1yep5z66y _1yep5z66z",md="_1mdhlqva _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69i _1yep5z69j _1yep5z69k";var ga=ut.forwardRef(({defaultOpen:r,onOpenChange:e,isOpen:t,isDisabled:o,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:l,boundaryElement:p,crossOffset:c,offset:d,triggerLabel:m,renderTrigger:u=({buttonProps:g,ref:_})=>jsx(G,{...g,variant:"popover",ref:_}),portalContainer:b,...y},f)=>{let g=ut.useRef(null),_=ye(b),v=useMenuTriggerState({defaultOpen:r,isOpen:t,onOpenChange:e}),{menuTriggerProps:h,menuProps:x}=useMenuTrigger({isDisabled:o,type:"menu"},v,g),w=se(),P=useMemo(()=>mergeProps(h,{isDisabled:o,isSelected:v.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(v.isOpen):m}),[h,o,v.isOpen,m]);return useEffect(()=>{!m&&!u&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[u,m]),jsxs(Fragment,{children:[u({buttonProps:P,ref:g}),jsx(ze,{triggerRef:g,state:v,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:l,boundaryElement:p,crossOffset:c,offset:d||2,className:"BaselineUI-Menu-Popover",portalContainer:_,children:jsx(vi,{className:classNames(tt,a),...x,...y,ref:f,autoFocus:v.focusStrategy||"first",children:w})})]})});ga.displayName="Menu";var va=C({defaultClassName:"_13f0naj0",variantClassNames:{variant:{default:"_13f0naj1",inline:"_13f0naj2"},isHovered:{true:"_13f0naj3"},isFocusVisible:{true:"_13f0naj4"},isDisabled:{true:"_13f0naj5"},size:{sm:"_13f0naj6",md:"_13f0naj7",lg:"_13f0naj8"},type:{body:"_13f0naj9",label:"_13f0naja"},isActive:{true:"_13f0najb"}},defaultVariants:{},compoundVariants:[[{isActive:!0,isDisabled:!1},"_13f0najc"],[{type:"body",size:"sm"},"_13f0najd"],[{type:"body",size:"md"},"_13f0naje"],[{type:"body",size:"lg"},"_13f0najf"],[{type:"label",size:"sm"},"_13f0najg"],[{type:"label",size:"md"},"_13f0najh"],[{type:"label",size:"lg"},"_13f0naji"]]});var bd=ut.forwardRef(({className:r,style:e,children:t,variant:o="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":l,title:p,role:c,...d},m)=>{let u=ut.useRef(null),{linkProps:b,isPressed:y}=useLink({...d,elementType:d.onPress?"span":n},u),{isFocusVisible:f,isFocused:g,focusProps:_}=useFocusRing(),{hoverProps:v,isHovered:h}=useHover({isDisabled:d.isDisabled}),x=n,w=filterTruthyValues({"data-block-id":s,"data-block-class":l,"data-disabled":d.isDisabled,"data-focused":g,"data-pressed":y,"data-focus-visible":f,"data-hovered":h,role:c,title:p});return jsx(x,{...mergeProps(b,_,v,w),className:classNames(va({variant:o,isFocusVisible:f,isHovered:h,isDisabled:d.isDisabled,size:a,isActive:y,type:i}),"BaselineUI-Link",r),ref:L(u,m),style:e,children:t})});bd.displayName="Link";function gd({isDisabled:r,onValueChange:e,onChange:t,name:o,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let l=useId(),p=useId(),c=useId();return {inputProps:{type:"file",id:p,disabled:!!r,"aria-labelledby":n?void 0:l,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let u=[...m.target.files||[]];e?.(u),t?.(m);},name:o,accept:i,multiple:s},labelProps:{htmlFor:p,id:l},descriptionProps:{id:c}}}async function zi({items:r}){let e=r.filter(t=>t.kind==="file").map(async t=>(invariant(t.kind==="file"),t.getFile()));return await Promise.all(e)}var vd=C({defaultClassName:"_180w5ed0",variantClassNames:{variant:{default:"_180w5ed1",inline:"_180w5ed2"},hoveredOrFocusedOrActive:{true:"_180w5ed3"},disabled:{true:"_180w5ed4"}},defaultVariants:{},compoundVariants:[[{variant:"inline",hoveredOrFocusedOrActive:!0},"_180w5ed5"],[{variant:"default",hoveredOrFocusedOrActive:!0},"_180w5ed6"],[{variant:"default",disabled:!0},"_180w5ed7"],[{variant:"inline",disabled:!0},"_180w5ed8"]]}),hd=C({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),_d=C({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),zd=C({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var wd=ut.forwardRef(({className:r,label:e,description:t,icon:o,variant:a="default",...n},i)=>{let s=ut.useRef(null),{inputProps:l,descriptionProps:p,labelProps:c}=gd(n),{dropProps:d}=useDrop({ref:s,onDrop:async({items:f})=>{let g=f.filter(v=>v.kind==="file").map(async v=>(invariant(v.kind==="file"),v.getFile())),_=await Promise.all(g);n.onValueChange?.(_);}}),{focusProps:m,isFocusVisible:u}=useFocusRing(),{hoverProps:b,isHovered:y}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(d,b,c),className:classNames(vd({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||u}),r),ref:L(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,l)})}),o?jsx(o,{size:20,className:_d({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:zd({disabled:n.isDisabled,hovered:y}),children:e}),t?jsx("div",{...p,className:hd({disabled:n.isDisabled}),children:t}):null]})]})});wd.displayName="FileUpload";var kd="_12vfhl40 z9nup81",Sd="_12vfhl41 z9nup82",Id=C({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Rd="_12vfhl42",Td="_12vfhl47",Nd="_12vfhl46 z9nup82",Ed="_12vfhl45",Ld=C({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Md=ut.forwardRef(({className:r,style:e,variant:t="active",showValue:o,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...l},p)=>{let c=useId(),{labelProps:d,progressBarProps:m}=useProgressBar({...l,"aria-describedby":a?c:l["aria-describedby"]}),{minValue:u=0,maxValue:b=100,value:y=0,label:f}=l,g=(y-u)/(b-u),_=`${Math.round(g*100)}%`,v=jsx("output",{className:Ld({hasLabel:!!f}),children:m["aria-valuetext"]}),h=t==="error"?n:a;return jsxs("div",{...m,style:e,className:classNames(kd,"BaselineUI-ProgressBar",r),"data-block-id":i,"data-block-class":s,ref:p,children:[f?jsxs("div",{className:Sd,children:[jsx("label",{...d,className:Rd,children:f}),o?v:null]}):null,jsxs("div",{className:Ed,children:[jsxs("div",{className:Nd,children:[jsx("div",{className:Td,children:jsx("div",{style:{width:_},className:Id({variant:t})})}),!f&&o?v:null]}),h?jsx("div",{className:Dt({hasError:t==="error"}),id:c,children:h}):null]})]})});Md.displayName="ProgressBar";function Jt({isReadOnly:r,validationState:e}){return r?ReadOnlyIcon:e==="error"?ErrorCircleFilledIcon:e==="warning"?WarningFilledIcon:null}var rt=ut.forwardRef(({className:r,validationState:e,variant:t="primary",style:o,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":l,...p},c)=>{let d=ut.useRef(null),{inputProps:m,labelProps:u,descriptionProps:b,errorMessageProps:y,validationErrors:f}=useTextField({...p,validationState:e?e==="error"?"invalid":"valid":void 0},d),g=p.errorMessage||f.join(" "),_=Te({...p,errorMessage:g,descriptionProps:b,errorMessageProps:y,labelPosition:a});g&&(e="error");let{hoverProps:v,isHovered:h}=useHover({isDisabled:p.isDisabled}),{isFocused:x,focusProps:w,isFocusVisible:P}=useFocusRing(),z=Jt({isReadOnly:p.isReadOnly,validationState:e??"valid"}),k=filterTruthyValues({"data-readonly":p.isReadOnly,"data-disabled":p.isDisabled,"data-validation-state":e,"data-focused":x,"data-focus-visible":P});return jsxs("div",{className:classNames(Ye({labelPosition:a}),"BaselineUI-TextInput",r),"data-block-id":s,"data-block-class":l,style:o,ref:c,children:[p.label||a==="start"&&_?jsxs("div",{className:Xe({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...u,className:We,children:p.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[Ft]:p.isDisabled}),children:[jsxs("div",{...v,className:Bt({validationState:e??"valid",isHovered:h,isFocused:x,variant:t,isReadOnly:!!p.isReadOnly,isDisabled:!!p.isDisabled}),children:[jsx("input",{...mergeProps(m,w,k),className:classNames(qo({isDisabled:p.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:d}),z?jsx(z,{className:At({validationState:e??"valid",isReadOnly:p.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});rt.displayName="TextInput";var Qt=({value:r,...e})=>{let t=useNumberFormatter(e);return jsx(Fragment,{children:t.format(r)})};Qt.displayName="NumberFormat";var Ad="_1yep5z6ip _1yep5z6iq _1yep5z6ir",Bd=C({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup83"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0,isReadOnly:!1},"_9b1tml7"],[{isSelected:!0,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml8"],[{isSelected:!1,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml9"],[{isSelected:!0,isDisabled:!0},"_9b1tmla"],[{isSelected:!0,isReadOnly:!0},"_9b1tmlb"]]}),Od=C({defaultClassName:"_9b1tmlf _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6eu _1yep5z6l4 _1yep5z6e9",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_1yep5z610r"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"_1yep5z61mu"],[{isSelected:!0,isDisabled:!0},"_1yep5z61mu"],[{isSelected:!1,isDisabled:!0},"_1yep5z61ms"]]}),Fd=C({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var Vd=ut.forwardRef(({className:r,count:e,style:t,size:o="md",icon:a,"data-block-id":n,"data-block-class":i,...s},l)=>{let p={isRequired:!1},c=a||(o==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let d=ut.useRef(null),m=useToggleState({...s,...p}),{inputProps:u,isPressed:b,isDisabled:y,isReadOnly:f,isSelected:g}=useSwitch({...s,...p},m,d),{focusProps:_,isFocused:v,isFocusVisible:h}=useFocusRing(),{hoverProps:x,isHovered:w}=useHover({}),P=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":v,"data-focus-visible":h,"data-disabled":y,"data-hovered":w,"data-pressed":b,"data-selected":g});return jsxs("label",{ref:l,style:t,className:classNames(Ad,"BaselineUI-Reaction",r),...P,children:[jsx(VisuallyHidden,{children:jsx("input",{...u,..._,ref:d})}),jsxs("div",{...x,className:Bd({isSelected:g,isFocusVisible:h,isHovered:w,isReadOnly:f,isDisabled:y}),children:[jsx("div",{className:Fd({isDisabled:y,isReadOnly:f}),children:jsx(c,{size:o==="md"?20:16})}),jsx("div",{className:Od({isSelected:m.isSelected,isDisabled:y,isReadOnly:f,size:o}),children:jsx(Qt,{value:e})})]})]})});Vd.displayName="Reaction";var $d="_1azy5686",Ud="_1azy5685",qd="var(--_1azy5680)",Kd="_1azy5688",Gd="_1azy5689",Wd="_1azy5681 z9nup82",Xd="_1azy5682";var Yd="_1azy5687";var wC={sm:16,md:20},kC={sm:[CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon],md:[CheckCircleFilledIcon,ErrorAltCircleFilledIcon$1]},tr=ut.forwardRef(({className:r,style:e,size:t="md",variant:o="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:l,progressBarProps:p}=useProgressBar({...i,isIndeterminate:!0}),c=wC[t],d=c/2-2,m=2*d*Math.PI,u=kC[t][o==="success"?0:1];return jsxs("div",{className:classNames(Wd,"BaselineUI-ProgressSpinner",r),ref:s,style:{...assignInlineVars({[qd]:`${m}px`}),...e},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...p,className:Xd,children:[(o==="active"||o==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:$d,cx:c/2,cy:c/2,r:d}),o==="active"&&jsx("circle",{role:"presentation",className:Ud,cx:c/2,cy:c/2,r:d})]}),o==="success"&&jsx(u,{className:Yd,size:c}),o==="error"&&jsx(u,{className:Kd,size:c})]}),i.label?jsx("span",{...l,className:Gd,children:i.label}):null]})});tr.displayName="ProgressSpinner";var za=C({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kpa"],[{isSelected:!0,isDisabled:!0},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),Zd=C({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z6114"},isSelected:{true:"_1yep5z6116"}},defaultVariants:{},compoundVariants:[]});var EC={sm:16,md:20,lg:24},Ca=ut.forwardRef(({className:r,style:e,iconStart:t,size:o="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let l=useToggleState(i),{buttonProps:p,isPressed:c,ref:d,isFocusVisible:m,isFocused:u,isHovered:b,uiStateOptions:y}=$o(i,l),f=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":u,"data-focus-visible":m,"data-disabled":i.isDisabled,"data-hovered":b,"data-pressed":c,"data-selected":l.isSelected});return jsxs(a,{...mergeProps(p,f),className:classNames(za({isHovered:b,isFocusVisible:m,isSelected:l.isSelected,size:o,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof r=="function"?r(y):r),style:typeof e=="function"?e(y):e,ref:L(d,s),children:[t?jsx(t,{size:EC[o],className:Zd({isDisabled:i.isDisabled,isSelected:l.isSelected})}):null,i.label]})});Ca.displayName="ToggleButton";var xa=C({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),Jd=C({defaultClassName:"_16vugd02 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{labelPosition:{end:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vf _1yep5z6vg _1yep5z6vh",start:"_1yep5z614y _1yep5z614z _1yep5z6150 _1yep5z616a _1yep5z616b _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),Qd=C({defaultClassName:"_16vugd06",variantClassNames:{isIndeterminate:{true:"_16vugd05"},isSelected:{true:"_16vugd05"},isFocusVisible:{true:"_16vugd09"},isHovered:{true:"_16vugd0a"},isDisabled:{true:"_16vugd0b"},isReadOnly:{true:"_16vugd0c"},hasError:{true:"_16vugd0d"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0e"]]});var ru=ut.forwardRef(({className:r,style:e,label:t,labelPosition:o="end","data-block-id":a,"data-block-class":n,...i},s)=>{let l=ut.useRef(null),p=useToggleState(i),{isFocusVisible:c,isFocused:d,focusProps:m}=useFocusRing(),{inputProps:u,isPressed:b,isDisabled:y,isSelected:f,isReadOnly:g}=useCheckbox({...i,children:t},p,l),{hoverProps:_,isHovered:v}=useHover({isDisabled:y}),h=filterTruthyValues({"data-disabled":y,"data-readonly":g,"data-hovered":v,"data-selected":f,"data-pressed":b,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":d,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(Jd({labelPosition:o}),"BaselineUI-Checkbox",r),style:e,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,m),ref:l})}),jsxs("div",{..._,className:Qd({isSelected:f&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:y,isReadOnly:g,hasError:i.isInvalid,isHovered:v}),children:[f&&!i.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),t?jsx("span",{className:xa({isDisabled:y}),children:t}):null]})});ru.displayName="Checkbox";var ou={ar:{goToPage:"\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0635\u0641\u062D\u0629",nextPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",pageXofY:"\u0635\u0641\u062D\u0629 {arg0} \u0645\u0646 {arg1}",prevPage:"\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629"},cs:{goToPage:"P\u0159ej\xEDt na stranu",nextPage:"Dal\u0161\xED str\xE1nka",pageXofY:"Strana {arg0} z {arg1}",prevPage:"P\u0159edchoz\xED strana"},cy:{goToPage:"Mynd i Dudalen",nextPage:"Tudalen Nesaf",pageXofY:"Tudalen {arg0} o {arg1}",prevPage:"Tudalen Blaenorol"},da:{goToPage:"G\xE5 til side",nextPage:"N\xE6ste side",pageXofY:"Side {arg0} af {arg1}",prevPage:"Forrige side"},de:{goToPage:"Zu Seite wechseln",nextPage:"N\xE4chste Seite",pageXofY:"Seite {arg0} von {arg1}",prevPage:"Vorherige Seite"},el:{goToPage:"\u039C\u03B5\u03C4\u03AC\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",nextPage:"\u0395\u03C0\u03CC\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1",pageXofY:"\u03A3\u03B5\u03BB\u03AF\u03B4\u03B1 {arg0} \u03B1\u03C0\u03CC {arg1}",prevPage:"\u03A0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1"},"en-GB":{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},en:{goToPage:"Go to Page",nextPage:"Next Page",pageXofY:"Page {arg0} of {arg1}",prevPage:"Previous Page"},es:{goToPage:"Ir a la p\xE1gina",nextPage:"P\xE1gina siguiente",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},fi:{goToPage:"Mene sivulle",nextPage:"Seuraava sivu",pageXofY:"Sivu {arg0} / {arg1}",prevPage:"Edellinen sivu"},"fr-CA":{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},fr:{goToPage:"Aller \xE0 la page",nextPage:"Page suivante",pageXofY:"Page {arg0} sur {arg1}",prevPage:"Page pr\xE9c\xE9dente"},he:{goToPage:"\u05DE\u05E2\u05D1\u05E8 \u05DC\u05E2\u05DE\u05D5\u05D3",nextPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D1\u05D0",pageXofY:"\u05E2\u05DE\u05D5\u05D3 {arg0} \u05DE\u05EA\u05D5\u05DA {arg1}",prevPage:"\u05D4\u05E2\u05DE\u05D5\u05D3 \u05D4\u05E7\u05D5\u05D3\u05DD"},hr:{goToPage:"Idi na stranicu",nextPage:"Slijede\u0107a stranica",pageXofY:"Stranica {arg0} od {arg1}",prevPage:"Prethodna stranica"},id:{goToPage:"Buka halaman",nextPage:"Halaman Berikutnya",pageXofY:"Halaman {arg0} dari {arg1}",prevPage:"Halaman Sebelumnya"},it:{goToPage:"Vai a pagina",nextPage:"Pagina successiva",pageXofY:"Pagina {arg0} di {arg1}",prevPage:"Pagina precedente"},ja:{goToPage:"\u30DA\u30FC\u30B8\u306B\u79FB\u52D5",nextPage:"\u6B21\u306E\u30DA\u30FC\u30B8",pageXofY:"\u30DA\u30FC\u30B8 {arg0}/{arg1}",prevPage:"\u524D\u306E\u30DA\u30FC\u30B8"},ko:{goToPage:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",pageXofY:"{arg0}/{arg1} \uD398\uC774\uC9C0",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0"},ms:{goToPage:"Pergi ke Halaman",nextPage:"Halaman Seterusnya",pageXofY:"Halaman {arg0} daripada {arg1}",prevPage:"Halaman Sebelumnya"},"nb-NO":{goToPage:"G\xE5 til side",nextPage:"Neste side",pageXofY:"Side {arg0} av {arg1}",prevPage:"Forrige side"},nl:{goToPage:"Ga naar pagina",nextPage:"Volgende pagina",pageXofY:"Pagina {arg0} van {arg1}",prevPage:"Vorige pagina"},pl:{goToPage:"Przejd\u017A do strony",nextPage:"Nast\u0119pna strona",pageXofY:"Strona {arg0} z {arg1}",prevPage:"Poprzednia strona"},"pt-PT":{goToPage:"Ir para p\xE1gina",nextPage:"P\xE1gina seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina anterior"},pt:{goToPage:"Ir \xE0 P\xE1gina",nextPage:"P\xE1gina Seguinte",pageXofY:"P\xE1gina {arg0} de {arg1}",prevPage:"P\xE1gina Anterior"},ru:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435",nextPage:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430",pageXofY:"\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 {arg0} \u0438\u0437 {arg1}",prevPage:"\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"},sk:{goToPage:"\xCDs\u0165 na stranu",nextPage:"Dal\u0161ia strana",pageXofY:"Strana {arg0} z {arg1}",prevPage:"Predch\xE1dzaj\xFAca strana"},sl:{goToPage:"Pojdi na stran",nextPage:"Naslednja stran",pageXofY:"Stran {arg0} od {arg1}",prevPage:"Prej\u0161nja stran"},sv:{goToPage:"G\xE5 till sida",nextPage:"N\xE4sta sida",pageXofY:"Sida {arg0} av {arg1}",prevPage:"F\xF6reg\xE5ende sida"},th:{goToPage:"\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E2B\u0E19\u0E49\u0E32",nextPage:"\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",pageXofY:"\u0E2B\u0E19\u0E49\u0E32 {arg0} \u0E08\u0E32\u0E01 {arg1}",prevPage:"\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32"},tr:{goToPage:"Sayfaya Git",nextPage:"Sonraki Sayfa",pageXofY:"Sayfa {arg0}/{arg1}",prevPage:"\xD6nceki Sayfa"},uk:{goToPage:"\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0443",nextPage:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0430 \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430",pageXofY:"\u0421\u0442\u043E\u0440\u0456\u043D\u043A\u0430 {arg0} \u0437 {arg1}",prevPage:"\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u044F \u0441\u0442\u043E\u0440\u0456\u043D\u043A\u0430"},"zh-Hans":{goToPage:"\u524D\u5F80\u9875\u9762",nextPage:"\u4E0B\u4E00\u9875",pageXofY:"\u7B2C {arg0}/{arg1} \u9875",prevPage:"\u4E0A\u4E00\u9875"},"zh-Hant":{goToPage:"\u5230\u6B64\u9801",nextPage:"\u4E0B\u4E00\u9801",pageXofY:"\u7B2C{arg0}\u9801\uFF0C\u5171{arg1}\u9801",prevPage:"\u4E0A\u4E00\u9801"}};var au=C({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),nu="_1nsi9h1f _1yep5z6ls _1yep5z6lk _1yep5z6eu",iu=C({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6g1 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z6zs",sm:"_1nsi9h12 _1yep5z6zv",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6z4 _1yep5z617s _1yep5z617q _1yep5z6130",pinned:"_1yep5z617e"}},defaultVariants:{},compoundVariants:[]}),su=C({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]});var sx={style:"decimal"},lx={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},uu=ut.forwardRef(({className:r,style:e,minValue:t=1,defaultValue:o=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:l="floating",hideActions:p,isDisabled:c,...d},m)=>{let{locale:u}=useLocale(),b=A(ou),y={...d,formatOptions:sx,minValue:t,incrementAriaLabel:a||b.formatMessage("nextPage"),decrementAriaLabel:n||b.formatMessage("prevPage"),defaultValue:o,"aria-label":i||b.formatMessage("goToPage")},f=ut.useRef(null),g=useNumberFieldState({...y,locale:u}),{inputProps:_,decrementButtonProps:v,incrementButtonProps:h,groupProps:x}=useNumberField({...y,onKeyDown:H=>{H.key==="Enter"&&f.current?.blur(),d.onKeyDown?.(H);},isDisabled:c},g,f),{hoverProps:w,isHovered:P}=useHover({}),{focusProps:z,isFocused:k,isFocusVisible:T}=useFocusRing(),R=l==="floating",[N,S]=lx[s],I=filterTruthyValues({"data-focus-visible":T,"data-focused":k,"data-hovered":P,"data-block-id":d["data-block-id"],"data-block-class":d["data-block-class"]}),F=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(x,w,I),className:classNames(iu({size:s,variant:l}),"BaselineUI-Pagination",r),style:e,ref:m,children:[p?null:jsxs(Fragment,{children:[jsx(D,{icon:N,...v,elementType:"div",size:s,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:F,isDisabled:c||v.isDisabled}),l==="floating"&&jsx(V,{orientation:"vertical"})]}),jsxs("div",{className:au({isFocused:k,variant:l,size:s}),"aria-label":b.formatMessage("pageXofY",{arg0:_.value,arg1:g.maxValue}),children:[jsx("input",{...mergeProps(_,z),ref:f,className:classNames("BaselineUI-Pagination-Input",nu),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:su({isDisabled:c}),children:["/ ",jsx(Qt,{value:g.maxValue})]})]}),p?null:jsxs(Fragment,{children:[l==="floating"&&jsx(V,{orientation:"vertical"}),jsx(D,{icon:S,...h,elementType:"div",size:s,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:F,isDisabled:c||h.isDisabled})]})]})});uu.displayName="Pagination";var mu=({date:r,...e})=>{let t=useDateFormatter(e);return jsx(Fragment,{children:t.format(r)})};mu.displayName="DateFormat";var Gr=C({defaultClassName:"_1f789qjm",variantClassNames:{variant:{neutral:"_1yep5z6112",red:"_1yep5z610c",green:"_1yep5z610g",blue:"_1yep5z610o","high-contrast":"_1yep5z6115"},isDisabled:{true:"_1yep5z61n1"},isSelected:{true:"_1yep5z6116"}},defaultVariants:{},compoundVariants:[]}),Pa=C({defaultClassName:"_1f789qj0 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ax _1yep5z6ay _1yep5z6az _1yep5z6bl _1yep5z6bm _1yep5z6bn _1yep5z6c9 _1yep5z6ca _1yep5z6cb _1yep5z6cx _1yep5z6cy _1yep5z6cz _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6l4 _1yep5z6lk _1yep5z6l7",variantClassNames:{isFocusVisible:{true:"_1f789qj1"},variant:{neutral:"_1yep5z6122",red:"_1yep5z611h",green:"_1yep5z611l",blue:"_1yep5z611t","high-contrast":"_1yep5z6126"},isDisabled:{true:"_1f789qj7 _1yep5z6121"},allowsRemoving:{true:"_1f789qj8"},isSelected:{true:"_1yep5z612c"},allowsSelection:{true:"_1f789qja"},isHovered:{true:"_1f789qjb"},size:{md:"_1f789qjc",sm:"_1f789qjd"}},defaultVariants:{},compoundVariants:[[{allowsSelection:!0,isHovered:!0,variant:"neutral"},"_1yep5z61ny"],[{allowsSelection:!0,isHovered:!0,variant:"red"},"_1yep5z61nd"],[{allowsSelection:!0,isHovered:!0,variant:"blue"},"_1yep5z61np"],[{allowsSelection:!0,isHovered:!0,variant:"green"},"_1yep5z61nh"],[{allowsSelection:!0,isHovered:!0,variant:"high-contrast"},"_1yep5z61o2"],[{allowsSelection:!0,isSelected:!0,isHovered:!0},"_1yep5z61oa"],[{variant:"high-contrast",isDisabled:!0},"_1yep5z61ny"],[{allowsRemoving:!0,size:"md"},"_1yep5z6190 _1yep5z6191 _1yep5z6192"],[{allowsRemoving:!0,size:"sm"},"_1yep5z61a3 _1yep5z61a4 _1yep5z61a5"]]}),fu="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69f _1yep5z69g _1yep5z69h",yu="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z69i _1yep5z69j _1yep5z69k",bu=C({defaultClassName:"_1f789qju",variantClassNames:{variant:{neutral:"_1f789qjv",red:"_1f789qjw",green:"_1f789qjx",blue:"_1f789qjy","high-contrast":"_1f789qjz"},isHovered:{true:"_1f789qj10"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qj11"],[{isHovered:!0,variant:"red"},"_1f789qj12"],[{isHovered:!0,variant:"blue"},"_1f789qj13"],[{isHovered:!0,variant:"green"},"_1f789qj14"],[{isHovered:!0,variant:"high-contrast"},"_1f789qj15"]]}),wa=C({defaultClassName:"_1f789qje",variantClassNames:{variant:{neutral:"_1yep5z610r",red:"_1yep5z610c",green:"_1yep5z610g",blue:"_1yep5z610o","high-contrast":"_1yep5z610w"},isDisabled:{true:"_1yep5z61ms"},isSelected:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]});var _u=({item:r,state:e,variant:t="neutral",size:o="md"})=>{let a=ut.useRef(null),{focusProps:n,isFocusVisible:i}=useFocusRing({within:!0}),{rowProps:s,gridCellProps:l,removeButtonProps:p,allowsRemoving:c,isDisabled:d,isSelected:m,allowsSelection:u}=useTag({item:r},e,a),b=ut.useRef(null),{buttonProps:y}=useButton(p,b),{hoverProps:f,isHovered:g}=useHover({isDisabled:d}),{hoverProps:_,isHovered:v}=useHover({isDisabled:d}),h=r.value?.icon,x=r.value?.data?.variant??t,w=o==="md"?XIcon$3:XIcon$1,P=o==="md"?CheckmarkIcon$3:CheckmarkIcon$1;return jsx("div",{...mergeProps(s,n,_),ref:a,className:classNames(Pa({isFocusVisible:i,variant:x,isDisabled:d,allowsRemoving:c,isSelected:m,allowsSelection:u,isHovered:v,size:o}),wa({variant:x,isDisabled:d,isSelected:m}),"BaselineUI-Tag"),children:jsxs("div",{...l,className:fu,children:[m?jsx(P,{size:o==="md"?16:12,className:classNames(Gr({variant:x,isDisabled:d,isSelected:m}),"BaselineUI-Tag-Icon")}):null,!m&&h?jsx(h,{size:o==="md"?16:12,className:classNames(Gr({variant:x,isDisabled:d,isSelected:m}),"BaselineUI-Tag-Icon")}):null,jsx(E,{paddingY:o==="md"?"sm":"none",typography:o==="sm"?"label.sm.medium":"label.md.medium",children:r.rendered}),c?jsx("button",{...mergeProps(y,f),className:bu({variant:x,isHovered:g}),children:jsx(w,{size:o==="md"?12:8})}):null]})})};var xu=ut.forwardRef(({className:r,style:e,"data-block-id":t,"data-block-class":o,items:a,size:n="md",...i},s)=>{let l=useMemo(()=>a.map(u=>({...u,data:{variant:u.variant}})),[a]),p=se(),c=ut.useRef(null),d=useListState({...i,items:l,children:p}),{gridProps:m}=useTagGroup(i,d,c);return jsx("div",{...m,className:classNames(yu,"BaselineUI-TagGroup",r),style:e,"data-block-id":t,"data-block-class":o,ref:L(s,c),children:[...d.collection].map(u=>jsx(_u,{state:d,item:u,variant:i.variant,size:n},u.key))})});xu.displayName="TagGroup";var Pu="_1yep5z6lh",wu=C({defaultClassName:"_1kvz17db _1yep5z6l4 _1yep5z6l6",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),ku=C({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6l4 _1yep5z6l5",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Su="_1kvz17de",Iu="_1yep5z6ev _1yep5z6dy",Ru=C({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6l4 _1yep5z6l7",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6g2",false:"_1yep5z6g3"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Tu="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Nu=C({defaultClassName:"_1kvz17d7 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Si=ut.forwardRef(({children:r,className:e,style:t},o)=>{let{headers:a}=useContext(ot),{disabledKeys:n}=useContext(ot),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let l=fe(s.target),p=l?Io(l):Io(),c=[...a?.keys()||[]].findIndex(y=>a?.get(y)?.current===p),d=a?.get(c||0),m=a?.size||0,u=y=>{let f=a.get(y-1<0?m-1:y-1);n?.has(f?.current?.getAttribute("data-key")||"")?u(y-1):f?.current?.focus();},b=y=>{let f=a.get((y+1)%m);n?.has(f?.current?.getAttribute("data-key")||"")?b(y+1):f?.current?.focus();};if(d)switch(s.key){case"Home":{s.preventDefault(),b(-1);break}case"End":{s.preventDefault(),u(m);break}case"ArrowDown":{s.preventDefault(),b(c);break}case"ArrowUp":{s.preventDefault(),u(c);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:t,className:classNames(Pu,e),ref:o,children:ut.Children.map(r,(s,l)=>ut.cloneElement(s,{index:l}))})});Si.displayName="AccordionBase";var ot=ut.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Mu=ut.forwardRef(({children:r,disabledKeys:e,defaultExpandedKeys:t=new Set,expandedKeys:o,expansionMode:a="multiple",onChange:n,className:i,style:s},l)=>{let[p,c]=ut.useState(t),d=ut.useRef(new Map).current,[m,u]=ut.useState(a);useEffect(()=>{u(a);},[a]),useEffect(()=>{n?.(p);},[p,n]);let b=useMemo(()=>({expandedKeys:o||p,setExpandedKeys:o?()=>{}:c,disabledKeys:e,headers:d,expansionMode:m}),[o,p,e,d,m]);return jsx(ot.Provider,{value:b,children:jsx(FocusScope,{children:jsx(Si,{className:i,style:s,ref:l,children:r})})})});Mu.displayName="Accordion";var Ri=ut.forwardRef(({title:r,actions:e,controlId:t,value:o,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},l)=>{let p=ut.useRef(null),{expandedKeys:c,setExpandedKeys:d,expansionMode:m,disabledKeys:u,headers:b}=useContext(ot),y=u?.has(o),f=useFocusManager();invariant(f);let{focusNext:g,focusPrevious:_}=f,{keyboardProps:v}=useKeyboard({onKeyDown:I=>{I.key==="ArrowRight"?g({wrap:!0}):I.key==="ArrowLeft"?_({wrap:!0}):I.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),b?.set(n,p);},[n,b]);let h=()=>{d(I=>{let M=new Set(I);return M.has(o)?M.delete(o):(m==="single"&&M.clear(),M.add(o)),M});},{buttonProps:x}=useButton({"aria-expanded":c.has(o),"aria-controls":t,onPress:h,isDisabled:y},p),{pressProps:w}=usePress({onPress:h,isDisabled:y}),{focusProps:P,isFocusVisible:z}=useFocusRing(),{hoverProps:k,isHovered:T}=useHover({isDisabled:y}),{focusProps:R,isFocusVisible:N}=useFocusRing({within:!0}),S=c.has(o);return jsxs("h3",{...mergeProps(v,w,k,R),className:Ru({isFocusVisible:z,isHovered:T,isDisabled:y}),ref:l,children:[jsxs("div",{className:Nu({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:ku({isExpanded:S}),size:8}),jsx("button",{...mergeProps(x,P),id:a,"data-key":o,className:Tu,ref:p,children:r})]}),e?.length?jsx("div",{"data-testid":"action-buttons",className:wu({showActionsOnTriggerOnly:s,isTriggered:N||T}),children:e.map((I,M)=>jsx(D,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...I},M))}):null,i?jsx("div",{className:Iu,children:i}):null]})});Ri.displayName="AccordionHeader";var Hu=ut.forwardRef(({title:r,actions:e,children:t,value:o,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:l},p)=>{let c=useId(),d=useId(),{expandedKeys:m}=useContext(ot),u=m.has(o);return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(Ri,{value:o,actions:e,id:d,title:r,controlId:c,ref:p,index:a,subLabel:n,showActionsOnTriggerOnly:l})}),jsx(AnimatePresence,{initial:!1,children:u?jsx(motion.section,{role:"region","aria-labelledby":d,id:c,className:Su,variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",children:jsx("div",{style:i,className:s,children:t})}):null})]})});Hu.displayName="AccordionItem";var Zr=ut.forwardRef(({variant:r,isOpen:e,selectedIcon:t,validationState:o="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":l,"data-block-class":p,...c},d)=>{let m=ut.useRef(null),{buttonProps:u,isPressed:b}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:f}=useHover({isDisabled:c.isDisabled}),{focusProps:g,isFocused:_,isFocusVisible:v}=useFocusRing(),h=Jt({isReadOnly:c.isReadOnly,validationState:o});c.isReadOnly&&(u.disabled=!1);let x=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":_,"data-focus-visible":v,"data-hovered":f,"data-pressed":b,"data-open":e,"data-block-id":l,"data-block-class":p});return jsxs("button",{...mergeProps(u,y,g,x),ref:L(d,m),className:classNames(dd({isFocused:v,isDisabled:c.isDisabled,isOpen:e,isHovered:f,variant:r}),Bt({variant:r,isHovered:f,isFocused:v,validationState:o,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:md,children:[t?jsx(t,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(At({validationState:o,isReadOnly:!!c.isReadOnly}),ud),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:cd({isOpen:e})})})]})});Zr.displayName="SelectButton";var ka=ut.createContext({state:null,popoverAnchorRef:null}),Ni=ut.forwardRef(({className:r,style:e,labelPosition:t="top",variant:o="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:l="bottom start",triggerClassName:p,triggerStyle:c,state:d,renderTrigger:m=({buttonProps:y,selectedValue:f,valueProps:g,isOpen:_,ref:v})=>{let h=f&&"icon"in f&&f.icon;return jsx(Zr,{...y,className:p,style:c,isOpen:_,isReadOnly:u.isReadOnly,ref:v,variant:o,validationState:u.validationState,selectedIcon:h||void 0,label:f?"label"in f&&f?.label:u.placeholder,valueProps:g})},...u},b)=>{let{popoverAnchorRef:y}=useContext(ka),f=ut.useRef(null),g=ye(u.portalContainer),{labelProps:_,triggerProps:v,valueProps:h,menuProps:x,descriptionProps:w,errorMessageProps:P}=useSelect({...u,validationState:u.validationState==="error"?"invalid":"valid"},d,f),z=Te({...u,descriptionProps:w,errorMessageProps:P,labelPosition:t}),k=d.selectedItem?.value??null;return jsxs(mt.Provider,{value:d,children:[jsxs("div",{style:e,className:classNames(Ye({labelPosition:t}),"BaselineUI-Select",r),"data-block-id":a,"data-block-class":n,ref:b,children:[u.label||z?jsxs("div",{className:Xe({labelPosition:t,hasMessage:!!z}),children:[u.label?jsx("div",{..._,className:classNames(We,"BaselineUI-Select-Label"),children:u.label}):null,t==="start"&&z]}):null,jsx(HiddenSelect,{state:d,triggerRef:f,isDisabled:u.isDisabled,label:u.label,name:u.name}),m({buttonProps:v,selectedValue:k,valueProps:h,isOpen:d.isOpen,ref:f}),t==="top"&&z]}),d?jsx(ze,{placement:l,portalContainer:g,offset:2,state:d,triggerRef:y||f,style:e,className:"BaselineUI-Select-Popover",...u,children:jsx(de,{...x,label:u.label,items:u.items,showSelectedIcon:u.showSelectedIcon,className:tt,optionStyle:i,optionClassName:s})}):null]})});Ni.displayName="SelectCore";var Gu=ut.forwardRef((r,e)=>{let t=se(),o=useSelectState({...r,validationState:r.validationState==="error"?"invalid":"valid",children:t});return jsx(Ni,{...r,ref:e,state:o})});Gu.displayName="SelectStandalone";var nt=ut.forwardRef((r,e)=>{let{state:t}=useContext(ka);return useEffect(()=>{invariant(t||r.items,"Select: A `state` that can be passed via context or `items` are required.");},[r.items,t]),t?jsx(Ni,{state:t,...r,ref:e}):jsx(Gu,{...r,ref:e})});nt.displayName="Select";var Xu=ut.forwardRef(({className:r,style:e,variant:t,"data-block-id":o,icon:a,tooltipProps:n,...i},s)=>{let l=ut.useRef(null),p=useCallback(({buttonProps:c,selectedValue:d,valueProps:m,isOpen:u,ref:b})=>{let y=d&&"icon"in d&&d.icon;return jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(Zr,{...c,isOpen:u,isReadOnly:i.isReadOnly,ref:b,variant:t,validationState:i.validationState,selectedIcon:y||void 0,label:d?"label"in d&&d?.label:i.placeholder,valueProps:m})})},[i,n,t]);return jsxs(E,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",r),"data-block-id":o,style:e,ref:L(s,l),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(nt,{...i,renderTrigger:p})]})});Xu.displayName="IconSelect";var Yu="_1017q4c5",Zu=C({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),Ju="_1017q4c4";var p0={sm:AvatarIcon,md:AvatarIcon$1},nr=ut.forwardRef(({className:r,style:e,size:t="md",icon:o=p0[t],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:l,imgLoading:p,"data-block-id":c,"data-block-class":d},m)=>{let{imgProps:u}=Ot({src:n,alt:a}),b=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(Zu({size:t,isDisabled:s}),"BaselineUI-Avatar",r),"data-disabled":s,ref:m,style:e,"aria-disabled":s,"data-block-id":c,"data-block-class":d,children:[n?jsx("img",{...u,loading:p,className:Ju}):null,!i&&!n&&jsx(o,{size:t==="sm"?16:24}),i&&!n?t==="sm"?b[0]:b:null,l?jsx("div",{"data-testid":"notification",className:Yu}):null]})});nr.displayName="Avatar";var Qu="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",em=C({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6l4 _1yep5z6l7 _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z610r"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z610v"},variant:{primary:"_1x62fhbb _1yep5z6zs",ghost:"_1yep5z6zv"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mo"],[{variant:"primary",isSelected:!0},"_1yep5z61nv"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61mv"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61nw"]]}),tm=C({defaultClassName:"_1x62fhb3 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6vf _1yep5z6vg _1yep5z6vh"}},defaultVariants:{},compoundVariants:[]}),rm="_1x62fhbl",Li=C({defaultClassName:"_1x62fhbf _1yep5z6f6",variantClassNames:{isHovered:{true:"_1yep5z6112"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z6114"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mz"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61n4"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1yep5z61n1"]]}),om="_1yep5z6lo _1yep5z6ll _1yep5z6hu _1yep5z6ln",am=C({defaultClassName:"_1x62fhb0 _1yep5z6lh _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{variant:{primary:"_1yep5z6120",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var nm=({state:r,...e})=>{let t=ut.useRef(null),{tabPanelProps:o}=useTabPanel(e,r,t),{selectedItem:a}=r,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:l,"data-block-id":p}=a.value;return jsx("div",{...mergeProps(o,n),ref:t,className:classNames({[om]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":p,style:l,children:a?.props.children})};var Ai=ut.forwardRef(({className:r,style:e,tabHeaderStyle:t,tabHeaderClassName:o,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...l},p)=>{let c=useTabListState({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues}),d=ut.useRef(null),{tabListProps:m}=useTabList({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues},c,d);return jsxs("div",{className:classNames("BaselineUI-Tabs",r),style:e,ref:p,"data-block-id":s,children:[jsxs("div",{className:classNames(am({variant:a}),o),style:t,children:[jsx("div",{...m,className:tm({variant:a}),ref:d,children:[...c.collection].map(u=>(invariant(u.value,"TabItem requires a value prop"),jsx(sm,{item:u,state:c,onRemove:i,variant:a},u.key)))}),n?.map((u,b)=>jsx("div",{className:Qu,children:jsx(D,{...u,variant:"secondary",size:"sm",className:classNames(rm,u.className)})},b))]}),jsx(nm,{state:c},c.selectedItem?.key)]})});Ai.displayName="TabsBase";var sm=({item:r,onRemove:e,state:t,variant:o})=>{let{key:a,value:n}=r,i=ut.useRef(null),{tabProps:s,isSelected:l,isDisabled:p}=useTab({key:a},t,i),{hoverProps:c,isHovered:d}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:u,titleStyle:b,titleClassName:y}=n,{focusProps:f,isFocusVisible:g,isFocused:_}=useFocusRing(),{keyboardProps:v}=useKeyboard({onKeyDown:x=>{x.key==="Backspace"&&e?e(a):x.continuePropagation();}}),h=filterTruthyValues({"data-selected":l,"data-disabled":p,"data-focused":_,"data-hovered":d,"data-focus-visible":g});return jsxs("div",{...mergeProps(v,s,c,f,h),className:classNames(em({isHovered:d,isSelected:l,isFocusVisible:g,isDisabled:p,variant:o}),"BaselineUI-Tabs-TabButton",y),style:b,ref:i,children:[u?jsx(u,{size:20,className:Li({isHovered:d,isSelected:l,isDisabled:p,variant:o})}):null,m,e?jsx(D,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{e(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:l||_||d?1:0},className:Li({isHovered:d,isSelected:l,isDisabled:p,variant:o})}):null]})};sm.displayName="TabButton";var pm=ut.forwardRef(function({children:e,...t},o){let a=useMemo(()=>ut.Children.map(e,n=>!n||!ut.isValidElement(n)||typeof n.type=="string"?null:{...n.props,id:n.props.value}).filter(Boolean),[e]);return jsx(Ai,{...t,ref:o,items:a,children:n=>jsx(Item,{title:n.title,children:n.children},n.key)})});pm.displayName="Tabs";var cm=({children:r,title:e,value:t})=>(invariant(t,"TabItem requires a value prop"),invariant(e,"TabItem requires a title prop"),invariant(r,"TabItem requires children"),r);cm.displayName="TabItem";var dm={ar:{close:"\u0625\u063A\u0644\u0627\u0642"},cs:{close:"Zav\u0159\xEDt"},cy:{close:"Cau"},da:{close:"Luk"},de:{close:"Schlie\xDFen"},el:{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF"},"en-GB":{close:"Close"},en:{close:"Close"},es:{close:"Cerrar"},fi:{close:"Sulje"},"fr-CA":{close:"Fermer"},fr:{close:"Fermer"},he:{close:"\u05E1\u05D2\u05D9\u05E8\u05D4"},hr:{close:"Zatvori"},id:{close:"Tutup"},it:{close:"Chiudi"},ja:{close:"\u9589\u3058\u308B"},ko:{close:"\uB2EB\uAE30"},ms:{close:"Tutup"},"nb-NO":{close:"Lukk"},nl:{close:"Sluit"},pl:{close:"Zamknij"},"pt-PT":{close:"Fechar"},pt:{close:"Fechar"},ru:{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"},sk:{close:"Zavrie\u0165"},sl:{close:"Zapri"},sv:{close:"St\xE4ng"},th:{close:"\u0E1B\u0E34\u0E14"},tr:{close:"Kapat"},uk:{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438"},"zh-Hans":{close:"\u5173\u95ED"},"zh-Hant":{close:"\u95DC\u9589"}};var um=C({defaultClassName:"kfun6yt _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6af _1yep5z6ag _1yep5z6ah",variantClassNames:{arrangement:{single:"_1yep5z6vc _1yep5z6vd _1yep5z6ve",multi:"_1yep5z614v _1yep5z614w _1yep5z614x",compact:"_1yep5z614v _1yep5z614w _1yep5z614x"}},defaultVariants:{},compoundVariants:[]}),mm=C({defaultClassName:"kfun6y0 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lh",variantClassNames:{variant:{info:"_1yep5z611s",warning:"_1yep5z611o",error:"_1yep5z611g",success:"_1yep5z611k"},arrangement:{single:"kfun6y5 _1yep5z616a _1yep5z616b _1yep5z616c _1yep5z615a _1yep5z615b _1yep5z615c",multi:"kfun6y6",compact:"kfun6y7 _1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oi _1yep5z6oj _1yep5z6ok _1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6nc _1yep5z6nd _1yep5z6ne _1yep5z6151 _1yep5z6152 _1yep5z6153 _1yep5z6wc _1yep5z6wd _1yep5z6we"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:!1,arrangement:"single"},"_1yep5z6183 _1yep5z6184 _1yep5z6185 _1yep5z61af _1yep5z61ag _1yep5z61ah _1yep5z61bl _1yep5z61bm _1yep5z61bn _1yep5z6199 _1yep5z619a _1yep5z619b"],[{hasButton:!0,arrangement:"compact"},"_1yep5z6183 _1yep5z6184 _1yep5z6185 _1yep5z61af _1yep5z61ag _1yep5z61ah _1yep5z61bl _1yep5z61bm _1yep5z61bn _1yep5z6199 _1yep5z619a _1yep5z619b"],[{hasCloseButton:!0,arrangement:"compact"},"_1yep5z61a3 _1yep5z61a4 _1yep5z61a5 _1yep5z618x _1yep5z618y _1yep5z618z"]]}),fm=C({defaultClassName:"kfun6yq _1yep5z6eu",variantClassNames:{size:{sm:"_1yep5z6100",md:"_1yep5z6103"}},defaultVariants:{},compoundVariants:[]}),ym=C({defaultClassName:"kfun6ym _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{arrangement:{single:"kfun6yn",multi:"_1yep5z6157 _1yep5z6158 _1yep5z6159",compact:"_1yep5z6n0 _1yep5z6n1 _1yep5z6n2 _1yep5z6pc _1yep5z6pd _1yep5z6pe _1yep5z6qi _1yep5z6qj _1yep5z6qk _1yep5z6o6 _1yep5z6o7 _1yep5z6o8 _1yep5z615p _1yep5z615q _1yep5z615r"}},defaultVariants:{},compoundVariants:[]}),bm=C({defaultClassName:"kfun6yh _1yep5z6le",variantClassNames:{variant:{info:"_1yep5z610n",warning:"_1yep5z610j",error:"_1yep5z610b",success:"_1yep5z610f"}},defaultVariants:{},compoundVariants:[]}),gm=C({defaultClassName:"kfun6ye _1yep5z6eu",variantClassNames:{size:{sm:"_1yep5z6102",md:"_1yep5z6105"}},defaultVariants:{},compoundVariants:[]}),vm=C({defaultClassName:"kfun6ya _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{arrangement:{single:"_1yep5z615a _1yep5z615b _1yep5z615c",multi:"_1yep5z6qu _1yep5z6qv _1yep5z6qw _1yep5z6t6 _1yep5z6t7 _1yep5z6t8",compact:"_1yep5z614v _1yep5z614w _1yep5z614x"}},defaultVariants:{},compoundVariants:[]});var j0={error:{sm:ErrorAltCircleFilledIcon,md:ErrorAltCircleFilledIcon$1},info:{sm:InfoCircleFilledIcon,md:InfoCircleFilledIcon$1},success:{sm:CheckmarkCircleFilledIcon,md:CheckCircleFilledIcon},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Ta=ut.forwardRef(({className:r,description:e,actionLabel:t,onAction:o,style:a,variant:n="info",title:i,arrangement:s="single",onClose:l,size:p="sm","data-block-id":c,"data-block-class":d,elementProps:m},u)=>{let b=A(dm),y=t&&jsx(G,{variant:s==="compact"?"tertiary":"ghost",label:t,onPress:o}),f=j0[n][p];return jsxs("div",{className:classNames(mm({variant:n,arrangement:s,hasButton:!!t||!!l,hasCloseButton:!!l}),"BaselineUI-InlineAlert",r),"data-block-id":c,"data-block-class":d,style:a,role:"alert",ref:u,...m?.root,children:[jsxs("div",{className:vm({arrangement:s}),children:[jsx(f,{className:bm({variant:n}),size:16}),jsxs("div",{className:um({arrangement:s}),...m?.content,children:[jsx("h3",{className:gm({size:p}),...m?.title,children:i}),jsx("section",{className:fm({size:p}),...m?.description,children:e})]}),s==="compact"&&y]}),jsxs("div",{className:ym({arrangement:s}),children:[s!=="compact"&&y,l?jsx(D,{variant:"secondary",icon:XIcon$2,size:"sm",onPress:l,"aria-label":b.formatMessage("close"),...m?.close}):null]})]})});Ta.displayName="InlineAlert";var it={ar:{add:"\u0625\u0636\u0627\u0641\u0629",addColor:"\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",cancel:"\u0625\u0644\u063A\u0627\u0621",colorFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",colorPresets:"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",customColors:"\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",newColor:"\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",noColor:"\u0644\u0627 \u064A\u0648\u062C\u062F",removeColor:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",transparent:"\u0634\u0641\u0627\u0641"},cs:{add:"P\u0159idat",addColor:"P\u0159idat barvu",cancel:"Zru\u0161it",colorFormat:"Form\xE1t barvy",colorPresets:"P\u0159edvolby barev",customColors:"Vlastn\xED barvy",newColor:"Vlastn\xED barva",noColor:"Nen\xED",removeColor:"Odebrat barvu",transparent:"Pr\u016Fhledn\xE1"},cy:{add:"Ychwanegu",addColor:"Ychwanegu Lliw",cancel:"Canslo",colorFormat:"Fformat Lliw",colorPresets:"Rhagosodiadau Lliw",customColors:"Lliwiau Custom",newColor:"Lliw Personol Newydd",noColor:"Dim",removeColor:"Tynnu Lliw",transparent:"Tryloyw"},da:{add:"Tilf\xF8j",addColor:"Tilf\xF8j Farve",cancel:"Annuller",colorFormat:"Farveformat",colorPresets:"Farvevalg",customColors:"Brugerdefinerede farver",newColor:"Ny tilpasset farve",noColor:"Ingen",removeColor:"Fjern Farve",transparent:"Transparent"},de:{add:"Hinzuf\xFCgen",addColor:"Farbe hinzuf\xFCgen",cancel:"Abbrechen",colorFormat:"Farbformat",colorPresets:"Farbvorlagen",customColors:"Benutzerdefinierte Farben",newColor:"Neue benutzerdefinierte Farbe",noColor:"Kein",removeColor:"Farbe entfernen",transparent:"Transparent"},el:{add:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",addColor:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",colorFormat:"\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",colorPresets:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",customColors:"\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",newColor:"\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",noColor:"\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",removeColor:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",transparent:"\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2"},"en-GB":{add:"Add",addColor:"Add Colour",cancel:"Cancel",colorFormat:"Colour Format",colorPresets:"Colour Presets",customColors:"Custom Colours",newColor:"New Custom Colour",noColor:"None",removeColor:"Remove Colour",transparent:"Transparent"},en:{add:"Add",addColor:"Add Color",cancel:"Cancel",colorFormat:"Color Format",colorPresets:"Color Presets",customColors:"Custom Colors",newColor:"New Custom Color",noColor:"None",removeColor:"Remove Color",transparent:"Transparent"},es:{add:"A\xF1adir",addColor:"A\xF1adir color",cancel:"Cancelar",colorFormat:"Formato de color",colorPresets:"Preajustes de color",customColors:"Colores personalizados",newColor:"Nuevo color personalizado",noColor:"Ninguna",removeColor:"Eliminar color",transparent:"Transparente"},fi:{add:"Lis\xE4\xE4",addColor:"Lis\xE4\xE4 v\xE4ri",cancel:"Kumoa",colorFormat:"V\xE4rimuoto",colorPresets:"V\xE4rin esiasetukset",customColors:"Mukautetut v\xE4rit",newColor:"Uusi muokattu v\xE4ri",noColor:"Ei mit\xE4\xE4n",removeColor:"Poista v\xE4ri",transparent:"L\xE4pin\xE4kyv\xE4"},"fr-CA":{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},fr:{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},he:{add:"\u05D4\u05D5\u05E1\u05E4\u05D4",addColor:"\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC",colorFormat:"\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",colorPresets:"\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",customColors:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",newColor:"\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",noColor:"\u05DC\u05DC\u05D0",removeColor:"\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3"},hr:{add:"Dodati",addColor:"Dodaj boju",cancel:"Otka\u017Ei",colorFormat:"Format boje",colorPresets:"Prijedlozi boja",customColors:"Prilago\u0111ene boje",newColor:"Nova prilago\u0111ena boja",noColor:"Prazno",removeColor:"Ukloni boju",transparent:"Prozirna"},id:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batalkan",colorFormat:"Format Warna",colorPresets:"Preset Warna",customColors:"Warna Kustom",newColor:"Warna Khusus Baru",noColor:"Tidak ada",removeColor:"Hapus Warna",transparent:"Transparan"},it:{add:"Aggiungi",addColor:"Aggiungi colore",cancel:"Annulla",colorFormat:"Formato del colore",colorPresets:"Colori predefiniti",customColors:"Colori personalizzati",newColor:"Nuovo colore personalizzato",noColor:"Nessuno",removeColor:"Rimuovi colore",transparent:"Trasparente"},ja:{add:"\u8FFD\u52A0",addColor:"\u8272\u3092\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorFormat:"\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",colorPresets:"\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",customColors:"\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",newColor:"\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",noColor:"\u306A\u3057",removeColor:"\u8272\u3092\u524A\u9664",transparent:"\u900F\u660E"},ko:{add:"\uCD94\uAC00",addColor:"\uC0C9\uC0C1 \uCD94\uAC00",cancel:"\uCDE8\uC18C",colorFormat:"\uC0C9\uC0C1 \uD615\uC2DD",colorPresets:"\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",customColors:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",newColor:"\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",noColor:"\uC5C6\uC74C",removeColor:"\uC0C9\uC0C1 \uC81C\uAC70",transparent:"\uD22C\uBA85"},ms:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batal",colorFormat:"Format Warna",colorPresets:"Praset Warna",customColors:"Warna Kustom",newColor:"Warna Tersuai Baharu",noColor:"Tiada",removeColor:"Buang Warna",transparent:"Lut Sinar"},"nb-NO":{add:"Legg til",addColor:"Legg til farge",cancel:"Avbryt",colorFormat:"Fargeformat",colorPresets:"Fargeinnstillinger",customColors:"Egendefinerte farger",newColor:"Ny tilpasset farge",noColor:"Ingen",removeColor:"Fjern farge",transparent:"Gjennomsiktig"},nl:{add:"Voeg toe",addColor:"Kleur toevoegen",cancel:"Annuleer",colorFormat:"Kleurformaat",colorPresets:"Kleurvoorinstellingen",customColors:"Aangepaste kleuren",newColor:"Nieuwe aangepaste kleur",noColor:"Geen",removeColor:"Kleur verwijderen",transparent:"Doorzichtig"},pl:{add:"Dodaj",addColor:"Dodaj kolor",cancel:"Anuluj",colorFormat:"Format koloru",colorPresets:"Wst\u0119pnie ustawione kolory",customColors:"Niestandardowe kolory",newColor:"Nowy kolor niestandardowy",noColor:"Brak",removeColor:"Usu\u0144 kolor",transparent:"Prze\u015Bwiecaj\u0105ce"},"pt-PT":{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Predefini\xE7\xF5es de cor",customColors:"Cores personalizadas",newColor:"Nova cor personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},pt:{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Pr\xE9-ajustes de Cores",customColors:"Cores personalizadas",newColor:"Nova Cor Personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},ru:{add:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",addColor:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",colorPresets:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",customColors:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",newColor:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",noColor:"\u041D\u0435\u0442",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",transparent:"\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439"},sk:{add:"Prida\u0165",addColor:"Prida\u0165 farbu",cancel:"Zru\u0161i\u0165",colorFormat:"Form\xE1t farby",colorPresets:"Predvo\u013Eby farieb",customColors:"Vlastn\xE9 farby",newColor:"Vlastn\xE1 farba",noColor:"\u017Diadny",removeColor:"Odstr\xE1ni\u0165 farbu",transparent:"Prieh\u013Eadn\xE1"},sl:{add:"Dodaj",addColor:"Dodaj barvo",cancel:"Prekli\u010Di",colorFormat:"Barvni format",colorPresets:"Barvne predloge",customColors:"Prilagojene barve",newColor:"Nova barva po meri",noColor:"Prazna stran",removeColor:"Odstrani barvo",transparent:"Prosojna"},sv:{add:"L\xE4gg till",addColor:"L\xE4gg till f\xE4rg",cancel:"Avbryt",colorFormat:"F\xE4rgformat",colorPresets:"F\xF6rval f\xF6r f\xE4rger",customColors:"Anpassade f\xE4rger",newColor:"Ny anpassad f\xE4rg",noColor:"Ingen",removeColor:"Ta bort f\xE4rg",transparent:"Genomskinligt"},th:{add:"\u0E40\u0E1E\u0E34\u0E48\u0E21",addColor:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",colorFormat:"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",colorPresets:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",customColors:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",newColor:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",noColor:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",removeColor:"\u0E25\u0E1A\u0E2A\u0E35",transparent:"\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A"},tr:{add:"Ekle",addColor:"Renk Ekle",cancel:"Vazge\xE7",colorFormat:"Renk Format\u0131",colorPresets:"Renk \xD6nayarlar\u0131",customColors:"\xD6zel Renkler",newColor:"Yeni \xF6zel renk",noColor:"Hi\xE7biri",removeColor:"Rengi Kald\u0131r",transparent:"\u015Eeffaf"},uk:{add:"\u0414\u043E\u0434\u0430\u0442\u0438",addColor:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",cancel:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",colorPresets:"\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",customColors:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",newColor:"\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",noColor:"\u041D\u0435\u043C\u0430\u0454",removeColor:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",transparent:"\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439"},"zh-Hans":{add:"\u6DFB\u52A0",addColor:"\u6DFB\u52A0\u989C\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u989C\u8272\u683C\u5F0F",colorPresets:"\u989C\u8272\u9884\u8BBE",customColors:"\u81EA\u5B9A\u4E49\u989C\u8272",newColor:"\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",noColor:"\u65E0",removeColor:"\u79FB\u9664\u989C\u8272",transparent:"\u900F\u660E"},"zh-Hant":{add:"\u52A0\u5165",addColor:"\u6DFB\u52A0\u984F\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u984F\u8272\u683C\u5F0F",colorPresets:"\u984F\u8272\u9810\u8A2D\u9805",customColors:"\u81EA\u8A02\u984F\u8272",newColor:"\u65B0\u81EA\u8A02\u984F\u8272",noColor:"\u7121",removeColor:"\u79FB\u9664\u984F\u8272",transparent:"\u900F\u660E"}};var Na=({children:r})=>{let{triggerProps:e}=ut.useContext(yt);return jsx(PressResponder,{...e,children:r})};Na.displayName="ModalTrigger";var G0=({children:r})=>{let{state:e}=ut.useContext(yt);return jsx(PressResponder,{onPress:()=>{e?.close();},children:r})};var hm="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lh",_m="_1dbkl5e",zm=C({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6ls _1yep5z6lk _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6lj _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z610v"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Cm="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf",xm=C({defaultClassName:"_1dbkl50 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6oc _1yep5z6od _1yep5z6oe",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Ea="_1dbkl5l _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z69f _1yep5z69g _1yep5z69h",Pm="_1dbkl5f z9nup87",La="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",wm="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lk",km="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jd _1yep5z6je _1yep5z6jf",Ma=C({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6n0 _1yep5z6n1 _1yep5z6n2"}},defaultVariants:{},compoundVariants:[]}),Fi="_1dbkl5v _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix",Sm=C({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lt _1yep5z6h4 _1yep5z6lk _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z612y"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z617e"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61oz"]]}),Im=C({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f5 _1yep5z6lj _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6l4 _1yep5z6l7",variantClassNames:{isHovered:{true:"_1yep5z6120"},isFocusVisible:{true:"_1yep5z617k _1yep5z617i _1yep5z617l _1yep5z613r"},isDisabled:{true:"_1yep5z6114"}},defaultVariants:{},compoundVariants:[]}),eo="_1dbkl5u",Da="_1dbkl5g",Aa="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69f _1yep5z69g _1yep5z69h",ji="_1dbkl5x",Rm="_1dbkl5w",Hi="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69l _1yep5z69m _1yep5z69n",Ba=C({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lo _1yep5z6ia _1yep5z6ib _1yep5z6ic _1yep5z6lt _1yep5z6lw",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z617i _1yep5z613r _1yep5z617k"}},defaultVariants:{},compoundVariants:[]}),Vi="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6ia _1yep5z6ib _1yep5z6ic";var Tm=C({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6le _1yep5z6i6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617n"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61th _1yep5z61tf _1yep5z61po _1yep5z61tk"],[{isSelected:!0,isDisabled:!0},"_1yep5z61th _1yep5z61tf _1yep5z61po _1yep5z61tk _1yep5z61py"],[{isHovered:!0,isSelected:!1},"_1yep5z61tk _1yep5z61th _1yep5z61tf _1yep5z61ps"]]}),Nm="_1344e9q9 _1yep5z6fl";var st=ut.forwardRef(({color:r,isFocusVisible:e,isSelected:t,isInteractive:o,isDisabled:a,style:n,className:i,id:s,tooltip:l,"data-block-id":p,"data-block-class":c,...d},m)=>{let u=r&&r!==Le&&(typeof r=="string"?parseColor(r):r),{formatMessage:b}=A(),y=!u,{colorSwatchProps:f}=useColorSwatch({color:y?"#000000":r}),{hoverProps:g,isHovered:_}=useHover({isDisabled:a||!o}),v=filterTruthyValues({"data-focus-visible":e,"data-selected":t,"data-hovered":_,"data-block-id":p,"data-block-class":c,"data-disabled":a,"data-interactive":o}),h=y?b(Em.none):f["aria-label"],x=d["aria-label"]??h,{tooltipProps:w}=jo({tooltip:l,label:x}),P=jsx("div",{...mergeProps(g,v,y?{}:f),style:n,"aria-label":y?b(Em.none):f["aria-label"],role:"img",className:classNames(Tm({removeBlendMode:y,isFocusVisible:e,isDisabled:!!a,isSelected:!!t,isHovered:_}),"BaselineUI-ColorSwatch",i),ref:m,id:s,...d,children:jsx(E,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:u?Lm(u,4):void 0,children:y?jsx("div",{className:Nm}):null})});return w&&!a?jsx(ne,{...w,children:jsx(aa,{children:P})}):P});st.displayName="ColorSwatch";var Em=K({none:{id:"none",defaultMessage:"None"}});var Dm=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],oo=parseColor("#000000").toFormat("hsla"),pe="hsla",ro="hexa";function vt(r){return typeof r=="string"?parseColor(r).toFormat(pe):r?r.toFormat(pe):null}function Am(r,e){return r?.getChannelValue("alpha")?e?.toString(ro)===r.toString(ro):!e?.getChannelValue("alpha")}function Bm(r,e,t){return e?.label?e.label:r?.getChannelValue("alpha")===0?t:r?.toString("rgba")}var Le="NONE";function Om(r,e){let t=e?.map(a=>({id:parseColor(a.color).toString(ro),label:a.label}))||[],o={id:Le,label:r};return [...t,o]}var Oa=(r,{optionProps:e,isFocusVisible:t,isSelected:o},a)=>(invariant(r.value&&"label"in r.value,"Item must have label"),jsx("li",{...e,ref:a,className:wm,children:jsx(st,{color:r.value.id,isFocusVisible:t,isSelected:o,"aria-label":r.value.label,isInteractive:!0})})),Lm=(r,e=4)=>{let t=r.getChannelValue("alpha")===0,o=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:t?o:`linear-gradient(${r.toString("hexa")}, ${r.toString("hexa")}), ${o}`,backgroundSize:`${e}px ${e}px`}};var jm=({value:r,...e})=>{let t=ut.useRef(null),o=ut.useRef(null),a=ut.useRef(null),n=useColorAreaState({...e,value:r}),{colorAreaProps:i,xInputProps:s,yInputProps:l,thumbProps:p}=useColorArea({...e,value:r,inputXRef:t,inputYRef:o,containerRef:a},n);useEffect(()=>{t.current?.focus();},[]);let{focusProps:c,isFocusVisible:d}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(hm,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...p,className:classNames(Ba({isFocusVisible:d}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...p.style,transform:"translate(-50%, -50%)",backgroundColor:vt(r)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:t,...s,...c}),jsx("input",{ref:o,...l,...c})]})})};var $m=({color:r,setColor:e,allowAlpha:t,...o})=>{let a=useColorFieldState({value:r,onChange:d=>{e(vt(d)?.toFormat(pe).withChannelValue("alpha",r.getChannelValue("alpha")??1)||oo);}}),n=ut.useRef(null),{inputProps:i}=useColorField({...o,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:l}=useFocusRing({isTextInput:!0}),{hoverProps:p,isHovered:c}=useHover({});return jsxs("div",{className:classNames(Fi,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,p),ref:n,className:Sm({isFocused:l,isHovered:c,allowAlpha:t})}),t?jsx(qm,{color:r,setColor:e}):null]})},Um=({color:r,setColor:e,allowAlpha:t})=>{let o=r.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(Fi,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"rgba":"rgb",children:[jsx(Oe,{"aria-label":r.getChannelName("red",a),value:o.getChannelValue("red"),showStepper:!1,className:eo,onChange:n=>{e(o.withChannelValue("red",n).toFormat(pe));},step:1,minValue:0,maxValue:255}),jsx(Oe,{"aria-label":r.getChannelName("green",a),value:o.getChannelValue("green"),showStepper:!1,className:eo,onChange:n=>{e(o.withChannelValue("green",n).toFormat(pe));},step:1,minValue:0,maxValue:255}),jsx(Oe,{"aria-label":r.getChannelName("blue",a),value:o.getChannelValue("blue"),showStepper:!1,className:eo,onChange:n=>{e(o.withChannelValue("blue",n).toFormat(pe));},step:1,minValue:0,maxValue:255}),t?jsx(qm,{color:r,setColor:e}):null]})},bP={style:"percent",maximumFractionDigits:0},qm=({color:r,setColor:e})=>{let{locale:t}=useLocale(),o=useCallback(a=>{e(r.withChannelValue("alpha",a));},[r,e]);return jsx(Oe,{"aria-label":r.getChannelName("alpha",t),value:r.getChannelValue("alpha"),formatOptions:bP,className:eo,showStepper:!1,onChange:o,minValue:0,maxValue:1})};var Ki=({channel:r,...e})=>{let{locale:t}=useLocale(),o=useColorSliderState({...e,channel:r,locale:t}),a=ut.useRef(null),n=ut.useRef(null),{trackProps:i,thumbProps:s,inputProps:l}=useColorSlider({...e,channel:r,trackRef:a,inputRef:n,"aria-label":o.value.getChannelName(r,t)},o),{focusProps:p,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(La,{[kp({size:"xs"})]:r==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":r,...i,ref:a,children:[r==="alpha"&&jsx("div",{className:Vi}),jsx("div",{className:La,style:i.style}),jsxs("div",{className:classNames(Ba({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:Vi,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:o.getDisplayColor().toString("css"),height:8},className:La}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...l,...p})})]})]})};var Fa=({color:r,setColor:e,allowAlpha:t,onChangeEnd:o})=>{let[a,n]=ut.useState("hex"),{formatMessage:i}=A(it);return jsxs(Fragment,{children:[jsx(jm,{value:r,xChannel:"saturation",yChannel:"lightness",onChange:e,onChangeEnd:o}),jsxs("div",{className:Hi,children:[jsx(Ki,{channel:"hue",value:r,onChange:e,onChangeEnd:o}),t?jsx(Ki,{channel:"alpha",value:r,onChange:e,onChangeEnd:o}):null]}),jsxs("div",{className:classNames(Hi,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(nt,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Dm,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx($m,{color:r,setColor:s=>{e(s),o?.(s);},allowAlpha:t}),a==="rgb"&&jsx(Um,{color:r,setColor:s=>{e(s),o?.(s);},allowAlpha:t})]})]})};var Jm=({color:r,setColor:e,storePickedColorKey:t,addColorButtonLabel:o,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:l}=useLocale(),{formatMessage:p}=A(it),c=ut.useRef(null),d=Ze(c.current),[m,u]=zp(t,[]),b=ut.useRef(null),[y,f]=ut.useState(r),g=ut.useMemo(()=>m.map(P=>({id:P,label:parseColor(P).getColorName(l),description:P})),[m,l]),_=useCallback(()=>{let P=i==="active"?r:y;if(m.includes(P.toString(pe))){b.current?.querySelector(`[data-key='${P.toString(pe)}']`)?.classList.add(ji);return}u([...m,P.toString(pe)]);},[m,r,u,y,i]);useEffect(()=>{let P=b.current;function z(k){k.animationName===Rm&&k.target?.classList.remove(ji);}return P?.addEventListener("animationend",z),()=>{P?.removeEventListener("animationend",z);}},[]);let v=useId(),h=jsx(D,{ref:c,variant:"secondary",size:"md","aria-label":o,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),x=useCallback(P=>jsxs(ge,{size:"content",className:Ma({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":p("newColor"),children:[jsx(Fa,{color:y,setColor:f,allowAlpha:s}),jsx(V,{}),jsx(E,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(E,{display:"inline-flex",gap:"lg",children:[jsx(G,{label:p("cancel"),size:"sm",variant:"secondary",onPress:P}),jsx(G,{label:p("add"),variant:"primary",onPress:()=>{_(),P();},size:"sm"})]})})]}),[y,_,p,s]),w=useCallback(P=>{invariant(P instanceof Set,"Key must be a set");let z=[...P][0];z&&e(parseColor(z).toFormat(pe));},[e]);return jsxs(Fragment,{children:[jsx(V,{}),jsxs("div",{className:classNames(km,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:v,children:n}),jsxs(E,{display:"flex",children:[!!m.length&&m.includes(r.toString(pe))&&jsx(D,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{u(m.filter(P=>P!==r.toString(pe)));}}),i==="active"&&h,i==="lazy"&&(d==="mobile"?jsxs(Ne,{children:[jsx(Na,{children:h}),jsx(Fe,{style:{zIndex:1e5},children:({close:P})=>x(P)})]}):jsxs(Ae,{type:"dialog",children:[jsx(Be,{children:h}),jsx(Ee,{placement:"right top",className:Da,offset:6,children:({close:P})=>x(P)})]}))]})]}),!!m.length&&jsx(de,{items:g,layout:"grid","aria-labelledby":v,className:classNames(Ea,Aa,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Oa,ref:b,autoFocus:!1,selectionMode:"single",selectedKeys:[r.toString(pe)],onSelectionChange:w})]})};var Xi=ut.forwardRef(({setColor:r,color:e,triggerRef:t,autoFocus:o,presets:a,state:n},i)=>{let{formatMessage:s}=A(it),l=useCallback(p=>{if(p instanceof Set&&p.size){let c=[...p][0],d=a.find(m=>m.id===c);invariant(d,"Preset not found"),r(d.id===Le?null:parseColor(d.id).toFormat(pe)),n.close();}},[n,a,r]);return jsx("div",{className:classNames(Aa,"BaselineUI-ColorInput-Presets"),style:{minWidth:t.current?.offsetWidth},ref:i,children:jsx(de,{autoFocus:o,items:a,layout:"grid","aria-label":s("colorPresets"),className:Ea,renderOption:Oa,selectionMode:"single",selectedKeys:[e?.toString(ro)||Le],onSelectionChange:l})})});Xi.displayName="ColorPresetList";var no=ut.forwardRef(({color:r,colorLabel:e,colorName:t,...o},a)=>{let n=ut.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:o.isDisabled}),{buttonProps:l,isPressed:p}=useButton(o,n),{isFocusVisible:c,focusProps:d}=useFocusRing(),m=filterTruthyValues({"data-block-id":o["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":o.isDisabled,"data-hovered":s,"data-pressed":p}),u=So(),b=So();return jsxs("button",{...mergeProps(l,i,d,m),style:o.style,className:classNames(zm({isHovered:s,isFocusVisible:c||o.isOpen,isDisabled:o.isDisabled,labelPosition:o.labelPosition}),"BaselineUI-ColorInputButton",o.className),ref:L(a,n),id:u,"aria-labelledby":o["aria-labelledby"]||`${u} ${b}`,children:[jsx(st,{color:r?.toString("hexa")}),e?jsx("div",{className:Pm,id:b,"aria-hidden":"true",children:t}):typeof t=="string"&&jsx(VisuallyHidden,{children:t})]})});no.displayName="ColorInputButton";var Va=ut.forwardRef(({className:r,style:e,icon:t,...o},a)=>{let n=ut.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:o.isDisabled}),{buttonProps:l,isPressed:p}=useButton(o,n),{isFocusVisible:c,focusProps:d}=useFocusRing(),m=filterTruthyValues({"data-block-id":o["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":o.isDisabled,"data-hovered":s,"data-pressed":p});return jsxs("button",{...mergeProps(l,i,d,m),ref:L(a,n),style:e,className:classNames(Im({isHovered:s||p||o.isOpen,isFocusVisible:c,isDisabled:o.isDisabled}),"BaselineUI-IconColorInputButton",r),children:[jsx(t,{size:16}),jsx("div",{className:_m,style:{backgroundColor:o.color||void 0}})]})});Va.displayName="IconColorInputButton";function lf({colorLabel:r,color:e,presets:t}){let{formatMessage:o}=A(),{locale:a}=useLocale(),n=useMemo(()=>t.find(l=>l.id===Le?!e:e?Am(e,parseColor(l.id)):!1),[t,e]),i=useMemo(()=>typeof r=="function"?r?.(e):r?Bm(e,n,o(VP.transparent)):!1,[e,r,o,n]),s=useMemo(()=>{if(n?.label)return n.label;e?.getColorName(a);},[e,a,n?.label]);return {colorName:i,humanReadableName:s}}var VP=K({transparent:{defaultMessage:"Transparent",id:"transparent"}});var lr=ut.forwardRef(({className:r,style:e,allowRemoval:t,allowAlpha:o=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:l,onChangeEnd:p,defaultValue:c,storePickedColorKey:d="baselinePickedColor",value:m,addColorButtonLabel:u,removeColorButtonLabel:b,customColorsLabel:y,renderTriggerButton:f=({isOpen:z,color:k,ref:T,colorName:R,triggerProps:N,labelId:S})=>jsx(no,{...mergeProps(N,{...w.label?{"aria-labelledby":S}:{"aria-label":w["aria-label"]}}),ref:T,isOpen:z,isDisabled:w.isDisabled,labelPosition:n,color:k,colorLabel:i,colorName:R}),pickerMode:g="active",offset:_=2,placement:v=n==="start"?"bottom end":"bottom start","data-block-id":h,"data-block-class":x,...w},P)=>{let z=ut.useRef(null),k=ut.useRef(null),T=useOverlayTriggerState(w),{triggerProps:R,overlayProps:N}=useOverlayTrigger({type:"listbox"},T,z),S=ye(w.portalContainer),[I,M]=useControlledState(m===void 0?void 0:vt(m),vt(c),X=>l?.(X?.toFormat("rgba")||null)),{formatMessage:F}=A(it),H=useMemo(()=>Om(F($a.noColor),a),[a,F]),B=useId(),{colorName:$}=lf({colorLabel:i,color:I,presets:H}),U=useMemo(()=>H.filter(X=>t||X.id!==Le),[H,t]),O=u||F($a.addColor),te=b||F($a.removeColor),j=y||F($a.customColors),Z=jsx(Jm,{color:I||oo,setColor:X=>{M(X),p?.(X?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:O,removeColorButtonLabel:te,customColorsLabel:j,pickerMode:g,allowAlpha:o});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Cm]:n==="start"},"BaselineUI-ColorInput-Trigger",r),"data-block-id":h,"data-block-class":x,style:e,ref:P,children:[w.label?jsx("label",{id:B,className:xm({labelPosition:n}),children:w.label}):null,f({isOpen:T.isOpen,color:I,ref:z,colorName:$,triggerProps:R,labelId:B})]}),jsx(ze,{...w,portalContainer:S,placement:v,state:T,offset:_,className:classNames(Da,"BaselineUI-ColorInput-Popover"),triggerRef:z,overlayProps:N,children:jsxs(ge,{size:"content",className:Ma({includesCustomColorPicker:s}),ref:k,"aria-labelledby":B,"aria-label":w["aria-label"],children:[s&&g==="active"?jsxs(Fragment,{children:[jsx(Fa,{color:I||oo,setColor:M,allowAlpha:o,onChangeEnd:X=>{p?.(X?.toFormat("rgba")||null);}}),Z]}):null,!!U.length&&jsxs(Fragment,{children:[s&&g==="active"?jsx(V,{}):null,jsx(Xi,{autoFocus:s&&g==="active"?!1:"first",state:T,triggerRef:z,presets:U,color:I,setColor:X=>{M(X),p?.(X?.toFormat("rgba")||null);}})]}),s&&g==="lazy"?Z:null]})})]})});lr.displayName="ColorInput";var $a=K({addColor:{defaultMessage:"Add color",id:"addColor"},removeColor:{defaultMessage:"Remove color",id:"removeColor"},customColors:{defaultMessage:"Custom colors",id:"customColors"},noColor:{defaultMessage:"No color",id:"noColor"},transparent:{defaultMessage:"Transparent",id:"transparent"}});var uf=ut.forwardRef(({className:r,style:e,icon:t,variant:o="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let l=ut.useRef(null),p=useCallback(({isOpen:c,color:d,ref:m,colorName:u,triggerProps:b})=>jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:o==="standard"?jsx(no,{...b,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:d,colorLabel:!1,colorName:u}):jsx(Va,{...b,isOpen:c,icon:TextIcon,color:d?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,o]);return jsxs(E,{display:"flex",flexDirection:"row",gap:"md",paddingX:o==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",r),"data-block-id":a,style:e,ref:L(s,l),children:[o==="standard"&&t?jsx(t,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(lr,{...i,colorLabel:!1,renderTriggerButton:p})]})});uf.displayName="IconColorInput";var mf={ar:{redo:"\u0625\u0639\u0627\u062F\u0629",undo:"\u062A\u0631\u0627\u062C\u0639"},cs:{redo:"Opakovat",undo:"Zru\u0161it"},cy:{redo:"Ail-wneud",undo:"Dad-wneud"},da:{redo:"Gentag",undo:"Fortryd"},de:{redo:"Wiederholen",undo:"R\xFCckg\xE4ngig machen"},el:{redo:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",undo:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7"},"en-GB":{redo:"Redo",undo:"Undo"},en:{redo:"Redo",undo:"Undo"},es:{redo:"Rehacer",undo:"Deshacer"},fi:{redo:"Tee sittenkin",undo:"Peru"},"fr-CA":{redo:"R\xE9tablir",undo:"Annuler"},fr:{redo:"R\xE9tablir",undo:"Annuler"},he:{redo:"\u05D1\u05D9\u05E6\u05D5\u05E2 \u05DE\u05D7\u05D3\u05E9",undo:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4"},hr:{redo:"Ponovi",undo:"Vrati"},id:{redo:"Ulangi",undo:"Kembalikan"},it:{redo:"Ripristina",undo:"Annulla"},ja:{redo:"\u3084\u308A\u76F4\u3059",undo:"\u53D6\u308A\u6D88\u3059"},ko:{redo:"\uC2E4\uD589\uBCF5\uADC0",undo:"\uC2E4\uD589\uCDE8\uC18C"},ms:{redo:"Buat Semula",undo:"Buat Asal"},"nb-NO":{redo:"Gj\xF8r om igjen",undo:"Angre"},nl:{redo:"Opnieuw",undo:"Herstel"},pl:{redo:"Pon\xF3w",undo:"Cofnij"},"pt-PT":{redo:"Refazer",undo:"Desfazer"},pt:{redo:"Refazer",undo:"Desfazer"},ru:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"},sk:{redo:"Opakova\u0165",undo:"Zru\u0161i\u0165"},sl:{redo:"Uveljavi",undo:"Razveljavi"},sv:{redo:"G\xF6r om",undo:"\xC5ngra"},th:{redo:"\u0E17\u0E33\u0E0B\u0E49\u0E33",undo:"\u0E16\u0E2D\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A"},tr:{redo:"Yinele",undo:"Geri Al"},uk:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",undo:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"zh-Hans":{redo:"\u91CD\u505A",undo:"\u64A4\u9500"},"zh-Hant":{redo:"\u91CD\u4F5C",undo:"\u5FA9\u539F"}};var Ua=C({defaultClassName:"mnnh5s1 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6l4 _1yep5z6l7 _1yep5z6lj _1yep5z6li _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6lh",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6wi _1yep5z6wj _1yep5z6wk _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6132 _1yep5z617r _1yep5z617s",false:"_1yep5z617e _1yep5z6121"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6120"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z613a _1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"mnnh5s8 _1yep5z6z7"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61o5"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61oz"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61nx"]]}),ff="_1yep5z6d8",qa=C({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var yf=C({defaultClassName:"_1i0ytqa3 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6lh _1yep5z6li _1yep5z6lk",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z6129",false:"_1yep5z612b"},isDisabled:{true:"_1i0ytqa7 _1yep5z6z7",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61ov _1yep5z61tn _1yep5z61tp"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61o6"],[{isInline:!1,isDisabled:!0},"_1yep5z61o8"]]}),bf="_1i0ytqa0",Ka=C({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6lh",variantClassNames:{isInline:{false:"_1yep5z6120"},isDisabled:{true:"_1i0ytqad _1yep5z6z7"}},defaultVariants:{},compoundVariants:[]}),gf=C({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lh",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function vf({line:r,options:e}){let t=useRef([]),o=useMemo(()=>{let a=Math.ceil(r.length/pr),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!t.current[i])){let p=r.slice(i*pr-(i>0?1:0),i*pr+pr);n=getSvgPathFromStroke(getStroke(p.map(([c,d,m])=>({x:c,y:d,pressure:m})),e)),p.length>=(i>0?pr+1:pr)&&(t.current[i]=n);}return n},[r,e]);return [...t.current,o]}var pr=60*3;var vw={size:1,thinning:0,smoothing:0,streamline:0,easing:r=>r,start:{taper:0,easing:r=>r,cap:!0},end:{taper:0,easing:r=>r,cap:!0},simulatePressure:!1},_f=ut.forwardRef(({className:r,style:e,canvasClassName:t,canvasStyle:o,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:l,onChangeEnd:p,enableHistory:c=!1,isInline:d=!0,isDisabled:m,placeholder:u,clearLabel:b,undoLabel:y,redoLabel:f,footerClassName:g,canvasRef:_,value:v,footerStyle:h,"data-block-id":x,"data-block-class":w,"aria-label":P="Drawing canvas",description:z="This is a canvas for drawing using a mouse or touch input.",...k},T)=>{let R=A(mf),N=ut.useRef(null),[S,I]=ut.useState(v||l||[]),M=ut.useMemo(()=>({...vw,...k}),[k]),[F,H]=ut.useState(),B=useId(),{labelProps:$,fieldProps:U}=useLabel({...k,"aria-label":P,labelElementType:"span"}),{isFocusVisible:O,focusProps:te}=useFocusRing({within:!0}),{hoverProps:j,isHovered:Z}=useHover({isDisabled:m}),{undo:X,redo:Ie,canRedo:Re,canUndo:he,push:Me}=mp(S,{onAction:Y=>{Y&&(I(Y),p?.(Y));},isDisabled:!c}),{keyboardProps:Ue}=useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?Nt():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Re&&Ie():he&&X());}}),[oe,me]=useState(!1),Rt=useCallback(Y=>{let q=Y.currentTarget.getBoundingClientRect();H(q),Y.target.setPointerCapture(Y.pointerId);let le=[Y.clientX-q.x,Y.clientY-q.y,Y.pressure];I(W=>[...W,[le]]),me(!0);},[]),Tt=useCallback(Y=>{if(Y.buttons!==1||!F)return;let le=xf(Y.nativeEvent).map(W=>[a?clamp(W.clientX-F.left,0,F.width):W.clientX-F.left,a?clamp(W.clientY-F.top,0,F.height):W.clientY-F.top,W.pressure]);I(W=>{let ke=[...W];return ke[W.length-1]=[...ke[W.length-1],...le],ke});},[F,a]),Cr=()=>{F&&(p?.(S),Me(S),me(!1));};useEffect(()=>{s?.(S);},[S,s]);let Nt=()=>{I([]),s?.([]),Me([]);};return jsxs("div",{ref:L(N,T),className:classNames(bf,"BaselineUI-FreehandCanvas",r),style:e,"aria-disabled":m,"data-block-id":x,"data-block-class":w,children:[k.label||c?jsxs("div",{className:gf({isInline:d}),children:[k.label?jsx(Q,{type:"label",size:"sm",...$,children:k.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(D,{variant:"secondary",size:"sm",isDisabled:!he||m,icon:UndoIcon,onPress:X,"aria-label":y||R.formatMessage("undo")}),jsx(D,{variant:"secondary",size:"sm",isDisabled:!Re||m,icon:RedoIcon,onPress:Ie,"aria-label":f||R.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(te,Ue,j,U),tabIndex:m?void 0:0,className:classNames(Ua({isInline:d,isHovered:Z}),yf({isFocusVisible:O,isInline:d,isDisabled:!!m}),t),"aria-describedby":k["aria-describedby"]||B,style:o,ref:_,children:[jsx(VisuallyHidden,{children:jsx("div",{id:B,children:z})}),jsx("svg",{width:o?.width||"100%",height:o?.height||"100%",onPointerDown:Rt,onPointerMove:Tt,onPointerUp:Cr,children:(v||S).map((Y,q,le)=>q<le.length-1||!oe?jsx(zf,{line:Y,options:M,strokeColor:i,strokeWidth:n},q):jsx(Cf,{line:Y,options:M,strokeColor:i,strokeWidth:n},q))})]}),u||b?jsx("div",{style:h,className:classNames(Ka({isInline:d,isDisabled:m}),g),children:(S.length||!u)&&b?jsx(G,{size:"sm",variant:"ghost",label:b,isDisabled:m,onPress:Nt}):jsx(G,{size:"sm",variant:"ghost",label:u,isDisabled:!0})}):null]})});_f.displayName="FreehandCanvas";var zf=ut.memo(({line:r,options:e,strokeColor:t,strokeWidth:o})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(r.map(([n,i,s])=>({x:n,y:i,pressure:s})),e)),[r,e]);return jsx("path",{d:a,stroke:t,strokeWidth:o})});zf.displayName="Stroke";var Cf=ut.memo(({line:r,options:e,strokeColor:t,strokeWidth:o})=>{let a=vf({line:r,options:e});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:t,strokeWidth:o},i))})});Cf.displayName="SplitStroke";function xf(r){if(typeof r.getCoalescedEvents=="function"){let e=r.getCoalescedEvents();return e.length>0?e.flatMap(t=>xf(t)):[r]}return [r]}var Pf="_1vac7ws0",wf=C({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Sf(r,e){let[t,o]=useState([]),a=()=>r?.flatMap(n=>[...e.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{o(a());},[],[a]),useGranularEffect(()=>{let n=a();o(n);},[r],[a]),t}function If(r){let{scrollable:e,ownerDocument:t,onScroll:o}=r;useEffect(()=>{let a=getHTMLElement(e,t);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",o),()=>{a.removeEventListener("scroll",o);}},[e,o,t]);}var Dw=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Tf=ut.forwardRef(({className:r,children:e,isRotatable:t,isResizable:o,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:l,onDoubleClick:p,onDragStart:c,onDragEnd:d,onDrag:m,onResizeStart:u,onResizeEnd:b,onResize:y,onRotateStart:f,onRotateEnd:g,onRotate:_,onSnap:v,isSnappable:h,elementGuidelines:x,hideAnchorOnDrag:w=!0,title:P,rotationPosition:z,autoUpdate:k,bound:T,snapRotationDegrees:R,snapRotationThreshold:N,scrollableAncestor:S,renderDirections:I,stopPropagation:M,transformOrigin:F,preventDefault:H},B)=>{let $=useRef(null),U=useRef(null),[O,te]=useState(document),j=useRef(O.createElement("div")),[Z,X]=useState({}),[Ie,Re]=useState(!1),[he,Me]=useState(!1),[Ue,oe]=useState(),me=Sf(x,O);useLayoutEffect(()=>{let q=j.current;return j.current=O.createElement("div"),()=>{q.remove();}},[O]);let{keyboardProps:Rt}=useKeyboard({onKeyDown:q=>{let le=q.shiftKey?10:1,W=q.metaKey||q.ctrlKey;W&&q.shiftKey&&(le=45);function ke(xr,Mb="x"){W?U.current?.request("rotatable",{deltaRotate:xr*le},!0):U.current?.request("draggable",Mb==="x"?{deltaX:xr*le}:{deltaY:xr*le},!0);}switch(q.key){case"ArrowRight":{ke(1);break}case"ArrowLeft":{ke(-1);break}case"ArrowUp":{ke(-1,"y");break}case"ArrowDown":ke(1,"y");}requestAnimationFrame(()=>{U.current?.updateRect();});}});useEffect(()=>{let q=fe($.current);te(q);let le=j.current;q.body.append(j.current);function W(xr){Me(xr.shiftKey);}function ke(){Me(!1);}return q.addEventListener("keydown",W),q.addEventListener("keyup",ke),()=>{q.removeEventListener("keydown",W),q.removeEventListener("keyup",ke),le.remove();}},[]),If({scrollable:S,onScroll:()=>{U.current?.updateRect();},ownerDocument:O});let Tt=useCallback(q=>{X(le=>({...le,...q.style})),i?.(q);},[i]),Cr=useCallback(q=>{if(Re(!0),$.current?.focus(),T){let W=getHTMLElement(T,O)?.getBoundingClientRect();oe({position:"client",left:W?.left??0,top:W?.top??0,right:W?.right??0,bottom:W?.bottom??0});}c?.(q);},[T,O,c]),Nt=useCallback(q=>{Re(!1),d?.(q);},[d]),Y=e({style:{...Z.width&&{width:Z.width},...Z.height&&{height:Z.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...Rt,ref:L($,B),style:{display:"inline-block",...n,...Z},className:classNames(Pf,r),onDoubleClick:p,tabIndex:0,title:P,children:Y}),createPortal(jsx(Dw,{ref:U,target:$,draggable:a,resizable:o,rotatable:t,keepRatio:he,throttleDrag:1,snappable:h||!!T,elementGuidelines:me,snapRenderThreshold:.9,className:wf({isDragging:Ie&&w}),onRender:Tt,onDragStart:Cr,onDragEnd:Nt,useResizeObserver:k,useMutationObserver:k,onRenderEnd:l,onDrag:m,onResizeStart:u,onResizeEnd:b,onResize:y,onRotateStart:f,onRotateEnd:g,onRotate:_,onRenderStart:s,onSnap:v,rotationPosition:z,bounds:Ue,snapRotationDegrees:R,snapRotationThreshold:N,renderDirections:I,stopPropagation:M,preventDefault:H,transformOrigin:F}),j.current)]})});Tf.displayName="Transform";var Nf={ar:{delete:"\u062D\u0630\u0641",selectImage:"\u062A\u062D\u062F\u064A\u062F \u0635\u0648\u0631\u0629"},cs:{delete:"Smazat",selectImage:"Vybrat obr\xE1zek"},cy:{delete:"Dileu",selectImage:"Dewiswch Ddelwedd"},da:{delete:"Slet",selectImage:"V\xE6lg billede"},de:{delete:"L\xF6schen",selectImage:"Bild ausw\xE4hlen"},el:{delete:"\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE",selectImage:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE \u03B5\u03B9\u03BA\u03CC\u03BD\u03B1\u03C2"},"en-GB":{delete:"Delete",selectImage:"Select Image"},en:{delete:"Delete",selectImage:"Select Image"},es:{delete:"Eliminar",selectImage:"Seleccionar imagen"},fi:{delete:"Poista",selectImage:"Valitse kuva"},"fr-CA":{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},fr:{delete:"Supprimer",selectImage:"S\xE9lectionner une image"},he:{delete:"\u05DE\u05D7\u05D9\u05E7\u05D4",selectImage:"\u05D1\u05D7\u05D9\u05E8\u05EA \u05EA\u05DE\u05D5\u05E0\u05D4"},hr:{delete:"Obri\u0161i",selectImage:"Odaberi sliku"},id:{delete:"Hapus",selectImage:"Pilih Gambar"},it:{delete:"Elimina",selectImage:"Seleziona immagine"},ja:{delete:"\u524A\u9664",selectImage:"\u30A4\u30E1\u30FC\u30B8\u3092\u9078\u629E"},ko:{delete:"\uC0AD\uC81C",selectImage:"\uC774\uBBF8\uC9C0 \uC120\uD0DD"},ms:{delete:"Padam",selectImage:"Pilih Imej"},"nb-NO":{delete:"Slett",selectImage:"Velg bilde"},nl:{delete:"Verwijder",selectImage:"Selecteer afbeelding"},pl:{delete:"Usu\u0144",selectImage:"Wybierz obraz"},"pt-PT":{delete:"Apagar",selectImage:"Selecionar imagem"},pt:{delete:"Apagar",selectImage:"Selecionar Imagem"},ru:{delete:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",selectImage:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440."},sk:{delete:"Zmaza\u0165",selectImage:"Vybra\u0165 obr\xE1zok"},sl:{delete:"Izbri\u0161i",selectImage:"Izberi sliko"},sv:{delete:"Radera",selectImage:"V\xE4lj bild"},th:{delete:"\u0E25\u0E1A",selectImage:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E"},tr:{delete:"Sil",selectImage:"Resim Se\xE7"},uk:{delete:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438",selectImage:"\u041E\u0431\u0440\u0430\u0442\u0438 \u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F"},"zh-Hans":{delete:"\u5220\u9664",selectImage:"\u9009\u62E9\u56FE\u50CF"},"zh-Hant":{delete:"\u522A\u9664",selectImage:"\u9078\u53D6\u5716\u50CF"}};var Mf=ut.forwardRef(({className:r,style:e,isInline:t=!0,accept:o="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:l,onDrop:p,onPaste:c,includeCheckeredBackground:d=!0,"data-block-id":m,"data-block-class":u,pickerButtonStyle:b,pickerButtonClassName:y,footerClassName:f,footerStyle:g,clearLabel:_,placeholder:v,labelStyle:h,labelClassName:x,...w},P)=>{let z=ut.useRef(null),k=ut.useRef(null),{formatMessage:T}=A(Nf),[R,N]=useControlledState(n,a||null,oe=>{invariant(typeof oe!="string"),w.onValueChange?.(oe?[oe]:[]);}),S=useMemo(()=>Xw(R||void 0),[R]),{fieldProps:I,labelProps:M}=useField(w),{dropProps:F,isDropTarget:H}=useDrop({ref:z,onDrop:async oe=>{if(l)return;let me=await zi({items:oe.items});me.length&&N(me[0]),p?.(oe);},...w}),{clipboardProps:B}=useClipboard({onPaste:async oe=>{if(l)return;let me=await zi({items:oe});me.length&&N(me[0]),c?.(oe);},...w}),$=()=>{N(null),k.current&&(k.current.value="");},U={type:"file",onChange:oe=>{let me=[...oe.target.files];N(me[0]),w.onChange?.(oe);},accept:o,disabled:l},{focusProps:O,isFocused:te,isFocusVisible:j}=useFocusRing({within:!0}),{hoverProps:Z,isHovered:X}=useHover({isDisabled:l}),{imgProps:Ie,isLoading:Re,isLoaded:he}=Ot({src:S,alt:i||""}),Me={label:s||T("selectImage"),onPress:()=>z.current?.click(),variant:"secondary",isDisabled:l,excludeFromTabOrder:!0,className:classNames(Uo({isFocusVisible:j}),{[ff]:H&&!l},y),style:b},Ue=filterTruthyValues({"data-loaded":he,"data-block-id":m,"data-block-class":u,"data-hovered":X,"data-focused":te,"data-drop-target":H,"data-disabled":l,"data-focus-visible":j});return jsxs(E,{...Ue,className:classNames("BaselineUI-ImageDropZone",r),display:"flex",flexDirection:"column",alignItems:"center",style:e,ref:P,children:[jsxs("label",{...mergeProps(F,Z,O,M),className:classNames(Ua({isInline:t,isHovered:X,isDisabled:l,hasLoadedImage:!!S&&he,showFocusRing:H||!!S&&j}),x),style:h,ref:z,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(I,B,U),ref:k})}),!S&&jsx(G,{...Me}),!!S&&(Re?jsx(tr,{}):jsx("img",{className:qa({isInline:t,isDisabled:l,hasLoadedImage:!!S&&he&&d}),...Ie}))]}),v||_?jsx("div",{style:g,className:classNames(Ka({isInline:t,isDisabled:l}),f),children:(S||!v)&&_?jsx(G,{size:"sm",variant:"ghost",label:_,isDisabled:l,onPress:$}):jsx(G,{size:"sm",variant:"ghost",label:v,isDisabled:!0})}):null]})});Mf.displayName="ImageDropZone";function Xw(r){return r instanceof File?URL.createObjectURL(r):r}var Df="_1vm2oh49 _1yep5z6ia _1yep5z6ib _1yep5z6ic _1yep5z6g4",os="_1vm2oh48 _1yep5z6li _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6jy _1yep5z6jz _1yep5z6k0",Af=C({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6ln _1yep5z6ll _1yep5z6i6 _1yep5z6lo _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6l4 _1yep5z6lj _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z6131 _1yep5z617q _1yep5z617s",false:"_1yep5z612b"},isFocusVisible:{true:"_1yep5z613a _1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6z7"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61o6"],[{accent:"theme",isInline:!0},"_1yep5z61nv"],[{accent:"positive",isInline:!1},"_1yep5z61o8"],[{accent:"theme",isInline:!1},"_1yep5z61nx"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61po _1yep5z61tf _1yep5z61th _1yep5z61ti"],[{isHovered:!0,isInline:!0},"_1yep5z61ti _1yep5z61po _1yep5z61tf _1yep5z61th"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61o7"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61nz"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61nw"]]});var Ff=ut.forwardRef(({className:r,style:e,isDisabled:t,isInline:o=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:l,onPress:p,onDelete:c,deleteAriaLabel:d,addAriaLabel:m,accent:u="positive","data-block-id":b,"data-block-class":y,...f},g)=>{let{focusProps:_,isFocused:v,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:x,hoverProps:w}=useHover({isDisabled:t}),{pressProps:P}=usePress({isDisabled:t,onPress:p});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let z=filterTruthyValues({"data-hovered":x,"data-focus-visible":h,"data-focused":v,"data-disabled":t});return jsxs("div",{...f,className:classNames(Af({isInline:o,isFocusVisible:h,isDisabled:t,isHovered:x,accent:u}),"BaselineUI-Preview",r),"data-block-id":b,"data-block-class":y,"aria-label":f["aria-label"]||a||s,style:e,ref:g,children:[typeof i=="string"?jsx("button",{disabled:t,...mergeProps(w,_,P,z),className:os,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(w,_,P,z),disabled:t,style:l,"aria-label":m,className:os,children:[n?jsx("img",{src:n,alt:a,className:qa({isInline:o,isDisabled:t})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(D,{isDisabled:t,className:Df,"aria-label":d,size:"xs",icon:TrashIcon,onPress:c}):null]})});Ff.displayName="Preview";var jf="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69c _1yep5z69d _1yep5z69e",Hf=C({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),Vf="cw3m0n7",$f=C({defaultClassName:"cw3m0n0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{labelPosition:{end:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vf _1yep5z6vg _1yep5z6vh",start:"_1yep5z614y _1yep5z614z _1yep5z6150 _1yep5z616a _1yep5z616b _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),Uf="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6le",qf=C({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var uk=({label:r,description:e},{isSelected:t,isFocusVisible:o,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:$f({labelPosition:n}),children:[jsx("div",{className:qf({isSelected:t,isFocusVisible:o,isDisabled:a}),children:t?jsx("div",{className:Vf}):null}),r?jsxs("div",{className:jf,children:[jsx("span",{className:xa({isDisabled:a}),children:r}),e?jsx("span",{className:Hf({isDisabled:a}),children:e}):null]}):null]}),Kf=({state:r,renderOption:e=uk,item:t,optionLabelPosition:o="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let l=!!s.isDisabled||!!s.disabledValues?.includes(t.id),p=ut.useRef(null),{inputProps:c,isPressed:d,isSelected:m}=useRadio({...s,isDisabled:l,children:t.label,value:t.id},r,p),{focusProps:u,isFocusVisible:b,isFocused:y}=useFocusRing(),{isHovered:f}=useHover({isDisabled:l}),g=filterTruthyValues({"data-selected":m,"data-focused":y,"data-focus-visible":b,"data-hovered":f,"data-disabled":l,"data-pressed":d,"data-read-only":i});return jsxs("label",{...g,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,u),ref:p})}),e(t,{isFocusVisible:b,isSelected:m,isFocused:y,isHovered:f,isDisabled:l,optionLabelPosition:o,isReadOnly:i})]})};var Wf=ut.forwardRef(({className:r,style:e,optionsContainerClassName:t,optionsContainerStyle:o,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":l,"aria-describedby":p,"aria-details":c,"data-block-id":d,"data-block-class":m,...u},b)=>{let y=useRadioGroupState(u),{radioGroupProps:f,labelProps:g,descriptionProps:_,errorMessageProps:v}=useRadioGroup({...u,"aria-label":s,"aria-labelledby":l,"aria-describedby":p,"aria-details":c},y),h=Te({...u,descriptionProps:_,errorMessageProps:v,labelPosition:n}),x=filterTruthyValues({"data-orientation":u.orientation,"data-block-id":d,"data-block-class":m,"data-disabled":u.isDisabled,"data-readonly":u.isReadOnly});return jsxs("div",{...mergeProps(f,x),className:classNames(Ye({labelPosition:n}),"BaselineUI-RadioGroup",r),style:e,ref:b,children:[u.label||h?jsxs("div",{className:Xe({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...g,className:classNames(We,"BaselineUI-RadioGroup-Label"),children:u.label}),n==="start"&&h]}):null,jsx("div",{className:classNames(Uf,{[Ft]:u.isDisabled},t),style:o,children:a.map(w=>jsx(Kf,{state:y,renderOption:i,item:w,...u,value:w.id},w.id))}),n==="top"&&h]})});Wf.displayName="RadioGroup";var Xf=({id:r,defaultMessage:e,elementType:t=Fragment$1})=>{invariant(r||e,"`id` or `defaultMessage` is required.");let o=A();return jsx(t,{children:o.formatMessage(r)||e})};Xf.displayName="MessageFormat";var Yf=ut.forwardRef(({className:r,style:e,children:t,"data-block-id":o,"data-block-class":a,role:n="group",isDisabled:i,...s},l)=>{let{hoverProps:p,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...p,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":o,"data-block-class":a,className:r,style:e,...s,ref:l,children:t})});Yf.displayName="Group";var ls="UNSUPPORTED_IN_MENU";function Qf(r){return useMemo(()=>ut.Children.toArray(r).map(e=>{let t=e,o=uniqueId("item"),a=co(t,Ae),n=Jf(t),i,s;if(a){let g=co(a,Be);invariant(g),i=Jf(g),s=co(a,Ee).props.children;}else n?i=n:i=t;let{onPress:l,label:p,"aria-label":c,iconStart:d,isDisabled:m,icon:u}=i.props,b=p||c||ls;invariant(typeof b=="string","ActionGroup children must have a string label");let y=`${o}-${b}`;return createElement(Item,{...{key:y,onPress:l,textValue:b,"aria-label":c,icon:d||u,dialogContent:s,isDisabled:m},key:y},t)}),[r])}function co(r,e){return e?flatMapDeep(ut.Children.toArray(r),o=>ut.isValidElement(o)&&o.props.children?[o,...ut.Children.toArray(o.props.children)]:[o]).find(o=>ut.isValidElement(o)&&o.type===e):void 0}function Jf(r){return co(r,G)||co(r,D)}var ey="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6lh _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6l9",ty={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var cs=ut.forwardRef(({className:r,style:e,children:t,collapsibleMenuProps:o,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...l},p)=>{let{formatMessage:c}=A(),[d,m]=useState(),u=Qf(t),b=useListState({...l,children:u}),y=ee(p),f=useRef(null),[{visibleItems:g,isMeasuring:_},v]=bn({visibleItems:b.collection.size,isMeasuring:!1}),h=useCallback(()=>{let N=S=>{if(f.current&&y.current){let I=[...f.current.children],M=y.current.getBoundingClientRect().width,F=S<b.collection.size,H=0,B=0;if(F){let $=I.pop();$&&(H+=ny($,!1,!0));}for(let[$,U]of I.entries())if(H+=ny(U,$===0,$===I.length-1),Math.round(H)<=Math.round(M))B++;else break;return B}return S};v(function*(){yield {visibleItems:b.collection.size,isMeasuring:!0};let S=N(b.collection.size),I=S<b.collection.size&&S>0;yield {visibleItems:S,isMeasuring:I},I&&(yield {visibleItems:N(S),isMeasuring:!1});});},[v,y,b.collection.size]),x=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);wn({ref:x,onResize:h}),Se(h,[b.collection,h]);let{toolbarProps:w}=useToolbar(l,y),P=[...b.collection],z=P.slice(0,g),k=P.slice(g).filter(N=>N.textValue!==ls),T=k.length>0;useEffect(()=>{m(void 0);},[k.length]),useEffect(()=>{l.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[l.orientation]);let{keyboardProps:R}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(w,R),className:r,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...e,flexBasis:_?"100%":void 0},ref:y,children:jsxs("div",{ref:f,className:ey,children:[z.map(N=>N.rendered),T?jsxs(Fragment,{children:[!_&&i?jsx(E,{flexGrow:1}):null,jsx(ga,{placement:"bottom end",renderTrigger:({buttonProps:N,ref:S})=>jsx(D,{...N,size:"md",icon:MoreIcon,"aria-label":c(Fk.more),variant:"toolbar",ref:S}),...o,disabledKeys:k.filter(N=>N.props?.isDisabled).map(N=>N.key),items:k.map(N=>{let S=N.textValue||N["aria-label"];return invariant(S,"ActionItem must have a label"),{id:N.key,label:S,icon:N.props.icon}}),onAction:N=>{let S=b.collection.getItem(N);invariant(S,"Item not found");let{onPress:I,dialogContent:M}=S.props;I?.(),m(M);}})]}):null]})}),jsx(Ne,{isOpen:!!d,onOpenChange:N=>{N||m(void 0);},children:jsx(Fe,{enableDrawer:"auto",style:{zIndex:1e5},children:d?ut.cloneElement(d,{inheritDrawer:!0}):null})})]})});cs.displayName="CollapsibleToolbar";function ny(r,e,t){let a=ae(r).getComputedStyle(r);return r.getBoundingClientRect().width+(e?0:iy(a.marginLeft))+(t?0:iy(a.marginRight))}function iy(r){let e=Number.parseInt(r,10);return Number.isNaN(e)?0:e}var Fk=K({more:{id:"more",defaultMessage:"More"}});var ds=ut.forwardRef(({className:r,style:e,"data-block-id":t,"data-block-class":o,"aria-controls":a,onKeyDown:n,...i},s)=>{let l=ut.useRef(null),{toolbarProps:p}=useToolbar(i,l),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(p,c),"aria-controls":a,className:classNames(ty[i.orientation||"horizontal"],"BaselineUI-Toolbar",r),style:e,"data-block-id":t,"data-block-class":o,ref:L(s,l),children:i.children})});ds.displayName="WrappedToolbar";var Xa=ut.forwardRef((r,e)=>{let t=r.isCollapsible?cs:ds;return jsx(t,{...r,ref:e})});Xa.displayName="Toolbar";var ly=C({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),py=C({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z6114"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61ti _1yep5z61th _1yep5z61tf _1yep5z61py _1yep5z61n1"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6g3"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61ti _1yep5z61th _1yep5z61po _1yep5z61tf"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61tg _1yep5z61tf _1yep5z61pp _1yep5z61n2"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61tf _1yep5z61th _1yep5z61po _1yep5z61ti"]]}),cy=C({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617l _1yep5z617k _1yep5z613r _1yep5z617i"},isSelected:{true:"_1yep5z6113"},isDisabled:{true:"z9nup83 _1yep5z6114"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61n0"]]}),dy=C({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617l _1yep5z617k _1yep5z613r _1yep5z617i"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z6114"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61nx"],[{isSelected:!0,isDisabled:!1},"_1yep5z61nx _1yep5z61n4"],[{isSelected:!0,isDisabled:!0},"_1yep5z61nx _1yep5z61n1"]]}),uy=C({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z6116"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61n3"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61n1"],[{isSelected:!1,isHovered:!0},"_1yep5z61nx"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61ti _1yep5z61th _1yep5z61po _1yep5z61tf"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61tg _1yep5z61tf _1yep5z61pp"]]});var Qk={xxs:8,xs:12,sm:16,md:20,lg:24},Ce=ut.forwardRef((r,e)=>{let t=ee(e),{tooltipProps:o}=Ho(r,t);return o?jsx(ne,{...o,children:jsx(us,{...r,ref:e})}):jsx(us,{...r,ref:e})});Ce.displayName="ToggleIconButton";var us=ut.forwardRef(({className:r,style:e,icon:t,size:o="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},l)=>{let p=useToggleState(s),{buttonProps:c,isPressed:d,ref:m,isFocusVisible:u,isFocused:b,isHovered:y,uiStateOptions:f}=$o(s,p),g=useMemo(()=>typeof t=="function"?t:p.isSelected?t.selected:t.unselected,[t,p.isSelected]),_={isSelected:p.isSelected,isHovered:y,isFocusVisible:u,isDisabled:!!s.isDisabled},v=filterTruthyValues({"data-hovered":y,"data-selected":p.isSelected,"data-focus-visible":u,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":b,"data-pressed":d});return jsx("button",{...mergeProps(c,v),className:classNames(a==="toolbar"&&uy(_),a==="primary"&&py(_),a==="secondary"&&cy(_),a==="tertiary"&&dy(_),ly({size:o}),"BaselineUI-ToggleIconButton",typeof r=="function"?r(f):r),style:typeof e=="function"?e(f):e,ref:L(m,l),children:jsx(g,{size:Qk[o]})})});us.displayName="ToggleIconButtonCore";var fy="f6jv6bl",yy="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jm _1yep5z6jn _1yep5z6jo",ur="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",by=C({defaultClassName:"f6jv6b0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6g1",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vi _1yep5z6vj _1yep5z6vk _1yep5z615a _1yep5z615b _1yep5z615c",false:"_1yep5z614v _1yep5z614w _1yep5z614x"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61if _1yep5z61ig _1yep5z61ih _1yep5z61j3 _1yep5z61j4 _1yep5z61j5 _1yep5z61jr _1yep5z61js _1yep5z61jt _1yep5z61kf _1yep5z61kg _1yep5z61kh _1yep5z61tp _1yep5z61tn _1yep5z61oy"]]}),Ya=C({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6lk",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),gy="f6jv6bi _1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn",vy="f6jv6bj";var hy="f6jv6bm _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6ls _1yep5z6ln _1yep5z6ll _1yep5z6hu _1yep5z6eu",_y=C({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lk _1yep5z6l4 _1yep5z6l7 _1yep5z6lj",variantClassNames:{isHovered:{true:"_1yep5z6120"},isDisabled:{true:"_1yep5z6z7"}},defaultVariants:{},compoundVariants:[]}),zy="_1yep5z6js _1yep5z6jt _1yep5z6ju",Cy="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6eu _1yep5z6e3 _1yep5z6lh",xy=C({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jy _1yep5z6jz _1yep5z6k0",variantClassNames:{isInline:{true:"_1yep5z6pl _1yep5z6pm _1yep5z6pn _1yep5z617s _1yep5z617q _1yep5z6131",false:"_1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6x0 _1yep5z6x1 _1yep5z6x2 _1yep5z6xo _1yep5z6xp _1yep5z6xq _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),Py="f6jv6bk",wy="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6eu",Za=C({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),Ja="f6jv6b9 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf",mo="f6jv6bn";var Sy=[["Toolbar Focus","Alt+F10"],["Bold","Ctrl+B"],["Italic","Ctrl+I"],["Underline","Ctrl+U"],["Select All","Ctrl+A"],["Cut","Ctrl+X"],["Copy","Ctrl+C"],["Paste","Ctrl+V"],["Undo","Ctrl+Z"],["Redo","Ctrl+Shift+Z"],["Submit","Ctrl+Enter"],["Open Help Dialog","Ctrl+Shift+H"]],{dialog:{row:fo}}=layoutSprinkleValues,Iy=({isOpen:r,onClose:e})=>{let{formatMessage:t}=A(),o=useId();return jsx(Ne,{isOpen:r,onOpenChange:a=>{a||e();},children:jsx(Fe,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(ge,{"aria-labelledby":o,className:gy,drawerBackground:"subtle",children:[jsxs(E,{paddingLeft:fo.padding.horizontal.lg,paddingRight:fo.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:vy,children:[jsx(Q,{id:o,elementType:"h3",type:"title",size:"md",children:t(yo.help)}),jsx(D,{icon:XIcon,size:"md",variant:"secondary","aria-label":t(yo.close),onPress:e})]}),jsx(V,{className:Py}),jsxs(E,{paddingX:fo.padding.horizontal.lg,role:"table","aria-labelledby":o,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(E,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:fo.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:t(yo.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:t(yo.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Sy.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(E,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:fo.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:t(yo[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==Sy.length-1&&jsx(V,{})]},a))})]})]})})})},yo=K({toolbarFocus:{id:"toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"help",defaultMessage:"Help"},close:{id:"close",defaultMessage:"Close"},action:{id:"action",defaultMessage:"Action"},shortcut:{id:"shortcut",defaultMessage:"Shortcut"},bold:{id:"bold",defaultMessage:"Bold"},italic:{id:"italic",defaultMessage:"Italic"},underline:{id:"underline",defaultMessage:"Underline"},selectAll:{id:"selectAll",defaultMessage:"Select All"},cut:{id:"cut",defaultMessage:"Cut"},copy:{id:"copy",defaultMessage:"Copy"},paste:{id:"paste",defaultMessage:"Paste"},undo:{id:"undo",defaultMessage:"Undo"},redo:{id:"redo",defaultMessage:"Redo"},openHelpDialog:{id:"openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"submit",defaultMessage:"Submit"}});var Qa=ut.forwardRef(({value:r,defaultValue:e,onChange:t,placeholder:o,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:l,editableContentAriaLabel:p,editorHandle:c,autoFocus:d,saveOnEnter:m,onSave:u},b)=>{let y=ut.useRef(null),[f,g]=useControlledState(r,e||"",t),_=useCallback(R=>{g(R.currentTarget.value||"");},[g]),v=useCallback(R=>{(m&&R.key==="Enter"&&!R.shiftKey||(R.ctrlKey||R.metaKey)&&R.key==="Enter")&&(R.preventDefault(),u());},[m,u]);useImperativeHandle(b,()=>({clear:()=>{g("");}}));let h=useCallback(R=>{R.currentTarget.style.height="16px",R.currentTarget.style.height=R.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let R=y.current;R&&(R.style.height="16px",R.style.height=R.scrollHeight+"px");},[s],[f]),useImperativeHandle(c,()=>({setCaretPosition:R=>{y.current&&(y.current.focus(),y.current.setSelectionRange(R,R));},focus:()=>{y.current&&y.current.focus();}}));let{focusProps:x,isFocused:w,isFocusVisible:P}=useFocusRing(),{hoverProps:z,isHovered:k}=useHover({}),T=filterTruthyValues({"data-focus-visible":P,"data-hovered":k,"data-focused":w});return jsx("textarea",{...mergeProps(x,z,T),ref:L(y,n),className:classNames(s?Cy:[Ya(),Za({isInline:i}),wy]),autoFocus:d,onChange:_,disabled:l,onInput:h,value:f,placeholder:o,spellCheck:a,"aria-label":p,onKeyDown:v})});Qa.displayName="PlainEditor";var vo="mention",en="mention_input",jy=ut.forwardRef(({onCancel:r,editor:e,element:t,onSelectionChange:o},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(rn),l=useSelected(),[p,c]=useState(""),{contains:d}=useFilter({sensitivity:"base"}),{formatMessage:m}=A(),u=useMemo(()=>{let I=i.filter(M=>p===""||d(M.displayName,p)).map(M=>({id:M.id,label:M.displayName,data:M}));return s?take(I,s):I},[i,s,p,d]),b=useCallback(I=>jsx(Item,{children:I.label},I.id),[]),y=useCallback((I=!1)=>{let M=findNodePath(e,t);M&&(removeNodes(e,{at:M}),I&&focusEditor(e));},[e,t]),f=useComboBoxState({items:u,children:b,menuTrigger:"focus",onSelectionChange:I=>{y(!0),o?.(I);}}),g=ut.useRef(null),_=ut.useRef(null),v=ut.useRef(null),h=ut.useRef(null),x=useHTMLInputCursorState(_);useInteractOutside({ref:h,onInteractOutside:()=>{f.close();}});let{inputProps:w,listBoxProps:P}=useComboBox({defaultItems:u,inputRef:_,buttonRef:g,listBoxRef:v,popoverRef:h,menuTrigger:"focus","aria-label":m(DS.mention)},f);useEffect(()=>{_.current?.focus();},[]);let z=useCallback((I="manual",M=!1)=>{y(M),r?.(I,f.inputValue);},[r,y,f.inputValue]),k=useRef(l);useEffect(()=>{k.current&&!l&&z("deselect"),k.current=l;},[l,z]);let T=x?.atStart??!1,R=x?.atEnd??!1,N=useCallback(I=>{I.key==="Backspace"&&T?z("backspace",!0):I.key==="Escape"?z("escape",!0):I.key==="ArrowLeft"&&T?z("arrowLeft",!0):I.key==="ArrowRight"&&R&&z("arrowRight",!0);let M=Hotkeys.isUndo(I)&&e.history.undos.length>0,F=Hotkeys.isRedo(I)&&e.history.redos.length>0;(M||F)&&(I.preventDefault(),e[M?"undo":"redo"](),focusEditor(e));},[T,R,z,e]),S=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let I=ae(_.current),M=_.current?I?.getComputedStyle(_.current).font:void 0;return {width:M?getTextDimensions({text:f.inputValue,font:M}).width+10:"4ch"}}},[f.inputValue]);return jsxs(mt.Provider,{value:f,children:[jsx("input",{...mergeProps(w,{onKeyDown:N,onBlur:()=>{z("blur",!0);},onChange:I=>{c(I.target.value);}}),style:S,className:hy,ref:L(a,_)}),jsx(ze,{triggerRef:n,isNonModal:!0,ref:h,state:f,crossOffset:-2,children:jsx(de,{...P,items:void 0,autoFocus:"first",ref:v,className:classNames(tt,sprinkles({width:"full"})),renderOption:Vy})})]})});jy.displayName="MentionInputContentElement";var gs=withRef(({className:r,...e},t)=>{let{children:o,editor:a,element:n}=e,{items:i}=useContext(rn),s=useRef(null),[l,p]=useState(null);useEffect(()=>{let m=findNodePath(a,n);if(!m)return;let u=getPointBefore(a,m);if(!u)return;let b=createPointRef(a,u);return p(b),()=>{b.unref();}},[a,n]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),Pr()&&m&&focusEditor(a);},[a]),d=useCallback(m=>{if(!m)return;let u=s.current?.getRootNode()instanceof ShadowRoot,b=i.find(f=>f.id===m);invariant(b,"User not found");let y={type:vo,value:b.id,displayName:b.displayName,children:[{text:""}]};insertNodes(a,[y,{text:" "}]),u?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:r,ref:t,...e,children:[jsx(jy,{onCancel:(m,u)=>{m!=="backspace"&&insertText(a,"@"+u,{at:l?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:d,ref:s,element:n,editor:a}),o]})});gs.displayName="MentionInputElement";var vs=withRef(({className:r,onClick:e,children:t,...o},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:r,contentEditable:!1,"data-user-id":n.value,onClick:getHandler(e,n),ref:a,...o,children:["@",n.displayName,t]})});vs.displayName="MentionElement";var Hy=(r,{options:{trigger:e,triggerPreviousCharPattern:t,triggerQuery:o}})=>{let{insertText:a}=r,n=i=>i===e;return r.insertText=i=>{if(!r.selection||!n(i)||o&&!o(r)){a(i);return}let s=getEditorString(r,getRange(r,r.selection,getPointBefore(r,r.selection)));if(t?.test(s)){tn(r);return}a(i);},r},DS=K({mention:{defaultMessage:"Mention",id:"mention"}});function Uy({className:r,children:e,...t}){return jsx(PlateElement,{asChild:!0,className:r,...t,children:jsx("p",{children:e})})}function ZS(r){return Object.entries(r).map(([e,t])=>`${kebabCase(e)}:${t}`).filter(([,e])=>!!e).join(";")}function JS(r){return "text"in r}function QS(r){return r.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}function ho(r){if(!r)return "";function e(t){if(JS(t)){let a=QS(t.text);return t.bold&&(a=`<b>${a}</b>`),t.italic&&(a=`<i>${a}</i>`),t.underline&&(a=`<u>${a}</u>`),(t.color||t.backgroundColor)&&(a=`<span style="${ZS(filterTruthyValues({color:t.color||void 0,backgroundColor:t.backgroundColor||void 0}))}">${a}</span>`),a}let o=t.children?.map(ho).join("");switch(t.type){case ELEMENT_PARAGRAPH:return `<p>${o}</p>`;case ELEMENT_LINK:return `<a href="${t.url}">${o}</a>`;case vo:return `<span data-user-id="${t.value}">${t.displayName}</span>`;default:return o}}return Array.isArray(r)?r.map(t=>e(t)).join(""):e(r)}function eI(r){return r?(r=r.trim(),r.endsWith(";")&&(r=r.slice(0,-1)),Object.fromEntries(r.split(";").map(e=>e.split(":").map(t=>t.trim())).map(([e,t])=>[camelCase(e),t]))):{}}function xs(r){r.startsWith("<p>")||(r=`<p>${r}</p>`);let e=new DOMParser().parseFromString(qy.default.sanitize(r),"text/html"),t=e.querySelectorAll("[style]");for(let a of t)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let o=e.querySelectorAll("br");for(let a of o)a.outerHTML=a.closest("p")?`
41
+ `:"<p>";return Gy(e.body)}function Gy(r,e){if(r.nodeType===Node.TEXT_NODE)return jsx$1("text",e,r.textContent);if(r.nodeType!==Node.ELEMENT_NODE)return null;let t={...e};switch(r.nodeName.toUpperCase()){case"B":{t.bold=!0;break}case"I":{t.italic=!0;break}case"EM":{t.italic=!0;break}case"U":{t.underline=!0;break}case"SPAN":{let a=eI(r.getAttribute("style")||"");a["text-decoration"]==="underline"&&(t.underline=!0),a.color&&(t.color=a.color),a.backgroundColor&&(t.backgroundColor=a.backgroundColor);break}}let o=[...r.childNodes].flatMap(a=>Gy(a,t));switch(o.length===0&&o.push(jsx$1("text",t,"")),r.nodeName.toUpperCase()){case"BR":return jsx$1("text",e,`
42
+ `);case"SPAN":{let a=r.dataset.userId;return a?jsx$1("element",{type:vo,value:a,displayName:r.textContent},{text:""}):o}case"P":return jsx$1("element",{type:ELEMENT_PARAGRAPH},o);case"A":return jsx$1("element",{type:ELEMENT_LINK,url:r.getAttribute("href")},o);default:return o}}function Wy(r){let e=findNode(r,{match:{type:getPluginType(r,ELEMENT_LINK)}}),[t]=e||[{url:""}];return t?.url}function tn(r){let e={children:[{text:" "}],type:en};r.insertNode(e);}var tI=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:vo,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:en}],withOverrides:Hy}),Xy=createPlugins([createParagraphPlugin({component:Uy}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:Yy}),tI({component:vs})],{components:{[en]:gs}});var xt={Add:"add",Edit:"edit",Show:"show"},e1=({isDisabled:r})=>{let{formatMessage:e}=A(),t=useEditorRef();return jsxs(Ae,{type:"dialog",children:[jsx(Be,{children:jsx(D,{icon:LinkIcon,size:"sm",isDisabled:r,"aria-label":e(Pt.addLink),className:ur,preventFocusOnPress:!0})}),jsx(Ee,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:o})=>jsx(ge,{size:"content",style:{minWidth:240},children:jsx(pI,{close:()=>{o(),setTimeout(()=>{focusEditor(t,t.selection);},0);}})})})]})},pI=({close:r})=>{let e=useEditorRef(),{formatMessage:t}=A(),o=useEditorSelector(p=>Wy(p),[]),[a,n]=ut.useState(o?xt.Show:xt.Add),[i,s]=ut.useState(o||""),l=jsx(E,{padding:"lg",children:jsx(rt,{label:t(Pt.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a===xt.Add&&jsxs(Fragment,{children:[l,jsx(E,{display:"flex",justifyContent:"flex-end",padding:"lg",className:fy,children:jsx(G,{isDisabled:!isUrl(i,!0),label:t(Pt.addLink),size:"sm",onPress:()=>{upsertLink(e,{url:i,skipValidation:!0}),r?.();},preventFocusOnPress:!0})})]}),a===xt.Show&&jsxs(Fragment,{children:[jsx(E,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:o})}),jsxs(E,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(G,{label:t(Pt.editLink),size:"sm",variant:"secondary",onPress:()=>{n(xt.Edit);},style:{flex:1,justifyContent:"center"}}),jsx(G,{label:t(Pt.removeLink),size:"sm",onPress:()=>{unwrapLink(e),r?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a===xt.Edit&&jsxs(Fragment,{children:[l,jsxs(E,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(G,{label:t(Pt.cancel),size:"sm",variant:"secondary",onPress:()=>{n(xt.Show),r?.();}}),jsx(G,{label:t(Pt.save),size:"sm",onPress:()=>{upsertLink(e,{url:i,skipValidation:!0}),r?.();}})]})]})]})};function Yy({className:r,children:e,...t}){return jsx(PlateElement,{asChild:!0,className:r,...t,children:jsx("a",{className:va({size:"sm"}),children:e})})}var Pt=K({addLink:{id:"addLink",defaultMessage:"Add Link",description:"Add Link"},editLink:{id:"editLink",defaultMessage:"Edit Link",description:"Edit Link"},removeLink:{id:"removeLink",defaultMessage:"Remove Link",description:"Remove Link"},cancel:{id:"cancel",defaultMessage:"Cancel",description:"Cancel"},save:{id:"save",defaultMessage:"Save",description:"Save"},link:{id:"linkAnnotation",defaultMessage:"Link",description:"Link"}});var dI=parseColor("#ffffff00").toString("hexa"),Ps=[{label:"Red",color:"#ff0000"},{label:"Green",color:"#00ff00"},{label:"Blue",color:"#0000ff"},{label:"Yellow",color:"#ffff00"},{label:"Cyan",color:"#00ffff"},{label:"Magenta",color:"#ff00ff"},{label:"Black",color:"#000000"},{label:"White",color:"#ffffff"},{label:"Gray",color:"#808080"},{label:"Orange",color:"#ffa500"},{label:"Brown",color:"#a52a2a"},{label:"Purple",color:"#800080"}];[...Ps,{label:"Transparent",color:dI}];var an=({nodeType:r,icon:e,ariaLabel:t,isDisabled:o})=>{let a=useEditorSelector(i=>isMarkActive(i,r),[]),n=useEditorRef();return jsx(Ce,{variant:"tertiary",isSelected:a,size:"sm",icon:e,"aria-label":t,isDisabled:o,onPress:()=>{toggleMark(n,{key:r});},preventFocusOnPress:!0})},ks=({nodeType:r,"aria-label":e,isDisabled:t})=>{let{updateColor:o,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:r}),i=useCallback(({ref:l,triggerProps:p})=>jsx(D,{icon:r==="color"?TextIcon$1:HighlightTextIcon,"aria-label":e,size:"md",variant:"popover",isDisabled:t,className:ur,preventFocusOnPress:!0,...p,ref:l}),[r,e,t]),s=useCallback(l=>{l?o(l.toString("rgba")):a();},[a,o]);return jsx(lr,{presets:Ps,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:t})};var HI=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],rn=ut.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Rs=ut.forwardRef(({value:r,defaultValue:e,onChange:t,style:o,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:l,containerRef:p,onHelpDialogOpenRequest:c,mentionableUsers:d,editorHandle:m,maxMentionableUsersSuggestions:u,autoFocus:b,editorRef:y,saveOnEnter:f,onSave:g},_)=>{let v=useRef(null),h=useId(),{formatMessage:x}=A(),w=useRef(null),P=w.current,z=useRef(null),k=useMemo(()=>P?.getRootNode()instanceof ShadowRoot,[P]),[T,R]=useControlledState(r?xs(r):void 0,xs(e||"<p></p>"),I=>{t&&t(ho(I));}),{keyboardProps:N}=useKeyboard({onKeyDown:I=>{(f&&I.key==="Enter"&&!I.shiftKey||(I.ctrlKey||I.metaKey)&&I.key==="Enter")&&(I.preventDefault(),g()),I.altKey&&I.key==="F10"?(I.preventDefault(),v.current&&v.current.querySelector("button")?.focus()):I.continuePropagation(),Pr()&&k&&z.current&&focusEditor(z.current);}});useEffect(()=>{s&&z.current&&deselect(z.current);},[s]),useImperativeHandle(_,()=>({startMention:()=>{z.current&&!w.current?.querySelector("input[role='combobox']")&&tn(z.current);}})),useImperativeHandle(m,()=>({setCaretPosition:I=>{z.current&&(focusEditor(z.current),moveSelection(z.current,{distance:I,unit:"character"}));},focus:()=>{z.current&&focusEditor(z.current);}}));let S=useMemo(()=>({items:d||[],containerRef:p,maxMentionableUsersSuggestions:u}),[d,p,u]);return jsx(rn.Provider,{value:S,children:jsxs(Plate,{initialValue:T||HI,plugins:Xy,editorRef:L(z,y||null),onChange:I=>{R(I);},children:[jsxs(Xa,{className:Ja,"aria-controls":h,ref:v,children:[jsxs(E,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(an,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:x(br.bold),isDisabled:s}),jsx(an,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:x(br.italic),isDisabled:s}),jsx(an,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:x(br.underline),isDisabled:s})]}),jsx(V,{orientation:"vertical",className:mo}),jsx(ks,{nodeType:MARK_COLOR,"aria-label":x(br.fontColor),isDisabled:s}),jsx(V,{orientation:"vertical",className:mo}),jsx(ks,{nodeType:MARK_BG_COLOR,"aria-label":x(br.backgroundColor),isDisabled:s}),jsx(V,{orientation:"vertical",className:mo}),jsx(e1,{isDisabled:s}),jsx(V,{orientation:"vertical",className:mo}),jsx(D,{className:ur,icon:QuestionmarkCircleIcon,size:"sm","aria-label":x(br.help),onPress:c})]}),jsx(V,{variant:"secondary"}),jsx("div",{...N,ref:w,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:o,placeholder:n,autoFocus:b,spellCheck:a,"aria-label":l,className:classNames(Ya({isDisabled:s}),Za({isInline:i})),renderPlaceholder:({attributes:I,children:M})=>jsx("span",{...I,className:sprinkles({paddingY:"lg"}),children:M})})})]})})});Rs.displayName="RichEditor";var Vy=({key:r,value:e},{isDisabled:t,optionProps:o,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:t}),{label:l,data:p}=e;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(o,s),className:_y({isDisabled:t,isHovered:a}),"data-active":a,ref:i,children:[jsx(nr,{name:l,...p?.avatar}),jsxs(E,{display:"flex",flexDirection:"column",children:[jsx(Q,{type:"subtitle",size:"sm",children:l}),jsx(Q,{type:"helper",size:"sm",children:p?.description})]})]}),r===n.collection.getLastKey()?null:jsx(V,{})]})},br=K({bold:{defaultMessage:"Bold",id:"bold"},italic:{defaultMessage:"Italic",id:"italic"},underline:{defaultMessage:"Underline",id:"underline"},backgroundColor:{defaultMessage:"Background color",id:"backgroundColor"},fontColor:{defaultMessage:"Font color",id:"fontColor"},help:{defaultMessage:"Help",id:"help"}});var i1=ut.memo(ut.forwardRef(({className:r,style:e,"data-block-id":t,"data-block-class":o,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:l=ArrowUpCircleFilledIcon,submitButtonAriaLabel:p,cancelButtonAriaLabel:c,"aria-label":d,"aria-describedby":m,"aria-labelledby":u,"aria-details":b,editableContentAriaLabel:y="Editing Area",footerButtons:f,clearOnCancel:g,clearOnSave:_,...v},h)=>{let x=useRef(null),{formatMessage:w}=A(),P=useRef(null),z=useRef(null),k=useRef(null),T=!a&&v.variant==="minimal",R=useRef(null),[N,S]=ut.useState(v.value||v.defaultValue),I=v.isDisabled||v.isSaveDisabled||!getPlainText(N||""),{fieldProps:M}=useLabel({"aria-label":d,"aria-labelledby":u,"aria-describedby":m,"aria-details":b,labelElementType:"div"});T&&!v.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let F=useCallback(()=>{S(""),a?x.current?.reset():z.current?.clear();},[a]),H=useCallback(()=>{I||(i?.(a?ho(x.current?.children):P.current.value),_&&F());},[F,_,a,i,I]),B=jsx(D,{variant:"ghost","aria-label":p||w(Ns.save),icon:l,isDisabled:I,size:"md",excludeFromTabOrder:T,className:T?zy:void 0,onPress:H,preventFocusOnPress:!0}),[$,U]=ut.useState(!1),{keyboardProps:O}=useKeyboard({onKeyDown:j=>{(j.metaKey||j.ctrlKey)&&j.shiftKey&&j.key==="h"&&(j.preventDefault(),U(!0));}}),te=useCallback(j=>{S(j),v.onChange?.(j);},[v]);return jsxs("div",{...mergeProps(M,a?O:{}),role:"application",ref:L(k,h),style:e,"data-block-id":t,"data-block-class":o,className:classNames(by({isInline:s,isMinimal:T}),"BaselineUI-Editor",r),"aria-disabled":v.isDisabled,children:[T?jsxs(Fragment,{children:[s?jsx(nr,{className:yy,name:v.avatarName||""}):null,jsxs("div",{className:xy({isInline:s}),children:[jsx(Qa,{isMinimal:T,textBoxRef:P,isInline:s,editableContentAriaLabel:y,...v,onChange:te,onSave:H}),B]})]}):jsxs(Fragment,{children:[a?jsx(Rs,{containerRef:k,ref:R,editorRef:x,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{U(!0);},...v,onChange:te,onSave:H}):jsxs(Fragment,{children:[!s&&jsx(V,{variant:"secondary"}),jsx(Qa,{onCancel:n,textBoxRef:P,ref:z,isInline:s,editableContentAriaLabel:y,...v,onChange:j=>{S(j),v.onChange?.(j);},onSave:H})]}),jsx(V,{variant:"secondary"}),jsxs("div",{className:classNames(Ja,sprinkles({justifyContent:"space-between"})),children:[jsxs(E,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&v.mentionableUsers?jsx(D,{icon:AtIcon,size:"sm","aria-label":w(Ns.mention),onPress:()=>R.current?.startMention(),preventFocusOnPress:!0}):null,f?.map(({type:j,props:Z},X)=>j==="action"?jsx(D,{...Z,size:"sm",isDisabled:v.isDisabled||Z.isDisabled},X):jsx(Ce,{...Z,size:"sm",variant:"tertiary",isDisabled:v.isDisabled||Z.isDisabled},X))]}),jsxs(E,{children:[!!n&&jsx(D,{variant:"secondary",icon:XCircleFilledIcon,isDisabled:v.isDisabled,size:"md",onPress:()=>{n(),g&&F();},"aria-label":c||w(Ns.cancel)}),B]})]})]}),jsx(Iy,{isOpen:$,onClose:()=>{U(!1);}})]})}));i1.displayName="Editor";var Ns=K({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var s1="_8kqf970 _1yep5z6pi _1yep5z6pj _1yep5z6pk _1yep5z6m0 _1yep5z6m1 _1yep5z6m2 _1yep5z6oc _1yep5z6od _1yep5z6oe _1yep5z614j _1yep5z614k _1yep5z614l _1yep5z614s _1yep5z614t _1yep5z614u _1yep5z615a _1yep5z615b _1yep5z615c _1yep5z6z3 _1yep5z6vc _1yep5z6vd _1yep5z6ve _1yep5z617g _1yep5z6zv";var p1=2,d1=ut.forwardRef(({className:r,style:e,hideForKeyboard:t,scrollRef:o,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":l},p)=>{let c=ut.useRef(null),d=useInteractionModality(),[m,u]=ut.useState(!1),b=useCallback(()=>{let k=o?.current||fe(c.current).body;return ae(k).getComputedStyle(k).flexDirection==="column-reverse"?k.scrollTop+p1>=0:k.scrollTop+k.clientHeight+p1>=k.scrollHeight},[o]),[y,f]=ut.useState(b),{buttonProps:g,isPressed:_}=useButton({onPress:()=>{let k=o?.current||fe(c.current).body;k.scrollTo({top:k.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:v,isFocused:h,isFocusVisible:x}=useFocusRing(),{hoverProps:w,isHovered:P}=useHover({}),z=filterTruthyValues({"data-block-id":s,"data-block-class":l,"data-pressed":_,"data-focus-visible":x,"data-hovered":P,"data-focused":h});return useEffect(()=>{f(b());},[b]),useEffect(()=>{let k=o?.current||fe(c.current).body,T="onscrollend"in ae(k),R=()=>{setTimeout(()=>{u(!1),f(b());},n);},N=()=>{u(!0),T||R();};return k.addEventListener("scroll",N),k.addEventListener("scrollend",R),()=>{k.removeEventListener("scroll",N),k.removeEventListener("scrollend",R);}},[o,n,b]),jsx(AnimatePresence,{initial:!1,children:(!t||d!=="keyboard")&&!m&&!y?jsxs(motion.button,{initial:{opacity:0,transform:"translateX(-50%) translateY(10px)"},animate:{opacity:1,transform:"translateX(-50%) translateY(0)"},exit:{opacity:0,transform:"translateX(-50%) translateY(10px)"},transition:{duration:.3},...mergeProps(g,v,w,z),className:classNames(s1,Pa({isFocusVisible:x,variant:"high-contrast",isHovered:P}),wa({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",r),style:e,ref:L(p,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:Gr({variant:"high-contrast"})}),a]}):null})});d1.displayName="ScrollControlButton";var Ls="_1yep5z6jy _1yep5z6jz _1yep5z6k0 _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",u1=C({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6m0 _1yep5z6m1 _1yep5z6m2 _1yep5z6oi _1yep5z6oj _1yep5z6ok"},hasNoCloseBtn:{true:"_1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oi _1yep5z6oj _1yep5z6ok _1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6nc _1yep5z6nd _1yep5z6ne"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61hf _1yep5z61hg _1yep5z61hh"]]}),m1="_1v0p2z10";var ln=ut.forwardRef(({className:r,style:e,"data-block-id":t,"data-block-class":o,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:l,icon:p,iconColor:c,showCloseButton:d=!0,onPrimaryAction:m,onCancel:u,autoFocusButton:b,isPrimaryActionDisabled:y},f)=>{let g=useId(),{formatMessage:_}=A(),v=n&&jsx(Q,{id:g,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(ge,{className:r,style:e,"data-block-id":t,"data-block-class":o,size:"sm",variant:"primary",role:"alertdialog",ref:f,"aria-labelledby":g,children:[jsxs("div",{className:u1({hasTitleAndIcon:!!(p&&n),hasNoCloseBtn:!d}),children:[jsxs(E,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[p?jsx(p,{style:{color:c},size:24}):null,!p&&v,d?jsx(D,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(uR.close),onPress:u}):null]}),p?v:null]}),a?jsx(E,{elementType:"section",className:m1,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,l?jsx(E,{paddingX:"lg",paddingBottom:"lg",children:jsx(rt,{...l})}):null,s||i?jsxs(Fragment,{children:[jsx(V,{}),jsxs(E,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(G,{variant:"secondary",className:Ls,label:s,onPress:u,autoFocus:b==="cancel"}):null,i?jsx(G,{className:Ls,label:i,onPress:m,autoFocus:b==="primary",isDisabled:y}):null]})]}):null]})});ln.displayName="AlertDialog";var uR=K({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var f1="_1t55bp71",y1="_1yep5z6e3 _1yep5z6eu _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z69i _1yep5z69j _1yep5z69k",b1="_1t55bp70";var vR=gR(),g1=ut.forwardRef(({className:r,style:e,children:t,"data-block-id":o,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let l=t;return (!t||Array.isArray(t)&&t.length===0)&&(l=""),vR.render(l)},[t]);return jsx("div",{className:classNames(y1,b1,{[f1]:n},"BaselineUI-Markdown",r),"data-block-id":o,"data-block-class":a,style:e,ref:i,dangerouslySetInnerHTML:{__html:s}})});g1.displayName="Markdown";function z1(r){let{formatMessage:e,locale:t}=A(),[o,a]=ut.useState(!1),[n,i]=ut.useState(0),[s,l]=ut.useState(0),[p,c]=ut.useState(!1);useEffect(()=>{if(!r.current)return;let u=r.current,b=()=>{a(!1),i(0);},y=()=>{p||i(u.currentTime*100/u.duration);},f=()=>{l(u.duration);};return u.addEventListener("ended",b),u.addEventListener("timeupdate",y),u.addEventListener("loadedmetadata",f),()=>{u.removeEventListener("ended",b),u.removeEventListener("timeupdate",y),u.removeEventListener("loadedmetadata",f);}},[p,r]);let d=useCallback(()=>{(async()=>r.current&&(r.current.paused?(await r.current.play(),a(!0),announce(e(h1.playing),"polite")):(r.current.pause(),a(!1),announce(e(h1.paused),"polite"))))();},[e,r]),m=useCallback(u=>{r.current&&(r.current.currentTime=u*r.current.duration/100,announce(zR(r.current.currentTime,t.locale),"assertive"));},[t.locale,r]);return {isPlaying:o,progress:n,duration:s,togglePlay:d,seek:m,setProgress:i,formattedCurrentTime:r.current?.currentTime?_1(r.current?.currentTime):"00:00",formattedDuration:s?_1(s):"00:00",setIsSliderDragging:c}}var h1=K({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function zR(r,e){let t=Math.floor(r/3600),o=Math.floor(r%3600/60),a=r%60,n={...t&&{hours:t},...o&&{minutes:o},seconds:Math.floor(a)};return new Intl.DurationFormat(e,{style:"long"}).format(n)}function _1(r){let e=Math.floor(r%3600/60),t=Math.floor(r%60);return [e,t].map(o=>o.toString().padStart(2,"0")).join(":")}var C1="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q",x1="rta2n91 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6zv _1yep5z6vf _1yep5z6vg _1yep5z6vh _1yep5z617e _1yep5z610s",P1="rta2n90";var S1=ut.forwardRef(({className:r,style:e,size:t="lg",sources:o,"data-block-id":a,"data-block-class":n,...i},s)=>{let l=ut.useRef(null),{isPlaying:p,progress:c,duration:d,togglePlay:m,seek:u,formattedDuration:b,formattedCurrentTime:y,setProgress:f,setIsSliderDragging:g}=z1(l),{formatMessage:_}=A(),v=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":p?"playing":"paused","data-loaded":d>0});return jsxs("div",{...v,...i,className:classNames(C1,"BaselineUI-AudioPlayer",r),role:"group",style:e,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:l,children:o.map(({url:h,type:x})=>jsx("source",{src:h,type:x},h))})}),jsx(Ce,{icon:p?PauseIcon:PlayIcon,variant:"toolbar",isSelected:p,size:t,"aria-label":_(p?Ds.pause:Ds.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:x1,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(Vt,{"aria-label":_(Ds.audioTimeline),value:c,minValue:0,maxValue:100,className:P1,onChange:h=>{f(h),g(!0);},onChangeEnd:h=>{u(h),g(!1);}}),jsx("span",{"aria-hidden":!0,children:b})]})]})});S1.displayName="AudioPlayer";var Ds=K({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var I1="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6ia _1yep5z6ib _1yep5z6ic",R1="_1w920rn1 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69i _1yep5z69j _1yep5z69k",T1="_1w920rn0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6l8",cn=C({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{isFocusVisible:{true:"_1yep5z6ln _1yep5z6ll _1yep5z6hu"},isSelected:{true:"_1yep5z6ln _1yep5z6ll _1yep5z6hu"},isLoading:{true:"_1yep5z6164 _1yep5z6165 _1yep5z6166"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn6 _1yep5z6ln _1yep5z6ll _1yep5z6hu"]]}),N1="_1w920rnb _1yep5z6li",E1=C({defaultClassName:"_1w920rn7 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6g5 _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6ln _1yep5z6ll _1yep5z6hu"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rna _1yep5z61tg _1yep5z61tf _1yep5z61pp"]]}),L1="_1w920rnc";var dn=({items:r,ulRef:e,containerClassName:t,previewClassName:o,itemDataAttribute:a,showCount:n=!1})=>{let{length:i}=r,s=ut.useRef(null);return useLayoutEffect(()=>{if(!s.current)return;let l=s.current.closest(t)?.querySelector(`[${a}='${r?.at(-1)?.key}']`)?.cloneNode(!0);invariant(l,"Node is not defined."),s.current?.prepend(l);},[r,e,t,a]),jsx("div",{className:o,ref:s,children:n&&i>1?jsx(E,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:L1,children:i}):null})};function D1(r,e){return r.find(t=>t.id===e)}function A1(r,e,t){let o=[...r],a=o.filter(s=>t.has(s.id)),n=o.filter(s=>!t.has(s.id)),i=n.findIndex(s=>s.id===e);return n.flatMap((s,l)=>l===i?[...a,s]:s)}function B1(r,e,t){let o=[...r],a=o.filter(s=>t.has(s.id)),n=o.filter(s=>!t.has(s.id)),i=n.findIndex(s=>s.id===e);return n.flatMap((s,l)=>l===i?[s,...a]:s)}function As(r){return r.map(e=>({id:e.id,label:e.label,data:{src:e.src,alt:e.alt}}))}function un(r){return r.map(e=>({id:e.id,label:e.label,src:e.data?.src,alt:e.data?.alt}))}var AR=({fit:r,item:e,deleteElement:t})=>{let{formatMessage:o}=A(),a=useReducedMotion(),{imgProps:n,isLoading:i}=Ot({src:e.data?.src,alt:e.data?.alt??""});return i?jsx(tr,{"aria-label":o(Co.loading)}):jsx(motion.div,{role:"img",initial:{opacity:a?1:0},animate:{opacity:1},exit:{opacity:a?1:0},"aria-label":n.alt,style:{backgroundImage:`url(${n.src})`,backgroundSize:r},className:N1,children:t})},j1=({item:r,options:{optionProps:e,isFocusVisible:t,isSelected:o,isFocused:a,isDisabled:n,isPressed:i},liRef:s,fit:l="contain",onDelete:p,className:c,imageClassName:d,imageLabelClassName:m,imageDimensions:u,style:b,layoutTransition:y=!0,renderImage:f=(g,{deleteElement:_})=>jsx(AR,{item:g,deleteElement:_,fit:l})})=>{let g=useId(),{formatMessage:_}=A(),{value:v}=r;invariant(v&&Ke(v),"Expected value to be a list option");let h=p?jsx("div",{className:I1,children:jsx(D,{"aria-label":_(Co.delete),size:"xs",icon:XIcon$3,onPress:()=>{p(v.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,x=un([v])[0],w=useCallback(N=>{let S={},I=typeof N=="function"?N(x,{isSelected:o}):N;return I&&(S.width=typeof I.width=="string"?Os[I.width]:I.width,S.aspectRatio="height"in I?`${S.width} / ${I.height}`:I?.aspectRatio?.toString()),S},[x,o]),P=useMemo(()=>({isFocusVisible:t,isSelected:o,isFocused:a,isDisabled:n,isPressed:i}),[t,o,a,n,i]),z=useReducedMotion(),k=typeof y=="boolean"?y:!z,T=typeof y=="object"?y:void 0,R=k?motion.li:"li";return jsxs(R,{...mergeProps(e,k?{layout:!0,transition:T}:void 0),ref:s,className:classNames(R1,Ge(c,x,P)),"aria-labelledby":g,style:Eo(b,x,P),children:[jsx(E,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(cn({isFocusVisible:t,isSelected:o,isLoading:!0}),Ge(d,x,P)),style:w(u),"data-image-key":v.id,children:f(v,{deleteElement:h??void 0,onDelete:p})})}),jsx("span",{id:g,className:classNames(E1({isFocusVisible:t,isSelected:o}),Ge(m,x,P)),children:v.label})]})};var $R={width:0,display:"block"},$1={src:"src",alt:"alt"},Os={sm:102,md:170},U1=ut.forwardRef(({className:r,style:e,fit:t="cover",onReorder:o,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s=Os.sm,aspectRatio:l=3/4,items:p,defaultItems:c=[],onKeyDown:d,imageContainerClassName:m,imageClassName:u,labelClassName:b,onListChange:y,renderImage:f,layoutTransition:g,imageDimensions:_={width:s,aspectRatio:l},imageContainerStyle:v,...h},x)=>{let w=ut.useRef(null),[P,z]=useState([]),{formatMessage:k}=A();useEffect(()=>{(l||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,l]);let[T,R]=useControlledState(h.selectedKeys,h.defaultSelectedKeys??[],h.onSelectionChange),[N,S]=useControlledState(p?As(p):void 0,As(c),y?B=>{y?.(un(B));}:void 0),I=useCallback(B=>{let $=B.target.key,U=B.keys;if(B.target.dropPosition==="before"){let O=A1(N,$,U);S(O);}else if(B.target.dropPosition==="after"){let O=B1(N,$,U);S(O);}o?.(B);},[N,o,S]),M=useCallback(()=>{i&&P.length&&(S(N.filter(B=>!P.includes(B.id))),i(new Set(P)),z([]));},[P,N,i,S]),F=useCallback((B,$,U)=>{let{value:O}=B;invariant(Ke(O));let te={id:O.id,label:O.label,src:O.data?.src,alt:O.data?.alt};return jsx(j1,{item:B,options:$,liRef:U,fit:t,onDelete:i?j=>{z([j]);}:void 0,renderImage:f,className:Ge(m,te,$),imageClassName:u,imageLabelClassName:b,imageDimensions:_,style:v,layoutTransition:g})},[t,i,f,m,u,b,_,v,g]),{keyboardProps:H}=useKeyboard({onKeyDown(B){if(d?.(B),B.key==="Backspace"||B.key==="Delete"){if(!i)return;if([...T].length)z([...T]);else {let U=B.target.dataset.key;z([U]);}}}});return jsxs("div",{...H,ref:x,style:e,className:classNames("BaselineUI-ImageGallery",r),"data-block-id":a,"data-block-class":n,children:[jsx(de,{...h,selectedKeys:T,items:N,onReorder:I,layout:"grid",orientation:"vertical",className:T1,ref:w,dropIndicatorStyle:$R,renderOption:F,renderDragPreview:B=>jsx(dn,{items:B,ulRef:w,containerClassName:".BaselineUI-ImageGallery",previewClassName:cn(),itemDataAttribute:"data-image-key",showCount:!0}),onSelectionChange:R,getItems:B=>[...B].map($=>{let U=D1(N,$);return {[$1.src]:U?.src||"",[$1.alt]:U?.alt||"",key:$}})}),jsx(Ne,{isOpen:!![...P].length,onOpenChange:B=>{B||z([]);},children:jsx(Fe,{isDismissable:!0,children:jsx(ln,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:k(Co.delete),cancelLabel:k(Co.cancel),onCancel:()=>{z([]);},onPrimaryAction:M,autoFocusButton:"cancel"})})})]})});U1.displayName="ImageGallery";var Co=K({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var q1="_1sexph00",K1="_1sexph01 _1yep5z617x _1yep5z617y _1yep5z617z _1yep5z61a9 _1yep5z61aa _1yep5z61ab _1yep5z61bf _1yep5z61bg _1yep5z61bh _1yep5z6193 _1yep5z6194 _1yep5z6195 _1yep5z61ry _1yep5z61rz _1yep5z61s0";var X1=ut.forwardRef(({className:r,style:e,items:t,"data-block-id":o,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:l=!0,excludeFromTabOrder:p,onPress:c,isSelected:d,defaultSelected:m,onButtonSelectionChange:u,moreAriaLabel:b,optionStyle:y,optionClassName:f,triggerClassName:g,triggerStyle:_,tooltipProps:v,...h},x)=>{let{formatMessage:w}=A(),P=se(),z=useSelectState({items:t,...h,defaultSelectedKey:h.defaultSelectedKey||t?.[0]?.id,children:P,validationState:h.validationState==="error"?"invalid":"valid"}),[k,T]=useControlledState(d,!!m,O=>{u?.({isSelected:O,selectedKey:z.selectedKey});}),{hoverProps:R,isHovered:N}=useHover({isDisabled:s}),S=useMemo(()=>{let O=z.collection.getItem(z.selectedKey),te=O?.textValue||O?.["aria-label"],j=O?.value,Z=j?.icon,X={size:i,isSelected:k,onPress:Ie=>{T(!k),c?.(Ie);},isDisabled:s,excludeFromTabOrder:p,className:typeof f=="function"?f(j,{isButton:!0,isSelected:k}):f,style:typeof y=="function"?y(j,{isButton:!0,isSelected:k}):y};return n&&Z?jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:te,placement:"bottom start",offset:4,...typeof v=="function"?v("button"):v,children:jsx(Ce,{icon:Z,"aria-label":te,variant:"toolbar",...X})}):jsx(Ca,{iconStart:Z,label:te,variant:"toolbar",...X})},[p,n,k,s,c,f,y,T,i,z.collection,z.selectedKey,v]),I=h["aria-label"],M=useCallback(({buttonProps:O,ref:te})=>{delete O["aria-labelledby"];let j=b||`${w(JR.more)} ${I}`;return jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:j,placement:"bottom start",offset:4,...v,children:jsx(PressResponder,{...O,children:jsx(D,{"aria-label":j,ref:te,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:Z})=>classNames(za({isSelected:k,isFocusVisible:Z}),K1,g),style:_,isDisabled:s,excludeFromTabOrder:p})})})},[I,p,w,k,s,b,i,v,g,_]),F=filterTruthyValues({"data-block-id":o,"data-block-class":a,"data-hovered":N,"data-selected":k,"data-disabled":s,"data-expanded":z.isOpen}),H=ee(x),B=useMemo(()=>({state:z,popoverAnchorRef:H}),[z,H]),$=useCallback(O=>typeof f=="function"?f(O,{isButton:!1,isSelected:z.selectionManager.isSelected(O.id)}):f,[f,z.selectionManager]),U=useCallback(O=>typeof y=="function"?y(O,{isButton:!1,isSelected:z.selectionManager.isSelected(O.id)}):y,[y,z.selectionManager]);return jsx(ka.Provider,{value:B,children:jsxs(E,{...R,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(q1,"BaselineUI-ButtonSelect",r),"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],"aria-describedby":h["aria-describedby"],"aria-details":h["aria-details"],style:e,ref:H,...F,children:[S,jsx(nt,{isDisabled:s,showSelectedIcon:l,placement:"bottom start",items:t,...h,style:{width:20},optionClassName:$,optionStyle:U,variant:"ghost",renderTrigger:M})]})})});X1.displayName="ButtonSelect";var JR=K({more:{id:"more",defaultMessage:"More"}});var Y1=C({defaultClassName:"_18v88n10 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6lh",variantClassNames:{labelPosition:{top:"_1yep5z614v _1yep5z614w _1yep5z614x",start:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z616a _1yep5z616b _1yep5z616c _1yep5z6vf _1yep5z6vg _1yep5z6vh"}},defaultVariants:{},compoundVariants:[]}),Z1=C({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6lh _1yep5z6ls _1yep5z6lk _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z610v"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),J1=C({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6le",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z610b",warning:"_1yep5z610j"},isReadOnly:{true:"_1yep5z6112"}},defaultVariants:{},compoundVariants:[]}),Q1=C({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6lv _1yep5z6lt _1yep5z6h4 _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z612k",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z617s _1yep5z617q _1yep5z612y _1yep5z617j _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z613r"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61tp _1yep5z61tn _1yep5z61oy"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61oz"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61oz"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),eb=C({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),tb=C({defaultClassName:"_18v88n19 _1yep5z6ip _1yep5z6iq _1yep5z6ir",variantClassNames:{labelPosition:{top:"_1yep5z6t3 _1yep5z6t4 _1yep5z6t5",start:"_1yep5z6n0 _1yep5z6n1 _1yep5z6n2 _1yep5z614v _1yep5z614w _1yep5z614x"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61s1 _1yep5z61s2 _1yep5z61s3"]]}),rb=C({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lk",variantClassNames:{isFocusVisible:{true:"_1yep5z6121 _1yep5z6143 _1yep5z617h"},isHovered:{true:"_1yep5z6121 _1yep5z6143 _1yep5z617h"},isOpen:{true:"_1yep5z6143 _1yep5z617h"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61ny _1yep5z61q0 _1yep5z61te"],[{isHovered:!0},"_1yep5z61ny _1yep5z61q0 _1yep5z61te"],[{isOpen:!0},"_1yep5z61q0 _1yep5z61te"]]});function ob({allowsCustomValue:r,onValueChange:e,inputValue:t},o,a,n,i){let[s,l]=useState(null),p=useRef(!1);useEffect(()=>{if(!e)return;let d=a.current,m=u=>{l(u.target);};return d?.addEventListener("focusin",m),()=>{d?.removeEventListener("focusin",m);}},[e,a,o.selectedKey]),useGranularEffect(()=>{o.selectedKey&&(e?.({value:o.selectedItem?.textValue,key:o.selectedKey}),p.current=!1);},[o.selectedKey],[e,o.selectedItem]),useInteractOutside({ref:n,isDisabled:!e,onInteractOutside:d=>{!i.current?.contains(d.target)&&s===n.current&&r&&p.current&&(e?.({value:n.current?.value,key:null}),p.current=!1);}}),useEffect(()=>{if(!e)return;let d=n.current,m=()=>{p.current=!0;};return d?.addEventListener("input",m),()=>{d?.removeEventListener("input",m);}},[n,e]),useEffect(()=>{p.current=!1;},[t]);let{keyboardProps:c}=useKeyboard({isDisabled:!e,onKeyDown:d=>{r&&d.key==="Enter"&&p.current?(e?.({value:n.current?.value,key:null}),p.current=!1):d.key==="Escape"&&o.close(),d.continuePropagation();}});return {inputProps:c}}var nb=ut.forwardRef(({className:r,style:e,inputStyle:t,inputClassName:o,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:l=!1,onSelectionChange:p,onInputChange:c,isInvalid:d=!1,labelPosition:m="top",validationState:u="valid",variant:b="primary",toggleLabel:y,renderOption:f,showIcon:g=!0,filter:_,minValue:v,maxValue:h,inputType:x="text",onInputSubmit:w,onValueChange:P,...z},k)=>{let T=useObjectRef(k),{contains:R}=useFilter({sensitivity:"base"}),N=se(),S=useComboBoxState({...z,defaultFilter:_||R,defaultItems:s,onSelectionChange:p,onInputChange:c,children:N,validationState:d?"invalid":"valid"}),I=ut.useRef(null),M=ut.useRef(null),F=ut.useRef(null),H=ut.useRef(null),B=ut.useRef(null),{inputProps:$}=ob({onValueChange:P,allowsCustomValue:z.allowsCustomValue,inputValue:z.inputValue},S,T,M,H),{buttonProps:U,inputProps:O,listBoxProps:te,labelProps:j,errorMessageProps:Z,descriptionProps:X,validationErrors:Ie}=useComboBox({...z,inputRef:M,defaultItems:s,buttonRef:I,listBoxRef:F,popoverRef:H,validationState:u==="error"?"invalid":"valid"},S),Re=z.errorMessage||Ie.join(" "),he=Te({...z,errorMessage:Re,descriptionProps:X,errorMessageProps:Z,labelPosition:m});Re&&(u="error");let{hoverProps:Me,isHovered:Ue}=useHover({isDisabled:z.isDisabled}),{isFocused:oe,focusProps:me,isFocusVisible:Rt}=useFocusRing(),Tt=Jt({isReadOnly:z.isReadOnly,validationState:u}),Cr=filterTruthyValues({"data-read-only":z.isReadOnly,"data-disabled":z.isDisabled,"data-validation-state":u,"data-focused":oe,"data-focus-visible":Rt}),{labelProps:Nt,fieldProps:Y}=useLabel({label:i,"aria-label":z["aria-label"],"aria-labelledby":z["aria-labelledby"],"aria-describedby":z["aria-describedby"],"aria-details":z["aria-details"]}),{keyboardProps:q}=useKeyboard({onKeyDown:W=>{z.allowsCustomValue&&W.key==="Enter"&&w?.(O.value?.toString()??"");}}),{focusProps:le}=useFocus({onBlur:()=>{z.allowsCustomValue&&O.value&&w?.(O.value?.toString()??"");}});return jsx(mt.Provider,{value:S,children:jsxs("div",{className:classNames(Y1({labelPosition:m}),r,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:e,ref:T,children:[i||m==="start"&&he?jsxs("div",{className:tb({labelPosition:m,hasMessage:!!he}),children:[jsx("label",{...mergeProps(j,Nt),className:eb({isDisabled:z.isDisabled}),children:i}),m==="start"&&he]}):null,jsxs("div",{...Me,className:Q1({validationState:u,isHovered:Ue,isFocused:oe,variant:b,isReadOnly:!!z.isReadOnly,isDisabled:!!z.isDisabled}),ref:B,children:[jsx("input",{...mergeProps(O,$,me,Cr,Y,le,q,x==="number"?{type:"number",min:v,max:h,onKeyDown:W=>{(W.key==="ArrowUp"||W.key==="ArrowDown")&&W.preventDefault();}}:null),id:z.id,ref:M,className:classNames(Z1({isDisabled:z.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",o),style:t}),Tt&&g?jsx(Tt,{className:J1({validationState:u,isReadOnly:z.isReadOnly}),size:16}):null,jsx(G,{...U,ref:I,variant:"popover",label:y,className:rb({isFocusVisible:!z.isDisabled&&!z.isReadOnly&&Rt,isHovered:!z.isDisabled&&!z.isReadOnly&&Ue,isOpen:S.isOpen})})]}),jsx(ze,{ref:H,triggerRef:B,state:S,crossOffset:-2,className:"BaselineUI-ComboBox-Popover",children:jsx(de,{...te,items:s,ref:F,renderOption:f,selectionMode:"single",showSelectedIcon:l,className:classNames(tt,"BaselineUI-ComboBox-ListBox")})}),m==="top"&&he]})})});nb.displayName="ComboBox";var ib=C({defaultClassName:"byycd01 _1yep5z6d6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{},defaultVariants:{},compoundVariants:[]});var qs=ut.forwardRef(({enableReorder:r,...e},t)=>r?jsx(sb,{ref:t,...e}):jsx(Ks,{ref:t,...e}));qs.displayName="GridListItem";var Ks=ut.forwardRef(({item:r,state:e,dropState:t,renderGridItem:o,dragHandleProps:a},n)=>{let i=ee(n),s=useGridListItem({node:r},e,i),l=e.selectionManager.selectionMode!=="none"&&e.selectionManager.selectionBehavior==="toggle",{checkboxProps:p}=useGridListSelectionCheckbox({key:r.key},e),c={...s,checkBoxProps:l?p:void 0,dragHandleProps:a};return jsxs("div",{"data-grid-list-item-key":r.key,children:[t?jsx(Lt,{target:{type:"item",key:r.key,dropPosition:"before"},dropState:t}):null,o?o(r,c,i):null,t&&e.collection.getKeyAfter(r.key)==null?jsx(Lt,{target:{type:"item",key:r.key,dropPosition:"after"},dropState:t}):null]},r.key)});Ks.displayName="BaseGridListItem";var sb=ut.forwardRef(({dragState:r,item:e,...t},o)=>{let a=useDraggableItem({key:e.key,hasDragButton:!0},r);return jsx(Ks,{item:e,dragHandleProps:a,ref:o,...t})});sb.displayName="DraggableGridListItem";var wT=r=>{r.key==="Enter"||r.key==="Escape"||r.stopPropagation();},pb=ut.forwardRef(({className:r,style:e,isEditing:t=!1,"data-block-id":o,"data-block-class":a,gridListHandle:n,onReorder:i,enableReorder:s=!1,layout:l="stack",orientation:p="vertical",renderGridItem:c,...d},m)=>{let u=se(),b=useListState({...d,children:u}),y=ut.useRef(null),f=ee(m),{gridProps:g}=useGridList(d,b,f);Ao({handle:n,type:"gridlist"},b,f);let{collectionProps:_,dragState:v,dropState:h}=No({...d,onReorder:i,enableReorder:s,layout:l,orientation:p,preview:y,getItems:P=>[...P].map(z=>{let k=b.collection.getItem(z);return invariant(k,"Expected item to be defined."),{key:k.key.toString()}})},b,f),x=t?wT:g.onKeyDownCapture,w={state:b,dragState:v,dropState:h,enableReorder:s,renderGridItem:c};return jsxs("ul",{...mergeProps(g,_),className:classNames("BaselineUI-GridList",r),"data-block-id":o,"data-block-class":a,style:e,ref:f,"aria-rowcount":b.collection.size,onKeyDownCapture:x,children:[[...b.collection].map(P=>jsx(qs,{item:P,...w},P.key)),s?jsx(DragPreview,{ref:y,children:P=>jsx(dn,{items:P,ulRef:f,containerClassName:".BaselineUI-GridList",previewClassName:ib(),itemDataAttribute:"data-grid-list-item-key"})}):null]})});pb.displayName="GridList";var cb="_1yep5z6f5",db="_1dc3b8m0";var ub=ut.forwardRef(({className:r,selectionMode:e,style:t,"data-block-id":o,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...l},p)=>{let c=ee(p),d=se(),m=useListState({...l,selectionMode:e,suppressTextValueWarning:!0,children:d}),{actionGroupProps:u}=useActionGroup({...l,selectionMode:e,children:d},m,c),b=[...m.collection].map(y=>(invariant(y.value),jsx(MT,{item:y,state:m,isDisabled:l.isDisabled,onAction:l.onAction,tooltipProps:n,renderActionItem:s},y.key)));return i?jsxs(E,{...u,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",r),"data-block-id":o,"data-block-class":a,style:t,ref:c,children:[jsx(i,{size:24,className:cb}),jsx(E,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:b})]}):jsx(E,{...u,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",r),"data-block-id":o,"data-block-class":a,style:t,ref:c,children:b})});ub.displayName="ActionGroup";var MT=({item:r,state:e,tooltipProps:t,renderActionItem:o,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:r.key},e),s=n||e.selectionManager.isDisabled(r.key),l=e.selectionManager.isSelected(r.key);invariant(r.value);let{icon:p}=r.value;invariant(p);let c=useMemo(()=>(invariant(r.value),typeof t=="function"?t(r.value):t),[t,r.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(r.key);}}),children:jsx(ne,{text:r.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:o?.(r,{isSelected:l,isDisabled:s})||jsx(D,{variant:"tertiary",icon:p,"aria-label":r.textValue,size:"sm",isDisabled:s,className:classNames({[db]:l},"BaselineUI-ActionGroup-Item")})})})};var mb="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",fb="_1yep5z61qp _1yep5z61qq _1yep5z61qr _1yep5z61h9 _1yep5z61ha _1yep5z61hb";var bb=ut.forwardRef(({className:r,style:e,items:t,optionsContainerClassName:o,label:a,icon:n,value:i,defaultValue:s,onChange:l,isDisabled:p,optionClassName:c,optionStyle:d,labelPosition:m="top","data-block-id":u,"data-block-class":b,shouldFocusWrap:y,tooltip:f=!0,...g},_)=>{let v=useMemo(()=>t.map(x=>({id:x.color,label:x.label})),[t]),h=useId();return useEffect(()=>{!a&&!g["aria-label"]&&!g["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,g]),jsxs(E,{...Cn(g),className:classNames("BaselineUI-ColorSwatchPicker",r),"data-block-id":u,"data-block-class":b,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:e,ref:_,children:[n||a?jsxs(E,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Q,{id:h,type:"label",size:"sm",children:a}):null]}):null,jsx(de,{className:classNames(fb,o),selectionMode:"single",items:v,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:p?v.map(x=>x.id):void 0,isDisabled:p,selectedKeys:i?[i]:void 0,onSelectionChange:x=>{l?.([...x][0]);},optionClassName:c,optionStyle:d,renderOption:({key:x,textValue:w},{isSelected:P,isFocusVisible:z,isDisabled:k,optionProps:T},R)=>jsx("li",{...T,"data-disabled":k,className:classNames(mb,T.className),ref:R,children:jsx(st,{isFocusVisible:z,color:x,isSelected:P,"aria-label":w,isInteractive:!0,isDisabled:k,tooltip:f})}),shouldFocusWrap:y,...g,"aria-labelledby":a?h:g["aria-labelledby"]})]})});bb.displayName="ColorSwatchPicker";var gb="_10dw1p96",vb="_10dw1p95",hb=C({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lk _1yep5z6l7 _1yep5z6l4",variantClassNames:{isSelected:{true:"_1yep5z6120"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z613r _1yep5z617k _1yep5z617i"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isSelected:!1,isRenaming:!1},"_1yep5z61nw _1yep5z61pu _1yep5z61tg _1yep5z61tf"]]});function Cb(r,e){if(typeof r=="function"&&!r.prototype?.isReactComponent){let t=r(e);return isValidElement(t)?r:t}return r}var xb=({context:r,depth:e,children:t,item:o,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:l,primaryActionAriaLabel:p,secondaryActionAriaLabel:c,onRename:d,onAction:m,renderItemTitle:u=b=>b.data.label})=>{let{formatMessage:b}=A(),{hoverProps:y,isHovered:f}=useHover({}),g=useRef(null),{onKeyDown:_,...v}=r.interactiveElementProps;delete v.onFocus,delete v.onClick;let h=createFocusManager(g),x=useCallback(S=>{if(S.key==="ArrowRight"&&(r.isExpanded||!o.children?.length))g.current?.setAttribute("tabindex","-1"),S.preventDefault(),S.stopPropagation(),h.focusNext();else switch(S.key){case"ArrowLeft":{h.focusPrevious()?(S.preventDefault(),S.stopPropagation()):(_?.(S),r.focusItem(!0));break}case"Enter":{r.toggleExpandedState();break}default:_?.(S);}},[r,h,_,o,g]),w=useMemo(()=>{let S=Cb(s,o.index),I=Cb(l,o.index),M=typeof p=="function"?p(o.index):p,F=typeof c=="function"?c(o.index):c;return S||I?jsxs(E,{display:"flex",flexDirection:"row",children:[S?jsx(Ce,{icon:S,"aria-label":M,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(o.index);},tooltip:!0}):null,I?jsx(Ce,{icon:I,"aria-label":F,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{n?.(o.index);},tooltip:!0}):null]}):null},[s,o.index,l,p,c,a,n]),P=useCallback(S=>{S.key==="Enter"?(d?.({key:o.index,value:S.target.value}),r.stopRenamingItem()):S.key==="Escape"?(r.stopRenamingItem(),g.current?.setAttribute("tabindex","0"),g.current?.focus()):S.key!=="ArrowRight"&&S.key!=="ArrowLeft"&&S.key!=="ArrowUp"&&S.key!=="ArrowDown"&&!S.metaKey&&S.continuePropagation();},[o.index,r,d,g]),z=o.data.icon,k=!!d,{pressProps:T}=usePress({onPress:()=>{m?.(o.index);}}),{isFocusVisible:R,focusProps:N}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:x,onFocus:()=>{r.focusItem(!1);}},T,N,y,r.itemContainerWithoutChildrenProps,v),className:classNames(vb,hb({isHovered:f,isSelected:r.isSelected,isFocusVisible:R,isRenaming:r.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":o.index,"data-expanded":o.isFolder?r.isExpanded:void 0,"aria-expanded":o.isFolder?r.isExpanded:void 0,"data-selected":r.isSelected,"aria-selected":r.isSelected,"data-depth":e,"aria-level":e+1,"aria-posinset":o.data.posInset,"aria-setsize":o.data.setSize,"aria-label":o.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:g,children:jsxs(E,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?w:null,jsxs(E,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(E,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${e*2} * ${themeVars.spacing.lg})`},children:[jsx(D,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{r.toggleExpandedState();},"aria-label":b(r.isExpanded?Zs.collapse:Zs.expand),style:{visibility:o.children?.length?"visible":"hidden"},className:classNames(gb,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),z?jsx(z,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(E,{paddingLeft:"sm",paddingY:r.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:S=>{k&&(S.stopPropagation(),S.preventDefault(),r.startRenamingItem());},children:[r.isRenaming?jsx("div",{onClick:S=>{S.stopPropagation();},children:jsx(rt,{defaultValue:o.data.label,autoFocus:!0,onBlur:S=>{d?.({key:o.index,value:S.target.value}),r.stopRenamingItem();},"aria-label":b(Zs.rename),onKeyDown:P,className:"BaselineUI-TreeView-RenameInput"})}):jsx(Q,{type:"label",size:"sm",className:classNames(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:u(o)}),o.data.description?jsx(Q,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:o.data.description}):null]})]}),i==="end"?w:null]})}),t]})},Zs=K({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function nN(r,{posInset:e,setSize:t}){return {index:r.id,children:r.children?r.children.map(o=>o.id):[],data:{label:r.label,description:r.description,icon:r.icon,...r.data,posInset:e,setSize:t},isFolder:!!r.children?.length}}function iN(r,e){let t={};function o(a,n,i){if(t[a.id]=e(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)o(a.children[s],s+1,a.children.length);}return o(r,0,0),t}var Sb=ut.forwardRef(({className:r,style:e,"data-block-id":t,"data-block-class":o,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:l,secondaryActionIcon:p,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,actionsPosition:m="start",onRename:u,onAction:b,renderItemTitle:y,...f},g)=>{let _=se(),v=useRef(null),h=useTreeState({...f,selectionMode:"multiple",items:a.children,children:_}),x=useMemo(()=>Object.fromEntries(Object.entries(iN(a,nN)).map(([R,N])=>[R,{...N,canRename:!!u}])),[a,u]),w=useId(),[P,z]=ut.useState(a.children?.[0]?.id??""),k=useRef(P),T=useMemo(()=>({[`tree-${w}`]:{focusedItem:P,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[P,h.expandedKeys,h.selectionManager.selectedKeys,w]);return useEffect(()=>{if(!v.current)return;let R=v.current.getRootNode(),N=R instanceof ShadowRoot,S=v.current?.contains(R?.activeElement??null);N&&S&&R?.querySelector(`[data-rct-item-id="${P}"]`)?.focus();},[P]),jsx(ControlledTreeEnvironment,{items:x,getItemTitle:R=>R.data?.label,viewState:T,onExpandItem:R=>{h.setExpandedKeys(new Set([...h.expandedKeys,R.index])),f.onExpand?.(R.index.toString());},onFocusItem:R=>{z(R.index),R.index&&(k.current=R.index);},onCollapseItem:R=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(N=>N!==R.index))),f.onCollapse?.(R.index.toString());},onSelectItems:R=>{h.selectionManager.setSelectedKeys(new Set(R));},renderItem:R=>jsx(xb,{...R,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:m,primaryActionIcon:l,secondaryActionIcon:p,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,onRename:u,onAction:b,renderItemTitle:y}),renderLiveDescriptorContainer:({children:R})=>jsx(xe,{children:jsx(VisuallyHidden,{children:R})}),renderTreeContainer:({containerProps:R,children:N})=>jsx("div",{...Et(R,{onBlur:S=>{S.currentTarget.contains(S.relatedTarget)||S.currentTarget.querySelector(`[data-key="${k.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":t,"data-block-class":o,style:{...e,...R.style},className:classNames(r,"BaselineUI-TreeView"),ref:L(g,R.ref,v),role:"treegrid",children:N}),renderItemsContainer:({children:R})=>R,children:jsx(Tree,{treeId:`tree-${w}`,rootItem:n,treeLabel:f["aria-label"],treeLabelledBy:f["aria-labelledby"]})})});Sb.displayName="TreeView";var mN=forwardRef(({className:r,isCollapsible:e=!1,...t},o)=>{let a=useRef(null),n=useId();return useImperativeHandle(o,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",r),collapsible:e,ref:a,id:n,...t})});mN.displayName="Panel";var _N=forwardRef(({className:r,...e},t)=>{let o=useRef(null);return useImperativeHandle(t,()=>({setLayout:o.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",r),ref:o,...e})});_N.displayName="PanelGroup";var Ib="_6abhjk0";var PN=({className:r,isDisabled:e=!1,...t})=>jsx(PanelResizeHandle,{disabled:e,className:classNames(Ib,"BaselineUI-PanelResizeHandle",r),...t});PN.displayName="PanelResizeHandle";var Rb=C({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z6lt _1yep5z6lv",variantClassNames:{variant:{info:"_1yep5z612v",warning:"_1yep5z612r",error:"_1yep5z612j",success:"_1yep5z612n"}},defaultVariants:{},compoundVariants:[]}),Tb="_1udvgpn5 _1yep5z6id _1yep5z6ie _1yep5z6if _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69l _1yep5z69m _1yep5z69n";var TN=()=>{};function NN({state:r,...e}){let t=ut.useRef(null),{toastProps:o,contentProps:a,titleProps:n,descriptionProps:i,closeButtonProps:s}=useToast(e,r,t),l=useMemo(()=>({root:o,title:n,content:a,description:i,close:s}),[o,n,a,i,s]),{canClose:p=!0,...c}=e.toast.content;return jsx(Ta,{elementProps:l,...c,className:classNames(Rb({variant:c.variant||"info"}),c.className),onClose:p?TN:void 0})}var Eb=ut.forwardRef(({state:r,style:e,className:t,...o},a)=>{let n=ee(a),{regionProps:i}=useToastRegion(o,r,n),s={zIndex:1,...e,...i.style};return jsx("div",{...i,ref:n,className:classNames(Tb,t),style:s,children:r.visibleToasts.map(l=>jsx(NN,{toast:l,state:r},l.key))})});Eb.displayName="ToastRegion";var Lb=ut.forwardRef(({toastQueue:r,portalContainer:e,...t},o)=>{let a=useToastQueue(r),n=ye(e);return a.visibleToasts.length>0?jsx(xe,{portalContainer:n,ref:o,children:jsx(Eb,{state:a,...t})}):null});Lb.displayName="GlobalToastRegion";
43
+ export{Mu as Accordion,Hu as AccordionItem,G as ActionButton,ub as ActionGroup,MT as ActionGroupItem,D as ActionIconButton,ln as AlertDialog,S1 as AudioPlayer,nr as Avatar,E as Box,X1 as ButtonSelect,ru as Checkbox,lr as ColorInput,st as ColorSwatch,bb as ColorSwatchPicker,nb as ComboBox,mu as DateFormat,ge as Dialog,Ac as DialogTitle,Gl as DomNodeRenderer,ia as Drawer,i1 as Editor,wd as FileUpload,aa as Focusable,Sh as FrameProvider,_f as FreehandCanvas,Lb as GlobalToastRegion,pb as GridList,Yf as Group,bp as I18nProvider,uf as IconColorInput,Va as IconColorInputButton,Xu as IconSelect,Uc as IconSlider,Mf as ImageDropZone,U1 as ImageGallery,Ta as InlineAlert,bd as Link,de as ListBox,g1 as Markdown,ga as Menu,Xf as MessageFormat,Ne as Modal,G0 as ModalClose,Fe as ModalContent,Na as ModalTrigger,Qt as NumberFormat,Oe as NumberInput,uu as Pagination,mN as Panel,_N as PanelGroup,PN as PanelResizeHandle,Ae as Popover,Ee as PopoverContent,Be as PopoverTrigger,xe as Portal,Go as PortalContainerProvider,Ff as Preview,Md as ProgressBar,tr as ProgressSpinner,Wf as RadioGroup,Vd as Reaction,d1 as ScrollControlButton,nd as SearchInput,nt as Select,V as Separator,Vt as Slider,ed as Switch,cm as TabItem,pm as Tabs,xu as TagGroup,Q as Text,rt as TextInput,oa as ThemeProvider,Ca as ToggleButton,Ce as ToggleIconButton,Xa as Toolbar,ne as Tooltip,Tf as Transform,Sb as TreeView,K as defineMessages,j2 as isInsideOverlayContent,Hl as isRect,Ze as useDevice,A as useI18n,Ot as useImage,cp as useIntersectionObserver,Yo as useIsFirstRender,zp as useLocalStorage,$D as useMutationObserver,ye as usePortalContainer,dp as useResizeObserver,YD as useTextSelection,mp as useUndoRedo,jn as useUserPreferences};