@baseline-ui/core 0.21.0 → 0.22.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.css +1 -1
- package/dist/index.d.mts +216 -28
- package/dist/index.d.ts +216 -28
- package/dist/index.js +105 -93
- package/dist/index.mjs +31 -23
- package/package.json +12 -7
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useListState, Section, Item, useNumberFieldState, useSliderState, useToggleState, useSearchFieldState, useTreeState, useMenuTriggerState, useTooltipTriggerState, useSelectState, useTabListState, useOverlayTriggerState, useRadioGroupState, useDraggableCollectionState, useDroppableCollectionState } from 'react-stately';
|
|
3
|
-
import { classNames, invariant, filterTruthyValues, getSvgPathFromStroke, getHTMLElement, getPlainText, cleanKeyFromGlobImport, getOsSpecificKeyboardShortcutLabel, isUrl } from '@baseline-ui/utils';
|
|
4
|
-
import { mergeRefs,
|
|
5
|
-
import {
|
|
1
|
+
import Po, { useMemo, useCallback, createContext, useContext, useEffect, useLayoutEffect, useRef, useState, useImperativeHandle, useReducer, Fragment as Fragment$1, createElement } from 'react';
|
|
2
|
+
import { useListState, Section, Item, useNumberFieldState, useSliderState, useToggleState, useSearchFieldState, useTreeState, useMenuTriggerState, useTooltipTriggerState, useSelectState, useTabListState, useOverlayTriggerState, useRadioGroupState, useComboBoxState, useDraggableCollectionState, useDroppableCollectionState, useListData } from 'react-stately';
|
|
3
|
+
import { classNames, invariant, filterTruthyValues, getSvgPathFromStroke, getHTMLElement, getTextDimensions, getPlainText, cleanKeyFromGlobImport, getOsSpecificKeyboardShortcutLabel, isUrl } from '@baseline-ui/utils';
|
|
4
|
+
import { mergeRefs, getOwnerDocument, getRootNode, clamp, useObjectRef, useValueEffect, useResizeObserver, useLayoutEffect as useLayoutEffect$1, getOwnerWindow, isFirefox, isIOS, isAndroid } from '@react-aria/utils';
|
|
5
|
+
import { useReducedMotion, animated, useSpring, useTransition, config, easings } from '@react-spring/web';
|
|
6
|
+
import { useSeparator, useHover, mergeProps, useOption, useLocale, useListBox, ListKeyboardDelegate, useFocusRing, DragPreview, useNumberField, useNumberFormatter, useSlider, useSliderThumb, VisuallyHidden, useSwitch, useSearchField, Overlay, usePopover, DismissButton, useMenu, useKeyboard, useMenuTrigger, useLink, useDrop, useId, useProgressBar, useTextField, useTooltip, useTooltipTrigger, useOverlayPosition, useCheckbox, useTagGroup, FocusScope, useFocusManager, useButton, usePress, useSelect, HiddenSelect, useTabList, useTab, useDialog, useOverlayTrigger, useLabel, useField, useClipboard, useRadioGroup, useFilter, useInteractOutside, useComboBox, useDraggableCollection, useDroppableCollection, ListDropTargetDelegate, useDraggableItem, useListBoxSection, useToggleButton, I18nProvider, useMessageFormatter, useMenuSection, useMenuItem, useDateFormatter, useTag, useTabPanel, useModalOverlay, useRadio, useDropIndicator } from 'react-aria';
|
|
6
7
|
export { useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
|
|
7
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
-
import { CheckmarkIcon,
|
|
9
|
-
import { sprinkles, lightTheme, themeVars,
|
|
9
|
+
import { CheckmarkIcon, QuestionmarkCircleIcon } from '@baseline-ui/icons/24/index';
|
|
10
|
+
import { sprinkles, lightTheme, themeVars, queries, darkTheme, layoutSprinkleValues } from '@baseline-ui/tokens';
|
|
10
11
|
import { ChevronDownIcon, MinusIcon, PlusIcon, ChevronRightIcon, XIcon } from '@baseline-ui/icons/8';
|
|
11
12
|
import { ReadOnlyIcon, ErrorFilledIcon, CloseIcon, UndoIcon, RedoIcon, TrashIcon, ArrowDownCircleFilledIcon, XIcon as XIcon$3, WarningFilledIcon, CheckmarkIcon as CheckmarkIcon$3, CheckFilledIcon, ErrorAltFilledIcon, AvatarIcon, InfoFilledIcon, NoneIcon, CaretLeftIcon as CaretLeftIcon$1, CaretRightIcon as CaretRightIcon$1 } from '@baseline-ui/icons/16';
|
|
12
13
|
import { CheckmarkIcon as CheckmarkIcon$1, MinusIcon as MinusIcon$1, XIcon as XIcon$2, CaretLeftIcon, CaretRightIcon } from '@baseline-ui/icons/12';
|
|
13
|
-
import {
|
|
14
|
-
import { XIcon as XIcon$1, AtIcon, CrossCircleFilledIcon, ArrowUpCircleFilledIcon, CheckmarkIcon as CheckmarkIcon$2, CheckFilledIcon as CheckFilledIcon$1, ErrorAltFilledIcon as ErrorAltFilledIcon$1, InfoFilledIcon as InfoFilledIcon$1, WarningFilledIcon as WarningFilledIcon$1, PlusIcon as PlusIcon$1, MinusIcon as MinusIcon$2,
|
|
14
|
+
import { MoreIcon, PauseIcon, PlayIcon, AvatarIcon as AvatarIcon$1, TextIcon, HighlightTextIcon, SearchIcon as SearchIcon$1, CaretLeftIcon as CaretLeftIcon$3, CaretRightIcon as CaretRightIcon$3 } from '@baseline-ui/icons/24';
|
|
15
|
+
import { XIcon as XIcon$1, AtIcon, CrossCircleFilledIcon, ArrowUpCircleFilledIcon, CheckmarkIcon as CheckmarkIcon$2, CheckFilledIcon as CheckFilledIcon$1, ErrorAltFilledIcon as ErrorAltFilledIcon$1, InfoFilledIcon as InfoFilledIcon$1, WarningFilledIcon as WarningFilledIcon$1, PlusIcon as PlusIcon$1, MinusIcon as MinusIcon$2, SearchIcon, CaretLeftIcon as CaretLeftIcon$2, CaretRightIcon as CaretRightIcon$2 } from '@baseline-ui/icons/20';
|
|
15
16
|
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
|
16
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
17
17
|
import { useGranularEffect, useGranularLayoutEffect } from 'granular-hooks';
|
|
18
|
-
import
|
|
19
|
-
import
|
|
18
|
+
import r1 from 'lodash/isEmpty';
|
|
19
|
+
import io from 'lodash/isEqual';
|
|
20
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
20
21
|
import { FocusableProvider } from '@react-aria/focus';
|
|
21
22
|
import { parseColor, useColorAreaState, useColorFieldState, useColorSliderState } from '@react-stately/color';
|
|
22
23
|
import { useControlledState } from '@react-stately/utils';
|
|
@@ -25,17 +26,22 @@ import { getStroke } from 'perfect-freehand';
|
|
|
25
26
|
import { createPortal } from 'react-dom';
|
|
26
27
|
import { makeMoveable, Draggable, Resizable, Rotatable, Snappable } from 'react-moveable';
|
|
27
28
|
import { useToolbar } from '@react-aria/toolbar';
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
29
|
+
import { take, uniqueId, flatMapDeep, camelCase, kebabCase } from 'lodash';
|
|
30
|
+
import { BoldIcon, ItalicIcon, UnderlineIcon, LinkIcon } from '@baseline-ui/icons/20/index';
|
|
31
|
+
import { createBoldPlugin, createItalicPlugin, createUnderlinePlugin, MARK_BOLD, MARK_ITALIC, MARK_UNDERLINE } from '@udecode/plate-basic-marks';
|
|
32
|
+
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';
|
|
33
|
+
import { createFontColorPlugin, createFontBackgroundColorPlugin, MARK_COLOR, MARK_BG_COLOR, useColorDropdownMenuState } from '@udecode/plate-font';
|
|
34
|
+
import { createParagraphPlugin, ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph';
|
|
35
|
+
import { createLinkPlugin, ELEMENT_LINK, upsertLink, unwrapLink } from '@udecode/plate-link';
|
|
36
|
+
import { withRef, withProps } from '@udecode/cn';
|
|
37
|
+
import * as ym from 'dompurify';
|
|
38
|
+
import { jsx as jsx$1 } from 'slate-hyperscript';
|
|
39
|
+
import { useHTMLInputCursorState } from '@udecode/plate-combobox';
|
|
40
|
+
import { useSelected } from 'slate-react';
|
|
36
41
|
import { useInteractionModality } from '@react-aria/interactions';
|
|
37
|
-
import
|
|
42
|
+
import uP from 'markdown-it';
|
|
38
43
|
import { announce } from '@react-aria/live-announcer';
|
|
44
|
+
import { XIcon as XIcon$4 } from '@baseline-ui/icons/12/index';
|
|
39
45
|
|
|
40
46
|
/**
|
|
41
47
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
@@ -46,6 +52,8 @@ import { announce } from '@react-aria/live-announcer';
|
|
|
46
52
|
* This notice may not be removed from this file.
|
|
47
53
|
*
|
|
48
54
|
*/
|
|
49
|
-
function Tn(e,t,o){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager,getItems:e.getItems||(l=>[...l].map(i=>{let p=t.collection.getItem(i);return invariant(p,"Expected item to be defined."),{"text/plain":p.textValue}}))});useDraggableCollection(e,a,o);let n=useDroppableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager}),{collectionProps:s}=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 e.enableReorder?{collectionProps:s,dragState:a,dropState:n}:{collectionProps:{},dropState:void 0,dragState:void 0}}function Im(e,t){if(typeof e!="object"||e===null)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 Tm(e){var t=Im(e,"string");return typeof t=="symbol"?t:String(t)}function Nm(e,t,o){return t=Tm(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Nn(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 Sn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Nn(Object(o),!0).forEach(function(r){Nm(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Nn(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function Mn(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var Sm=(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},f=e=>{var t=o=>{var r=e.defaultClassName,a=Sn(Sn({},e.defaultVariants),o);for(var n in a){var s,l=(s=a[n])!==null&&s!==void 0?s:e.defaultVariants[n];if(l!=null){var i=l;typeof i=="boolean"&&(i=i===!0?"true":"false");var p=e.variantClassNames[n][i];p&&(r+=" "+p);}}for(var[d,m]of e.compoundVariants)Sm(d,a,e.defaultVariants)&&(r+=" "+m);return r};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return Mn(e.variantClassNames,o=>Mn(o,r=>r.split(" ")[0]))}},t};var Ln=f({defaultClassName:"_6n12k9b _1yep5z6l0 _1yep5z6kz _1yep5z6hk _1yep5z6ki",variantClassNames:{isDropTarget:{true:"_1yep5z612n"},orientation:{vertical:"_1yep5z6166",horizontal:"_1yep5z6167"}},defaultVariants:{},compoundVariants:[]}),Bn="_6n12k98 _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",Dn=f({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),En=f({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6ki _1yep5z6kl _1yep5z6ky _1yep5z6kx _1yep5z6kv _1yep5z6ks",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z612n _1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612w _1yep5z612x _1yep5z612y"},isHovered:{true:"_1yep5z6114",false:"_1yep5z6113"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Fn="_6n12k90";var Hn=f({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var E=xo.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div",...s},l)=>{let{separatorProps:i}=useSeparator({...s,orientation:r,elementType:n});return jsx(n,{...i,className:classNames(Hn({isVertical:r==="vertical",isSecondary:o==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":s["data-block-id"],style:t,role:a?void 0:i.role,ref:l})});E.displayName="Separator";function Vm(e){return sprinkles.properties.has(e)}var M=xo.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:s}=useMemo(()=>{let l={},i={};for(let p in o)Vm(p)?l[p]=o[p]:i[p]=o[p];return {sprinkleProps:l,domProps:i}},[o]);return jsx(a,{...s,className:classNames(sprinkles(n),"BaselineUI-Box",s.className),ref:r,children:t})});M.displayName="Box";var Mo=xo.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:s,descriptionProps:l,labelProps:i,isFocused:p,isPressed:d,_state:m},u)=>{invariant(e.value&&(e.value.type==="option"||e.value.type===void 0),"Item cannot be a section");let{icon:c,label:y}=e.value,{hoverProps:g,isHovered:_}=useHover({isDisabled:t}),b=filterTruthyValues({"data-selected":r,"data-disabled":t,"data-focused":p,"data-hovered":_,"data-pressed":d,"data-focus-visible":o,"data-selection-mode":m.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,g,b),className:classNames(En({isHovered:_,isFocused:o,isFirstChild:m.collection.getFirstKey()===e.key,isLastChild:m.collection.getLastKey()===e.key,isDisabled:t}),"BaselineUI-ListBox-Option"),ref:u,children:[jsxs(M,{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,c?jsx(c,{size:24}):null,jsx("span",{...i,children:y})]}),s?jsx("span",{className:Dn({isDisabled:t}),...l,children:s}):null]})});Mo.displayName="DefaultRenderOption";var Ft=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:s,isHidden:l,dropIndicatorProps:i,orientation:p},d)=>l?null:jsx("li",{...i,ref:d,"data-drop-target":s,className:classNames(Ln({isDropTarget:s,orientation:p}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let s=xo.useRef(null),{dropIndicatorProps:l,isHidden:i,isDropTarget:p}=useDropIndicator(n,e,s);return a({dropIndicatorProps:{...l,role:"option"},isHidden:i,isDropTarget:p,orientation:t},s)};var Kn=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ft,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(Ft,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};Kn.displayName="DraggableListOption";var Lo=xo.forwardRef(({item:e,renderOption:t=(u,c,y)=>jsx(Mo,{item:u,liProps:c.optionProps,...c,ref:y}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:s,dropIndicatorStyle:l,dropIndicatorClassName:i,optionStyle:p,optionClassName:d},m)=>{let u=xo.useRef(null),c=useOption({key:e.key},r,u),{value:y}=e;invariant(!!y),invariant(!("children"in e),"ListSection should not be passed to ListOption");let g={style:typeof p=="function"?p(y):p,className:typeof d=="function"?d(y):d};return a&&n?jsx(Kn,{orientation:s,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:l,dropIndicatorClassName:i,children:_=>t(e,{...c,showSelectedIcon:o,_state:r,optionProps:mergeProps(c.optionProps,_,g)},mergeRefs(u,m))}):t(e,{...c,showSelectedIcon:o,_state:r,optionProps:mergeProps(c.optionProps,g)},mergeRefs(u,m))});Lo.displayName="Option";var Ht=({section:e,state:t,sectionClassName:o,sectionStyle:r,...a})=>{let{itemProps:n,groupProps:s}=useListBoxSection({heading:e.rendered,"aria-label":e["aria-label"]}),l=t.collection.getChildren?.(e.key);invariant(l,"items with type `section` must have children");let{value:i}=e,p=typeof r=="function"?r(i):r,d=typeof o=="function"?o(i):o;return jsxs(Fragment,{children:[e.key!==t.collection.getFirstKey()&&jsx(E,{UNSAFE_omitRole:!0}),jsx("li",{...n,style:{...n.style,...p},className:classNames(Fn,d,"BaselineUI-ListBox-Section"),children:jsx("ul",{...s,children:[...l].map(m=>jsx(Lo,{item:m,state:t,...a},m.key))})})]})};Ht.displayName="ListBoxSection";var Ot=xo.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=!0,UNSAFE_state:a,style:n,renderOption:s,enableReorder:l=!1,"data-block-id":i,renderDragPreview:p,...d},m)=>{let u=xo.useRef(null),c=useListState(d),{direction:y}=useLocale(),g=a||c,_=xo.useRef(null),{listBoxProps:b}=useListBox({...d,shouldSelectOnPressUp:l,keyboardDelegate:new ListKeyboardDelegate({collection:g.collection,ref:_,layout:t,orientation:o,direction:y,disabledKeys:g.disabledKeys})},g,_),{collectionProps:v,dragState:z,dropState:h}=Tn({...d,layout:t,orientation:o,enableReorder:l,preview:u},g,_),{isFocusVisible:P,isFocused:C,focusProps:R}=useFocusRing(),x=filterTruthyValues({"data-block-id":i,"data-layout":t,"data-empty":g.collection.size===0,"data-focused":C,"data-focus-visible":P,"data-orientation":o});return jsxs("ul",{...mergeProps(b,R,x,v),className:classNames(Bn,"BaselineUI-ListBox",e),style:n,ref:mergeRefs(m,_),children:[[...g.collection].map(w=>{let S={key:w.key,state:g,dragState:z,dropState:h,renderOption:s,renderDropIndicator:d.renderDropIndicator,showSelectedIcon:r,orientation:o,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName};return w.type==="section"?jsx(Ht,{...S,section:w}):jsx(Lo,{...S,item:w})}),p?jsx(DragPreview,{ref:u,children:p}):null]})});Ot.displayName="ListBoxBase";var ye=xo.forwardRef((e,t)=>jsx(Ot,{...e,ref:t,children:o=>o.type==="section"?jsx(Section,{items:o.children,title:o.id,children:r=>jsx(Item,{children:r.label},r.id)},o.id):jsx(Item,{children:o.label},o.id)}));ye.displayName="ListBox";var dr="uf19bsg _1yep5z6ki",Yn=f({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0 _1yep5z6kx _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ks",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z610d"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"_1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg",popover:"uf19bse _1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z6mn _1yep5z6mo _1yep5z6mp _1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nq _1yep5z6nr _1yep5z6ns _1yep5z6uz _1yep5z6v0 _1yep5z6v1"},isPressed:{true:"uf19bsf"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61mf"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mf"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61ln"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61lm _1yep5z61mg"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61ls"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61o1 _1yep5z61rl _1yep5z61rp _1yep5z61rm"],[{variant:"toolbar",isPressed:!0},"_1yep5z61mf"],[{variant:"primary",isPressed:!0},"_1yep5z61mf"],[{variant:"secondary",isPressed:!0},"_1yep5z61ln"],[{variant:"tertiary",isPressed:!0},"_1yep5z61lq _1yep5z61mg"],[{variant:"ghost",isPressed:!0},"_1yep5z61lt"],[{variant:"popover",isPressed:!0},"_1yep5z61o1 _1yep5z61rl _1yep5z61rp _1yep5z61rm"],[{variant:"ghost",isDisabled:!1},"_1yep5z61lr"],[{variant:"popover",size:"lg"},"_1yep5z61h4 _1yep5z61h5 _1yep5z61h6 _1yep5z61hs _1yep5z61ht _1yep5z61hu _1yep5z61ig _1yep5z61ih _1yep5z61ii _1yep5z61j4 _1yep5z61j5 _1yep5z61j6"]]});var Bo=xo.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ee=({children:e,...t})=>{let o=xo.useRef(null),r=useOverlayTriggerState(t),a=useOverlayTrigger(t,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:o}),[r,a]);return jsx(Bo.Provider,{value:n,children:typeof e=="function"?e(r):e})};var cr=xo.createContext({isSelected:!1,ref:void 0}),Fe=({children:e})=>{let{state:t,overlayTriggerAria:o,triggerRef:r}=useContext(Bo);invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:a}=o,n=useMemo(()=>({...a,isSelected:t.isOpen,ref:r}),[a,t.isOpen,r]);return jsx(cr.Provider,{value:n,children:e})};var mr=e=>{let t=xo.useRef(null),{ref:o,...r}=useContext(cr)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t);return {buttonProps:a,isPressed:n,ref:mergeRefs(t,o||null)}},ur=(e,t)=>{let o=xo.useRef(null),{ref:r,...a}=useContext(cr)||{},{buttonProps:n,isPressed:s}=useToggleButton({...e,...a},t,o);return {buttonProps:n,isPressed:s,ref:mergeRefs(o,r||null)}};var yr=f({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6dy _1yep5z6ki",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5"},isDisabled:{true:"oom8bs6"},isFocusVisible:{true:"oom8bs7"},isHovered:{true:"oom8bs8"},size:{sm:"oom8bs9",md:"oom8bsa"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsb"],[{variant:"secondary",isHovered:!0},"oom8bsc"],[{variant:"tertiary",isHovered:!0},"oom8bsd"],[{variant:"popover",isHovered:!0},"oom8bse"],[{variant:"ghost",isHovered:!0},"oom8bsf"],[{variant:"primary",isFocusVisible:!0},"oom8bsg"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsh"]]});var Hu={sm:16,md:20},j=xo.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:s="button",isDisabled:l,size:i="sm","data-block-id":p,...d},m)=>{let{buttonProps:u,isPressed:c,ref:y}=mr({...d,elementType:s,isDisabled:l}),g=Hu[i],{hoverProps:_,isHovered:b}=useHover({isDisabled:l}),{isFocusVisible:v,isFocused:z,focusProps:h}=useFocusRing();return jsxs(s,{...mergeProps(u,_,h),className:classNames(yr({isDisabled:!!l,isFocusVisible:v,isHovered:b,variant:n,size:i}),"BaselineUI-ActionButton",o),"data-focus-visible":v,"data-focused":z,"data-hovered":b,"data-disabled":l,"data-block-id":p,"data-pressed":c,style:t,ref:mergeRefs(m,y),children:[!!r&&jsx(r,{size:g}),e,!!a&&jsx(a,{size:g}),n==="popover"&&jsx(ChevronDownIcon,{size:8,className:dr})]})});j.displayName="ActionButton";var Do=f({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var fr="z9nup80",oo="z9nup83",Qn="z9nup87";var Jn=xo.forwardRef(({className:e,node:t},o)=>{let r=xo.useRef(null);return xo.useEffect(()=>{let a=r.current;return a?.append(t),()=>{a?.contains(t)&&t.remove();}},[t]),jsx("div",{className:classNames(fr,e),ref:mergeRefs(o,r)})});Jn.displayName="DomNodeRenderer";var es="_14uvjig0 z9nup81",os="_14uvjig7",rs="_14uvjig3",ts=f({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),as=f({defaultClassName:"_14uvjige _14uvjig1",variantClassNames:{active:{true:"_14uvjigf _14uvjig2"},isDisabled:{true:"_14uvjigg"},isReadOnly:{true:"_14uvjigh"},isFocusVisible:{true:"_14uvjigi _14uvjig2"},isHovered:{true:"_14uvjigj _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),ns="_14uvjig8",ss=f({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var ro=f({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),br=f({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),to=f({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),he="nrh1eh3",Ce=f({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),xe=f({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),ao=f({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 Pe({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:s}){return e?jsx("div",{...o,className:ro({isDisabled:s,labelPosition:n}),children:e}):a?jsx("div",{...t,className:ro({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:ro({isDisabled:s,labelPosition:n}),children:r}):null}var is=f({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),ls="_1lnwne0";var $u={xxs:8,xs:12,sm:16,md:20,lg:24},T=xo.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:s=n?"div":"button",...l},i)=>{!l["aria-label"]&&!l["aria-labelledby"]&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");let{buttonProps:p,isPressed:d,ref:m}=mr({...l,elementType:s}),{isFocusVisible:u,isFocused:c,focusProps:y}=useFocusRing(),{hoverProps:g,isHovered:_}=useHover({isDisabled:l.isDisabled}),b=filterTruthyValues({"data-block-id":l["data-block-id"],"data-focused":c,"data-focus-visible":u,"data-disabled":l.isDisabled,"data-hovered":_,"data-pressed":d});return jsxs(s,{...mergeProps(p,g,y,b),className:classNames(Yn({variant:a,size:r,isDisabled:!!l.isDisabled,isFocusVisible:u,isHovered:_,isPressed:d}),"BaselineUI-ActionIconButton",e),ref:mergeRefs(i,m),style: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:$u[r]}),a==="popover"&&jsx(ChevronDownIcon,{size:8,className:dr})]})});T.displayName="ActionIconButton";var ge=xo.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=!0,...n},s)=>{let l=xo.useRef(null),{locale:i}=useLocale(),p=useNumberFieldState({...n,locale:i}),{hoverProps:d,isHovered:m}=useHover({isDisabled:n.isDisabled}),{focusProps:u,isFocusVisible:c,isFocused:y}=useFocusRing(),{labelProps:g,decrementButtonProps:_,inputProps:b,incrementButtonProps:v,groupProps:z,descriptionProps:h,errorMessageProps:P}=useNumberField(n,p,l),C=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),R=Pe({description:n.description,errorMessageProps:P,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),x=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":m,"data-focused":y,"data-focus-visible":c,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"]});return jsxs("div",{style:t,className:classNames(xe({labelPosition:o}),"BaselineUI-NumberInput",e),...x,ref:s,children:[n.label?jsxs("div",{className:Ce({labelPosition:o,hasMessage:!!R}),children:[jsx("label",{...g,className:he,children:n.label}),o==="start"&&R]}):null,jsxs("div",{className:classNames({[oo]:n.isDisabled}),children:[jsxs("div",{...mergeProps(z,d),className:classNames(ao({isHovered:m,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:y,variant:r}),{[ls]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(b,u),ref:l,className:classNames("BaselineUI-NumberInput-Input",br({isDisabled:n.isDisabled,labelPosition:o}))}),C?jsx(C,{className:to({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:is({isHoveredOrFocused:m||y,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(T,{variant:"secondary",size:"xxs",icon:MinusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(E,{style:{height:16},orientation:"vertical"}),jsx(T,{variant:"secondary",size:"xxs",icon:PlusIcon,...v,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),o==="top"&&R]})]})});ge.displayName="NumberInput";var _r=xo.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:s,minValue:l,maxValue:i,value:p,"aria-label":d,"aria-labelledby":m,"aria-details":u,"aria-describedby":c,"data-block-id":y,defaultValue:g,isReadOnly:_,label:b,id:v,includeNumberInput:z},h)=>{let P=xo.useRef(null),C={onChange:o===void 0?void 0:V=>{o(V[0]);},isDisabled:n||_,step:s,minValue:l,maxValue:i,onChangeEnd:r===void 0?void 0:V=>{r(V[0]);},value:p===void 0?void 0:[p],defaultValue:g===void 0?void 0:[g],"aria-label":d,"aria-labelledby":m,"aria-details":u,"aria-describedby":c,id:v,label:b},R=useNumberFormatter(a),x=useSliderState({...C,numberFormatter:R}),{trackProps:w,groupProps:S,labelProps:O}=useSlider(C,x,P),I=jsx(ge,{variant:"ghost",showStepper:!1,"aria-label":d,"aria-labelledby":O.id,value:x.getThumbValue(0),formatOptions:a,onChange:V=>{x.setThumbValue(0,V);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...S,style:t,"data-block-id":y,className:classNames(es,"BaselineUI-Slider",e),children:[b?jsxs("div",{className:rs,children:[jsx("label",{...O,className:classNames(ts({isDisabled:n,hasNumberInput:!!z}),"BaselineUI-Slider-Label"),children:b}),z?I:null]}):null,jsxs("div",{className:os,children:[jsx("div",{...w,className:classNames(ns,"BaselineUI-Slider-Track"),ref:mergeRefs(P,h),"data-testid":"track",children:jsx(_y,{state:x,trackRef:P,isDisabled:n,isReadOnly:_})}),z&&!b?I:null]})]})});_r.displayName="Slider";function _y({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=xo.useRef(null),{thumbProps:n,inputProps:s,isDragging:l}=useSliderThumb({trackRef:t,inputRef:a},e),{focusProps:i,isFocused:p,isFocusVisible:d}=useFocusRing(),{hoverProps:m,isHovered:u}=useHover({isDisabled:o}),c=filterTruthyValues({"data-disabled":o,"data-readonly":r,"data-hovered":u,"data-focus-visible":d,"data-dragging":l,"data-focused":p});return jsxs(Fragment,{children:[jsx("div",{className:classNames(ss({isDisabled:o,isFocusVisible:d,active:l,isHovered:u}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsx("div",{...mergeProps(n,m,c),className:classNames(as({isDisabled:o,isFocusVisible:d,active:l,isReadOnly:r,isHovered:u}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(s,i)})})})]})}var us=f({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),ys=f({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),fs="bpklwad",bs=f({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),gs="bpklwa6",vs=f({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var Cs=xo.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,...s},l)=>{let i=xo.useRef(null),p=useToggleState(s),{inputProps:d,isPressed:m}=useSwitch(s,p,i),{isFocusVisible:u,focusProps:c}=useFocusRing(),{hoverProps:y,isHovered:g}=useHover({isDisabled:s.isDisabled}),_=filterTruthyValues({"data-block-id":n,"data-focused":u,"data-disabled":s.isDisabled,"data-focus-visible":u,"data-selected":p.isSelected,"data-readonly":s.isReadOnly,"data-hovered":g,"data-pressed":m}),b=jsx("div",{className:classNames(us({isSelected:p.isSelected,isDisabled:!!s.isDisabled,isFocused:u,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(ys({isSelected:p.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(_,y),className:classNames(bs({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:l,children:[t?jsx("span",{className:classNames(fs,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,c),ref:i})}),r?jsxs("div",{className:vs({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",gs),children:p.isSelected?r.on:r.off}),b]}):b]})});Cs.displayName="Switch";var xs="_19n40yy9",Ps=f({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 Ey={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},ws=xo.forwardRef(({className:e,size:t="md",variant:o="primary",...r},a)=>{let n=xo.useRef(null),s=useSearchFieldState(r),{inputProps:l,clearButtonProps:i}=useSearchField({...r,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},s,n),{focusProps:p,isFocusVisible:d,isFocused:m}=useFocusRing({within:!0,isTextInput:!0}),u=Ey[t],c=t==="sm"?XIcon$2:XIcon$3,y=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":m,"data-disabled":r.isDisabled,"data-focus-visible":d});return jsxs("div",{...y,className:classNames(Ps({size:t,isFocused:m,variant:o,hasText:!!s.value,isDisabled:r.isDisabled}),"BaselineUI-SearchInput",e),ref:a,children:[jsx(u,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(l,p),className:xs,ref:n}),s.value!==""&&jsx(T,{icon:c,...i,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});ws.displayName="SearchInput";function Yt(e=window){let[t,o]=useState("light"),[r,a]=useState(!1),[n,s]=useState(!1),[l,i]=useState(!1);return useEffect(()=>{let p=e.matchMedia("(prefers-color-scheme: dark)"),d=m=>{o(m.matches?"dark":"light");};return p.matches&&o("dark"),p.addEventListener("change",d),()=>{p.addEventListener("change",d);}},[e]),useEffect(()=>{let p=e.matchMedia("(prefers-contrast: more)"),d=m=>{a(m.matches);};return a(p.matches),p.addEventListener("change",d),()=>{p.addEventListener("change",d);}},[e]),useEffect(()=>{let p=e.matchMedia("(prefers-reduced-motion: reduce)"),d=m=>{s(m.matches);};return p.matches&&s(!0),p.addEventListener("change",d),()=>{p.addEventListener("change",d);}},[e]),useEffect(()=>{let p=e.matchMedia("(prefers-reduced-transparency: reduce)"),d=m=>{i(m.matches);};return p.matches&&i(!0),p.addEventListener("change",d),()=>{p.addEventListener("change",d);}},[e]),{colorScheme:t,highContrast:r,reducedMotion:n,transparency:l}}var io=createContext({theme:lightTheme,setTheme:()=>{}});var Is="var(--hj25q10)";var Cr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},lo=xo.forwardRef(({theme:e="system",children:t,setTheme:o,className:r,style:a,UNSAFE_domProps:n,"data-block-id":s},l)=>{let{direction:i}=useLocale(),{colorScheme:p,reducedMotion:d,highContrast:m,transparency:u}=Yt(),{name:c,theme:y}=useMemo(()=>{switch(e){case"system":return p==="light"?Cr.LIGHT:Cr.DARK;case"light":return Cr.LIGHT;case"dark":return Cr.DARK;default:return {name:"custom",theme:e}}},[p,e]),g={"data-theme":c,"data-block-id":s,"data-reduced-motion":d,"data-high-contrast":m,"data-transparency":u},_=useMemo(()=>({theme:y,setTheme:o}),[y,o]);return jsx(io.Provider,{value:_,children:jsx("div",{...mergeProps(n,g),className:classNames(fr,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[Is]:i==="rtl"?"-1":"1"}),...a},ref:l,children:t})})});lo.displayName="ThemeProvider";var Wt=xo.createContext(void 0),Ms=({portalContainer:e,children:t})=>jsx(Wt.Provider,{value:e,children:t});Ms.displayName="PortalContainerProvider";function Bs({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let s=xo.useRef(null);useEffect(()=>{if(o){s.current?.disconnect(),s.current=null;return}s.current=new IntersectionObserver(([l])=>{t(l);},{root:n?.current,rootMargin:a,threshold:r});},[t,o,n,a,r]),useEffect(()=>{let{current:l}=s;return e.current&&l?.observe(e.current),()=>l?.disconnect()},[e]);}function Ds({ref:e,onResize:t,isDisabled:o}){let r=xo.useRef(null),[a,n]=xo.useState();return xo.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([s])=>{n(s.contentRect),t?.(s);});},[t,o,n]),xo.useEffect(()=>{let{current:s}=r;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]),{size:a}}function Pr({src:e,alt:t}){let[o,r]=useState(!1),[a,n]=useState(!1),[s,l]=useState(!1),i=()=>{r(!0),l(!1);},p=()=>{n(!0),l(!1);};return useEffect(()=>{if(!e)return;l(!0);let d=new Image;return d.src=e,d.addEventListener("load",i),d.addEventListener("error",p),()=>{d.removeEventListener("load",i),d.removeEventListener("error",p);}},[e]),{isLoaded:o,hasError:a,isLoading:s,imgProps:{src:o?e:void 0,alt:t}}}function Re(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var Es="SET_STATE",kr="UNDO",Rr="REDO",rf=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case Es:return {past:[...o,r],present:t.data,future:[]};case kr:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case Rr:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},Fs=(e={},{isDisabled:t,onAction:o})=>{let r=Re(),[a,n]=useReducer(rf,{past:[],present:e,future:[]}),{past:s,present:l,future:i}=a,p=g=>{n({type:Es,data:g});},d=useRef(),m=()=>{d.current=kr,n({type:kr});},u=()=>{d.current=Rr,n({type:Rr});},c=!!s?.length,y=!!i?.length;return useGranularEffect(()=>{(d.current===kr||d.current===Rr)&&(o?.(l,d.current),d.current=void 0);},[l],[o,r]),{state:l,push:t?()=>{}:p,undo:t?()=>{}:m,redo:t?()=>{}:u,pastStates:s,futureStates:i,canUndo:c,canRedo:y}};var Zt=xo.createContext({messages:{}}),As=({children:e,messages:t={},...o})=>{let r=xo.useMemo(()=>({messages:t}),[t]);return jsx(I18nProvider,{...o,children:jsx(Zt.Provider,{value:r,children:e})})};As.displayName="I18nProvider";function L(e){let{messages:t}=useContext(Zt);!e&&nf(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.");let o=useMessageFormatter(e?cleanKeyFromGlobImport(e):t),r=useLocale();return {formatMessage:(a,n)=>{if(typeof a=="object")try{return o(a.id,n)}catch{return console.log(`BUI \u{1F30D}: Translation not found for key: \`${a.id.toString()}\`. The default message, i.e. \`${a.defaultMessage}\`, will be used instead.`),a.defaultMessage||a.id}else try{return o(a,n)}catch{return console.log(`BUI \u{1F30D}: Translation not found for key: \`${a.toString()}\`. The default message, i.e. \`${a.toString()}\`, will be used instead.`),a}},locale:r}}var W=e=>e;function fR(e,t,o){let r=xo.useRef(null);return xo.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 js(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 s=n instanceof Function?n(o):n;r(s),window.localStorage.setItem(e,JSON.stringify(s));}catch(s){console.log(s);}}]}function CR({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=xo.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let s=getOwnerWindow(e.current).getSelection();s&&e.current?.contains(s.anchorNode)&&o?.(s);},onPressStart(){let n=getOwnerWindow(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function s(){let p=getOwnerWindow(n).getSelection();p&&e.current?.contains(p.anchorNode)&&t(p);}let l=getOwnerDocument(n);return l.addEventListener("selectionchange",s),()=>{l.removeEventListener("selectionchange",s);}},[e,t,r]);}function wr(e){let t=useCallback(()=>{let a=getOwnerWindow(e??document.body),n=a.matchMedia(queries.tablet),s=a.matchMedia(queries.desktop);return n.matches?"tablet":s.matches?"desktop":"mobile"},[e]),[o,r]=xo.useState(t);return useLayoutEffect$1(()=>{let a=getOwnerWindow(e),n=()=>{r(t());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,t]),o}function te(e){let t=useContext(Wt);return e||t}var Ks=f({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),Ir="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Gs=f({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Ys="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs",Ws="_1yep5z66x _1yep5z66y _1yep5z66z",Xs="_1mdhlqv5 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k";var po=xo.forwardRef(({className:e,style:t,children:o,...r},a)=>{let{theme:n}=useContext(io);return jsx(Overlay,{...r,children:jsx(lo,{ref:a,theme:n,style:t,className:classNames("BaselineUI-Portal",e),children:o})})});po.displayName="Portal";function $s({placement:e}){let t=useReducedMotion();return useTransition(!0,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!t,config:config.stiff})}var Qs={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Js="_1gzftth1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",ei="_1gzftth6",oi="_1gzftth7",ri="var(--_1gzftth0)";var{color:Qt}=themeVars,ve=xo.forwardRef(({className:e,style:t,state:o,overlayProps:r,underlayClassName:a,children:n,includeArrow:s=!1,offset:l=2,portalContainer:i,contentContainerClassName:p,contentContainerStyle:d,...m},u)=>{let c=xo.useRef(null),y=te(i),g=s?8:0,{underlayProps:_,popoverProps:b,placement:v,arrowProps:z}=usePopover({...m,offset:l+g,popoverRef:c,containerPadding:m.containerPadding||0},o),h=$s({placement:v}),P=v==="center"?"bottom":v;return h((C,R)=>R&&jsxs(po,{portalContainer:y,style:t,ref:u,children:[!m.isNonModal&&jsx("div",{..._,className:classNames(oi,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...b,style:{...b.style,...C,...assignInlineVars({[ri]:`${m.triggerRef?.current?.offsetWidth}px`})},ref:mergeRefs(c,u),className:classNames(Js,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(x=>v?.includes(x)),children:[s?jsxs("svg",{className:classNames(Qs[P],"BaselineUI-PopoverContent-Arrow"),...z,style:{...z.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:Qt.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:Qt.background.primary.subtle,stroke:Qt.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:o.close}),jsx("div",{...r,style:d,className:classNames(ei,p),children:n}),jsx(DismissButton,{onDismiss:o.close})]})]}))});ve.displayName="PopoverContentCore";var ni="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 _1yep5z6l0 _1yep5z6kz _1yep5z6he _1yep5z6l3 _1yep5z6fs",si="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var ea=({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(E,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:si,children:[...e.childNodes].map(s=>(invariant(s.type==="item"),jsx(Nr,{item:s,state:o,showSelectedIcon:t},s.key)))})]})]})};ea.displayName="MenuSection";var Nr=({item:e,state:t,className:o,showSelectedIcon:r})=>{let a=xo.useRef(null),n=useMenuItem({key:e.key},t,a),{isFocusVisible:s,focusProps:l}=useFocusRing();return jsx(Mo,{item:e,liProps:mergeProps(n.menuItemProps,l,{className:o}),...n,isFocusVisible:s,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:t,showSelectedIcon:r})};Nr.displayName="MenuItem";var ra=xo.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),s=xo.useRef(null),{menuProps:l}=useMenu(r,n,s),{keyboardProps:i}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(l,i),className:classNames(ni,e),ref:mergeRefs(s,a),children:[...n.collection].map(p=>p.type==="section"?jsx(ea,{section:p,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},p.key):jsx(Nr,{item:p,state:n,className:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},p.key))})});ra.displayName="MenuContent";var di=xo.forwardRef(({isDisabled:e,contentClassName:t,state:o,placement:r="bottom start",isNonModal:a,shouldFlip:n,shouldUpdatePosition:s,boundaryElement:l,crossOffset:i,offset:p,triggerButton:d,portalContainer:m,...u},c)=>{let y=xo.useRef(null),g=te(m),{menuTriggerProps:_,menuProps:b}=useMenuTrigger({isDisabled:e,type:"menu"},o,y);return jsxs(Fragment,{children:[jsx(Slot,{...mergeProps(_,{isDisabled:e,popupPlacement:["top","bottom","right","left"].find(v=>r.includes(v)),isSelected:o.isOpen,className:"BaselineUI-Menu-Trigger"}),ref:y,children:d}),o.isOpen?jsx(ve,{triggerRef:y,state:o,placement:r,isNonModal:a,shouldFlip:n,shouldUpdatePosition:s,boundaryElement:l,crossOffset:i,offset:p||2,className:classNames(Ir,"BaselineUI-Menu-Popover"),portalContainer:g,children:jsx(ra,{className:t,...b,...u,ref:c,autoFocus:o.focusStrategy||"first"})}):null]})});di.displayName="MenuRoot";var aa=xo.forwardRef((e,t)=>{let o=e.children;return jsx(di,{...e,ref:t,triggerButton:o,children:r=>"type"in r&&r.type==="section"?jsx(Section,{items:r.children,title:r.title,children:a=>jsx(Item,{children:a.label},a.id)},r.id):(invariant("label"in r,"Item doesn't have a label"),jsx(Item,{textValue:r.label,children:r.label},r.id))})});aa.displayName="MenuBase";var ci=xo.forwardRef(({defaultOpen:e,isOpen:t,onOpenChange:o,...r},a)=>{let n=useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o});return jsx(aa,{...r,state:n,ref:a})});ci.displayName="Menu";var Sr=f({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 ui=xo.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:s="body","data-block-id":l,title:i,...p},d)=>{let m=xo.useRef(null),{linkProps:u,isPressed:c}=useLink({...p,elementType:p.onPress?"span":n},m),{isFocusVisible:y,isFocused:g,focusProps:_}=useFocusRing(),{hoverProps:b,isHovered:v}=useHover({isDisabled:p.isDisabled}),z=n,h=filterTruthyValues({"data-block-id":l,"data-disabled":p.isDisabled,"data-focused":g,"data-pressed":c,"data-focus-visible":y,"data-hovered":v,title:i});return jsx(z,{...mergeProps(u,_,b,h),className:classNames(Sr({variant:r,isFocusVisible:y,isHovered:v,isDisabled:p.isDisabled,size:a,isActive:c,type:s}),"BaselineUI-Link",e),ref:mergeRefs(m,d),style:t,children:o})});ui.displayName="Link";function yi({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:s,multiple:l}){let i=useId(),p=useId(),d=useId();return {inputProps:{type:"file",id:p,disabled:!!e,"aria-labelledby":n?void 0:i,"aria-describedby":a||d,"aria-label":n,onChange:u=>{let c=[...u.target.files||[]];t?.(c),o?.(u);},name:r,accept:s,multiple:l},labelProps:{htmlFor:p,id:i},descriptionProps:{id:d}}}async function sa({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 fi=f({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"]]}),bi=f({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),gi=f({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),vi=f({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Ci=xo.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},s)=>{let l=xo.useRef(null),{inputProps:i,descriptionProps:p,labelProps:d}=yi(n),{dropProps:m}=useDrop({ref:l,onDrop:async({items:_})=>{let b=_.filter(z=>z.kind==="file").map(async z=>(invariant(z.kind==="file"),z.getFile())),v=await Promise.all(b);n.onValueChange?.(v);}}),{focusProps:u,isFocusVisible:c}=useFocusRing(),{hoverProps:y,isHovered:g}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(m,y,d),className:classNames(fi({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:g||c}),e),ref:mergeRefs(s,l),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,i)})}),r?jsx(r,{size:20,className:gi({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:vi({disabled:n.isDisabled,hovered:g}),children:t}),o?jsx("div",{...p,className:bi({disabled:n.isDisabled}),children:o}):null]})]})});Ci.displayName="FileUpload";var xi="_12vfhl40 z9nup81",Pi="_12vfhl41 z9nup82",ki=f({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Ri="_12vfhl42",wi="_12vfhl47",Ii="_12vfhl46 z9nup82",Ti="_12vfhl45",Ni=f({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Si=xo.forwardRef(({className:e,variant:t="active",showValue:o,description:r,errorMessage:a,...n},s)=>{let l=useId(),{labelProps:i,progressBarProps:p}=useProgressBar({...n,"aria-describedby":r?l:n["aria-describedby"]}),{minValue:d=0,maxValue:m=100,value:u=0,label:c}=n,y=(u-d)/(m-d),g=`${Math.round(y*100)}%`,_=jsx("output",{className:Ni({hasLabel:!!c}),children:p["aria-valuetext"]}),b=t==="error"?a:r;return jsxs("div",{...p,className:classNames(xi,e),ref:s,children:[c?jsxs("div",{className:Pi,children:[jsx("label",{...i,className:Ri,children:c}),o?_:null]}):null,jsxs("div",{className:Ti,children:[jsxs("div",{className:Ii,children:[jsx("div",{className:wi,children:jsx("div",{style:{width:g},className:ki({variant:t})})}),!c&&o?_:null]}),b?jsx("div",{className:ro({hasError:t==="error"}),id:l,children:b}):null]})]})});Si.displayName="ProgressBar";function Lr({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorFilledIcon:t==="warning"?WarningFilledIcon:null}var uo=xo.forwardRef(({className:e,validationState:t="valid",variant:o="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:s,"data-block-id":l,...i},p)=>{let d=xo.useRef(null),{inputProps:m,labelProps:u,descriptionProps:c,errorMessageProps:y,validationErrors:g}=useTextField({...i,validationState:t==="error"?"invalid":"valid"},d),_=i.errorMessage||g.join(" "),b=Pe({...i,errorMessage:_,descriptionProps:c,errorMessageProps:y,labelPosition:a});_&&(t="error");let{hoverProps:v,isHovered:z}=useHover({isDisabled:i.isDisabled}),{isFocused:h,focusProps:P,isFocusVisible:C}=useFocusRing(),R=Lr({isReadOnly:i.isReadOnly,validationState:t}),x=filterTruthyValues({"data-readonly":i.isReadOnly,"data-disabled":i.isDisabled,"data-validation-state":t,"data-focused":h,"data-focus-visible":C});return jsxs("div",{className:classNames(xe({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":l,style:r,ref:p,children:[i.label||a==="start"&&b?jsxs("div",{className:Ce({labelPosition:a,hasMessage:!!b}),children:[jsx("label",{...u,className:he,children:i.label}),a==="start"&&b]}):null,jsxs("div",{className:classNames({[oo]:i.isDisabled}),children:[jsxs("div",{...v,className:ao({validationState:t,isHovered:z,isFocused:h,variant:o,isReadOnly:!!i.isReadOnly,isDisabled:!!i.isDisabled}),children:[jsx("input",{...mergeProps(m,P,x),className:classNames(br({isDisabled:i.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",s),style:n,ref:d}),R?jsx(R,{className:to({validationState:t,isReadOnly:i.isReadOnly}),size:16}):null]}),a==="top"&&b]})]})});uo.displayName="TextInput";var yo=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};yo.displayName="NumberFormat";var Li="_1yep5z6i3 _1yep5z6i4 _1yep5z6i5",Bi=f({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"]]}),Di=f({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"]]}),Ei=f({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var Vi=xo.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,...n},s)=>{let l={isRequired:!1},i=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!n["aria-label"]&&!n["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let p=xo.useRef(null),d=useToggleState({...n,...l}),{inputProps:m,isPressed:u,isDisabled:c,isReadOnly:y,isSelected:g}=useSwitch({...n,...l},d,p),{focusProps:_,isFocused:b,isFocusVisible:v}=useFocusRing(),{hoverProps:z,isHovered:h}=useHover({});return jsxs("label",{ref:s,style:o,className:classNames(Li,"BaselineUI-Reaction",e),"data-block-id":n["data-block-id"],"data-focused":b,"data-focus-visible":v,"data-disabled":c,"data-hovered":h,"data-pressed":u,"data-selected":g,children:[jsx(VisuallyHidden,{children:jsx("input",{...m,..._,ref:p})}),jsxs("div",{...z,className:Bi({isSelected:g,isFocusVisible:v,isHovered:h,isReadOnly:y,isDisabled:c}),children:[jsx("div",{className:Ei({isDisabled:c,isReadOnly:y}),children:jsx(i,{size:r==="md"?20:16})}),jsx("div",{className:Di({isSelected:d.isSelected,isDisabled:c,isReadOnly:y,size:r}),children:jsx(yo,{value:t})})]})]})});Vi.displayName="Reaction";var Ai=f({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),Oi=f({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:"_1yep5z6g0 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6fs _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var pa=xo.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:s,tooltipProps:l,includeArrow:i},p)=>{let{tooltipProps:d}=useTooltip({isOpen:t.isOpen},t),m=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]),u=useReducedMotion(),[c]=useSpring(()=>({from:{opacity:0,transform:`translate(${m.x}px, ${m.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!u})),y=a==="center"?"bottom":a;return jsxs(animated.span,{...o,style:{...c,...o.style},ref:p,"data-placement":y,children:[i?jsx("div",{className:Ai({placement:y,variant:n}),...r}):null,jsx("div",{...mergeProps(d,l),className:Oi({variant:n,size:s}),children:e})]})});pa.displayName="TooltipContent";var qi=xo.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:s=!0,portalContainer:l,...i},p)=>{let d=xo.useRef(null),m=xo.useRef(null),u=!i.text||i.isDisabled,c=useTooltipTriggerState({...i,delay:o,closeDelay:r,isDisabled:u}),{triggerProps:y,tooltipProps:g}=useTooltipTrigger({...i,isDisabled:u,delay:o,closeDelay:r},c,d),_=te(l),{overlayProps:b,arrowProps:v,placement:z,updatePosition:h}=useOverlayPosition({arrowSize:s?13:0,targetRef:d,arrowBoundaryOffset:s?8:0,offset:s?12:2,overlayRef:m,placement:t,isOpen:c.isOpen,...i});return Bs({ref:m,threshold:1,onIntersect:h,isDisabled:!c.isOpen}),Ds({ref:d,onResize:h,isDisabled:!c.isOpen}),jsxs(FocusableProvider,{...y,ref:d,children:[e,c.isOpen?jsx(po,{disableFocusManagement:!0,portalContainer:_,children:jsx(pa,{ref:mergeRefs(p,m),state:c,arrowProps:v,overlayProps:b,placement:z,tooltipProps:g,variant:a,size:n,includeArrow:s,children:i.text})}):null]})});qi.displayName="Tooltip";var Ki="_1azy5686",Gi="_1azy5685",Yi="var(--_1azy5680)",Wi="_1azy5688",Xi="_1azy5689",Zi="_1azy5681 z9nup82",$i="_1azy5682";var Qi="_1azy5687";var pb={sm:16,md:20},db={sm:[CheckFilledIcon,ErrorAltFilledIcon],md:[CheckFilledIcon$1,ErrorAltFilledIcon$1]},Dr=xo.forwardRef(({className:e,style:t,size:o="md",variant:r="active",...a},n)=>{let{labelProps:s,progressBarProps:l}=useProgressBar({...a,isIndeterminate:!0}),i=pb[o],p=i/2-2,d=2*p*Math.PI,m=db[o][r==="success"?0:1];return jsxs("div",{className:classNames(Zi,e),ref:n,style:{...assignInlineVars({[Yi]:`${d}px`}),...t},children:[jsxs("div",{...l,className:$i,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:i,width:i,viewBox:`0 0 ${i} ${i}`,children:[jsx("circle",{role:"presentation",className:Ki,cx:i/2,cy:i/2,r:p}),r==="active"&&jsx("circle",{role:"presentation",className:Gi,cx:i/2,cy:i/2,r:p})]}),r==="success"&&jsx(m,{className:Qi,size:i}),r==="error"&&jsx(m,{className:Wi,size:i})]}),a.label?jsx("span",{...s,className:Xi,children:a.label}):null]})});Dr.displayName="ProgressSpinner";var Ji=f({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{md:"_5uw3kp5",lg:"_5uw3kp6"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kp7"]]});var _b={md:20,lg:24},el=xo.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",...n},s)=>{let l=useToggleState(n),{buttonProps:i,isPressed:p,ref:d}=ur(n,l),{hoverProps:m,isHovered:u}=useHover({isDisabled:n.isDisabled}),{isFocusVisible:c,isFocused:y,focusProps:g}=useFocusRing(),_=filterTruthyValues({"data-block-id":n["data-block-id"],"data-focused":y,"data-focus-visible":c,"data-disabled":n.isDisabled,"data-hovered":u,"data-pressed":p,"data-selected":l.isSelected});return jsxs(a,{...mergeProps(i,m,g,_),className:classNames(Ji({isHovered:u,isFocusVisible:c,isSelected:l.isSelected,size:r,isDisabled:n.isDisabled}),"BaselineUI-ToggleButton",e),style:t,ref:mergeRefs(d,s),children:[o?jsx(o,{size:_b[r]}):null,n.label]})});el.displayName="ToggleButton";var Er=f({defaultClassName:"_16vugd0e",variantClassNames:{isDisabled:{true:"_16vugd0f"}},defaultVariants:{},compoundVariants:[]}),ol=f({defaultClassName:"_16vugd01 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),rl=f({defaultClassName:"_16vugd05",variantClassNames:{isIndeterminate:{true:"_16vugd04"},isSelected:{true:"_16vugd04"},isFocusVisible:{true:"_16vugd08"},isHovered:{true:"_16vugd09"},isDisabled:{true:"_16vugd0a"},isReadOnly:{true:"_16vugd0b"},hasError:{true:"_16vugd0c"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0d"]]});var nl=xo.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,...n},s)=>{let l=xo.useRef(null),i=useToggleState(n),{isFocusVisible:p,isFocused:d,focusProps:m}=useFocusRing(),{inputProps:u,isPressed:c,isDisabled:y,isSelected:g,isReadOnly:_}=useCheckbox({...n,children:o},i,l),{hoverProps:b,isHovered:v}=useHover({isDisabled:y}),z=filterTruthyValues({"data-disabled":y,"data-readonly":_,"data-hovered":v,"data-selected":g,"data-pressed":c,"data-indeterminate":n.isIndeterminate,"data-invalid":n.isInvalid,"data-focus-visible":p,"data-focused":d,"data-block-id":a});return jsxs("label",{...z,className:classNames(ol({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,m),ref:l})}),jsxs("div",{...b,className:rl({isSelected:g&&!n.isIndeterminate,isIndeterminate:n.isIndeterminate,isFocusVisible:p,isDisabled:y,isReadOnly:_,hasError:n.isInvalid,isHovered:v}),children:[g&&!n.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,n.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:Er({isDisabled:y}),children:o}):null]})});nl.displayName="Checkbox";var sl={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 il=f({defaultClassName:"_1nsi9h17",variantClassNames:{isFocusVisible:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"}},defaultVariants:{},compoundVariants:[]}),ll="_1nsi9h1b",pl=f({defaultClassName:"_1nsi9h10",variantClassNames:{size:{xs:"_1nsi9h11",sm:"_1nsi9h12",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1nsi9h15",pinned:"_1nsi9h16"}},defaultVariants:{},compoundVariants:[]}),dl="_1nsi9h1c";var Yb={style:"decimal"},Wb={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},yl=xo.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":s,size:l="md",variant:i="floating",...p},d)=>{let{locale:m}=useLocale(),u=L(sl),c={...p,formatOptions:Yb,minValue:o,incrementAriaLabel:a||u.formatMessage("nextPage"),decrementAriaLabel:n||u.formatMessage("prevPage"),defaultValue:r,"aria-label":s||u.formatMessage("goToPage")},y=xo.useRef(null),g=useNumberFieldState({...c,locale:m}),{inputProps:_,decrementButtonProps:b,incrementButtonProps:v,groupProps:z}=useNumberField({...c,onKeyDown:V=>{V.key==="Enter"&&y.current?.blur(),p.onKeyDown?.(V);}},g,y),{hoverProps:h,isHovered:P}=useHover({}),{focusProps:C,isFocused:R,isFocusVisible:x}=useFocusRing(),w=i==="floating",[S,O]=Wb[l],I=filterTruthyValues({"data-focus-visible":x,"data-focused":R,"data-hovered":P,"data-block-id":p["data-block-id"]});return jsxs("div",{...mergeProps(z,h,I),className:classNames(pl({size:l,variant:i}),"BaselineUI-Pagination",e),style:t,ref:d,children:[jsx(T,{icon:S,...b,elementType:"div",size:l,style:{height:"100%",...w&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton"}),i==="floating"&&jsx(E,{orientation:"vertical"}),jsxs("div",{className:il({isFocusVisible:x,variant:i}),"aria-label":u.formatMessage("pageXofY",{arg0:_.value,arg1:g.maxValue}),children:[jsx("input",{...mergeProps(_,C),ref:y,className:classNames("BaselineUI-Pagination-Input",ll),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:dl,children:["/ ",jsx(yo,{value:g.maxValue})]})]}),i==="floating"&&jsx(E,{orientation:"vertical"}),jsx(T,{icon:O,...v,elementType:"div",size:l,style:{height:"100%",...w&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton"})]})});yl.displayName="Pagination";var fl=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};fl.displayName="DateFormat";var Fr=f({defaultClassName:"_1f789qj1",variantClassNames:{isFocusVisible:{true:"_1f789qj2"},variant:{neutral:"_1f789qj3",red:"_1f789qj4",green:"_1f789qj5",blue:"_1f789qj6","high-contrast":"_1f789qj7"},isDisabled:{true:"_1f789qj8"},allowsRemoving:{true:"_1f789qj9"},isSelected:{true:"_1f789qja"},allowsSelection:{true:"_1f789qjb"},isHovered:{true:"_1f789qjc"}},defaultVariants:{},compoundVariants:[[{allowsSelection:!0,isHovered:!0,variant:"neutral"},"_1f789qjd"],[{allowsSelection:!0,isHovered:!0,variant:"red"},"_1f789qje"],[{allowsSelection:!0,isHovered:!0,variant:"blue"},"_1f789qjf"],[{allowsSelection:!0,isHovered:!0,variant:"green"},"_1f789qjg"],[{allowsSelection:!0,isHovered:!0,variant:"high-contrast"},"_1f789qjh"],[{allowsSelection:!0,isSelected:!0,isHovered:!0},"_1f789qji"]]}),bl="_1f789qjj",gl="_1f789qj0",vl=f({defaultClassName:"_1f789qjk",variantClassNames:{variant:{neutral:"_1f789qjl",red:"_1f789qjm",green:"_1f789qjn",blue:"_1f789qjo","high-contrast":"_1f789qjp"},isHovered:{true:"_1f789qjq"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qjr"],[{isHovered:!0,variant:"red"},"_1f789qjs"],[{isHovered:!0,variant:"blue"},"_1f789qjt"],[{isHovered:!0,variant:"green"},"_1f789qju"],[{isHovered:!0,variant:"high-contrast"},"_1f789qjv"]]});var ig=({item:e,state:t,variant:o="neutral"})=>{let r=xo.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:s,gridCellProps:l,removeButtonProps:i,allowsRemoving:p,isDisabled:d,isSelected:m,allowsSelection:u}=useTag({item:e},t,r),c=xo.useRef(null),{buttonProps:y}=useButton(i,c),{hoverProps:g,isHovered:_}=useHover({isDisabled:d}),{hoverProps:b,isHovered:v}=useHover({isDisabled:d}),z=e.value?.icon,h=e.value?.variant??o;return jsx("div",{...mergeProps(s,a,b),ref:r,className:Fr({isFocusVisible:n,variant:h,isDisabled:d,allowsRemoving:p,isSelected:m,allowsSelection:u,isHovered:v}),children:jsxs("div",{...l,className:bl,children:[m?jsx(CheckmarkIcon$3,{size:16}):null,!m&&z?jsx(z,{size:16}):null,e.rendered,p?jsx("button",{...mergeProps(y,g),className:vl({variant:h,isHovered:_}),children:jsx(XIcon$2,{})}):null]})})},ua=xo.forwardRef(({className:e,style:t,...o},r)=>{let a=xo.useRef(null),n=useListState(o),{gridProps:s}=useTagGroup(o,n,a);return jsx("div",{...s,className:classNames(gl,e),style:t,ref:mergeRefs(r,a),children:[...n.collection].map(l=>jsx(ig,{state:n,item:l,variant:o.variant},l.key))})});ua.displayName="TagGroupBase";var Cl=xo.forwardRef(({items:e,...t},o)=>jsx(ua,{...t,items:e,ref:o,children:r=>jsx(Item,{children:r.label})}));Cl.displayName="TagGroup";var xl="_1yep5z6kv",Pl=f({defaultClassName:"_1kvz17db _1yep5z6ki _1yep5z6kk",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),kl=f({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ki _1yep5z6kj",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Rl="_1yep5z6ev _1yep5z6dy",wl=f({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ki _1yep5z6kl",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6ft",false:"_1yep5z6fu"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Il="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Tl=f({defaultClassName:"_1kvz17d7 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var fa=xo.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext(we),{disabledKeys:n}=useContext(we),{keyboardProps:s}=useKeyboard({onKeyDown:l=>{let i=getRootNode(l.target),p=[...a?.keys()||[]].findIndex(y=>a?.get(y)?.current===i.activeElement),d=a?.get(p||0),m=a?.size||0,u=y=>{let g=a.get(y-1<0?m-1:y-1);n?.has(g?.current?.getAttribute("data-key")||"")?u(y-1):g?.current?.focus();},c=y=>{let g=a.get((y+1)%m);n?.has(g?.current?.getAttribute("data-key")||"")?c(y+1):g?.current?.focus();};if(d)switch(l.key){case"Home":{l.preventDefault(),c(-1);break}case"End":{l.preventDefault(),u(m);break}case"ArrowDown":{l.preventDefault(),c(p);break}case"ArrowUp":{l.preventDefault(),u(p);break}default:l.continuePropagation();}}});return jsx("div",{...s,style:o,className:classNames(xl,t),ref:r,children:xo.Children.map(e,(l,i)=>xo.cloneElement(l,{index:i}))})});fa.displayName="AccordionBase";var we=xo.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Ml=xo.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:s,style:l},i)=>{let[p,d]=xo.useState(o),m=xo.useRef(new Map).current,[u,c]=xo.useState(a);useEffect(()=>{c(u);},[u]),useEffect(()=>{n?.(p);},[p,n]);let y=useMemo(()=>({expandedKeys:r||p,setExpandedKeys:r?()=>{}:d,disabledKeys:t,headers:m,expansionMode:u}),[r,p,t,m,u]);return jsx(we.Provider,{value:y,children:jsx(FocusScope,{children:jsx(fa,{className:s,style:l,ref:i,children:e})})})});Ml.displayName="Accordion";var ga=xo.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:s,showActionsOnTriggerOnly:l},i)=>{let p=xo.useRef(null),{expandedKeys:d,setExpandedKeys:m,expansionMode:u,disabledKeys:c,headers:y}=useContext(we),g=c?.has(r),_=useFocusManager();invariant(_);let{focusNext:b,focusPrevious:v}=_,{keyboardProps:z}=useKeyboard({onKeyDown:D=>{D.key==="ArrowRight"?b({wrap:!0}):D.key==="ArrowLeft"?v({wrap:!0}):D.continuePropagation();},isDisabled:g});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),y?.set(n,p);},[n,y]);let h=()=>{m(D=>{let H=new Set(D);return H.has(r)?H.delete(r):(u==="single"&&H.clear(),H.add(r)),H});},{buttonProps:P}=useButton({"aria-expanded":d.has(r),"aria-controls":o,onPress:h,isDisabled:g},p),{pressProps:C}=usePress({onPress:h,isDisabled:g}),{focusProps:R,isFocusVisible:x}=useFocusRing(),{hoverProps:w,isHovered:S}=useHover({isDisabled:g}),{focusProps:O,isFocusVisible:I}=useFocusRing({within:!0}),V=d.has(r);return jsxs("h3",{...mergeProps(z,C,w,O),className:wl({isFocusVisible:x,isHovered:S,isDisabled:g}),ref:i,children:[jsxs("div",{className:Tl({isDisabled:!!g}),children:[jsx(ChevronRightIcon,{className:kl({isExpanded:V}),size:8}),jsx("button",{...mergeProps(P,R),id:a,"data-key":r,className:Il,ref:p,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:Pl({showActionsOnTriggerOnly:l,isTriggered:I||S}),children:t.map((D,H)=>jsx(T,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:g,...D},H))}):null,s?jsx("div",{className:Rl,children:s}):null]})});ga.displayName="AccordionHeader";var Al=xo.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:s,className:l,showActionsOnTriggerOnly:i},p)=>{let d=useId(),m=useId(),{expandedKeys:u}=useContext(we),c=xo.useRef(null),y=u.has(r),g=Re(),_=useReducedMotion(),b=useTransition(y?[r]:[],{from:!g&&!_&&{height:0,opacity:0},enter:()=>async v=>{await v({height:c.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:v=>v});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(ga,{value:r,actions:t,id:m,title:e,controlId:d,ref:p,index:a,subLabel:n,showActionsOnTriggerOnly:i})}),b(v=>jsx(animated.div,{role:"region","aria-labelledby":m,id:d,style:{...v,overflow:"hidden"},children:jsx("div",{ref:c,className:l,style:s,children:o})}))]})});Al.displayName="AccordionItem";var va=xo.forwardRef(({variant:e,isOpen:t,validationState:o="valid",...r},a)=>{let n=xo.useRef(null),{buttonProps:s,isPressed:l}=useButton({...r,isDisabled:r.isDisabled||r.isReadOnly},n),{hoverProps:i,isHovered:p}=useHover({isDisabled:r.isDisabled}),{focusProps:d,isFocused:m,isFocusVisible:u}=useFocusRing(),c=Lr({isReadOnly:r.isReadOnly,validationState:o});r.isReadOnly&&(s.disabled=!1);let y=filterTruthyValues({"data-disabled":r.isDisabled,"data-readonly":r.isReadOnly,"data-focused":m,"data-focus-visible":u,"data-hovered":p,"data-pressed":l,"data-open":t});return jsxs("button",{...mergeProps(s,i,d,y),ref:mergeRefs(a,n),className:classNames(Gs({isFocused:u,isDisabled:r.isDisabled}),ao({variant:e,isHovered:p,isFocused:u,validationState:o,isDisabled:!!r.isDisabled,isReadOnly:r.isReadOnly}),"BaselineUI-Select-Button"),children:[r.children,c?jsx("span",{"aria-hidden":!0,className:classNames(to({validationState:o,isReadOnly:!!r.isReadOnly}),Ws),children:jsx(c,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(ChevronDownIcon,{size:8,className:Ks({isOpen:t})})})]})});va.displayName="SelectButton";var za=xo.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,optionStyle:n,optionClassName:s,...l},i)=>{let p=xo.useRef(null),d=useSelectState({...l,validationState:l.validationState==="error"?"invalid":"valid"}),m=te(l.portalContainer),{labelProps:u,triggerProps:c,valueProps:y,menuProps:g,descriptionProps:_,errorMessageProps:b}=useSelect({...l,validationState:l.validationState==="error"?"invalid":"valid"},d,p),v=Pe({...l,descriptionProps:_,errorMessageProps:b,labelPosition:o}),z=d.selectedItem?.value,h=z&&"icon"in z&&z.icon;return jsxs(Fragment,{children:[jsxs("div",{style:t,className:classNames(xe({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,ref:i,children:[l.label||v?jsxs("div",{className:Ce({labelPosition:o,hasMessage:!!v}),children:[l.label?jsx("div",{...u,className:classNames(he,"BaselineUI-Select-Label"),children:l.label}):null,o==="start"&&v]}):null,jsx(HiddenSelect,{state:d,triggerRef:p,isDisabled:l.isDisabled,label:l.label,name:l.name}),jsx(va,{...c,isOpen:d.isOpen,variant:r,validationState:l.validationState,ref:p,isReadOnly:l.isReadOnly,children:jsxs("span",{className:Xs,children:[h?jsx(h,{size:24}):null,jsx("span",{...y,children:z?"label"in z&&z?.label:l.placeholder})]})}),o==="top"&&v]}),d.isOpen?jsx(ve,{portalContainer:m,offset:2,state:d,triggerRef:p,style:t,className:classNames(Ir,"BaselineUI-Select-Popover"),...l,children:jsx(ye,{...g,label:l.label,items:l.items,UNSAFE_state:d,showSelectedIcon:l.showSelectedIcon,className:Ys,optionStyle:n,optionClassName:s})}):null]})});za.displayName="SelectBase";var Ur=xo.forwardRef((e,t)=>jsx(za,{...e,ref:t,children:o=>o.type==="section"?jsx(Section,{items:o.children,title:o.id,children:r=>jsx(Item,{children:r.label},r.id)},o.id):jsx(Item,{textValue:o.label,children:o.label},o.id)}));Ur.displayName="Select";var Kl="_1017q4c5",Gl=f({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),Yl="_1017q4c4";var Zg={sm:AvatarIcon,md:AvatarIcon$1},go=xo.forwardRef(({className:e,style:t,size:o="md",icon:r=Zg[o],name:a,imgSrc:n,showInitials:s,isDisabled:l,hasNotifications:i,imgLoading:p,"data-block-id":d},m)=>{let{imgProps:u}=Pr({src:n,alt:a}),c=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(Gl({size:o,isDisabled:l}),"BaselineUI-Avatar",e),"data-disabled":l,ref:m,style:t,"aria-disabled":l,"data-block-id":d,children:[n?jsx("img",{...u,loading:p,className:Yl}):null,!s&&!n&&jsx(r,{size:o==="sm"?16:24}),s&&!n?o==="sm"?c[0]:c:null,i?jsx("div",{"data-testid":"notification",className:Kl}):null]})});go.displayName="Avatar";var Wl="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",Xl=f({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z6105"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z6109"},variant:{primary:"_1x62fhbb _1yep5z6z6",ghost:"_1yep5z6z9"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61lg"],[{variant:"primary",isSelected:!0},"_1yep5z61me"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61lr"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61mf"]]}),Zl=f({defaultClassName:"_1x62fhb3 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),$l="_1x62fhbf",Ql="_1yep5z6l2 _1yep5z6kz _1yep5z6hc _1yep5z6l1",Jl=f({defaultClassName:"_1x62fhb0 _1yep5z6kv _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1yep5z6115",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var ep=({state:e,...t})=>{let o=xo.useRef(null),{tabPanelProps:r}=useTabPanel(t,e,o),{selectedItem:a}=e,{focusProps:n,isFocusVisible:s}=useFocusRing();if(!a?.value)return null;let{className:l,style:i,"data-block-id":p}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[Ql]:s},"Baseline-Tabs-TabPanel",l),"data-block-id":p,style:i,children:a?.props.children})};var Pa=xo.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:s,"data-block-id":l,...i},p)=>{let d=useTabListState({...i,selectedKey:i.selectedValue,defaultSelectedKey:i.defaultSelectedValue,disabledKeys:i.disabledValues}),m=xo.useRef(null),{tabListProps:u}=useTabList({...i,selectedKey:i.selectedValue,defaultSelectedKey:i.defaultSelectedValue,disabledKeys:i.disabledValues},d,m);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:t,ref:p,"data-block-id":l,children:[jsxs("div",{className:classNames(Jl({variant:a}),r),style:o,children:[jsx("div",{...u,className:Zl({variant:a}),ref:m,children:[...d.collection].map(c=>(invariant(c.value,"TabItem requires a value prop"),jsx(rp,{item:c,state:d,onRemove:s,variant:a},c.key)))}),n?.map((c,y)=>jsx("div",{className:Wl,children:jsx(T,{...c,variant:"secondary",size:"sm",className:classNames($l,c.className)})},y))]}),jsx(ep,{state:d},d.selectedItem?.key)]})});Pa.displayName="TabsBase";var rp=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,s=xo.useRef(null),{tabProps:l,isSelected:i,isDisabled:p}=useTab({key:a},o,s),{hoverProps:d,isHovered:m}=useHover({});invariant(n,"TabButton requires a value prop");let{title:u,icon:c,titleStyle:y,titleClassName:g}=n,{focusProps:_,isFocusVisible:b,isFocused:v}=useFocusRing(),{keyboardProps:z}=useKeyboard({onKeyDown:P=>{P.key==="Backspace"&&t?t(a):P.continuePropagation();}}),h=filterTruthyValues({"data-selected":i,"data-disabled":p,"data-focused":v,"data-hovered":m,"data-focus-visible":b});return jsxs("div",{...mergeProps(z,l,d,_,h),className:classNames(Xl({isHovered:m,isSelected:i,isFocusVisible:b,isDisabled:p,variant:r}),"BaselineUI-Tabs-TabButton",g),style:y,ref:s,children:[c?jsx(c,{size:20}):null,u,t?jsx(T,{variant:"secondary",elementType:"div",icon:XIcon,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",color:"inherit",opacity:i||v||m?1:0}}):null]})};rp.displayName="TabButton";var ap=xo.forwardRef(({children:e,...t},o)=>{let r=useMemo(()=>xo.Children.map(e,a=>!a||!xo.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(Pa,{...t,ref:o,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});ap.displayName="Tabs";var np=({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);np.displayName="TabItem";var sp={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 ip=f({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),lp=f({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"]]}),pp=f({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),dp=f({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),cp=f({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),mp=f({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),up=f({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var wv={error:{sm:ErrorAltFilledIcon,md:ErrorAltFilledIcon$1},info:{sm:InfoFilledIcon,md:InfoFilledIcon$1},success:{sm:CheckFilledIcon,md:CheckFilledIcon$1},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},yp=xo.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:s,arrangement:l="single",onClose:i,size:p="sm"},d)=>{let m=L(sp),u=o&&jsx(j,{variant:l==="compact"?"tertiary":"ghost",label:o,onPress:r}),c=wv[n][p];return jsxs("div",{className:classNames(lp({variant:n,arrangement:l,hasButton:!!o||!!i,hasCloseButton:!!i}),e),style:a,role:"alert",ref:d,children:[jsxs("div",{className:up({arrangement:l}),children:[jsx(c,{className:cp({variant:n}),size:16}),jsxs("div",{className:ip({arrangement:l}),children:[jsx("h3",{className:mp({size:p}),children:s}),jsx("section",{className:pp({size:p}),children:t})]}),l==="compact"&&u]}),jsxs("div",{className:dp({arrangement:l}),children:[l!=="compact"&&u,i?jsx(T,{variant:"secondary",icon:CloseIcon,size:"sm",onPress:i,"aria-label":m.formatMessage("close")}):null]})]})});yp.displayName="InlineAlert";var fp=f({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z6105",title:"_1yep5z6105",label:"_1yep5z6106",value:"_1yep5z6106",helper:"_1yep5z6107",body:"_1yep5z6105"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61jz"],[{type:"title",size:"md"},"_1yep5z61k2"],[{type:"title",size:"lg"},"_1yep5z61k5"],[{type:"body",size:"sm"},"_1yep5z61kp"],[{type:"body",size:"md"},"_1yep5z61ks"],[{type:"body",size:"lg"},"_1yep5z61ks"],[{type:"subtitle",size:"sm"},"_1yep5z61kl"],[{type:"subtitle",size:"md"},"_1yep5z61ko"],[{type:"subtitle",size:"lg"},"_1yep5z61ko"],[{type:"label",size:"md"},"_1yep5z61kn"],[{type:"label",size:"lg"},"_1yep5z61kn"],[{type:"value",size:"md"},"_1yep5z61kn"],[{type:"value",size:"lg"},"_1yep5z61kn"],[{type:"helper",size:"sm"},"_1yep5z61kh"]]});var G=xo.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(fp({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));G.displayName="Text";var bp=f({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie",variantClassNames:{background:{subtle:"_1yep5z6113",medium:"_1yep5z6114"}},defaultVariants:{},compoundVariants:[]}),gp="siobe24",vp="var(--siobe20)";var Yr=xo.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":s,onCloseRequest:l,...i},p)=>{let{formatMessage:d}=L(),m=xo.useRef(null),{dialogProps:u,titleProps:c}=useDialog(i,m);return jsxs("div",{...u,className:classNames(bp({background:r}),"BaselineUI-Drawer",e),"data-block-id":s,style:t,ref:mergeRefs(p,m),children:[jsxs(M,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:gp,children:[jsx(G,{type:"title",size:"sm",...c,className:Qn,children:a}),jsxs(M,{children:[n?jsx(T,{...n,variant:"secondary"}):null,jsx(T,{variant:"secondary",size:"md",icon:XIcon$1,onPress:l,"aria-label":d(Dv.close)})]})]}),jsx(E,{variant:r==="subtle"?"primary":"secondary"}),o]})});Yr.displayName="Drawer";var Dv=W({close:{id:"close",defaultMessage:"Close"}});function hp(e,t,o){let{isDisabled:r}=e,a=useReducedMotion(),[n,s]=xo.useState("100vh");useEffect(()=>{if(!isIOS()&&!isAndroid())return;let c=getOwnerWindow(o.current);function y(){s(`${c?.visualViewport.height}px`);}return y(),c?.visualViewport.addEventListener("resize",y),()=>{c?.visualViewport.removeEventListener("resize",y);}},[o]);let[{y:l},i]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),p=useRef(0),d=useCallback(()=>{i.start({y:p.current,onRest:()=>{t.close();}});},[i,t]),m=useCallback(c=>{c.target.closest("[data-drawer]")||d();},[d]);useGranularLayoutEffect(()=>{p.current=o.current?.offsetHeight||0,i.set({y:p.current}),i.start({y:0,immediate:!!a});},[],[i,a]);let u=l.to({range:[0,p.current/2,p.current],output:[.5,.2,0],extrapolate:"clamp"}).to(c=>`rgba(0,0,0,${c})`);return {overlayProps:{style:r?void 0:{transform:l.to(c=>`translateY(${c}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:u},onClick:r?void 0:m},close:d,containerHeight:r?void 0:n}}var Cp=f({defaultClassName:"aml2vl0 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hr _1yep5z6hs _1yep5z6ht",variantClassNames:{enableDrawer:{false:"_1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),xp="_1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6g2 _1yep5z6hr _1yep5z6hs _1yep5z6ht";var Ie=xo.createContext({state:null,triggerProps:{},overlayProps:{}}),vo=({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(Ie.Provider,{value:n,children:e})};vo.displayName="Modal";var Ia=xo.createContext({isDrawer:!1,closeDrawer:()=>{}}),a_=animated(lo),n_=({children:e,className:t,style:o,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:s,enableDrawer:l=!1,"data-block-id":i})=>{let{state:p}=xo.useContext(Ie),d=wr(n),m=te(n),u=typeof l=="boolean"&&l||l==="auto"&&d==="mobile";invariant(p,"ModalContent must be a child of Modal");let c=xo.useRef(null),y=typeof r=="function"?r(u):r,g=typeof a=="function"?a(u):a,{underlayProps:_,overlayProps:b,close:v,containerHeight:z}=hp({isDisabled:!u,isDismissable:y},p,c),{modalProps:h,underlayProps:P}=useModalOverlay({isDismissable:!u,isKeyboardDismissDisabled:g},p,c),{theme:C}=useContext(io),R=useReducedMotion(),x=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!R||s,config:{easing:easings.easeInBounce}}),w=useMemo(()=>({...h.style,...u?{...b.style,width:"100%"}:x}),[b.style,h.style,u,x]),S=useMemo(()=>({isDrawer:u,closeDrawer:v}),[u,v]);return jsx(Overlay,{portalContainer:m,children:jsx(Ia.Provider,{value:S,children:jsxs(a_,{className:classNames(Cp({enableDrawer:u}),t),theme:C,"data-block-id":i,style:{...o,height:u?z:"auto",...assignInlineVars({[vp]:z})},children:[jsx(animated.div,{...mergeProps(P,_),"data-testid":"underlay",style:_.style,className:classNames(xp,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(h,b),style:w,ref:c,"data-drawer":u,className:"BaselineUI-Modal-Content",children:e})]})})})},s_=animated(n_),Yo=({children:e,style:t,...o})=>{let{state:r}=xo.useContext(Ie);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})((s,l)=>l&&jsx(s_,{...o,style:{...t,...s},children:typeof e=="function"?e({close:r.close}):e}))};var Tp=f({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z6121 _1yep5z616i _1yep5z616k",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg _1yep5z6166"}},defaultVariants:{},compoundVariants:[]});var Na=xo.createContext({titleProps:{}}),ae=xo.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":s,drawerBackground:l,...i},p)=>{let d=xo.useRef(null),m=xo.useRef(null),{isDrawer:u,closeDrawer:c}=useContext(Ia),[y,g]=xo.useState("");useLayoutEffect(()=>{let z=m.current?.getRootNode(),h=i["aria-label"]||"";i["aria-labelledby"]&&(h=z?.querySelector(`#${i["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),g(h);},[i]);let{dialogProps:_,titleProps:b}=useDialog(i,d),v=useMemo(()=>({titleProps:b}),[b]);return u&&r?jsx(Yr,{title:y,onCloseRequest:c,className:t,...i,"data-drawer":!0,"data-block-id":s,ref:mergeRefs(m,p),background:l,children:e}):jsx(Na.Provider,{value:v,children:jsx("section",{..._,"data-block-id":s,ref:mergeRefs(d,p),style:o,className:classNames(Tp({size:u?"content":a,variant:n,isDrawer:u}),"BaselineUI-Dialog",t),children:e})})});ae.displayName="Dialog";var Mp=xo.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(Na),n=xo.isValidElement(e)?Slot:"h3";return jsx(n,{...a,ref:r,className:t,style:o,children:e})});Mp.displayName="DialogTitle";var Te={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 Zr=({children:e})=>{let{triggerProps:t}=xo.useContext(Ie);return jsx(Slot,{...t,children:e})};Zr.displayName="ModalTrigger";var C_=({children:e})=>{let{state:t}=xo.useContext(Ie);return jsx(Slot,{onPress:()=>t?.close(),children:e})};var Ne=xo.forwardRef((e,t)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(Bo);return invariant(a),o?.isOpen?jsx(ve,{ref:t,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:o}):null});Ne.displayName="PopoverContent";var Lp="_1dbkl5v",Bp="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt",Dp="_1dbkl5e",Ep=f({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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l6 _1yep5z6ky _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6kx _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z6109"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Fp=f({defaultClassName:"_1dbkl50 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6nq _1yep5z6nr _1yep5z6ns",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),$r="_1dbkl5t _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69f _1yep5z69g _1yep5z69h",Hp="_1dbkl5f z9nup87",Qr="_1dbkl5u _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn",Vp=f({defaultClassName:"_1dbkl5h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kx _1yep5z6ks",variantClassNames:{isFocusVisible:{true:"_1dbkl5i _1dbkl5g"},isDisabled:{true:"_1yep5z6yl"},removeBlendMode:{true:"_1dbkl5k"},isSelected:{true:"_1dbkl5g"},isHovered:{true:"_1dbkl5g"}},defaultVariants:{},compoundVariants:[]}),Ap="_1dbkl5s _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ky",Jr="_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",Op="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it",et=f({defaultClassName:"_1dbkl5p _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6me _1yep5z6mf _1yep5z6mg"}},defaultVariants:{},compoundVariants:[]}),Sa="_1dbkl514 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",jp="_1dbkl53",Up=f({defaultClassName:"_1dbkl5z _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl510 _1yep5z611y"},isHovered:{true:"_1dbkl511"},allowAlpha:{false:"_1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6166"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61nd"]]}),qp=f({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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f0 _1yep5z6kx _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kl",variantClassNames:{isHovered:{true:"_1yep5z6115"},isFocusVisible:{true:"_1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612n"},isDisabled:{true:"_1yep5z610d"}},defaultVariants:{},compoundVariants:[]}),Xo="_1dbkl513",ot="_1dbkl5o _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",rt="_1dbkl5r _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",Ma="_1dbkl516",Kp="_1dbkl515",La="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69l _1yep5z69m _1yep5z69n",tt=f({defaultClassName:"_1dbkl5w _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l2 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6l7 _1yep5z6la",variantClassNames:{isFocusVisible:{true:"_1dbkl5x _1yep5z616a _1yep5z612n _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),Ba="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6ho _1yep5z6hp _1yep5z6hq";var je=({color:e,isFocusVisible:t,isDisabled:o,isSelected:r,isPresentational:a})=>{let n=e&&e!==_e&&parseColor(e),s=n&&n.getChannelValue("alpha")===0,{hoverProps:l,isHovered:i}=useHover({isDisabled:o});return jsx("div",{...l,className:classNames(Vp({removeBlendMode:!n,isFocusVisible:t,isDisabled:o,isSelected:r,isHovered:i&&!a&&!o}),{[Do({size:"xs"})]:s}),children:n?jsxs(Fragment,{children:[jsx("div",{className:classNames(Jr,Do({size:"xs"}))}),jsx("div",{className:Jr,style:{backgroundColor:s?void 0:n.toString("hexa")}})]}):jsx("div",{className:Jr,children:jsx(NoneIcon,{size:14})})})};var Wp=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],_o=parseColor("#000000").toFormat("hsla"),Y="hsla",$o="hexa";function Ue(e){return typeof e=="string"?parseColor(e).toFormat(Y):e?e.toFormat(Y):null}function Xp(e,t){return e?.getChannelValue("alpha")?t?.toString($o)===e.toString($o):!t?.getChannelValue("alpha")}function Zp(e,t,o){return t?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var _e="NONE";function $p(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString($o),label:a.label}))||[],r={id:_e,label:e};return [...o,r]}var at=(e,{optionProps:t,isFocusVisible:o,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...t,ref:a,"aria-label":e.value?.label||void 0,className:Ap,children:jsx(je,{color:e.value.id,isFocusVisible:o,isSelected:r})}));var ed=({value:e,...t})=>{let o=xo.useRef(null),r=xo.useRef(null),a=xo.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:s,gradientProps:l,xInputProps:i,yInputProps:p,thumbProps:d}=useColorArea({...t,value:e,inputXRef:o,inputYRef:r,containerRef:a},n);useEffect(()=>{o.current?.focus();},[]);let{focusProps:m,isFocusVisible:u}=useFocusRing();return jsxs("div",{ref:a,...s,className:classNames(Lp,"BaselineUI-ColorInput-ColorArea"),children:[jsx("div",{...l,className:jp}),jsxs("div",{...d,className:classNames(tt({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...d.style,transform:"translate(-50%, -50%)",backgroundColor:Ue(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...i,...m}),jsx("input",{ref:r,...p,...m})]})]})};var td=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:m=>{t(Ue(m)?.toFormat(Y).withChannelValue("alpha",e.getChannelValue("alpha")??1)||_o);}}),n=xo.useRef(null),{inputProps:s}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:l,isFocused:i}=useFocusRing({isTextInput:!0}),{hoverProps:p,isHovered:d}=useHover({});return jsxs("div",{className:classNames(Sa,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(s,l,p),ref:n,className:Up({isFocused:i,isHovered:d,allowAlpha:o})}),o?jsx(nd,{color:e,setColor:t}):null]})},ad=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(Sa,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(ge,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Xo,onChange:n=>{t(r.withChannelValue("red",n).toFormat(Y));},step:1,minValue:0,maxValue:255}),jsx(ge,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Xo,onChange:n=>{t(r.withChannelValue("green",n).toFormat(Y));},step:1,minValue:0,maxValue:255}),jsx(ge,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Xo,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(Y));},step:1,minValue:0,maxValue:255}),o?jsx(nd,{color:e,setColor:t}):null]})},K_={style:"percent",maximumFractionDigits:0},nd=({color:e,setColor:t})=>{let{locale:o}=useLocale(),r=useCallback(a=>{t(e.withChannelValue("alpha",a));},[e,t]);return jsx(ge,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:K_,className:Xo,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var Ha=({channel:e,...t})=>{let{locale:o}=useLocale(),r=useColorSliderState({...t,channel:e,locale:o}),a=xo.useRef(null),n=xo.useRef(null),{trackProps:s,thumbProps:l,inputProps:i}=useColorSlider({...t,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:p,isFocusVisible:d}=useFocusRing();return jsxs("div",{className:classNames(Qr,{[Do({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...s,ref:a,children:[e==="alpha"&&jsx("div",{className:Ba}),jsx("div",{className:Qr,style:s.style}),jsxs("div",{className:classNames(tt({isFocusVisible:d}),"BaselineUI-ColorInput-ColorSliderThumb"),...l,children:[jsx("div",{className:Ba,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:Qr}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...i,...p})})]})]})};var nt=({color:e,setColor:t,allowAlpha:o})=>{let[r,a]=xo.useState("hex"),{formatMessage:n}=L(Te);return jsxs(Fragment,{children:[jsx(ed,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:t}),jsxs("div",{className:La,children:[jsx(Ha,{channel:"hue",value:e,onChange:t}),o?jsx(Ha,{channel:"alpha",value:e,onChange:t}):null]}),jsxs("div",{className:classNames(La,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Ur,{label:n("colorFormat"),labelPosition:"start",variant:"ghost",items:Wp,selectedKey:r,onSelectionChange:s=>{a(s);}}),r==="hex"&&jsx(td,{color:e,setColor:t,allowAlpha:o}),r==="rgb"&&jsx(ad,{color:e,setColor:t,allowAlpha:o})]})]})};var Oa=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:s,allowAlpha:l})=>{let{formatMessage:i}=L(Te),p=xo.useRef(null),d=wr(p.current),[m,u]=js(o,[]),c=xo.useRef(null),[y,g]=xo.useState(e),_=xo.useMemo(()=>m.map(C=>({id:C,label:C,description:C})),[m]),b=useCallback(()=>{let C=s==="active"?e:y;if(m.includes(C.toString(Y))){c.current?.querySelector(`[data-key='${C.toString(Y)}']`)?.classList.add(Ma);return}u([...m,C.toString(Y)]);},[m,e,u,y,s]);useEffect(()=>{let C=c.current;function R(x){x.animationName===Kp&&x.target?.classList.remove(Ma);}return C?.addEventListener("animationend",R),()=>{C?.removeEventListener("animationend",R);}},[]);let v=useId(),z=jsx(T,{ref:p,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:s==="active"?b:void 0}),h=useCallback(C=>jsxs(ae,{size:"content",className:et({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":i("newColor"),children:[jsx(nt,{color:y,setColor:g,allowAlpha:l}),jsx(E,{}),jsx(M,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(M,{display:"inline-flex",gap:"lg",children:[jsx(j,{label:i("cancel"),size:"sm",variant:"secondary",onPress:C}),jsx(j,{label:i("add"),variant:"primary",onPress:()=>{b(),C();},size:"sm"})]})})]}),[y,b,i,l]),P=useCallback(C=>{invariant(C instanceof Set,"Key must be a set");let R=[...C][0];R&&t(parseColor(R).toFormat(Y));},[t]);return jsxs(Fragment,{children:[jsx(E,{}),jsxs("div",{className:classNames(Op,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:v,children:n}),jsxs(M,{display:"flex",children:[!!m.length&&m.includes(e.toString(Y))&&jsx(T,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{u(m.filter(C=>C!==e.toString(Y)));}}),s==="active"&&z,s==="lazy"&&(d==="mobile"?jsxs(vo,{children:[jsx(Zr,{children:z}),jsx(Yo,{style:{zIndex:1e5},children:({close:C})=>h(C)})]}):jsx(Ee,{type:"dialog",children:({close:C})=>jsxs(Fragment,{children:[jsx(Fe,{children:z}),jsx(Ne,{placement:"right top",className:ot,offset:6,children:h(C)})]})}))]})]}),!!m.length&&jsx(ye,{items:_,layout:"grid","aria-labelledby":v,className:classNames($r,rt,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:at,ref:c,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(Y)],onSelectionChange:P})]})};var ja=xo.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},s)=>{let{formatMessage:l}=L(Te),i=useCallback(p=>{if(p instanceof Set&&p.size){let d=[...p][0],m=a.find(u=>u.id===d);invariant(m,"Preset not found"),e(m.id===_e?null:parseColor(m.id).toFormat(Y)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(rt,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:s,children:jsx(ye,{autoFocus:r,items:a,layout:"grid","aria-label":l("colorPresets"),className:$r,renderOption:at,selectionMode:"single",selectedKeys:[t?.toString($o)||_e],onSelectionChange:i})})});ja.displayName="ColorPresetList";var qa=xo.forwardRef((e,t)=>{let o=xo.useRef(null),{hoverProps:r,isHovered:a}=useHover({isDisabled:e.isDisabled}),{buttonProps:n,isPressed:s}=useButton(e,o),{isFocusVisible:l,focusProps:i}=useFocusRing(),p=filterTruthyValues({"data-block-id":e["data-block-id"],"data-focused":l,"data-focus-visible":l,"data-disabled":e.isDisabled,"data-hovered":a,"data-pressed":s});return jsx("button",{...mergeProps(n,r,i,p),style:e.style,className:classNames(Ep({isHovered:a,isFocusVisible:l||e.isOpen,isDisabled:e.isDisabled,labelPosition:e.labelPosition}),"BaselineUI-ColorInputButton",e.className),ref:mergeRefs(t,o),children:e.children})});qa.displayName="ColorInputButton";var zd=xo.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=xo.useRef(null),{hoverProps:s,isHovered:l}=useHover({isDisabled:r.isDisabled}),{buttonProps:i,isPressed:p}=useButton(r,n),{isFocusVisible:d,focusProps:m}=useFocusRing(),u=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":d,"data-focus-visible":d,"data-disabled":r.isDisabled,"data-hovered":l,"data-pressed":p});return jsxs("button",{...mergeProps(i,s,m,u),ref:mergeRefs(a,n),style:t,className:classNames(qp({isHovered:l||p||r.isOpen,isFocusVisible:d,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(o,{size:16}),jsx("div",{className:Dp,style:{backgroundColor:r.color}})]})});zd.displayName="IconColorInputButton";var Qo=xo.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:s=!0,includePicker:l=!0,onChange:i,defaultValue:p,storePickedColorKey:d="baselinePickedColor",value:m,addColorButtonLabel:u,removeColorButtonLabel:c,customColorsLabel:y,renderTriggerButton:g,pickerMode:_="active",offset:b=2,placement:v=n==="start"?"bottom end":"bottom start","data-block-id":z,...h},P)=>{let C=xo.useRef(null),R=xo.useRef(null),x=useOverlayTriggerState(h),{triggerProps:w,overlayProps:S}=useOverlayTrigger({type:"listbox"},x,C),O=te(h.portalContainer),[I,V]=useControlledState(m===void 0?void 0:Ue(m),Ue(p),q=>i?.(q?.toFormat("rgba")||null)),{formatMessage:D}=L(Te),H=useMemo(()=>$p(D("noColor"),a),[a,D]),Z=useMemo(()=>H.find(q=>q.id===_e?!I:I?Xp(I,parseColor(q.id)):!1),[H,I]),oe=useId(),$=useMemo(()=>typeof s=="function"?s?.(I):s?Zp(I,Z,D("transparent")):!1,[I,s,D,Z]),Q=useMemo(()=>H.filter(q=>o||q.id!==_e),[H,o]),k=u||D("addColor"),N=c||D("removeColor"),K=y||D("customColors");return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Bp]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":z,style:t,ref:P,children:[h.label?jsx("label",{id:oe,className:Fp({labelPosition:n}),children:h.label}):null,g?.({isOpen:x.isOpen,color:I,ref:C,colorName:$,triggerProps:w})||jsxs(qa,{...mergeProps(w,{...h.label?{"aria-labelledby":oe}:{"aria-label":h["aria-label"]}}),ref:C,isOpen:x.isOpen,isDisabled:h.isDisabled,labelPosition:n,children:[jsx(je,{isPresentational:!0,color:I?.toString("hexa")}),s?jsx("div",{className:Hp,children:$}):jsx(VisuallyHidden,{children:$})]})]}),x.isOpen?jsx(ve,{...h,portalContainer:O,placement:v,state:x,offset:b,className:classNames(ot,"BaselineUI-ColorInput-Popover"),triggerRef:C,overlayProps:S,children:jsxs(ae,{size:"content",className:et({includesCustomColorPicker:l}),ref:R,"aria-labelledby":oe,"aria-label":h["aria-label"],children:[l&&_==="active"?jsxs(Fragment,{children:[jsx(nt,{color:I||_o,setColor:V,allowAlpha:r}),jsx(Oa,{color:I||_o,setColor:V,storePickedColorKey:d,addColorButtonLabel:k,removeColorButtonLabel:N,customColorsLabel:K,pickerMode:_,allowAlpha:r})]}):null,!!Q.length&&jsxs(Fragment,{children:[l&&_==="active"?jsx(E,{}):null,jsx(ja,{autoFocus:l&&_==="active"?!1:"first",state:x,triggerRef:C,presets:Q,color:I,setColor:V})]}),l&&_==="lazy"?jsx(Oa,{color:I||_o,setColor:V,storePickedColorKey:d,addColorButtonLabel:k,removeColorButtonLabel:N,customColorsLabel:K,pickerMode:_,allowAlpha:r}):null]})}):null]})});Qo.displayName="ColorInput";var Cd={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 pt=f({defaultClassName:"mnnh5s1 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6ki _1yep5z6kl _1yep5z6kx _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy _1yep5z6122 _1yep5z616j _1yep5z616k",false:"_1yep5z6166 _1yep5z6116"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6115"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 _1yep5z6yl"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61mo"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61nd"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61mg"]]}),xd="_1yep5z6d8",dt=f({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Pd=f({defaultClassName:"_1i0ytqa3 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6kw _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z611e",false:"_1yep5z611g"},isDisabled:{true:"_1i0ytqa7 _1yep5z6yl",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61n9 _1yep5z61rt _1yep5z61rv"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61mp"],[{isInline:!1,isDisabled:!0},"_1yep5z61mr"]]}),kd="_1i0ytqa0",ct=f({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z6115"},isDisabled:{true:"_1i0ytqad _1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),Rd=f({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});var D6={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},Id=xo.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:s="#3A87FD",onChange:l,defaultValue:i,onChangeEnd:p,enableHistory:d=!1,isInline:m=!0,isDisabled:u,placeholder:c,clearLabel:y,undoLabel:g,redoLabel:_,footerClassName:b,canvasRef:v,value:z,footerStyle:h,"data-block-id":P,"aria-label":C="Drawing canvas",description:R="This is a canvas for drawing using a mouse or touch input.",...x},w)=>{let S=L(Cd),O=xo.useRef(null),[I,V]=xo.useState(z?Xa(z):i?Xa(i):[]),D=xo.useRef((z?.length||i?.length||0)-1),[H,Z]=xo.useState(),oe=useId(),{labelProps:$,fieldProps:Q}=useLabel({...x,"aria-label":C,labelElementType:"span"}),{isFocusVisible:k,focusProps:N}=useFocusRing({within:!0}),{hoverProps:K,isHovered:q}=useHover({isDisabled:u}),{undo:ie,redo:Qe,canRedo:Je,canUndo:be,push:Be}=Fs(I,{onAction:B=>{B&&(V(B),D.current=B.length-1,p?.(B.map(pe=>getStroke(pe,U))));},isDisabled:!d}),{keyboardProps:eo}=useKeyboard({onKeyDown:B=>{B.key==="Backspace"?sr():B.key==="z"&&(B.metaKey||B.ctrlKey)&&(B.shiftKey?Je&&Qe():be&&ie());}}),U=xo.useMemo(()=>({...D6,...x}),[x]),le=useCallback(B=>{B.persist(),B.buttons===1&&(invariant(H,"svgCoordinates must be defined"),V(pe=>{let A=[...pe];return A[D.current]=[...A[D.current],{x:a?clamp(B.clientX-H.left,0,H.width):B.clientX-H.left,y:a?clamp(B.clientY-H.top,0,H.height):B.clientY-H.top,pressure:B.pressure}],A}));},[H,a]),Dt=useCallback(B=>{B.persist();let pe=B.currentTarget.getBoundingClientRect();Z(pe),B.target.setPointerCapture(B.pointerId),D.current+=1,V(A=>{let re=[...A];return re[D.current]=[{x:B.clientX-pe.x,y:B.clientY-pe.y,pressure:B.pressure}],re});},[]),nr=Re();useGranularEffect(()=>{nr||l?.(I.map(B=>getStroke(B,U)));},[I],[l,U,nr]);let sr=()=>{V([]),D.current=-1,Be([]);},Et=useCallback(()=>{p?.(I.map(B=>getStroke(B,U))),Be(I);},[I,p,U,Be]);return jsxs("div",{ref:mergeRefs(O,w),className:classNames(kd,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":u,"data-block-id":P,children:[x.label||d?jsxs("div",{className:Rd({isInline:m}),children:[x.label?jsx(G,{type:"label",size:"sm",...$,children:x.label}):jsx("span",{}),d?jsxs("div",{children:[jsx(T,{variant:"secondary",size:"sm",isDisabled:!be||u,icon:UndoIcon,onPress:ie,"aria-label":g||S.formatMessage("undo")}),jsx(T,{variant:"secondary",size:"sm",isDisabled:!Je||u,icon:RedoIcon,onPress:Qe,"aria-label":_||S.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(N,eo,K,Q),tabIndex:u?void 0:0,className:classNames(pt({isInline:m,isHovered:q}),Pd({isFocusVisible:k,isInline:m,isDisabled:!!u}),o),"aria-describedby":x["aria-describedby"]||oe,style:r,ref:v,children:[jsx(VisuallyHidden,{children:jsx("div",{id:oe,children:R})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:Dt,onPointerMove:le,onPointerUp:Et,children:(z?Xa(z):I).map((B,pe)=>jsx("path",{d:getSvgPathFromStroke(getStroke(B,U)),stroke:s,strokeWidth:n},pe))})]}),c||y?jsx("div",{style:h,className:classNames(ct({isInline:m,isDisabled:u}),b),children:(I.length||!c)&&y?jsx(j,{size:"sm",variant:"ghost",label:y,isDisabled:u,onPress:sr}):jsx(j,{size:"sm",variant:"ghost",label:c,isDisabled:!0})}):null]})});Id.displayName="FreehandCanvas";var Xa=e=>e.map(t=>t.map(([o,r])=>({x:o,y:r,pressure:0})));var Td="_1vac7ws0",Nd=f({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Md(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 Ld(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 J6=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Dd=xo.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:s,onTransformStart:l,onTransformEnd:i,onDoubleClick:p,onDragStart:d,onDragEnd:m,onDrag:u,onResizeStart:c,onResizeEnd:y,onResize:g,onRotateStart:_,onRotateEnd:b,onRotate:v,onSnap:z,isSnappable:h,elementGuidelines:P,hideAnchorOnDrag:C=!0,title:R,rotationPosition:x,autoUpdate:w,bound:S,snapRotationDegrees:O,snapRotationThreshold:I,scrollableAncestor:V,renderDirections:D,stopPropagation:H,transformOrigin:Z,preventDefault:oe},$)=>{let Q=useRef(null),k=useRef(null),[N,K]=useState(document),q=useRef(N.createElement("div")),[ie,Qe]=useState({}),[Je,be]=useState(!1),[Be,eo]=useState(!1),[U,le]=useState(),Dt=Md(P,N);useLayoutEffect(()=>{let A=q.current;return q.current=N.createElement("div"),()=>{A.remove();}},[N]);let{keyboardProps:nr}=useKeyboard({onKeyDown:A=>{let re=A.shiftKey?10:1,ue=A.metaKey||A.ctrlKey;ue&&A.shiftKey&&(re=45);function De(No,_m="x"){ue?k.current?.request("rotatable",{deltaRotate:No*re},!0):k.current?.request("draggable",_m==="x"?{deltaX:No*re}:{deltaY:No*re},!0);}switch(A.key){case"ArrowRight":{De(1);break}case"ArrowLeft":{De(-1);break}case"ArrowUp":{De(-1,"y");break}case"ArrowDown":De(1,"y");}requestAnimationFrame(()=>{k.current?.updateRect();});}});useEffect(()=>{let A=getOwnerDocument(Q.current);K(A);let re=q.current;A.body.append(q.current);function ue(No){eo(No.shiftKey);}function De(){eo(!1);}return A.addEventListener("keydown",ue),A.addEventListener("keyup",De),()=>{A.removeEventListener("keydown",ue),A.removeEventListener("keyup",De),re.remove();}},[]),Ld({scrollable:V,onScroll:()=>{k.current?.updateRect();},ownerDocument:N});let sr=useCallback(A=>{Qe(re=>({...re,...A.style})),s?.(A);},[s]),Et=useCallback(A=>{if(be(!0),Q.current?.focus(),S){let ue=getHTMLElement(S,N)?.getBoundingClientRect();le({position:"client",left:ue?.left??0,top:ue?.top??0,right:ue?.right??0,bottom:ue?.bottom??0});}d?.(A);},[S,N,d]),B=useCallback(A=>{be(!1),m?.(A);},[m]),pe=t({style:{...ie.width&&{width:ie.width},...ie.height&&{height:ie.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...nr,ref:mergeRefs(Q,$),style:{display:"inline-block",...n,...ie},className:classNames(Td,e),onDoubleClick:p,tabIndex:0,title:R,children:pe}),createPortal(jsx(J6,{ref:k,target:Q,draggable:a,resizable:r,rotatable:o,keepRatio:Be,throttleDrag:1,snappable:h||!!S,elementGuidelines:Dt,snapRenderThreshold:.9,className:Nd({isDragging:Je&&C}),onRender:sr,onDragStart:Et,onDragEnd:B,useResizeObserver:w,useMutationObserver:w,onRenderEnd:i,onDrag:u,onResizeStart:c,onResizeEnd:y,onResize:g,onRotateStart:_,onRotateEnd:b,onRotate:v,onRenderStart:l,onSnap:z,rotationPosition:x,bounds:U,snapRotationDegrees:O,snapRotationThreshold:I,renderDirections:D,stopPropagation:H,preventDefault:oe,transformOrigin:Z}),q.current)]})});Dd.displayName="Transform";var Ed={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 Vd=xo.forwardRef(({className:e,style:t,isInline:o=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:s,pickerButtonLabel:l,isDisabled:i,onDrop:p,onPaste:d,includeCheckeredBackground:m=!0,"data-block-id":u,pickerButtonStyle:c,pickerButtonClassName:y,footerClassName:g,footerStyle:_,clearLabel:b,placeholder:v,labelStyle:z,labelClassName:h,...P},C)=>{let R=xo.useRef(null),x=xo.useRef(null),{formatMessage:w}=L(Ed),[S,O]=useControlledState(n,a||null,U=>{invariant(typeof U!="string"),P.onValueChange?.(U?[U]:[]);}),I=useMemo(()=>u5(S||void 0),[S]),{fieldProps:V,labelProps:D}=useField(P),{dropProps:H,isDropTarget:Z}=useDrop({ref:R,onDrop:async U=>{if(i)return;let le=await sa({items:U.items});le.length&&O(le[0]),p?.(U);},...P}),{clipboardProps:oe}=useClipboard({onPaste:async U=>{if(i)return;let le=await sa({items:U});le.length&&O(le[0]),d?.(U);},...P}),$=()=>{O(null),x.current&&(x.current.value="");},Q={type:"file",onChange:U=>{let le=[...U.target.files];O(le[0]),P.onChange?.(U);},accept:r,disabled:i},{focusProps:k,isFocused:N,isFocusVisible:K}=useFocusRing({within:!0}),{hoverProps:q,isHovered:ie}=useHover({isDisabled:i}),{imgProps:Qe,isLoading:Je,isLoaded:be}=Pr({src:I,alt:s||""}),Be={label:l||w("selectImage"),onPress:()=>R.current?.click(),variant:"secondary",isDisabled:i,excludeFromTabOrder:!0,className:classNames(yr({isFocusVisible:K}),{[xd]:Z&&!i},y),style:c},eo=filterTruthyValues({"data-loaded":be,"data-block-id":u,"data-hovered":ie,"data-focused":N,"data-drop-target":Z,"data-disabled":i,"data-focus-visible":K});return jsxs(M,{...eo,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:t,ref:C,children:[jsxs("label",{...mergeProps(H,q,k,D),className:classNames(pt({isInline:o,isHovered:ie,isDisabled:i,hasLoadedImage:!!I&&be,showFocusRing:Z||!!I&&K}),h),style:z,ref:R,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(V,oe,Q),ref:x})}),!I&&jsx(j,{...Be}),!!I&&(Je?jsx(Dr,{}):jsx("img",{className:dt({isInline:o,isDisabled:i,hasLoadedImage:!!I&&be&&m}),...Qe}))]}),v||b?jsx("div",{style:_,className:classNames(ct({isInline:o,isDisabled:i}),g),children:(I||!v)&&b?jsx(j,{size:"sm",variant:"ghost",label:b,isDisabled:i,onPress:$}):jsx(j,{size:"sm",variant:"ghost",label:v,isDisabled:!0})}):null]})});Vd.displayName="ImageDropZone";function u5(e){return e instanceof File?URL.createObjectURL(e):e}var Ad="_1vm2oh49 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6fv",Ja="_1vm2oh48 _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6jc _1yep5z6jd _1yep5z6je",Od=f({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6l1 _1yep5z6kz _1yep5z6hk _1yep5z6l2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kx _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6121 _1yep5z616i _1yep5z616k",false:"_1yep5z611g"},isFocusVisible:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6yl"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61mp"],[{accent:"theme",isInline:!0},"_1yep5z61me"],[{accent:"positive",isInline:!1},"_1yep5z61mr"],[{accent:"theme",isInline:!1},"_1yep5z61mg"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61ny _1yep5z61rl _1yep5z61rn _1yep5z61ro"],[{isHovered:!0,isInline:!0},"_1yep5z61ro _1yep5z61ny _1yep5z61rl _1yep5z61rn"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61mq"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61mi"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61mf"]]});var qd=xo.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:s,textValue:l,textStyle:i,onPress:p,onDelete:d,deleteAriaLabel:m,addAriaLabel:u,accent:c="positive","data-block-id":y,...g},_)=>{let{focusProps:b,isFocused:v,isFocusVisible:z}=useFocusRing({within:!0}),{isHovered:h,hoverProps:P}=useHover({isDisabled:o}),{pressProps:C}=usePress({isDisabled:o,onPress:p});invariant(n||s||l,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let R=filterTruthyValues({"data-hovered":h,"data-focus-visible":z,"data-focused":v,"data-disabled":o});return jsxs("div",{...g,className:classNames(Od({isInline:r,isFocusVisible:z,isDisabled:o,isHovered:h,accent:c}),"BaselineUI-Preview",e),"data-block-id":y,"aria-label":g["aria-label"]||a||l,style:t,ref:_,children:[typeof s=="string"?jsx("button",{disabled:o,...mergeProps(P,b,C,R),className:Ja,"aria-label":u,dangerouslySetInnerHTML:{__html:s}}):jsxs("button",{...mergeProps(P,b,C,R),disabled:o,style:i,"aria-label":u,className:Ja,children:[n?jsx("img",{src:n,alt:a,className:dt({isInline:r,isDisabled:o})}):null,!!s&&typeof s=="object"&&s,l]}),d?jsx(T,{isDisabled:o,className:Ad,"aria-label":m,size:"xs",icon:TrashIcon,onPress:d}):null]})});qd.displayName="Preview";var Kd="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e",Gd=f({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Yd="cw3m0n7",Wd=f({defaultClassName:"cw3m0n0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),Xd="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ks",Zd=f({defaultClassName:"cw3m0n3 _16vugd05",variantClassNames:{isFocusVisible:{true:"_16vugd08"},isSelected:{true:"_16vugd07"},isDisabled:{true:"_16vugd0a"}},defaultVariants:{},compoundVariants:[]});var N5=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:Wd({labelPosition:n}),children:[jsx("div",{className:Zd({isSelected:o,isFocusVisible:r,isDisabled:a}),children:o?jsx("div",{className:Yd}):null}),e?jsxs("div",{className:Kd,children:[jsx("span",{className:Er({isDisabled:a}),children:e}),t?jsx("span",{className:Gd({isDisabled:a}),children:t}):null]}):null]}),$d=({state:e,renderOption:t=N5,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:s,...l})=>{let i=!!l.isDisabled||!!l.disabledValues?.includes(o.id),p=xo.useRef(null),{inputProps:d,isPressed:m,isSelected:u}=useRadio({...l,isDisabled:i,children:o.label,value:o.id},e,p),{focusProps:c,isFocusVisible:y,isFocused:g}=useFocusRing(),{isHovered:_}=useHover({isDisabled:i}),b=filterTruthyValues({"data-selected":u,"data-focused":g,"data-focus-visible":y,"data-hovered":_,"data-disabled":i,"data-pressed":m,"data-read-only":s});return jsxs("label",{...b,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,c),ref:p})}),t(o,{isFocusVisible:y,isSelected:u,isFocused:g,isHovered:_,isDisabled:i,optionLabelPosition:r,isReadOnly:s})]})};var bt=xo.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:s,"aria-label":l,"aria-labelledby":i,"aria-describedby":p,"aria-details":d,"data-block-id":m,...u},c)=>{let y=useRadioGroupState(u),{radioGroupProps:g,labelProps:_,descriptionProps:b,errorMessageProps:v}=useRadioGroup({...u,"aria-label":l,"aria-labelledby":i,"aria-describedby":p,"aria-details":d},y),z=Pe({...u,descriptionProps:b,errorMessageProps:v,labelPosition:n}),h=filterTruthyValues({"data-orientation":u.orientation,"data-block-id":m,"data-disabled":u.isDisabled,"data-readonly":u.isReadOnly});return jsxs("div",{...mergeProps(g,h),className:classNames(xe({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:c,children:[u.label||z?jsxs("div",{className:Ce({labelPosition:n,hasMessage:!!z}),children:[jsx("span",{..._,className:classNames(he,"BaselineUI-RadioGroup-Label"),children:u.label}),n==="start"&&z]}):null,jsxs("div",{className:classNames({[oo]:u.isDisabled}),children:[jsx("div",{className:classNames(Xd,o),style:r,children:a.map(P=>jsx($d,{state:y,renderOption:s,item:P,value:P.id,...u},P.id))}),n==="top"&&z]})]})});bt.displayName="RadioGroup";var Qd=({id:e,defaultMessage:t,elementType:o=Fragment$1})=>{invariant(e||t,"`id` or `defaultMessage` is required.");let r=L();return jsx(o,{children:r.formatMessage(e)||t})};Qd.displayName="MessageFormat";var Jd=xo.forwardRef(({className:e,style:t,children:o,role:r="group",isDisabled:a,...n},s)=>{let{hoverProps:l,isHovered:i}=useHover({isDisabled:a});return jsx("div",{...l,role:r,"data-hovered":i,"data-disabled":a,className:e,style:t,...n,ref:s,children:o})});Jd.displayName="Group";var ec="_1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",oc="_1yep5z61ov _1yep5z61ow _1yep5z61ox _1yep5z61g1 _1yep5z61g2 _1yep5z61g3";var tc=xo.forwardRef(({items:e,optionsContainerClassName:t,...o},r)=>{let a=useMemo(()=>e.map(n=>({id:n.color,label:n.label})),[e]);return jsx(bt,{items:a,optionsContainerClassName:classNames(oc,t),orientation:"horizontal",renderOption:({label:n,id:s},{isSelected:l,isFocusVisible:i})=>jsxs("div",{className:ec,children:[jsx(je,{isFocusVisible:i,color:s,isSelected:l}),jsx(VisuallyHidden,{children:n})]}),...o,className:classNames(o.className,"BaselineUI-ColorPresetInput"),ref:r})});tc.displayName="ColorPresetInput";var ac={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var gt=xo.forwardRef(({className:e,style:t,"data-block-id":o,"aria-controls":r,...a},n)=>{let s=xo.useRef(null),{toolbarProps:l}=useToolbar(a,s),{isFocusVisible:i,focusProps:p}=useFocusRing(),d=filterTruthyValues({"data-block-id":o,"data-focus-visible":i});return jsx("div",{...mergeProps(l,p,d),"aria-controls":r,className:classNames(ac[a.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,ref:mergeRefs(n,s),children:a.children})});gt.displayName="Toolbar";var sc=f({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),ic=f({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z610d"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61rl _1yep5z61o5 _1yep5z61lo"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6ft"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61rm _1yep5z61rl _1yep5z61nz _1yep5z61lp"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61rl _1yep5z61rn _1yep5z61ny _1yep5z61ro"]]}),lc=f({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1yep5z610c"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61ln"]]}),pc=f({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61mg"],[{isSelected:!0,isDisabled:!1},"_1yep5z61mg _1yep5z61lq"],[{isSelected:!0,isDisabled:!0},"_1yep5z61mg _1yep5z61lo"]]}),dc=f({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6fs _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z610e"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61lp"],[{isSelected:!1,isDisabled:!0},"_1yep5z61lo _1yep5z61me"],[{isSelected:!1,isHovered:!0},"_1yep5z61mf"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]});var lz={xxs:8,xs:12,sm:16,md:20,lg:24},Me=xo.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,...s},l)=>{let i=useToggleState(s),{buttonProps:p,isPressed:d,ref:m}=ur(s,i),{hoverProps:u,isHovered:c}=useHover({isDisabled:s.isDisabled}),{isFocusVisible:y,isFocused:g,focusProps:_}=useFocusRing(),b=useMemo(()=>typeof o=="function"?o:i.isSelected?o.selected:o.unselected,[o,i.isSelected]),v={isSelected:i.isSelected,isHovered:c,isFocusVisible:y,isDisabled:!!s.isDisabled},z=filterTruthyValues({"data-hovered":c,"data-selected":i.isSelected,"data-focus-visible":y,"data-disabled":s.isDisabled,"data-block-id":n,"data-focused":g,"data-pressed":d});return jsx("button",{...mergeProps(p,u,_,z),className:classNames(a==="toolbar"&&dc(v),a==="primary"&&ic(v),a==="secondary"&&lc(v),a==="tertiary"&&pc(v),sc({size:r}),"BaselineUI-ToggleIconButton",e),style:t,ref:mergeRefs(m,l),children:jsx(b,{size:lz[r]})})});Me.displayName="ToggleIconButton";var mc="f6jv6bm",uc="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6j0 _1yep5z6j1 _1yep5z6j2",ko="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",yc=f({defaultClassName:"f6jv6b0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6fs",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6uw _1yep5z6ux _1yep5z6uy _1yep5z6142 _1yep5z6143 _1yep5z6144",false:"_1yep5z613n _1yep5z613o _1yep5z613p"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61h7 _1yep5z61h8 _1yep5z61h9 _1yep5z61hv _1yep5z61hw _1yep5z61hx _1yep5z61ij _1yep5z61ik _1yep5z61il _1yep5z61j7 _1yep5z61j8 _1yep5z61j9 _1yep5z61rv _1yep5z61rt _1yep5z61nc"]]}),vt=f({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6ky",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),fc="f6jv6bj _1yep5z6vz _1yep5z6w0 _1yep5z6w1 _1yep5z6wn _1yep5z6wo _1yep5z6wp _1yep5z6xb _1yep5z6xc _1yep5z6xd _1yep5z6xz _1yep5z6y0 _1yep5z6y1",bc="f6jv6bk";var gc=f({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6kx",variantClassNames:{isHovered:{true:"_1yep5z6115"},isDisabled:{true:"_1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),vc="f6jv6bi _1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs _1yep5z6l0 _1yep5z6kz _1yep5z6hf _1yep5z6l3",_c="_1yep5z6j6 _1yep5z6j7 _1yep5z6j8",zc="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu _1yep5z6e3 _1yep5z6kv",hc=f({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jc _1yep5z6jd _1yep5z6je",variantClassNames:{isInline:{true:"_1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z616k _1yep5z616i _1yep5z6121",false:"_1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg"}},defaultVariants:{},compoundVariants:[]}),Cc="f6jv6bl",xc="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu",_t=f({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),zt="f6jv6b9 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it";var kc=[["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"],["Open Help Dialog","Ctrl+Shift+H"]],{dialog:{row:er}}=layoutSprinkleValues,Rc=({isOpen:e,onClose:t})=>{let{formatMessage:o}=L(),r=useId();return jsx(vo,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(Yo,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(ae,{"aria-labelledby":r,className:fc,drawerBackground:"subtle",children:[jsxs(M,{paddingLeft:er.padding.horizontal.lg,paddingRight:er.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:bc,children:[jsx(G,{id:r,elementType:"h3",type:"title",size:"md",children:o(or.help)}),jsx(T,{icon:XIcon$1,size:"md",variant:"secondary","aria-label":o(or.close),onPress:t})]}),jsx(E,{className:Cc}),jsxs(M,{paddingX:er.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(M,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:er.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(or.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(or.shortcut)})]})}),jsx("div",{role:"rowgroup",children:kc.map(([a,n],s)=>jsxs(Fragment$1,{children:[jsxs(M,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:er.padding.vertical.xs,style:{minHeight:40},children:[jsx(G,{type:"subtitle",size:"sm",role:"cell",children:o(or[camelCase(a)])}),jsx(G,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),s!==kc.length-1&&jsx(E,{})]},a))})]})]})})})},or=W({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"}});var ht=xo.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:s,isMinimal:l,isDisabled:i,editableContentAriaLabel:p,editorHandle:d,autoFocus:m},u)=>{let c=xo.useRef(null),[y,g]=useControlledState(e,t||"",o),_=useCallback(x=>{g(x.currentTarget.value||"");},[g]);useImperativeHandle(u,()=>({clear:()=>{g("");}}));let b=useCallback(x=>{x.currentTarget.style.height="16px",x.currentTarget.style.height=x.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let x=c.current;x&&(x.style.height="16px",x.style.height=x.scrollHeight+"px");},[l],[y]),useImperativeHandle(d,()=>({setCaretPosition:x=>{c.current&&(c.current.focus(),c.current.setSelectionRange(x,x));}}));let{focusProps:v,isFocused:z,isFocusVisible:h}=useFocusRing(),{hoverProps:P,isHovered:C}=useHover({}),R=filterTruthyValues({"data-focus-visible":h,"data-hovered":C,"data-focused":z});return jsx("textarea",{...mergeProps(v,P,R),ref:mergeRefs(c,n),className:classNames(l?zc:[vt(),_t({isInline:s}),xc]),autoFocus:m,onChange:_,disabled:i,onInput:b,value:y,placeholder:r,spellCheck:a,"aria-label":p})});ht.displayName="PlainEditor";var ln=(e,t)=>{let o=Editor.marks(e);return o?o[t]===!0:!1},wo=(e,t)=>{ln(e,t)?Editor.removeMark(e,t):Editor.addMark(e,t,!0);},Ge=e=>{ReactEditor.focus(e);};function Ye(e,t){let[o]=Editor.nodes(e,{match:r=>!Editor.isEditor(r)&&Element$1.isElement(r)&&"type"in r&&r.type===t});return o?.[0]}var xt=(e,t)=>{Transforms.unwrapNodes(e,{match:o=>!Editor.isEditor(o)&&Element$1.isElement(o)&&"type"in o&&o.type===t});};function Nz(e){if(!e.selection)return;let{selection:t}=e,[o]=Range.edges(t),r=Editor.before(e,o,{unit:"word"}),a=Editor.after(e,o,{unit:"word"});return {anchor:r||o,focus:a||o}}var pn=(e,t)=>{if(!e.selection)return;let o=Ye(e,"link");if(o){let i=Nz(e);i&&Range.isCollapsed(i)&&Transforms.select(e,i),xt(e,"link");}let{selection:r}=e,a=r&&Range.isCollapsed(r),n=o?.children?.[0],s=n&&"text"in n?n.text:t,l={type:"link",url:t,children:a?[{text:s}]:[]};a?Transforms.insertNodes(e,l):(Transforms.wrapNodes(e,l,{split:!0}),Transforms.collapse(e,{edge:"end"}));},Mc=e=>{let{isInline:t}=e;return e.isInline=o=>"type"in o&&(o.type==="link"||o.type==="span")||t(o),e},Lc=e=>{let{isInline:t,isVoid:o,markableVoid:r}=e;return e.isInline=a=>"type"in a&&a.type==="mention"?!0:t(a),e.isVoid=a=>"type"in a&&a.type==="mention"?!0:o(a),e.markableVoid=a=>"type"in a&&a.type==="mention"||r(a),e},Bc=(e,t)=>{let o=Ye(e,"span"),r={};if(o){let n=new Set(["type","children"]);r=Object.fromEntries(Object.keys(o).filter(s=>!n.has(s)).filter(s=>!!o[s]).map(s=>[s,o[s]])),xt(e,"span");}let a={...o,type:"span",...r,children:[]};delete a[t],Transforms.wrapNodes(e,a,{split:!0}),Transforms.collapse(e,{edge:"end"});},Sz=(e,t,o)=>{if(!e.selection)return;let a={...Ye(e,"span"),type:"span",[t]:o,children:[]};Transforms.wrapNodes(e,a,{split:!0}),Transforms.collapse(e,{edge:"end"});};function Nc(e){return "type"in e&&e.type==="span"}function Dc(e,t,o){let[r]=Editor.nodes(e,{match:a=>!Editor.isEditor(a)&&Element$1.isElement(a)&&"type"in a&&Nc(a)});r?Transforms.setNodes(e,{[t]:o},{match:a=>Nc(a),split:!0}):Sz(e,t,o);}function Mz(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}var Pt=e=>slateToHtml(e,{markMap:{bold:["b"],underline:["u"],italic:["i"]},elementMap:{paragraph:"p"},elementTransforms:{link:({node:t,children:o=[]})=>new Element("a",{href:t.url},o),span:({node:t,children:o=[]})=>{let r=Mz({...t.color&&{color:t.color},...t.backgroundColor&&{backgroundColor:t.backgroundColor}}),a=r?{style:r}:{};return new Element("span",a,o)},mention:({node:t})=>new Element("span",{"data-user-id":t.userId},[new Text(t.displayName)])}});function Lz(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 dn(e){return e.startsWith("<p>")||(e=`<p>${e}</p>`),htmlToSlate(e,{convertBrToLineBreak:!0,filterWhitespaceNodes:!0,htmlPreProcessString:t=>{let o=new DOMParser().parseFromString(Sc.default.sanitize(t),"text/html"),r=o.querySelectorAll("[style]");for(let a of r)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>`);return o.body.innerHTML},textTags:{em:()=>({italic:!0}),i:()=>({italic:!0}),strong:()=>({bold:!0}),u:()=>({underline:!0}),b:()=>({bold:!0})},elementTags:{a:t=>({type:"link",url:t?.attribs.href||"",children:[]}),p:()=>({type:"paragraph"}),span:t=>{let o=t?.attribs["data-user-id"];return o?{type:"mention",userId:o,displayName:t?.children[0]?.data||""}:{type:"span",...Lz(t?.attribs.style||"")}}}})}function rr(e,t=1){let{selection:o}=e;if(o){let[r]=Range.edges(o),a=Editor.before(e,r,{distance:t,unit:"character"}),n=a&&Editor.range(e,a,r);return {text:n&&Editor.string(e,n),range:n}}else return null}function Ec(e){return e&&(e.text===" "||!e.range)}function Fc(e){Transforms.delete(e,{at:{anchor:Editor.start(e,[]),focus:Editor.end(e,[])}});}var Ac=({isDisabled:e})=>{let{formatMessage:t}=L(),o=useSlate();return jsx(Ee,{type:"dialog",children:({close:r})=>jsxs(Fragment,{children:[jsx(Fe,{children:jsx(T,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(We.addLink),className:ko,preventFocusOnPress:!0})}),jsx(Ne,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:jsx(ae,{size:"content",style:{minWidth:240},children:jsx(Fz,{close:()=>{r(),setTimeout(()=>{Ge(o);},0);}})})})]})})},Fz=({close:e})=>{let t=useSlate(),{formatMessage:o}=L(),r=Ye(t,"link")?.url,[a,n]=xo.useState(r?"show":"add"),[s,l]=xo.useState(r||""),i=jsx(M,{padding:"lg",children:jsx(uo,{label:o(We.link),value:s,autoFocus:!0,onChange:l,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[i,jsx(M,{display:"flex",justifyContent:"flex-end",padding:"lg",className:mc,children:jsx(j,{isDisabled:!isUrl(s,!0),label:o(We.addLink),size:"sm",onPress:()=>{pn(t,s),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(M,{padding:"lg",children:jsx(G,{type:"subtitle",size:"sm",children:r})}),jsxs(M,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(j,{label:o(We.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(j,{label:o(We.removeLink),size:"sm",onPress:()=>{xt(t,"link"),e?.();},style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[i,jsxs(M,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(j,{label:o(We.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(j,{label:o(We.save),size:"sm",onPress:()=>{pn(t,s),e?.();}})]})]})]})},We=W({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 Vz=parseColor("#ffffff00").toString("hexa"),mn=[{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"}];[...mn,{label:"Transparent",color:Vz}];var wt=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useSlate(),n=ln(a,e);return jsx(Me,{variant:"tertiary",isSelected:n,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{wo(a,e);},preventFocusOnPress:!0})},yn=({nodeType:e,"aria-label":t,isDisabled:o})=>{let r=useSlate(),a=Ye(r,"span")?.[e],n=useCallback(p=>{r?.selection&&(Transforms.setSelection(r,r.selection),Ge(r),Dc(r,e,p),setTimeout(()=>{invariant(r.selection),Transforms.setSelection(r,r.selection),Ge(r);},0));},[r,e]),s=useCallback(()=>{r?.selection&&(Transforms.setSelection(r,r.selection),Ge(r),Bc(r,e),setTimeout(()=>{invariant(r.selection),Transforms.setSelection(r,r.selection),Ge(r);},0));},[r,e]),l=useCallback(({ref:p,triggerProps:d})=>jsx(T,{icon:e==="color"?TextIcon:HighlightTextIcon,"aria-label":t,size:"md",variant:"popover",isDisabled:o,className:ko,preventFocusOnPress:!0,...d,ref:p}),[e,t,o]),i=useCallback(p=>{p?n(p.toString("rgba")):s();},[s,n]);return jsx(Qo,{presets:mn,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:l,value:a||"#000000",onChange:i,isDisabled:o})};function qc({mentionableUsers:e,mentionPopoverRef:t,editor:o,maxMentionableUsersSuggestions:r=10}){let[a,n]=useState(null),[s,l]=useState(0),[i,p]=useState(""),d=useInteractionModality(),m=useMemo(()=>e?.map(b=>({id:b.id,label:b.displayName||b.name,description:b.description,value:b,data:{avatar:b.avatar}})),[e]),{contains:u}=useFilter({sensitivity:"base"}),c=m?.filter(b=>u(b.label,i)).slice(0,r),y=useCallback(()=>{let{selection:b}=o,v=rr(o,2);if(b&&Range.isCollapsed(b)){let[z]=Range.edges(b);if((v?.text?.startsWith(" ")||v?.text?.length===1)&&v?.text?.endsWith("@")){invariant(v,"lastTwoCharacters should be defined");let h=rr(o)?.range;n(h||null),p("");}else {let h=Editor.before(o,z,{unit:"word"}),P=h&&Editor.before(o,h),C=P&&Editor.range(o,P,z),x=(C&&Editor.string(o,C))?.match(/^@(\w+)$/),w=Editor.after(o,z),S=Editor.range(o,z,w),I=Editor.string(o,S).match(/^(\s|$)/);x&&I&&C&&(n(C),p(x[1]));}return null}n(null);},[o]),g=useCallback((b=s)=>{let v=c?.[b];if(v){let z={userId:v.id,displayName:v.label,children:[{text:""}],type:"mention"};invariant(o,"Editor ref is not set"),invariant(a,"Target is not set"),Transforms.select(o,a),Transforms.insertNodes(o,z),Transforms.move(o),Transforms.insertText(o," "),l(0),n(null);}},[c,s,o,a]),_=useCallback(b=>{if(!!e?.length&&a)switch(b.key){case"ArrowDown":{b.preventDefault(),l(z=>(z+1)%(c?.length||1));break}case"ArrowUp":{b.preventDefault(),l(z=>(z-1+(c?.length||1))%(c?.length||1));break}case"Escape":{b.preventDefault(),n(null);break}case"Enter":{b.preventDefault(),g();break}}},[c?.length,e?.length,a,g]);return useLayoutEffect(()=>{let b=t.current;b&&d==="keyboard"&&b.querySelector("[data-active=true]")?.scrollIntoView({block:"nearest",behavior:"smooth"});},[s,t,d]),useInteractOutside({ref:t,onInteractOutside:()=>{n(null);}}),{triggerMention:y,matchedUsers:c,onKeyDown:_,insertMention:g,activeIndex:s,isMentionPopoverOpen:!!a&&!!c?.length,setActiveIndex:l}}var yh=[{type:"paragraph",children:[{text:""}]}],fh=isIOS()||isAndroid(),hn=xo.forwardRef(({editor:e,value:t,defaultValue:o,onChange:r,style:a,spellCheck:n,placeholder:s,isInline:l,isDisabled:i,editableContentAriaLabel:p,containerRef:d,onHelpDialogOpenRequest:m,mentionableUsers:u,editorHandle:c,maxMentionableUsersSuggestions:y,autoFocus:g},_)=>{let b=useRef(null),v=useId(),z=useCallback(k=>jsx(bh,{...k}),[]),{formatMessage:h}=L(),P=useRef(null),C=P.current,R=useRef(null),x=useMemo(()=>C?.getRootNode()instanceof ShadowRoot,[C]),{onKeyDown:w,matchedUsers:S,activeIndex:O,insertMention:I,triggerMention:V,isMentionPopoverOpen:D,setActiveIndex:H}=qc({mentionableUsers:u,mentionPopoverRef:R,maxMentionableUsersSuggestions:y,editor:e}),[Z,oe]=useControlledState(t?dn(t):void 0,dn(o||"<p></p>"),k=>{r&&r(Pt(k));}),{keyboardProps:$}=useKeyboard({onKeyDown:k=>{w(k),(k.metaKey||k.ctrlKey)&&k.key==="b"?(k.preventDefault(),wo(e,"bold")):(k.metaKey||k.ctrlKey)&&k.key==="i"?(k.preventDefault(),wo(e,"italic")):(k.metaKey||k.ctrlKey)&&k.key==="u"?(k.preventDefault(),wo(e,"underline")):k.altKey&&k.key==="F10"?(k.preventDefault(),b.current&&b.current.querySelector("button")?.focus()):k.continuePropagation(),isFirefox()&&x&&ReactEditor.focus(e);}});useEffect(()=>{i&&ReactEditor.deselect(e);},[i,e]),useEffect(()=>{let k=P.current?.querySelector("[contenteditable=true]");if(!k)return;let N=()=>{ReactEditor.focus(e);};return Transforms.select(e,Editor.end(e,[])),k.addEventListener("focus",N),()=>{k.removeEventListener("focus",N);}},[e]),useImperativeHandle(_,()=>({startMention:()=>{let k=rr(e,1);Transforms.insertText(e,Ec(k)?"@":" @"),ReactEditor.focus(e);}})),useImperativeHandle(c,()=>({setCaretPosition:k=>{ReactEditor.focus(e),Transforms.move(e,{distance:k,unit:"character"});}}));let{pressProps:Q}=usePress({onPress:k=>{ReactEditor.focus(e),k.continuePropagation();},allowTextSelectionOnPress:!0,isDisabled:i});return jsxs(Slate,{editor:e,initialValue:Z||yh,onValueChange:oe,onChange:V,children:[jsxs(gt,{className:zt,"aria-controls":v,ref:b,children:[jsxs(M,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(wt,{nodeType:"bold",icon:BoldIcon,ariaLabel:h(To.bold),isDisabled:i}),jsx(wt,{nodeType:"italic",icon:ItalicIcon,ariaLabel:h(To.italic),isDisabled:i}),jsx(wt,{nodeType:"underline",icon:UnderlineIcon,ariaLabel:h(To.underline),isDisabled:i})]}),jsx(E,{orientation:"vertical"}),jsx(yn,{nodeType:"color","aria-label":h(To.fontColor),isDisabled:i}),jsx(E,{orientation:"vertical"}),jsx(yn,{nodeType:"backgroundColor","aria-label":h(To.backgroundColor),isDisabled:i}),jsx(E,{orientation:"vertical"}),jsx(Ac,{isDisabled:i}),jsx(E,{orientation:"vertical"}),jsx(T,{className:ko,icon:QuestionmarkCircleIcon,size:"sm","aria-label":h(To.help),onPress:m})]}),jsx(E,{variant:"secondary"}),jsx("div",{ref:P,onDragStart:zn,onDragEnd:zn,onKeyUp:zn,children:jsx(Editable,{...mergeProps($,fh?Q:{}),renderLeaf:z,renderElement:gh,readOnly:i,disabled:i,autoFocus:g,"data-mention-open":D,className:classNames(vt({isDisabled:i}),_t({isInline:l})),renderPlaceholder:({attributes:k,children:N})=>jsx("span",{...k,className:sprinkles({paddingY:"lg"}),children:N}),style:a,placeholder:s,spellCheck:n,id:v,"aria-label":p})}),jsxs(Ee,{isOpen:D,type:"listbox",children:[jsx(Fe,{}),jsx(Ne,{isNonModal:!0,className:vc,triggerRef:d,placement:"bottom start",children:jsx(ye,{ref:R,items:S||[],className:sprinkles({width:"full"}),renderOption:(...k)=>vh(...k,{index:(S||[]).findIndex(N=>N.id===k[0].key),setIndex:H,activeIndex:O}),onAction:k=>{let N=S?.findIndex(K=>K.id===k);I(N);}})})]})]})});hn.displayName="RichEditor";var bh=({children:e,attributes:t,leaf:o})=>(o.bold&&(e=jsx("strong",{children:e})),o.italic&&(e=jsx("em",{children:e})),o.underline&&(e=jsx("u",{children:e})),jsx("span",{...t,children:e})),Tt=()=>jsxs("span",{contentEditable:!1,style:{fontSize:0},children:["$",String.fromCodePoint(160)]}),gh=e=>{let{attributes:t,children:o,element:r}=e;return "type"in r&&r.type==="link"?jsxs("a",{...t,href:r.url,className:Sr({size:"sm"}),style:{cursor:"unset"},children:[jsx(Tt,{}),o,jsx(Tt,{})]}):"type"in r&&r.type==="span"?jsxs("span",{...t,style:{color:r.color,backgroundColor:r.backgroundColor},children:[jsx(Tt,{}),o,jsx(Tt,{})]}):"type"in r&&r.type==="mention"?jsxs("span",{...t,contentEditable:isChrome()?void 0:t.contentEditable,"data-user-id":r.userId,children:[o,"@",r.displayName]}):jsx("p",{...t,children:o})},vh=({value:e,nextKey:t},{optionProps:o,isDisabled:r},a,{index:n,setIndex:s,activeIndex:l})=>{let{hoverProps:i}=useHover({isDisabled:r,onHoverStart:()=>{s(n);}});invariant(e,"Option value is not set");let{label:p,description:d,data:m}=e;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(o,i),className:gc({isDisabled:r,isHovered:n===l}),"data-active":n===l,ref:a,children:[jsx(go,{name:p,...m?.avatar}),jsxs(M,{display:"flex",flexDirection:"column",children:[jsx(G,{type:"subtitle",size:"sm",children:p}),jsx(G,{type:"helper",size:"sm",children:d})]})]}),t?jsx(E,{}):null]})};function zn(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation();}var To=W({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 Zc=xo.memo(xo.forwardRef(({className:e,style:t,"data-block-id":o,enableRichText:r=!1,onCancel:a,onSave:n,isInline:s=!0,submitButtonIcon:l=ArrowUpCircleFilledIcon,submitButtonAriaLabel:i,cancelButtonAriaLabel:p,"aria-label":d,"aria-describedby":m,"aria-labelledby":u,"aria-details":c,editableContentAriaLabel:y="Editing Area",footerButtons:g,clearOnCancel:_,clearOnSave:b,...v},z)=>{let h=useMemo(()=>{let N=Mc(withReact(withHistory(createEditor())));return v.mentionableUsers?Lc(N):N},[v.mentionableUsers]),{formatMessage:P}=L(),C=useRef(null),R=useRef(null),x=useRef(null),w=!r&&v.variant==="minimal",S=useRef(null),[O,I]=xo.useState(v.value||v.defaultValue),{fieldProps:V}=useLabel({"aria-label":d,"aria-labelledby":u,"aria-describedby":m,"aria-details":c,labelElementType:"div"});w&&!v.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let D=useCallback(()=>{I(""),r?Fc(h):R.current?.clear();},[h,r]),H=useCallback(()=>{n?.(r?Pt(h.children):C.current.value),b&&D();},[D,b,h.children,r,n]),Z=jsx(T,{variant:"ghost","aria-label":i||P(xn.save),icon:l,isDisabled:v.isDisabled||v.isSaveDisabled||!getPlainText(O||""),size:"md",excludeFromTabOrder:w,className:w?_c:void 0,onPress:H}),[oe,$]=xo.useState(!1),{keyboardProps:Q}=useKeyboard({onKeyDown:N=>{(N.metaKey||N.ctrlKey)&&N.shiftKey&&N.key==="h"&&(N.preventDefault(),$(!0));}}),k=useCallback(N=>{I(N),v.onChange?.(N);},[v]);return jsxs("div",{...mergeProps(V,r?Q:{}),role:"application",ref:mergeRefs(x,z),style:t,"data-block-id":o,className:classNames(yc({isInline:s,isMinimal:w}),"BaselineUI-Editor",e),"aria-disabled":v.isDisabled,children:[w?jsxs(Fragment,{children:[s?jsx(go,{className:uc,name:v.avatarName||""}):null,jsxs("div",{className:hc({isInline:s}),children:[jsx(ht,{isMinimal:w,textBoxRef:C,isInline:s,editableContentAriaLabel:y,...v,onChange:k}),Z]})]}):jsxs(Fragment,{children:[r?jsx(hn,{containerRef:x,ref:S,editor:h,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{$(!0);},...v,onChange:k}):jsxs(Fragment,{children:[!s&&jsx(E,{variant:"secondary"}),jsx(ht,{onCancel:a,textBoxRef:C,ref:R,isInline:s,editableContentAriaLabel:y,...v,onChange:N=>{I(N),v.onChange?.(N);}})]}),jsx(E,{variant:"secondary"}),jsxs("div",{className:classNames(zt,sprinkles({justifyContent:"space-between"})),children:[jsxs(M,{paddingX:"sm",gap:"sm",display:"flex",children:[r&&v.mentionableUsers?jsx(T,{icon:AtIcon,size:"sm","aria-label":P(xn.mention),onPress:()=>S.current?.startMention()}):null,g?.map(({type:N,props:K},q)=>N==="action"?jsx(T,{...K,size:"sm",isDisabled:v.isDisabled||K.isDisabled},q):jsx(Me,{...K,size:"sm",variant:"tertiary",isDisabled:v.isDisabled||K.isDisabled},q))]}),jsxs(M,{children:[!!a&&jsx(T,{variant:"secondary",icon:CrossCircleFilledIcon,isDisabled:v.isDisabled,size:"md",onPress:()=>{a(),_&&D();},"aria-label":p||P(xn.cancel)}),Z]})]})]}),jsx(Rc,{isOpen:oe,onClose:()=>{$(!1);}})]})}));Zc.displayName="Editor";var xn=W({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var Mt=xo.forwardRef(({className:e,style:t,"data-block-id":o,isMounted:r,children:a,transitions:n,elementType:s="div",...l},i)=>{let p=useTransition(r,n),d=animated[s];return p((m,u)=>u&&jsx(d,{className:e,"data-block-id":o,style:{...t,...m},...l,ref:i,children:a}))});Mt.displayName="Transition";var $c="_8kqf970 _1yep5z6ow _1yep5z6ox _1yep5z6oy _1yep5z613b _1yep5z613c _1yep5z613d _1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6142 _1yep5z6143 _1yep5z6144 _1yep5z6yh _1yep5z6uq _1yep5z6ur _1yep5z6us _1yep5z6168";var em=2,om=xo.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:s=!0,"data-block-id":l},i)=>{let p=xo.useRef(null),d=useInteractionModality(),[m,u]=xo.useState(!1),c=useCallback(()=>{let w=r?.current||getOwnerDocument(p.current).body;return getOwnerWindow(w).getComputedStyle(w).flexDirection==="column-reverse"?w.scrollTop+em>=0:w.scrollTop+w.clientHeight+em>=w.scrollHeight},[r]),[y,g]=xo.useState(c),_=Re(),{buttonProps:b,isPressed:v}=useButton({onPress:()=>{let w=r?.current||getOwnerDocument(p.current).body;w.scrollTo({top:w.scrollHeight,behavior:s?"smooth":"auto"});}},p),{focusProps:z,isFocused:h,isFocusVisible:P}=useFocusRing(),{hoverProps:C,isHovered:R}=useHover({}),x=filterTruthyValues({"data-block-id":l,"data-pressed":v,"data-focus-visible":P,"data-hovered":R,"data-focused":h});return useEffect(()=>{g(c());},[c]),useEffect(()=>{let w=r?.current||getOwnerDocument(p.current).body,S="onscrollend"in getOwnerWindow(w),O=()=>{setTimeout(()=>{u(!1),g(c());},n);},I=()=>{u(!0),S||O();};return w.addEventListener("scroll",I),w.addEventListener("scrollend",O),()=>{w.removeEventListener("scroll",I),w.removeEventListener("scrollend",O);}},[r,n,c]),jsxs(Mt,{isMounted:(o?d!=="keyboard":!0)&&!m&&!y,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:_},...mergeProps(b,z,C,x),className:classNames($c,Fr({isFocusVisible:P,variant:"high-contrast",isHovered:R}),"BaselineUI-ScrollControlButton",e),style:t,ref:mergeRefs(i,p),children:[jsx(ArrowDownCircleFilledIcon,{size:16}),a]})});om.displayName="ScrollControlButton";var Rn="_1yep5z6jc _1yep5z6jd _1yep5z6je _1yep5z6jl _1yep5z6jm _1yep5z6jn",rm=f({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nw _1yep5z6nx _1yep5z6ny"},hasNoCloseBtn:{true:"_1yep5z6lk _1yep5z6ll _1yep5z6lm _1yep5z6nw _1yep5z6nx _1yep5z6ny _1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6mq _1yep5z6mr _1yep5z6ms"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61g7 _1yep5z61g8 _1yep5z61g9"]]}),tm="_1v0p2z10";var am=xo.forwardRef(({className:e,style:t,"data-block-id":o,message:r,title:a,primaryActionLabel:n,cancelLabel:s,textInputProps:l,icon:i,iconColor:p,showCloseButton:d=!0,onPrimaryAction:m,onCancel:u,autoFocusButton:c,isPrimaryActionDisabled:y},g)=>{let _=useId(),{formatMessage:b}=L(),v=a&&jsx(G,{id:_,type:"title",size:"sm",elementType:"h3",children:a});return jsxs(ae,{className:e,style:t,"data-block-id":o,size:"sm",variant:"primary",role:"alertdialog",ref:g,"aria-labelledby":_,children:[jsxs("div",{className:rm({hasTitleAndIcon:!!(i&&a),hasNoCloseBtn:!d}),children:[jsxs(M,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[i?jsx(i,{style:{color:p},size:24}):null,!i&&v,d?jsx(T,{icon:XIcon$1,variant:"secondary",size:"md","aria-label":b(Qh.close),onPress:u}):null]}),i?v:null]}),r?jsx(M,{elementType:"section",className:tm,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:r}):null,l?jsx(M,{paddingX:"lg",paddingBottom:"lg",children:jsx(uo,{...l})}):null,s||n?jsxs(Fragment,{children:[jsx(E,{}),jsxs(M,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(j,{variant:"secondary",className:Rn,label:s,onPress:u,autoFocus:c==="cancel"}):null,n?jsx(j,{className:Rn,label:n,onPress:m,autoFocus:c==="primary",isDisabled:y}):null]})]}):null]})});am.displayName="AlertDialog";var Qh=W({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var nm="_1t55bp71",sm="_1yep5z6e3 _1yep5z6eu _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69i _1yep5z69j _1yep5z69k",im="_1t55bp70";var aC=tC(),lm=xo.forwardRef(({className:e,style:t,children:o,"data-block-id":r,showCaret:a},n)=>{let s=useMemo(()=>{let l=o;return (!o||Array.isArray(o)&&o.length===0)&&(l=""),aC.render(l)},[o]);return jsx("div",{className:classNames(sm,im,{[nm]:a},"BaselineUI-Markdown",e),"data-block-id":r,style:t,ref:n,dangerouslySetInnerHTML:{__html:s}})});lm.displayName="Markdown";function mm(e){let{formatMessage:t,locale:o}=L(),[r,a]=xo.useState(!1),[n,s]=xo.useState(0),[l,i]=xo.useState(0),[p,d]=xo.useState(!1);useEffect(()=>{if(!e.current)return;let c=e.current,y=()=>{a(!1),s(0);},g=()=>{p||s(c.currentTime*100/c.duration);},_=()=>{i(c.duration);};return c.addEventListener("ended",y),c.addEventListener("timeupdate",g),c.addEventListener("loadedmetadata",_),()=>{c.removeEventListener("ended",y),c.removeEventListener("timeupdate",g),c.removeEventListener("loadedmetadata",_);}},[p,e]);let m=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(t(dm.playing),"polite")):(e.current.pause(),a(!1),announce(t(dm.paused),"polite"))))();},[t,e]),u=useCallback(c=>{e.current&&(e.current.currentTime=c*e.current.duration/100,announce(iC(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:l,togglePlay:m,seek:u,setProgress:s,formattedCurrentTime:e.current?.currentTime?cm(e.current?.currentTime):"00:00",formattedDuration:l?cm(l):"00:00",setIsSliderDragging:d}}var dm=W({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function iC(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 cm(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 um="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q",ym="rta2n91 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6z9 _1yep5z6ut _1yep5z6uu _1yep5z6uv _1yep5z6166 _1yep5z6106",fm="rta2n90";var vm=xo.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,...n},s)=>{let l=xo.useRef(null),{isPlaying:i,progress:p,duration:d,togglePlay:m,seek:u,formattedDuration:c,formattedCurrentTime:y,setProgress:g,setIsSliderDragging:_}=mm(l),{formatMessage:b}=L(),v=filterTruthyValues({"data-block-id":a,"data-state":i?"playing":"paused","data-loaded":d>0});return jsxs("div",{...v,...n,className:classNames(um,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:l,children:r.map(({url:z,type:h})=>jsx("source",{src:z,type:h},z))})}),jsx(Me,{icon:i?PauseIcon:PlayIcon,variant:"toolbar",isSelected:i,size:o,"aria-label":b(i?In.pause:In.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:ym,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(_r,{"aria-label":b(In.audioTimeline),value:p,minValue:0,maxValue:100,className:fm,onChange:z=>{g(z),_(!0);},onChangeEnd:z=>{u(z),_(!1);}}),jsx("span",{"aria-hidden":!0,children:c})]})]})});vm.displayName="AudioPlayer";var In=W({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});function h3(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}
|
|
55
|
+
function Un(e,t,o){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager,getItems:e.getItems||(s=>[...s].map(l=>{let p=t.collection.getItem(l);return invariant(p,"Expected item to be defined."),{"text/plain":p.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 e.enableReorder?{collectionProps:i,dragState:a,dropState:n}:{collectionProps:{},dropState:void 0,dragState:void 0}}function Su(e,t){if(typeof e!="object"||e===null)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 Mu(e){var t=Su(e,"string");return typeof t=="symbol"?t:String(t)}function Lu(e,t,o){return t=Mu(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function qn(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 Kn(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?qn(Object(o),!0).forEach(function(r){Lu(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):qn(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function Gn(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var Bu=(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},_=e=>{var t=o=>{var r=e.defaultClassName,a=Kn(Kn({},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 l=s;typeof l=="boolean"&&(l=l===!0?"true":"false");var p=e.variantClassNames[n][l];p&&(r+=" "+p);}}for(var[c,m]of e.compoundVariants)Bu(c,a,e.defaultVariants)&&(r+=" "+m);return r};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return Gn(e.variantClassNames,o=>Gn(o,r=>r.split(" ")[0]))}},t};var Wn=_({defaultClassName:"_6n12k9b _1yep5z6l0 _1yep5z6kz _1yep5z6hk _1yep5z6ki",variantClassNames:{isDropTarget:{true:"_1yep5z612n"},orientation:{vertical:"_1yep5z6166",horizontal:"_1yep5z6167"}},defaultVariants:{},compoundVariants:[]}),Xn="_6n12k98 _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",Yn=_({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),$n=_({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6ki _1yep5z6kl _1yep5z6ky _1yep5z6kx _1yep5z6kv _1yep5z6ks",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z612n _1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612w _1yep5z612x _1yep5z612y"},isHovered:{true:"_1yep5z6114",false:"_1yep5z6113"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Zn="_6n12k90";var Qn=_({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var F=Po.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div",...i},s)=>{let{separatorProps:l}=useSeparator({...i,orientation:r,elementType:n});return jsx(n,{...l,className:classNames(Qn({isVertical:r==="vertical",isSecondary:o==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i["data-block-id"],style:t,role:a?void 0:l.role,ref:s})});F.displayName="Separator";function ju(e){return sprinkles.properties.has(e)}var D=Po.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},l={};for(let p in o)ju(p)?s[p]=o[p]:l[p]=o[p];return {sprinkleProps:s,domProps:l}},[o]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:t})});D.displayName="Box";var Fo=Po.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:l,isFocused:p,isPressed:c,_state:m},d)=>{invariant(e.value&&(e.value.type==="option"||e.value.type===void 0),"Item cannot be a section");let{icon:u,label:y}=e.value,{hoverProps:b,isHovered:f}=useHover({isDisabled:t}),v=filterTruthyValues({"data-selected":r,"data-disabled":t,"data-focused":p,"data-hovered":f,"data-pressed":c,"data-focus-visible":o,"data-selection-mode":m.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,b,v),className:classNames($n({isHovered:f,isFocused:o,isFirstChild:m.collection.getFirstKey()===e.key,isLastChild:m.collection.getLastKey()===e.key,isDisabled:t}),"BaselineUI-ListBox-Option"),ref:d,children:[jsxs(D,{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",{...l,children:y})]}),i?jsx("span",{className:Yn({isDisabled:t}),...s,children:i}):null]})});Fo.displayName="DefaultRenderOption";var Ut=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:l,orientation:p},c)=>s?null:jsx("li",{...l,ref:c,"data-drop-target":i,className:classNames(Wn({isDropTarget:i,orientation:p}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let i=Po.useRef(null),{dropIndicatorProps:s,isHidden:l,isDropTarget:p}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:l,isDropTarget:p,orientation:t},i)};var ni=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ut,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(Ut,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};ni.displayName="DraggableListOption";var Ho=Po.forwardRef(({item:e,renderOption:t=(d,u,y)=>jsx(Fo,{item:d,liProps:u.optionProps,...u,ref:y}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:l,optionStyle:p,optionClassName:c},m)=>{let d=Po.useRef(null),u=useOption({key:e.key},r,d),{value:y}=e;invariant(!!y),invariant(!("children"in e),"ListSection should not be passed to ListOption");let b={style:typeof p=="function"?p(y):p,className:typeof c=="function"?c(y):c};return a&&n?jsx(ni,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:l,children:f=>t(e,{...u,showSelectedIcon:o,_state:r,optionProps:mergeProps(u.optionProps,f,b)},mergeRefs(d,m))}):t(e,{...u,showSelectedIcon:o,_state:r,optionProps:mergeProps(u.optionProps,b)},mergeRefs(d,m))});Ho.displayName="Option";var qt=({section:e,state:t,sectionClassName:o,sectionStyle:r,...a})=>{let{itemProps:n,groupProps:i}=useListBoxSection({heading:e.rendered,"aria-label":e["aria-label"]}),s=t.collection.getChildren?.(e.key);invariant(s,"items with type `section` must have children");let{value:l}=e,p=typeof r=="function"?r(l):r,c=typeof o=="function"?o(l):o;return jsxs(Fragment,{children:[e.key!==t.collection.getFirstKey()&&jsx(F,{UNSAFE_omitRole:!0}),jsx("li",{...n,style:{...n.style,...p},className:classNames(Zn,c,"BaselineUI-ListBox-Section"),children:jsx("ul",{...i,children:[...s].map(m=>jsx(Ho,{item:m,state:t,...a},m.key))})})]})};qt.displayName="ListBoxSection";var Wt=Po.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=!0,UNSAFE_state:a,style:n,renderOption:i,enableReorder:s=!1,"data-block-id":l,renderDragPreview:p,onReorder:c,...m},d)=>{let u=Po.useRef(null),y=useListState(m),{direction:b}=useLocale(),f=a||y,v=Po.useRef(null),{listBoxProps:g}=useListBox({...m,shouldSelectOnPressUp:s,keyboardDelegate:new ListKeyboardDelegate({collection:f.collection,ref:v,layout:t,orientation:o,direction:b,disabledKeys:f.disabledKeys})},f,v),z=useReducedMotion(),C=useCallback(R=>{let L=getOwnerDocument(v.current);c&&(!z&&"startViewTransition"in L?L.startViewTransition(()=>{c(R);}):c(R));},[c,z]),{collectionProps:k,dragState:h,dropState:I}=Un({...m,onReorder:C,layout:t,orientation:o,enableReorder:s,preview:u},f,v),{isFocusVisible:x,isFocused:N,focusProps:T}=useFocusRing(),w=filterTruthyValues({"data-block-id":l,"data-layout":t,"data-empty":f.collection.size===0,"data-focused":N,"data-focus-visible":x,"data-orientation":o});return jsxs("ul",{...mergeProps(g,T,w,k),className:classNames(Xn,"BaselineUI-ListBox",e),style:n,ref:mergeRefs(d,v),children:[[...f.collection].map(R=>{let L={key:R.key,state:f,dragState:h,dropState:I,renderOption:i,renderDropIndicator:m.renderDropIndicator,showSelectedIcon:r,orientation:o,dropIndicatorStyle:m.dropIndicatorStyle,dropIndicatorClassName:m.dropIndicatorClassName,optionStyle:m.optionStyle,optionClassName:m.optionClassName};return R.type==="section"?jsx(qt,{...L,section:R}):jsx(Ho,{...L,item:R})}),p?jsx(DragPreview,{ref:u,children:p}):null]})});Wt.displayName="ListBoxBase";var re=Po.forwardRef((e,t)=>jsx(Wt,{...e,ref:t,children:o=>o.type==="section"?jsx(Section,{items:o.children,title:o.id,children:r=>jsx(Item,{children:r.label},r.id)},o.id):jsx(Item,{children:o.label},o.id)}));re.displayName="ListBox";var Cr="uf19bsg _1yep5z6ki",si=_({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0 _1yep5z6kx _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ks",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z610d"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"_1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg",popover:"uf19bse _1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z6mn _1yep5z6mo _1yep5z6mp _1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nq _1yep5z6nr _1yep5z6ns _1yep5z6uz _1yep5z6v0 _1yep5z6v1"},isPressed:{true:"uf19bsf"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61mf"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mf"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61ln"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61lm _1yep5z61mg"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61ls"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61o1 _1yep5z61rl _1yep5z61rp _1yep5z61rm"],[{variant:"toolbar",isPressed:!0},"_1yep5z61mf"],[{variant:"primary",isPressed:!0},"_1yep5z61mf"],[{variant:"secondary",isPressed:!0},"_1yep5z61ln"],[{variant:"tertiary",isPressed:!0},"_1yep5z61lq _1yep5z61mg"],[{variant:"ghost",isPressed:!0},"_1yep5z61lt"],[{variant:"popover",isPressed:!0},"_1yep5z61o1 _1yep5z61rl _1yep5z61rp _1yep5z61rm"],[{variant:"ghost",isDisabled:!1},"_1yep5z61lr"],[{variant:"popover",size:"lg"},"_1yep5z61h4 _1yep5z61h5 _1yep5z61h6 _1yep5z61hs _1yep5z61ht _1yep5z61hu _1yep5z61ig _1yep5z61ih _1yep5z61ii _1yep5z61j4 _1yep5z61j5 _1yep5z61j6"]]});var Vo=Po.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Oe=({children:e,...t})=>{let o=Po.useRef(null),r=useOverlayTriggerState(t),a=useOverlayTrigger(t,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:o}),[r,a]);return jsx(Vo.Provider,{value:n,children:typeof e=="function"?e(r):e})};var xr=Po.createContext({isSelected:!1,ref:void 0}),Ae=({children:e})=>{let{state:t,overlayTriggerAria:o,triggerRef:r}=useContext(Vo);invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:a}=o,n=useMemo(()=>({...a,isSelected:t.isOpen,ref:r}),[a,t.isOpen,r]);return jsx(xr.Provider,{value:n,children:e})};var Pr=e=>{let t=Po.useRef(null),{ref:o,...r}=useContext(xr)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t);return {buttonProps:a,isPressed:n,ref:mergeRefs(t,o||null)}},kr=(e,t)=>{let o=Po.useRef(null),{ref:r,...a}=useContext(xr)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},t,o);return {buttonProps:n,isPressed:i,ref:mergeRefs(o,r||null)}};var Rr=_({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6dy _1yep5z6ki",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6"},isDisabled:{true:"oom8bs7"},isFocusVisible:{true:"oom8bs8"},isHovered:{true:"oom8bs9"},size:{sm:"oom8bsa",md:"oom8bsb",lg:"oom8bsc"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsd"],[{variant:"secondary",isHovered:!0},"oom8bse"],[{variant:"tertiary",isHovered:!0},"oom8bsf"],[{variant:"popover",isHovered:!0},"oom8bsg"],[{variant:"ghost",isHovered:!0},"oom8bsh"],[{variant:"primary",isFocusVisible:!0},"oom8bsi"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsj"]]});var Ky={sm:16,md:20,lg:24},H=Po.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:l="sm","data-block-id":p,...c},m)=>{let{buttonProps:d,isPressed:u,ref:y}=Pr({...c,elementType:i,isDisabled:s}),b=Ky[l],{hoverProps:f,isHovered:v}=useHover({isDisabled:s}),{isFocusVisible:g,isFocused:z,focusProps:C}=useFocusRing(),k=filterTruthyValues({"data-block-id":p,"data-disabled":s,"data-focused":z,"data-focus-visible":g,"data-hovered":v,"data-pressed":u});return jsxs(i,{...mergeProps(d,f,C,k),className:classNames(Rr({isDisabled:!!s,isFocusVisible:g,isHovered:v,variant:n,size:l}),"BaselineUI-ActionButton",o),style:t,ref:mergeRefs(m,y),children:[!!r&&jsx(r,{size:b}),e,!!a&&jsx(a,{size:b}),n==="popover"&&jsx(ChevronDownIcon,{size:8,className:Cr})]})});H.displayName="ActionButton";var Oo=_({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var wr="z9nup80",Qe="z9nup83";var mi="z9nup87";var ui=Po.forwardRef(({className:e,node:t},o)=>{let r=Po.useRef(null);return Po.useEffect(()=>{let a=r.current;return a?.append(t),()=>{a?.contains(t)&&t.remove();}},[t]),jsx("div",{className:classNames(wr,e),ref:mergeRefs(o,r)})});ui.displayName="DomNodeRenderer";var yi="_14uvjig0 z9nup81",fi="_14uvjig7",bi="_14uvjig3",gi=_({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),vi=_({defaultClassName:"_14uvjige _14uvjig1",variantClassNames:{active:{true:"_14uvjigf _14uvjig2"},isDisabled:{true:"_14uvjigg"},isReadOnly:{true:"_14uvjigh"},isFocusVisible:{true:"_14uvjigi _14uvjig2"},isHovered:{true:"_14uvjigj _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),_i="_14uvjig8",zi=_({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var Je=_({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),Ir=_({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),eo=_({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Re="nrh1eh3",we=_({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Ie=_({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),oo=_({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 fe({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...o,className:Je({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...t,className:Je({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:Je({isDisabled:i,labelPosition:n}),children:r}):null}var hi=_({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),Ci="_1lnwne0";var af={xxs:8,xs:12,sm:16,md:20,lg:24},M=Po.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},l)=>{!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");let{buttonProps:p,isPressed:c,ref:m}=Pr({...s,elementType:i}),{isFocusVisible:d,isFocused:u,focusProps:y}=useFocusRing(),{hoverProps:b,isHovered:f}=useHover({isDisabled:s.isDisabled}),v=filterTruthyValues({"data-block-id":s["data-block-id"],"data-focused":u,"data-focus-visible":d,"data-disabled":s.isDisabled,"data-hovered":f,"data-pressed":c});return jsxs(i,{...mergeProps(p,b,y,v),className:classNames(si({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:d,isHovered:f,isPressed:c}),"BaselineUI-ActionIconButton",e),ref:mergeRefs(l,m),style: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:af[r]}),a==="popover"&&jsx(ChevronDownIcon,{size:8,className:Cr})]})});M.displayName="ActionIconButton";var ze=Po.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=Po.useRef(null),{locale:l}=useLocale(),p=useNumberFieldState({...n,locale:l}),{hoverProps:c,isHovered:m}=useHover({isDisabled:n.isDisabled}),{focusProps:d,isFocusVisible:u,isFocused:y}=useFocusRing(),{labelProps:b,decrementButtonProps:f,inputProps:v,incrementButtonProps:g,groupProps:z,descriptionProps:C,errorMessageProps:k}=useNumberField(n,p,s),h=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),I=fe({description:n.description,errorMessageProps:k,descriptionProps:C,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),x=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":m,"data-focused":y,"data-focus-visible":u,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"]});return jsxs("div",{style:t,className:classNames(Ie({labelPosition:o}),"BaselineUI-NumberInput",e),...x,ref:i,children:[n.label?jsxs("div",{className:we({labelPosition:o,hasMessage:!!I}),children:[jsx("label",{...b,className:Re,children:n.label}),o==="start"&&I]}):null,jsxs("div",{className:classNames({[Qe]:n.isDisabled}),children:[jsxs("div",{...mergeProps(z,c),className:classNames(oo({isHovered:m,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:y,variant:r}),{[Ci]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(v,d),ref:s,className:classNames("BaselineUI-NumberInput-Input",Ir({isDisabled:n.isDisabled,labelPosition:o}))}),h?jsx(h,{className:eo({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:hi({isHoveredOrFocused:m||y,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(M,{variant:"secondary",size:"xxs",icon:MinusIcon,...f,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(F,{style:{height:16},orientation:"vertical"}),jsx(M,{variant:"secondary",size:"xxs",icon:PlusIcon,...g,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),o==="top"&&I]})]})});ze.displayName="NumberInput";var Sr=Po.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:l,value:p,"aria-label":c,"aria-labelledby":m,"aria-details":d,"aria-describedby":u,"data-block-id":y,defaultValue:b,isReadOnly:f,label:v,id:g,includeNumberInput:z},C)=>{let k=Po.useRef(null),h={onChange:o===void 0?void 0:L=>{o(L[0]);},isDisabled:n||f,step:i,minValue:s,maxValue:l,onChangeEnd:r===void 0?void 0:L=>{r(L[0]);},value:p===void 0?void 0:[p],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":m,"aria-details":d,"aria-describedby":u,id:g,label:v},I=useNumberFormatter(a),x=useSliderState({...h,numberFormatter:I}),{trackProps:N,groupProps:T,labelProps:w}=useSlider(h,x,k),R=jsx(ze,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":w.id,value:x.getThumbValue(0),formatOptions:a,onChange:L=>{x.setThumbValue(0,L);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...T,style:t,"data-block-id":y,className:classNames(yi,"BaselineUI-Slider",e),children:[v?jsxs("div",{className:bi,children:[jsx("label",{...w,className:classNames(gi({isDisabled:n,hasNumberInput:!!z}),"BaselineUI-Slider-Label"),children:v}),z?R:null]}):null,jsxs("div",{className:fi,children:[jsx("div",{...N,className:classNames(_i,"BaselineUI-Slider-Track"),ref:mergeRefs(k,C),"data-testid":"track",children:jsx(wf,{state:x,trackRef:k,isDisabled:n,isReadOnly:f})}),z&&!v?R:null]})]})});Sr.displayName="Slider";function wf({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=Po.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:t,inputRef:a},e),{focusProps:l,isFocused:p,isFocusVisible:c}=useFocusRing(),{hoverProps:m,isHovered:d}=useHover({isDisabled:o}),u=filterTruthyValues({"data-disabled":o,"data-readonly":r,"data-hovered":d,"data-focus-visible":c,"data-dragging":s,"data-focused":p});return jsxs(Fragment,{children:[jsx("div",{className:classNames(zi({isDisabled:o,isFocusVisible:c,active:s,isHovered:d}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsx("div",{...mergeProps(n,m,u),className:classNames(vi({isDisabled:o,isFocusVisible:c,active:s,isReadOnly:r,isHovered:d}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,l)})})})]})}var wi=_({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),Ii=_({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),Ti="bpklwad",Ni=_({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),Si="bpklwa6",Mi=_({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var Ei=Po.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,...i},s)=>{let l=Po.useRef(null),p=useToggleState(i),{inputProps:c,isPressed:m}=useSwitch(i,p,l),{isFocusVisible:d,focusProps:u}=useFocusRing(),{hoverProps:y,isHovered:b}=useHover({isDisabled:i.isDisabled}),f=filterTruthyValues({"data-block-id":n,"data-focused":d,"data-disabled":i.isDisabled,"data-focus-visible":d,"data-selected":p.isSelected,"data-readonly":i.isReadOnly,"data-hovered":b,"data-pressed":m}),v=jsx("div",{className:classNames(wi({isSelected:p.isSelected,isDisabled:!!i.isDisabled,isFocused:d,isReadOnly:!!i.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(Ii({isSelected:p.isSelected,isDisabled:i.isDisabled,isReadOnly:i.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(f,y),className:classNames(Ni({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:s,children:[t?jsx("span",{className:classNames(Ti,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,u),ref:l})}),r?jsxs("div",{className:Mi({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",Si),children:p.isSelected?r.on:r.off}),v]}):v]})});Ei.displayName="Switch";var Fi="_19n40yy9",Hi=_({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 qf={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},Ai=Po.forwardRef(({className:e,size:t="md",variant:o="primary",...r},a)=>{let n=Po.useRef(null),i=useSearchFieldState(r),{inputProps:s,clearButtonProps:l}=useSearchField({...r,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},i,n),{focusProps:p,isFocusVisible:c,isFocused:m}=useFocusRing({within:!0,isTextInput:!0}),d=qf[t],u=t==="sm"?XIcon$2:XIcon$3,y=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":m,"data-disabled":r.isDisabled,"data-focus-visible":c});return jsxs("div",{...y,className:classNames(Hi({size:t,isFocused:m,variant:o,hasText:!!i.value,isDisabled:r.isDisabled}),"BaselineUI-SearchInput",e),ref:a,children:[jsx(d,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(s,p),className:Fi,ref:n}),i.value!==""&&jsx(M,{icon:u,...l,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});Ai.displayName="SearchInput";function Ui({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let i=Po.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 qi({ref:e,onResize:t,isDisabled:o}){let r=Po.useRef(null),[a,n]=Po.useState();return Po.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),t?.(i);});},[t,o,n]),Po.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function ao({src:e,alt:t}){let[o,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),l=()=>{r(!0),s(!1);},p=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",l),c.addEventListener("error",p),()=>{c.removeEventListener("load",l),c.removeEventListener("error",p);}},[e]),{isLoaded:o,hasError:a,isLoading:i,imgProps:{src:o?e:void 0,alt:t}}}function Ne(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var Ki="SET_STATE",Lr="UNDO",Br="REDO",Jf=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case Ki:return {past:[...o,r],present:t.data,future:[]};case Lr:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case Br:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},Gi=(e={},{isDisabled:t,onAction:o})=>{let r=Ne(),[a,n]=useReducer(Jf,{past:[],present:e,future:[]}),{past:i,present:s,future:l}=a,p=b=>{n({type:Ki,data:b});},c=useRef(),m=()=>{c.current=Lr,n({type:Lr});},d=()=>{c.current=Br,n({type:Br});},u=!!i?.length,y=!!l?.length;return useGranularEffect(()=>{(c.current===Lr||c.current===Br)&&(o?.(s,c.current),c.current=void 0);},[s],[o,r]),{state:s,push:t?()=>{}:p,undo:t?()=>{}:m,redo:t?()=>{}:d,pastStates:i,futureStates:l,canUndo:u,canRedo:y}};var ea=Po.createContext({messages:{}}),Yi=({children:e,messages:t={},...o})=>{let r=Po.useMemo(()=>({messages:t}),[t]);return jsx(I18nProvider,{...o,children:jsx(ea.Provider,{value:r,children:e})})};Yi.displayName="I18nProvider";function B(e){let{messages:t}=useContext(ea);!e&&r1(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.");let o=useMessageFormatter(e?cleanKeyFromGlobImport(e):t),r=useLocale();return {formatMessage:(a,n)=>{if(typeof a=="object")try{return o(a.id,n)}catch{return console.log(`BUI \u{1F30D}: Translation not found for key: \`${a.id.toString()}\`. The default message, i.e. \`${a.defaultMessage}\`, will be used instead.`),a.defaultMessage||a.id}else try{return o(a,n)}catch{return console.log(`BUI \u{1F30D}: Translation not found for key: \`${a.toString()}\`. The default message, i.e. \`${a.toString()}\`, will be used instead.`),a}},locale:r}}var q=e=>e;function xI(e,t,o){let r=Po.useRef(null);return Po.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 Zi(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 NI({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=Po.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=getOwnerWindow(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&o?.(i);},onPressStart(){let n=getOwnerWindow(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let p=getOwnerWindow(n).getSelection();p&&e.current?.contains(p.anchorNode)&&t(p);}let s=getOwnerDocument(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,t,r]);}function no(e){let t=useCallback(()=>{let a=getOwnerWindow(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[o,r]=Po.useState(t);return useLayoutEffect$1(()=>{let a=getOwnerWindow(e),n=()=>{r(t());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,t]),o}var ra=Po.createContext(void 0),es=({portalContainer:e,children:t})=>jsx(ra.Provider,{value:e,children:t});es.displayName="PortalContainerProvider";function ie(e){let t=useContext(ra);return e||t}var z1=["append","prepend","insert","insertBefore","insertAfter","remove","removeSelectedItems","move","moveBefore","moveAfter","update"];function os(e){let{onListChange:t,onSelectionChange:o,...r}=e,a=useListData({...r,initialItems:e.initialItems||[]}),n=useRef(e.initialItems),i=useCallback(()=>{t&&t(a.items);},[t,a.items]),s=useCallback(()=>{o&&o(a.selectedKeys);},[o,a.selectedKeys]),l=useCallback(c=>e.getKey?e.getKey(c):c.id||c.key,[e]);useEffect(i,[a.items,e.initialItems,i]),useEffect(s,[a.selectedKeys,e.initialItems,s]),useEffect(()=>{let c=(b,f)=>b.filter(v=>!f.some(g=>io(v,g))),m=(b,f)=>f.filter(v=>!b.some(g=>io(v,g))),d=b=>{b.length>0&&a.remove(...b.map(f=>l(f)));},u=(b,f)=>{if(b.length>0){let v=f.findIndex(g=>b.some(z=>io(g,z)));if(v===0)a.prepend(...b);else if(v>0){let g=f[v-1],z=a.items.findIndex(C=>io(C,g));a.insertAfter(l(a.items[z]),...b);}else a.append(...b);}},y=b=>{for(let[f,v]of b.entries()){let g=a.items.findIndex(z=>io(z,v));g!==-1&&g!==f&&a.move(l(a.items[g]),f);}};if(!io(n.current,e.initialItems)){let b=a.items,f=e.initialItems||[],v=c(b,f);d(v);let g=m(b,f);u(g,f),y(f),n.current=f;}},[e.initialItems,a,l]);let p=useMemo(()=>{let c={};for(let m of z1)c[m]=(...d)=>{let u=a[m](...d);return i(),(m==="remove"||m==="removeSelectedItems")&&s(),u};return c},[a,i,s]);return {...a,...p}}function na(e=window){let[t,o]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,l]=useState(!1);return useEffect(()=>{let p=e.matchMedia("(prefers-color-scheme: dark)"),c=m=>{o(m.matches?"dark":"light");};return p.matches&&o("dark"),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),useEffect(()=>{let p=e.matchMedia("(prefers-contrast: more)"),c=m=>{a(m.matches);};return a(p.matches),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),useEffect(()=>{let p=e.matchMedia("(prefers-reduced-motion: reduce)"),c=m=>{i(m.matches);};return p.matches&&i(!0),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),useEffect(()=>{let p=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=m=>{l(m.matches);};return p.matches&&l(!0),p.addEventListener("change",c),()=>{p.addEventListener("change",c);}},[e]),{colorScheme:t,highContrast:r,reducedMotion:n,transparency:s}}var so=createContext({theme:lightTheme,setTheme:()=>{}});var rs="var(--hj25q10)";var Fr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},lo=Po.forwardRef(({theme:e="system",children:t,setTheme:o,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i},s)=>{let{direction:l}=useLocale(),{colorScheme:p,reducedMotion:c,highContrast:m,transparency:d}=na(),{name:u,theme:y}=useMemo(()=>{switch(e){case"system":return p==="light"?Fr.LIGHT:Fr.DARK;case"light":return Fr.LIGHT;case"dark":return Fr.DARK;default:return {name:"custom",theme:e}}},[p,e]),b=no(),f={"data-theme":u,"data-block-id":i,"data-reduced-motion":c,"data-high-contrast":m,"data-transparency":d,"data-device":b},v=useMemo(()=>({theme:y,setTheme:o}),[y,o]);return jsx(so.Provider,{value:v,children:jsx("div",{...mergeProps(n,f),className:classNames(wr,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[rs]:l==="rtl"?"-1":"1"}),...a},ref:s,children:t})})});lo.displayName="ThemeProvider";var is=_({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),Hr="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",ss=_({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),ls="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs",ps="_1yep5z66x _1yep5z66y _1yep5z66z",ds="_1mdhlqv5 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k";var po=Po.forwardRef(({className:e,style:t,children:o,...r},a)=>{let{theme:n}=useContext(so);return jsx(Overlay,{...r,children:jsx(lo,{ref:a,theme:n,style:t,className:classNames("BaselineUI-Portal",e),children:o})})});po.displayName="Portal";function ms({placement:e}){let t=useReducedMotion();return useTransition(!0,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!t,config:config.stiff})}var us={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},ys="_1gzftth1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2",fs="_1gzftth6",bs="_1gzftth7",gs="var(--_1gzftth0)";var{color:ia}=themeVars,ae=Po.forwardRef(({className:e,style:t,state:o,overlayProps:r,underlayClassName:a,children:n,includeArrow:i=!1,offset:s=2,portalContainer:l,contentContainerClassName:p,contentContainerStyle:c,...m},d)=>{let u=Po.useRef(null),y=ie(l),b=i?8:0,{underlayProps:f,popoverProps:v,placement:g,arrowProps:z}=usePopover({...m,offset:s+b,popoverRef:u,containerPadding:m.containerPadding||0},o),C=ms({placement:g}),k=g==="center"?"bottom":g;return C((h,I)=>I&&jsxs(po,{portalContainer:y,style:t,ref:d,children:[!m.isNonModal&&jsx("div",{...f,className:classNames(bs,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...v,style:{...v.style,...h,...assignInlineVars({[gs]:`${m.triggerRef?.current?.offsetWidth}px`})},ref:mergeRefs(u,d),className:classNames(ys,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(x=>g?.includes(x)),children:[i?jsxs("svg",{className:classNames(us[k],"BaselineUI-PopoverContent-Arrow"),...z,style:{...z.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:ia.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:ia.background.primary.subtle,stroke:ia.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:o.close}),jsx("div",{...r,style:c,className:classNames(fs,p),children:n}),jsx(DismissButton,{onDismiss:o.close})]})]}))});ae.displayName="PopoverContentCore";var zs="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 _1yep5z6l0 _1yep5z6kz _1yep5z6he _1yep5z6l3 _1yep5z6fs",hs="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var la=({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(F,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:hs,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(Or,{item:i,state:o,showSelectedIcon:t},i.key)))})]})]})};la.displayName="MenuSection";var Or=({item:e,state:t,className:o,showSelectedIcon:r})=>{let a=Po.useRef(null),n=useMenuItem({key:e.key},t,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(Fo,{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 da=Po.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),i=Po.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:l}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(s,l),className:classNames(zs,e),ref:mergeRefs(i,a),children:[...n.collection].map(p=>p.type==="section"?jsx(la,{section:p,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},p.key):jsx(Or,{item:p,state:n,className:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},p.key))})});da.displayName="MenuContent";var Rs=Po.forwardRef(({isDisabled:e,contentClassName:t,state:o,placement:r="bottom start",isNonModal:a,shouldFlip:n,shouldUpdatePosition:i,boundaryElement:s,crossOffset:l,offset:p,triggerButton:c,triggerLabel:m,renderTrigger:d=({buttonProps:f,ref:v})=>jsx(H,{...f,variant:"popover",ref:v}),portalContainer:u,...y},b)=>{let f=Po.useRef(null),v=ie(u),{menuTriggerProps:g,menuProps:z}=useMenuTrigger({isDisabled:e,type:"menu"},o,f),C=useMemo(()=>mergeProps(g,{isDisabled:e,isSelected:o.isOpen,className:"BaselineUI-Menu-Trigger",label:m}),[g,e,o.isOpen,m]);return useEffect(()=>{c&&console.warn("The `children` prop to pass trigger button is deprecated. Use `renderTrigger` instead. The `children` prop will be removed in the next major version.");},[c]),useEffect(()=>{!m&&!d&&!c&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,c,m]),jsxs(Fragment,{children:[c?jsx(Slot,{...C,ref:f,children:c}):d({buttonProps:C,ref:f}),o.isOpen?jsx(ae,{triggerRef:f,state:o,placement:r,isNonModal:a,shouldFlip:n,shouldUpdatePosition:i,boundaryElement:s,crossOffset:l,offset:p||2,className:classNames(Hr,"BaselineUI-Menu-Popover"),portalContainer:v,children:jsx(da,{className:t,...z,...y,ref:b,autoFocus:o.focusStrategy||"first"})}):null]})});Rs.displayName="MenuRoot";var ma=Po.forwardRef((e,t)=>{let o=e.children;return jsx(Rs,{...e,ref:t,triggerButton:o,children:r=>"type"in r&&r.type==="section"?jsx(Section,{items:r.children,title:r.title,children:a=>jsx(Item,{children:a.label},a.id)},r.id):(invariant("label"in r,"Item doesn't have a label"),jsx(Item,{textValue:r.label,children:r.label},r.id))})});ma.displayName="MenuBase";var Ar=Po.forwardRef(({defaultOpen:e,isOpen:t,onOpenChange:o,...r},a)=>{let n=useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o});return jsx(ma,{...r,state:n,ref:a})});Ar.displayName="Menu";var jr=_({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 Is=Po.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,title:l,...p},c)=>{let m=Po.useRef(null),{linkProps:d,isPressed:u}=useLink({...p,elementType:p.onPress?"span":n},m),{isFocusVisible:y,isFocused:b,focusProps:f}=useFocusRing(),{hoverProps:v,isHovered:g}=useHover({isDisabled:p.isDisabled}),z=n,C=filterTruthyValues({"data-block-id":s,"data-disabled":p.isDisabled,"data-focused":b,"data-pressed":u,"data-focus-visible":y,"data-hovered":g,title:l});return jsx(z,{...mergeProps(d,f,v,C),className:classNames(jr({variant:r,isFocusVisible:y,isHovered:g,isDisabled:p.isDisabled,size:a,isActive:u,type:i}),"BaselineUI-Link",e),ref:mergeRefs(m,c),style:t,children:o})});Is.displayName="Link";function Ts({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let l=useId(),p=useId(),c=useId();return {inputProps:{type:"file",id:p,disabled:!!e,"aria-labelledby":n?void 0:l,"aria-describedby":a||c,"aria-label":n,onChange:d=>{let u=[...d.target.files||[]];t?.(u),o?.(d);},name:r,accept:i,multiple:s},labelProps:{htmlFor:p,id:l},descriptionProps:{id:c}}}async function ya({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 Ns=_({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"]]}),Ss=_({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Ms=_({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Ls=_({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Fs=Po.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},i)=>{let s=Po.useRef(null),{inputProps:l,descriptionProps:p,labelProps:c}=Ts(n),{dropProps:m}=useDrop({ref:s,onDrop:async({items:f})=>{let v=f.filter(z=>z.kind==="file").map(async z=>(invariant(z.kind==="file"),z.getFile())),g=await Promise.all(v);n.onValueChange?.(g);}}),{focusProps:d,isFocusVisible:u}=useFocusRing(),{hoverProps:y,isHovered:b}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(m,y,c),className:classNames(Ns({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:b||u}),e),ref:mergeRefs(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,l)})}),r?jsx(r,{size:20,className:Ms({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Ls({disabled:n.isDisabled,hovered:b}),children:t}),o?jsx("div",{...p,className:Ss({disabled:n.isDisabled}),children:o}):null]})]})});Fs.displayName="FileUpload";var Hs="_12vfhl40 z9nup81",Vs="_12vfhl41 z9nup82",Os=_({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),As="_12vfhl42",js="_12vfhl47",Us="_12vfhl46 z9nup82",qs="_12vfhl45",Ks=_({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Gs=Po.forwardRef(({className:e,variant:t="active",showValue:o,description:r,errorMessage:a,...n},i)=>{let s=useId(),{labelProps:l,progressBarProps:p}=useProgressBar({...n,"aria-describedby":r?s:n["aria-describedby"]}),{minValue:c=0,maxValue:m=100,value:d=0,label:u}=n,y=(d-c)/(m-c),b=`${Math.round(y*100)}%`,f=jsx("output",{className:Ks({hasLabel:!!u}),children:p["aria-valuetext"]}),v=t==="error"?a:r;return jsxs("div",{...p,className:classNames(Hs,e),ref:i,children:[u?jsxs("div",{className:Vs,children:[jsx("label",{...l,className:As,children:u}),o?f:null]}):null,jsxs("div",{className:qs,children:[jsxs("div",{className:Us,children:[jsx("div",{className:js,children:jsx("div",{style:{width:b},className:Os({variant:t})})}),!u&&o?f:null]}),v?jsx("div",{className:Je({hasError:t==="error"}),id:s,children:v}):null]})]})});Gs.displayName="ProgressBar";function uo({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorFilledIcon:t==="warning"?WarningFilledIcon:null}var yo=Po.forwardRef(({className:e,validationState:t="valid",variant:o="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,...l},p)=>{let c=Po.useRef(null),{inputProps:m,labelProps:d,descriptionProps:u,errorMessageProps:y,validationErrors:b}=useTextField({...l,validationState:t==="error"?"invalid":"valid"},c),f=l.errorMessage||b.join(" "),v=fe({...l,errorMessage:f,descriptionProps:u,errorMessageProps:y,labelPosition:a});f&&(t="error");let{hoverProps:g,isHovered:z}=useHover({isDisabled:l.isDisabled}),{isFocused:C,focusProps:k,isFocusVisible:h}=useFocusRing(),I=uo({isReadOnly:l.isReadOnly,validationState:t}),x=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":t,"data-focused":C,"data-focus-visible":h});return jsxs("div",{className:classNames(Ie({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,style:r,ref:p,children:[l.label||a==="start"&&v?jsxs("div",{className:we({labelPosition:a,hasMessage:!!v}),children:[jsx("label",{...d,className:Re,children:l.label}),a==="start"&&v]}):null,jsxs("div",{className:classNames({[Qe]:l.isDisabled}),children:[jsxs("div",{...g,className:oo({validationState:t,isHovered:z,isFocused:C,variant:o,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,k,x),className:classNames(Ir({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:c}),I?jsx(I,{className:eo({validationState:t,isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&v]})]})});yo.displayName="TextInput";var fo=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};fo.displayName="NumberFormat";var Xs="_1yep5z6i3 _1yep5z6i4 _1yep5z6i5",Ys=_({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"]]}),$s=_({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"]]}),Zs=_({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var el=Po.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,...n},i)=>{let s={isRequired:!1},l=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!n["aria-label"]&&!n["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let p=Po.useRef(null),c=useToggleState({...n,...s}),{inputProps:m,isPressed:d,isDisabled:u,isReadOnly:y,isSelected:b}=useSwitch({...n,...s},c,p),{focusProps:f,isFocused:v,isFocusVisible:g}=useFocusRing(),{hoverProps:z,isHovered:C}=useHover({});return jsxs("label",{ref:i,style:o,className:classNames(Xs,"BaselineUI-Reaction",e),"data-block-id":n["data-block-id"],"data-focused":v,"data-focus-visible":g,"data-disabled":u,"data-hovered":C,"data-pressed":d,"data-selected":b,children:[jsx(VisuallyHidden,{children:jsx("input",{...m,...f,ref:p})}),jsxs("div",{...z,className:Ys({isSelected:b,isFocusVisible:g,isHovered:C,isReadOnly:y,isDisabled:u}),children:[jsx("div",{className:Zs({isDisabled:u,isReadOnly:y}),children:jsx(l,{size:r==="md"?20:16})}),jsx("div",{className:$s({isSelected:c.isSelected,isDisabled:u,isReadOnly:y,size:r}),children:jsx(fo,{value:t})})]})]})});el.displayName="Reaction";var ol=_({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),rl=_({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:"_1yep5z6g0 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6fs _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var ga=Po.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:l},p)=>{let{tooltipProps:c}=useTooltip({isOpen:t.isOpen},t),m=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]),d=useReducedMotion(),[u]=useSpring(()=>({from:{opacity:0,transform:`translate(${m.x}px, ${m.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!d})),y=a==="center"?"bottom":a;return jsxs(animated.span,{...o,style:{...u,...o.style},ref:p,"data-placement":y,children:[l?jsx("div",{className:ol({placement:y,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:rl({variant:n,size:i}),children:e})]})});ga.displayName="TooltipContent";var nl=Po.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,...l},p)=>{let c=Po.useRef(null),m=Po.useRef(null),d=!l.text||l.isDisabled,u=useTooltipTriggerState({...l,delay:o,closeDelay:r,isDisabled:d}),{triggerProps:y,tooltipProps:b}=useTooltipTrigger({...l,isDisabled:d,delay:o,closeDelay:r},u,c),f=ie(s),{overlayProps:v,arrowProps:g,placement:z,updatePosition:C}=useOverlayPosition({arrowSize:i?13:0,targetRef:c,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:m,placement:t,isOpen:u.isOpen,...l});return Ui({ref:m,threshold:1,onIntersect:C,isDisabled:!u.isOpen}),qi({ref:c,onResize:C,isDisabled:!u.isOpen}),jsxs(FocusableProvider,{...y,ref:c,children:[e,u.isOpen?jsx(po,{disableFocusManagement:!0,portalContainer:f,children:jsx(ga,{ref:mergeRefs(p,m),state:u,arrowProps:g,overlayProps:v,placement:z,tooltipProps:b,variant:a,size:n,includeArrow:i,children:l.text})}):null]})});nl.displayName="Tooltip";var il="_1azy5686",sl="_1azy5685",ll="var(--_1azy5680)",pl="_1azy5688",dl="_1azy5689",cl="_1azy5681 z9nup82",ml="_1azy5682";var ul="_1azy5687";var hg={sm:16,md:20},Cg={sm:[CheckFilledIcon,ErrorAltFilledIcon],md:[CheckFilledIcon$1,ErrorAltFilledIcon$1]},go=Po.forwardRef(({className:e,style:t,size:o="md",variant:r="active",...a},n)=>{let{labelProps:i,progressBarProps:s}=useProgressBar({...a,isIndeterminate:!0}),l=hg[o],p=l/2-2,c=2*p*Math.PI,m=Cg[o][r==="success"?0:1];return jsxs("div",{className:classNames(cl,e),ref:n,style:{...assignInlineVars({[ll]:`${c}px`}),...t},children:[jsxs("div",{...s,className:ml,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:l,width:l,viewBox:`0 0 ${l} ${l}`,children:[jsx("circle",{role:"presentation",className:il,cx:l/2,cy:l/2,r:p}),r==="active"&&jsx("circle",{role:"presentation",className:sl,cx:l/2,cy:l/2,r:p})]}),r==="success"&&jsx(m,{className:ul,size:l}),r==="error"&&jsx(m,{className:pl,size:l})]}),a.label?jsx("span",{...i,className:dl,children:a.label}):null]})});go.displayName="ProgressSpinner";var yl=_({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kp8"],[{isSelected:!0,isDisabled:!0},"_5uw3kp9"]]});var Sg={sm:16,md:20,lg:24},fl=Po.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",...n},i)=>{let s=useToggleState(n),{buttonProps:l,isPressed:p,ref:c}=kr(n,s),{hoverProps:m,isHovered:d}=useHover({isDisabled:n.isDisabled}),{isFocusVisible:u,isFocused:y,focusProps:b}=useFocusRing(),f=filterTruthyValues({"data-block-id":n["data-block-id"],"data-focused":y,"data-focus-visible":u,"data-disabled":n.isDisabled,"data-hovered":d,"data-pressed":p,"data-selected":s.isSelected});return jsxs(a,{...mergeProps(l,m,b,f),className:classNames(yl({isHovered:d,isFocusVisible:u,isSelected:s.isSelected,size:r,isDisabled:n.isDisabled}),"BaselineUI-ToggleButton",e),style:t,ref:mergeRefs(c,i),children:[o?jsx(o,{size:Sg[r]}):null,n.label]})});fl.displayName="ToggleButton";var Kr=_({defaultClassName:"_16vugd0e",variantClassNames:{isDisabled:{true:"_16vugd0f"}},defaultVariants:{},compoundVariants:[]}),bl=_({defaultClassName:"_16vugd01 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),gl=_({defaultClassName:"_16vugd05",variantClassNames:{isIndeterminate:{true:"_16vugd04"},isSelected:{true:"_16vugd04"},isFocusVisible:{true:"_16vugd08"},isHovered:{true:"_16vugd09"},isDisabled:{true:"_16vugd0a"},isReadOnly:{true:"_16vugd0b"},hasError:{true:"_16vugd0c"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0d"]]});var zl=Po.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,...n},i)=>{let s=Po.useRef(null),l=useToggleState(n),{isFocusVisible:p,isFocused:c,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:u,isDisabled:y,isSelected:b,isReadOnly:f}=useCheckbox({...n,children:o},l,s),{hoverProps:v,isHovered:g}=useHover({isDisabled:y}),z=filterTruthyValues({"data-disabled":y,"data-readonly":f,"data-hovered":g,"data-selected":b,"data-pressed":u,"data-indeterminate":n.isIndeterminate,"data-invalid":n.isInvalid,"data-focus-visible":p,"data-focused":c,"data-block-id":a});return jsxs("label",{...z,className:classNames(bl({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:i,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:s})}),jsxs("div",{...v,className:gl({isSelected:b&&!n.isIndeterminate,isIndeterminate:n.isIndeterminate,isFocusVisible:p,isDisabled:y,isReadOnly:f,hasError:n.isInvalid,isHovered:g}),children:[b&&!n.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,n.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:Kr({isDisabled:y}),children:o}):null]})});zl.displayName="Checkbox";var hl={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 Cl=_({defaultClassName:"_1nsi9h17",variantClassNames:{isFocusVisible:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"}},defaultVariants:{},compoundVariants:[]}),xl="_1nsi9h1b",Pl=_({defaultClassName:"_1nsi9h10",variantClassNames:{size:{xs:"_1nsi9h11",sm:"_1nsi9h12",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1nsi9h15",pinned:"_1nsi9h16"}},defaultVariants:{},compoundVariants:[]}),kl="_1nsi9h1c";var nv={style:"decimal"},iv={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},Tl=Po.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:l="floating",...p},c)=>{let{locale:m}=useLocale(),d=B(hl),u={...p,formatOptions:nv,minValue:o,incrementAriaLabel:a||d.formatMessage("nextPage"),decrementAriaLabel:n||d.formatMessage("prevPage"),defaultValue:r,"aria-label":i||d.formatMessage("goToPage")},y=Po.useRef(null),b=useNumberFieldState({...u,locale:m}),{inputProps:f,decrementButtonProps:v,incrementButtonProps:g,groupProps:z}=useNumberField({...u,onKeyDown:L=>{L.key==="Enter"&&y.current?.blur(),p.onKeyDown?.(L);}},b,y),{hoverProps:C,isHovered:k}=useHover({}),{focusProps:h,isFocused:I,isFocusVisible:x}=useFocusRing(),N=l==="floating",[T,w]=iv[s],R=filterTruthyValues({"data-focus-visible":x,"data-focused":I,"data-hovered":k,"data-block-id":p["data-block-id"]});return jsxs("div",{...mergeProps(z,C,R),className:classNames(Pl({size:s,variant:l}),"BaselineUI-Pagination",e),style:t,ref:c,children:[jsx(M,{icon:T,...v,elementType:"div",size:s,style:{height:"100%",...N&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton"}),l==="floating"&&jsx(F,{orientation:"vertical"}),jsxs("div",{className:Cl({isFocusVisible:x,variant:l}),"aria-label":d.formatMessage("pageXofY",{arg0:f.value,arg1:b.maxValue}),children:[jsx("input",{...mergeProps(f,h),ref:y,className:classNames("BaselineUI-Pagination-Input",xl),style:{width:`${f.value?.toString().length||1}ch`}}),jsxs("span",{className:kl,children:["/ ",jsx(fo,{value:b.maxValue})]})]}),l==="floating"&&jsx(F,{orientation:"vertical"}),jsx(M,{icon:w,...g,elementType:"div",size:s,style:{height:"100%",...N&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton"})]})});Tl.displayName="Pagination";var Nl=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};Nl.displayName="DateFormat";var Gr=_({defaultClassName:"_1f789qj1",variantClassNames:{isFocusVisible:{true:"_1f789qj2"},variant:{neutral:"_1f789qj3",red:"_1f789qj4",green:"_1f789qj5",blue:"_1f789qj6","high-contrast":"_1f789qj7"},isDisabled:{true:"_1f789qj8"},allowsRemoving:{true:"_1f789qj9"},isSelected:{true:"_1f789qja"},allowsSelection:{true:"_1f789qjb"},isHovered:{true:"_1f789qjc"}},defaultVariants:{},compoundVariants:[[{allowsSelection:!0,isHovered:!0,variant:"neutral"},"_1f789qjd"],[{allowsSelection:!0,isHovered:!0,variant:"red"},"_1f789qje"],[{allowsSelection:!0,isHovered:!0,variant:"blue"},"_1f789qjf"],[{allowsSelection:!0,isHovered:!0,variant:"green"},"_1f789qjg"],[{allowsSelection:!0,isHovered:!0,variant:"high-contrast"},"_1f789qjh"],[{allowsSelection:!0,isSelected:!0,isHovered:!0},"_1f789qji"]]}),Sl="_1f789qjj",Ml="_1f789qj0",Ll=_({defaultClassName:"_1f789qjk",variantClassNames:{variant:{neutral:"_1f789qjl",red:"_1f789qjm",green:"_1f789qjn",blue:"_1f789qjo","high-contrast":"_1f789qjp"},isHovered:{true:"_1f789qjq"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qjr"],[{isHovered:!0,variant:"red"},"_1f789qjs"],[{isHovered:!0,variant:"blue"},"_1f789qjt"],[{isHovered:!0,variant:"green"},"_1f789qju"],[{isHovered:!0,variant:"high-contrast"},"_1f789qjv"]]});var _v=({item:e,state:t,variant:o="neutral"})=>{let r=Po.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:l,allowsRemoving:p,isDisabled:c,isSelected:m,allowsSelection:d}=useTag({item:e},t,r),u=Po.useRef(null),{buttonProps:y}=useButton(l,u),{hoverProps:b,isHovered:f}=useHover({isDisabled:c}),{hoverProps:v,isHovered:g}=useHover({isDisabled:c}),z=e.value?.icon,C=e.value?.variant??o;return jsx("div",{...mergeProps(i,a,v),ref:r,className:Gr({isFocusVisible:n,variant:C,isDisabled:c,allowsRemoving:p,isSelected:m,allowsSelection:d,isHovered:g}),children:jsxs("div",{...s,className:Sl,children:[m?jsx(CheckmarkIcon$3,{size:16}):null,!m&&z?jsx(z,{size:16}):null,e.rendered,p?jsx("button",{...mergeProps(y,b),className:Ll({variant:C,isHovered:f}),children:jsx(XIcon$2,{})}):null]})})},ha=Po.forwardRef(({className:e,style:t,...o},r)=>{let a=Po.useRef(null),n=useListState(o),{gridProps:i}=useTagGroup(o,n,a);return jsx("div",{...i,className:classNames(Ml,e),style:t,ref:mergeRefs(r,a),children:[...n.collection].map(s=>jsx(_v,{state:n,item:s,variant:o.variant},s.key))})});ha.displayName="TagGroupBase";var Fl=Po.forwardRef(({items:e,...t},o)=>jsx(ha,{...t,items:e,ref:o,children:r=>jsx(Item,{children:r.label})}));Fl.displayName="TagGroup";var Hl="_1yep5z6kv",Vl=_({defaultClassName:"_1kvz17db _1yep5z6ki _1yep5z6kk",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Ol=_({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ki _1yep5z6kj",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Al="_1yep5z6ev _1yep5z6dy",jl=_({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ki _1yep5z6kl",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6ft",false:"_1yep5z6fu"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Ul="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",ql=_({defaultClassName:"_1kvz17d7 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var xa=Po.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext(Me),{disabledKeys:n}=useContext(Me),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let l=getRootNode(s.target),p=[...a?.keys()||[]].findIndex(y=>a?.get(y)?.current===l.activeElement),c=a?.get(p||0),m=a?.size||0,d=y=>{let b=a.get(y-1<0?m-1:y-1);n?.has(b?.current?.getAttribute("data-key")||"")?d(y-1):b?.current?.focus();},u=y=>{let b=a.get((y+1)%m);n?.has(b?.current?.getAttribute("data-key")||"")?u(y+1):b?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),u(-1);break}case"End":{s.preventDefault(),d(m);break}case"ArrowDown":{s.preventDefault(),u(p);break}case"ArrowUp":{s.preventDefault(),d(p);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:o,className:classNames(Hl,t),ref:r,children:Po.Children.map(e,(s,l)=>Po.cloneElement(s,{index:l}))})});xa.displayName="AccordionBase";var Me=Po.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Wl=Po.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},l)=>{let[p,c]=Po.useState(o),m=Po.useRef(new Map).current,[d,u]=Po.useState(a);useEffect(()=>{u(d);},[d]),useEffect(()=>{n?.(p);},[p,n]);let y=useMemo(()=>({expandedKeys:r||p,setExpandedKeys:r?()=>{}:c,disabledKeys:t,headers:m,expansionMode:d}),[r,p,t,m,d]);return jsx(Me.Provider,{value:y,children:jsx(FocusScope,{children:jsx(xa,{className:i,style:s,ref:l,children:e})})})});Wl.displayName="Accordion";var ka=Po.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},l)=>{let p=Po.useRef(null),{expandedKeys:c,setExpandedKeys:m,expansionMode:d,disabledKeys:u,headers:y}=useContext(Me),b=u?.has(r),f=useFocusManager();invariant(f);let{focusNext:v,focusPrevious:g}=f,{keyboardProps:z}=useKeyboard({onKeyDown:P=>{P.key==="ArrowRight"?v({wrap:!0}):P.key==="ArrowLeft"?g({wrap:!0}):P.continuePropagation();},isDisabled:b});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),y?.set(n,p);},[n,y]);let C=()=>{m(P=>{let S=new Set(P);return S.has(r)?S.delete(r):(d==="single"&&S.clear(),S.add(r)),S});},{buttonProps:k}=useButton({"aria-expanded":c.has(r),"aria-controls":o,onPress:C,isDisabled:b},p),{pressProps:h}=usePress({onPress:C,isDisabled:b}),{focusProps:I,isFocusVisible:x}=useFocusRing(),{hoverProps:N,isHovered:T}=useHover({isDisabled:b}),{focusProps:w,isFocusVisible:R}=useFocusRing({within:!0}),L=c.has(r);return jsxs("h3",{...mergeProps(z,h,N,w),className:jl({isFocusVisible:x,isHovered:T,isDisabled:b}),ref:l,children:[jsxs("div",{className:ql({isDisabled:!!b}),children:[jsx(ChevronRightIcon,{className:Ol({isExpanded:L}),size:8}),jsx("button",{...mergeProps(k,I),id:a,"data-key":r,className:Ul,ref:p,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:Vl({showActionsOnTriggerOnly:s,isTriggered:R||T}),children:t.map((P,S)=>jsx(M,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:b,...P},S))}):null,i?jsx("div",{className:Al,children:i}):null]})});ka.displayName="AccordionHeader";var op=Po.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:l},p)=>{let c=useId(),m=useId(),{expandedKeys:d}=useContext(Me),u=Po.useRef(null),y=d.has(r),b=Ne(),f=useReducedMotion(),v=useTransition(y?[r]:[],{from:!b&&!f&&{height:0,opacity:0},enter:()=>async g=>{await g({height:u.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:g=>g});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(ka,{value:r,actions:t,id:m,title:e,controlId:c,ref:p,index:a,subLabel:n,showActionsOnTriggerOnly:l})}),v(g=>jsx(animated.div,{role:"region","aria-labelledby":m,id:c,style:{...g,overflow:"hidden"},children:jsx("div",{ref:u,className:s,style:i,children:o})}))]})});op.displayName="AccordionItem";var Ra=Po.forwardRef(({variant:e,isOpen:t,validationState:o="valid",...r},a)=>{let n=Po.useRef(null),{buttonProps:i,isPressed:s}=useButton({...r,isDisabled:r.isDisabled||r.isReadOnly},n),{hoverProps:l,isHovered:p}=useHover({isDisabled:r.isDisabled}),{focusProps:c,isFocused:m,isFocusVisible:d}=useFocusRing(),u=uo({isReadOnly:r.isReadOnly,validationState:o});r.isReadOnly&&(i.disabled=!1);let y=filterTruthyValues({"data-disabled":r.isDisabled,"data-readonly":r.isReadOnly,"data-focused":m,"data-focus-visible":d,"data-hovered":p,"data-pressed":s,"data-open":t});return jsxs("button",{...mergeProps(i,l,c,y),ref:mergeRefs(a,n),className:classNames(ss({isFocused:d,isDisabled:r.isDisabled}),oo({variant:e,isHovered:p,isFocused:d,validationState:o,isDisabled:!!r.isDisabled,isReadOnly:r.isReadOnly}),"BaselineUI-Select-Button"),children:[r.children,u?jsx("span",{"aria-hidden":!0,className:classNames(eo({validationState:o,isReadOnly:!!r.isReadOnly}),ps),children:jsx(u,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(ChevronDownIcon,{size:8,className:is({isOpen:t})})})]})});Ra.displayName="SelectButton";var Ia=Po.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,optionStyle:n,optionClassName:i,placement:s="bottom start",renderTrigger:l=({buttonProps:m,selectedValue:d,valueProps:u,isOpen:y,ref:b})=>{let f=d&&"icon"in d&&d.icon;return jsx(Ra,{...m,isOpen:y,isReadOnly:p.isReadOnly,ref:b,variant:r,validationState:p.validationState,children:jsxs("span",{className:ds,children:[f?jsx(f,{size:24}):null,jsx("span",{...u,children:d?"label"in d&&d?.label:p.placeholder})]})})},...p},c)=>{let m=Po.useRef(null),d=useSelectState({...p,validationState:p.validationState==="error"?"invalid":"valid"}),u=ie(p.portalContainer),{labelProps:y,triggerProps:b,valueProps:f,menuProps:v,descriptionProps:g,errorMessageProps:z}=useSelect({...p,validationState:p.validationState==="error"?"invalid":"valid"},d,m),C=fe({...p,descriptionProps:g,errorMessageProps:z,labelPosition:o}),k=d.selectedItem?.value;return jsxs(Fragment,{children:[jsxs("div",{style:t,className:classNames(Ie({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,ref:c,children:[p.label||C?jsxs("div",{className:we({labelPosition:o,hasMessage:!!C}),children:[p.label?jsx("div",{...y,className:classNames(Re,"BaselineUI-Select-Label"),children:p.label}):null,o==="start"&&C]}):null,jsx(HiddenSelect,{state:d,triggerRef:m,isDisabled:p.isDisabled,label:p.label,name:p.name}),l({buttonProps:b,selectedValue:k,valueProps:f,isOpen:d.isOpen,ref:m}),o==="top"&&C]}),d.isOpen?jsx(ae,{placement:s,portalContainer:u,offset:2,state:d,triggerRef:m,style:t,className:classNames(Hr,"BaselineUI-Select-Popover"),...p,children:jsx(re,{...v,label:p.label,items:p.items,UNSAFE_state:d,showSelectedIcon:p.showSelectedIcon,className:ls,optionStyle:n,optionClassName:i})}):null]})});Ia.displayName="SelectBase";var Qr=Po.forwardRef((e,t)=>jsx(Ia,{...e,ref:t,children:o=>o.type==="section"?jsx(Section,{items:o.children,title:o.id,children:r=>jsx(Item,{children:r.label},r.id)},o.id):jsx(Item,{textValue:o.label,children:o.label},o.id)}));Qr.displayName="Select";var ip="_1017q4c5",sp=_({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),lp="_1017q4c4";var l_={sm:AvatarIcon,md:AvatarIcon$1},_o=Po.forwardRef(({className:e,style:t,size:o="md",icon:r=l_[o],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:l,imgLoading:p,"data-block-id":c},m)=>{let{imgProps:d}=ao({src:n,alt:a}),u=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(sp({size:o,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:t,"aria-disabled":s,"data-block-id":c,children:[n?jsx("img",{...d,loading:p,className:lp}):null,!i&&!n&&jsx(r,{size:o==="sm"?16:24}),i&&!n?o==="sm"?u[0]:u:null,l?jsx("div",{"data-testid":"notification",className:ip}):null]})});_o.displayName="Avatar";var pp="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it",dp=_({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z6105"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z6109"},variant:{primary:"_1x62fhbb _1yep5z6z6",ghost:"_1yep5z6z9"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61lg"],[{variant:"primary",isSelected:!0},"_1yep5z61me"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61lr"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61mf"]]}),cp=_({defaultClassName:"_1x62fhb3 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),mp="_1x62fhbf",up="_1yep5z6l2 _1yep5z6kz _1yep5z6hc _1yep5z6l1",yp=_({defaultClassName:"_1x62fhb0 _1yep5z6kv _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{variant:{primary:"_1yep5z6115",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var fp=({state:e,...t})=>{let o=Po.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:l,"data-block-id":p}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[up]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":p,style:l,children:a?.props.children})};var Ma=Po.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,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}),m=Po.useRef(null),{tabListProps:d}=useTabList({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues},c,m);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:t,ref:p,"data-block-id":s,children:[jsxs("div",{className:classNames(yp({variant:a}),r),style:o,children:[jsx("div",{...d,className:cp({variant:a}),ref:m,children:[...c.collection].map(u=>(invariant(u.value,"TabItem requires a value prop"),jsx(gp,{item:u,state:c,onRemove:i,variant:a},u.key)))}),n?.map((u,y)=>jsx("div",{className:pp,children:jsx(M,{...u,variant:"secondary",size:"sm",className:classNames(mp,u.className)})},y))]}),jsx(fp,{state:c},c.selectedItem?.key)]})});Ma.displayName="TabsBase";var gp=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,i=Po.useRef(null),{tabProps:s,isSelected:l,isDisabled:p}=useTab({key:a},o,i),{hoverProps:c,isHovered:m}=useHover({});invariant(n,"TabButton requires a value prop");let{title:d,icon:u,titleStyle:y,titleClassName:b}=n,{focusProps:f,isFocusVisible:v,isFocused:g}=useFocusRing(),{keyboardProps:z}=useKeyboard({onKeyDown:k=>{k.key==="Backspace"&&t?t(a):k.continuePropagation();}}),C=filterTruthyValues({"data-selected":l,"data-disabled":p,"data-focused":g,"data-hovered":m,"data-focus-visible":v});return jsxs("div",{...mergeProps(z,s,c,f,C),className:classNames(dp({isHovered:m,isSelected:l,isFocusVisible:v,isDisabled:p,variant:r}),"BaselineUI-Tabs-TabButton",b),style:y,ref:i,children:[u?jsx(u,{size:20}):null,d,t?jsx(M,{variant:"secondary",elementType:"div",icon:XIcon,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",color:"inherit",opacity:l||g||m?1:0}}):null]})};gp.displayName="TabButton";var _p=Po.forwardRef(({children:e,...t},o)=>{let r=useMemo(()=>Po.Children.map(e,a=>!a||!Po.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(Ma,{...t,ref:o,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});_p.displayName="Tabs";var zp=({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);zp.displayName="TabItem";var hp={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 Cp=_({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),xp=_({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"]]}),Pp=_({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),kp=_({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Rp=_({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),wp=_({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),Ip=_({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var V_={error:{sm:ErrorAltFilledIcon,md:ErrorAltFilledIcon$1},info:{sm:InfoFilledIcon,md:InfoFilledIcon$1},success:{sm:CheckFilledIcon,md:CheckFilledIcon$1},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Tp=Po.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:l,size:p="sm"},c)=>{let m=B(hp),d=o&&jsx(H,{variant:s==="compact"?"tertiary":"ghost",label:o,onPress:r}),u=V_[n][p];return jsxs("div",{className:classNames(xp({variant:n,arrangement:s,hasButton:!!o||!!l,hasCloseButton:!!l}),e),style:a,role:"alert",ref:c,children:[jsxs("div",{className:Ip({arrangement:s}),children:[jsx(u,{className:Rp({variant:n}),size:16}),jsxs("div",{className:Cp({arrangement:s}),children:[jsx("h3",{className:wp({size:p}),children:i}),jsx("section",{className:Pp({size:p}),children:t})]}),s==="compact"&&d]}),jsxs("div",{className:kp({arrangement:s}),children:[s!=="compact"&&d,l?jsx(M,{variant:"secondary",icon:CloseIcon,size:"sm",onPress:l,"aria-label":m.formatMessage("close")}):null]})]})});Tp.displayName="InlineAlert";var Np=_({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z6105",title:"_1yep5z6105",label:"_1yep5z6106",value:"_1yep5z6106",helper:"_1yep5z6107",body:"_1yep5z6105"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61jz"],[{type:"title",size:"md"},"_1yep5z61k2"],[{type:"title",size:"lg"},"_1yep5z61k5"],[{type:"body",size:"sm"},"_1yep5z61kp"],[{type:"body",size:"md"},"_1yep5z61ks"],[{type:"body",size:"lg"},"_1yep5z61ks"],[{type:"subtitle",size:"sm"},"_1yep5z61kl"],[{type:"subtitle",size:"md"},"_1yep5z61ko"],[{type:"subtitle",size:"lg"},"_1yep5z61ko"],[{type:"label",size:"md"},"_1yep5z61kn"],[{type:"label",size:"lg"},"_1yep5z61kn"],[{type:"value",size:"md"},"_1yep5z61kn"],[{type:"value",size:"lg"},"_1yep5z61kn"],[{type:"helper",size:"sm"},"_1yep5z61kh"]]});var Z=Po.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Np({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));Z.displayName="Text";var Sp=_({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie",variantClassNames:{background:{subtle:"_1yep5z6113",medium:"_1yep5z6114"}},defaultVariants:{},compoundVariants:[]}),Mp="siobe24",Lp="var(--siobe20)";var rt=Po.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":i,onCloseRequest:s,...l},p)=>{let{formatMessage:c}=B(),m=Po.useRef(null),{dialogProps:d,titleProps:u}=useDialog(l,m);return jsxs("div",{...d,className:classNames(Sp({background:r}),"BaselineUI-Drawer",e),"data-block-id":i,style:t,ref:mergeRefs(p,m),children:[jsxs(D,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Mp,children:[jsx(Z,{type:"title",size:"sm",...u,className:mi,children:a}),jsxs(D,{children:[n?jsx(M,{...n,variant:"secondary"}):null,jsx(M,{variant:"secondary",size:"md",icon:XIcon$1,onPress:s,"aria-label":c(W_.close)})]})]}),jsx(F,{variant:r==="subtle"?"primary":"secondary"}),o]})});rt.displayName="Drawer";var W_=q({close:{id:"close",defaultMessage:"Close"}});function Ep(e,t,o){let{isDisabled:r}=e,a=useReducedMotion(),[n,i]=Po.useState("100vh");useEffect(()=>{if(!isIOS()&&!isAndroid())return;let u=getOwnerWindow(o.current);function y(){i(`${u?.visualViewport.height}px`);}return y(),u?.visualViewport.addEventListener("resize",y),()=>{u?.visualViewport.removeEventListener("resize",y);}},[o]);let[{y:s},l]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),p=useRef(0),c=useCallback(()=>{l.start({y:p.current,onRest:()=>{t.close();}});},[l,t]),m=useCallback(u=>{u.target.closest("[data-drawer]")||c();},[c]);useGranularLayoutEffect(()=>{p.current=o.current?.offsetHeight||0,l.set({y:p.current}),l.start({y:0,immediate:!!a});},[],[l,a]);let d=s.to({range:[0,p.current/2,p.current],output:[.5,.2,0],extrapolate:"clamp"}).to(u=>`rgba(0,0,0,${u})`);return {overlayProps:{style:r?void 0:{transform:s.to(u=>`translateY(${u}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:d},onPointerDown:r?void 0:m},close:c,containerHeight:r?void 0:n}}var Fp=_({defaultClassName:"aml2vl0 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hr _1yep5z6hs _1yep5z6ht",variantClassNames:{enableDrawer:{false:"_1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),Hp="_1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6g2 _1yep5z6hr _1yep5z6hs _1yep5z6ht";var Le=Po.createContext({state:null,triggerProps:{},overlayProps:{}}),be=({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(Le.Provider,{value:n,children:e})};be.displayName="Modal";var Ea=Po.createContext({isDrawer:!1,closeDrawer:()=>{}}),b6=animated(lo),g6=({children:e,className:t,style:o,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":l})=>{let{state:p}=Po.useContext(Le),c=no(n),m=ie(n),d=typeof s=="boolean"&&s||s==="auto"&&c==="mobile";invariant(p,"ModalContent must be a child of Modal");let u=Po.useRef(null),y=typeof r=="function"?r(d):r,b=typeof a=="function"?a(d):a,{underlayProps:f,overlayProps:v,close:g,containerHeight:z}=Ep({isDisabled:!d,isDismissable:y},p,u),{modalProps:C,underlayProps:k}=useModalOverlay({isDismissable:!d,isKeyboardDismissDisabled:b},p,u),{theme:h}=useContext(so),I=useReducedMotion(),x=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!I||i,config:{easing:easings.easeInBounce}}),N=useMemo(()=>({...C.style,...d?{...v.style,width:"100%"}:x}),[v.style,C.style,d,x]),T=useMemo(()=>({isDrawer:d,closeDrawer:g}),[d,g]);return jsx(Overlay,{portalContainer:m,children:jsx(Ea.Provider,{value:T,children:jsxs(b6,{className:classNames(Fp({enableDrawer:d}),t),theme:h,"data-block-id":l,style:{...o,height:d?z:"auto",...assignInlineVars({[Lp]:z})},children:[jsx(animated.div,{...mergeProps(k,f),onPointerDown:d?f.onPointerDown:k.onPointerDown,"data-testid":"underlay",style:f.style,className:classNames(Hp,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(C,v),style:N,ref:u,"data-drawer":d,className:"BaselineUI-Modal-Content",children:e})]})})})},v6=animated(g6),he=({children:e,style:t,...o})=>{let{state:r}=Po.useContext(Le);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(v6,{...o,style:{...t,...i},children:typeof e=="function"?e({close:r.close}):e}))};var qp=_({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6fs _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z6121 _1yep5z616i _1yep5z616k",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg _1yep5z6166"}},defaultVariants:{},compoundVariants:[]});var Ha=Po.createContext({titleProps:{}}),se=Po.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,drawerBackground:s,...l},p)=>{let c=Po.useRef(null),m=Po.useRef(null),{isDrawer:d,closeDrawer:u}=useContext(Ea),[y,b]=Po.useState("");useLayoutEffect(()=>{let z=m.current?.getRootNode(),C=l["aria-label"]||"";l["aria-labelledby"]&&(C=z?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(C);},[l]);let{dialogProps:f,titleProps:v}=useDialog(l,c),g=useMemo(()=>({titleProps:v}),[v]);return d&&r?jsx(rt,{title:y,onCloseRequest:u,className:t,...l,"data-drawer":!0,"data-block-id":i,ref:mergeRefs(m,p),background:s,children:e}):jsx(Ha.Provider,{value:g,children:jsx("section",{...f,"data-block-id":i,ref:mergeRefs(c,p),style:o,className:classNames(qp({size:d?"content":a,variant:n,isDrawer:d}),"BaselineUI-Dialog",t),children:e})})});se.displayName="Dialog";var Wp=Po.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(Ha),n=Po.isValidElement(e)?Slot:"h3";return jsx(n,{...a,ref:r,className:t,style:o,children:e})});Wp.displayName="DialogTitle";var Be={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 nt=({children:e})=>{let{triggerProps:t}=Po.useContext(Le);return jsx(Slot,{...t,children:e})};nt.displayName="ModalTrigger";var B6=({children:e})=>{let{state:t}=Po.useContext(Le);return jsx(Slot,{onPress:()=>t?.close(),children:e})};var De=Po.forwardRef((e,t)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(Vo);return invariant(a),o?.isOpen?jsx(ae,{ref:t,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:o}):null});De.displayName="PopoverContent";var Xp="_1dbkl5v",Yp="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jr _1yep5z6js _1yep5z6jt",$p="_1dbkl5e",Zp=_({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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l6 _1yep5z6ky _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6kx _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z6109"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Qp=_({defaultClassName:"_1dbkl50 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6nq _1yep5z6nr _1yep5z6ns",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),it="_1dbkl5t _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69f _1yep5z69g _1yep5z69h",Jp="_1dbkl5f z9nup87",st="_1dbkl5u _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn",ed=_({defaultClassName:"_1dbkl5h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kx _1yep5z6ks",variantClassNames:{isFocusVisible:{true:"_1dbkl5i _1dbkl5g"},isDisabled:{true:"_1yep5z6yl"},removeBlendMode:{true:"_1dbkl5k"},isSelected:{true:"_1dbkl5g"},isHovered:{true:"_1dbkl5g"}},defaultVariants:{},compoundVariants:[]}),od="_1dbkl5s _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ky",lt="_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn",rd="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ir _1yep5z6is _1yep5z6it",pt=_({defaultClassName:"_1dbkl5p _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6me _1yep5z6mf _1yep5z6mg"}},defaultVariants:{},compoundVariants:[]}),Va="_1dbkl514 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib",td="_1dbkl53",ad=_({defaultClassName:"_1dbkl5z _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6l7 _1yep5z6gq _1yep5z6ky _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl510 _1yep5z611y"},isHovered:{true:"_1dbkl511"},allowAlpha:{false:"_1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6166"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61nd"]]}),nd=_({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 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f0 _1yep5z6kx _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kl",variantClassNames:{isHovered:{true:"_1yep5z6115"},isFocusVisible:{true:"_1yep5z616c _1yep5z616a _1yep5z616d _1yep5z612n"},isDisabled:{true:"_1yep5z610d"}},defaultVariants:{},compoundVariants:[]}),Jo="_1dbkl513",dt="_1dbkl5o _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",ct="_1dbkl5r _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",Oa="_1dbkl516",id="_1dbkl515",Aa="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69l _1yep5z69m _1yep5z69n",mt=_({defaultClassName:"_1dbkl5w _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l2 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6l7 _1yep5z6la",variantClassNames:{isFocusVisible:{true:"_1dbkl5x _1yep5z616a _1yep5z612n _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),ja="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ko _1yep5z6kp _1yep5z6kr _1yep5z6kq _1yep5z6ho _1yep5z6hp _1yep5z6hq";var Ke=({color:e,isFocusVisible:t,isDisabled:o,isSelected:r,isPresentational:a})=>{let n=e&&e!==Ce&&parseColor(e),i=n&&n.getChannelValue("alpha")===0,{hoverProps:s,isHovered:l}=useHover({isDisabled:o});return jsx("div",{...s,className:classNames(ed({removeBlendMode:!n,isFocusVisible:t,isDisabled:o,isSelected:r,isHovered:l&&!a&&!o}),{[Oo({size:"xs"})]:i}),children:n?jsxs(Fragment,{children:[jsx("div",{className:classNames(lt,Oo({size:"xs"}))}),jsx("div",{className:lt,style:{backgroundColor:i?void 0:n.toString("hexa")}})]}):jsx("div",{className:lt,children:jsx(NoneIcon,{size:14})})})};var pd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],zo=parseColor("#000000").toFormat("hsla"),Q="hsla",or="hexa";function Ge(e){return typeof e=="string"?parseColor(e).toFormat(Q):e?e.toFormat(Q):null}function dd(e,t){return e?.getChannelValue("alpha")?t?.toString(or)===e.toString(or):!t?.getChannelValue("alpha")}function cd(e,t,o){return t?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var Ce="NONE";function md(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString(or),label:a.label}))||[],r={id:Ce,label:e};return [...o,r]}var ut=(e,{optionProps:t,isFocusVisible:o,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...t,ref:a,"aria-label":e.value?.label||void 0,className:od,children:jsx(Ke,{color:e.value.id,isFocusVisible:o,isSelected:r})}));var fd=({value:e,...t})=>{let o=Po.useRef(null),r=Po.useRef(null),a=Po.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:i,gradientProps:s,xInputProps:l,yInputProps:p,thumbProps:c}=useColorArea({...t,value:e,inputXRef:o,inputYRef:r,containerRef:a},n);useEffect(()=>{o.current?.focus();},[]);let{focusProps:m,isFocusVisible:d}=useFocusRing();return jsxs("div",{ref:a,...i,className:classNames(Xp,"BaselineUI-ColorInput-ColorArea"),children:[jsx("div",{...s,className:td}),jsxs("div",{...c,className:classNames(mt({isFocusVisible:d}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...c.style,transform:"translate(-50%, -50%)",backgroundColor:Ge(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...l,...m}),jsx("input",{ref:r,...p,...m})]})]})};var vd=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:m=>{t(Ge(m)?.toFormat(Q).withChannelValue("alpha",e.getChannelValue("alpha")??1)||zo);}}),n=Po.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:l}=useFocusRing({isTextInput:!0}),{hoverProps:p,isHovered:c}=useHover({});return jsxs("div",{className:classNames(Va,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,p),ref:n,className:ad({isFocused:l,isHovered:c,allowAlpha:o})}),o?jsx(zd,{color:e,setColor:t}):null]})},_d=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(Va,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(ze,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Jo,onChange:n=>{t(r.withChannelValue("red",n).toFormat(Q));},step:1,minValue:0,maxValue:255}),jsx(ze,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Jo,onChange:n=>{t(r.withChannelValue("green",n).toFormat(Q));},step:1,minValue:0,maxValue:255}),jsx(ze,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Jo,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(Q));},step:1,minValue:0,maxValue:255}),o?jsx(zd,{color:e,setColor:t}):null]})},t5={style:"percent",maximumFractionDigits:0},zd=({color:e,setColor:t})=>{let{locale:o}=useLocale(),r=useCallback(a=>{t(e.withChannelValue("alpha",a));},[e,t]);return jsx(ze,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:t5,className:Jo,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var Ga=({channel:e,...t})=>{let{locale:o}=useLocale(),r=useColorSliderState({...t,channel:e,locale:o}),a=Po.useRef(null),n=Po.useRef(null),{trackProps:i,thumbProps:s,inputProps:l}=useColorSlider({...t,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:p,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(st,{[Oo({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:ja}),jsx("div",{className:st,style:i.style}),jsxs("div",{className:classNames(mt({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:ja,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:st}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...l,...p})})]})]})};var yt=({color:e,setColor:t,allowAlpha:o})=>{let[r,a]=Po.useState("hex"),{formatMessage:n}=B(Be);return jsxs(Fragment,{children:[jsx(fd,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:t}),jsxs("div",{className:Aa,children:[jsx(Ga,{channel:"hue",value:e,onChange:t}),o?jsx(Ga,{channel:"alpha",value:e,onChange:t}):null]}),jsxs("div",{className:classNames(Aa,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Qr,{label:n("colorFormat"),labelPosition:"start",variant:"ghost",items:pd,selectedKey:r,onSelectionChange:i=>{a(i);}}),r==="hex"&&jsx(vd,{color:e,setColor:t,allowAlpha:o}),r==="rgb"&&jsx(_d,{color:e,setColor:t,allowAlpha:o})]})]})};var Ya=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{formatMessage:l}=B(Be),p=Po.useRef(null),c=no(p.current),[m,d]=Zi(o,[]),u=Po.useRef(null),[y,b]=Po.useState(e),f=Po.useMemo(()=>m.map(h=>({id:h,label:h,description:h})),[m]),v=useCallback(()=>{let h=i==="active"?e:y;if(m.includes(h.toString(Q))){u.current?.querySelector(`[data-key='${h.toString(Q)}']`)?.classList.add(Oa);return}d([...m,h.toString(Q)]);},[m,e,d,y,i]);useEffect(()=>{let h=u.current;function I(x){x.animationName===id&&x.target?.classList.remove(Oa);}return h?.addEventListener("animationend",I),()=>{h?.removeEventListener("animationend",I);}},[]);let g=useId(),z=jsx(M,{ref:p,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?v:void 0}),C=useCallback(h=>jsxs(se,{size:"content",className:pt({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(yt,{color:y,setColor:b,allowAlpha:s}),jsx(F,{}),jsx(D,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(D,{display:"inline-flex",gap:"lg",children:[jsx(H,{label:l("cancel"),size:"sm",variant:"secondary",onPress:h}),jsx(H,{label:l("add"),variant:"primary",onPress:()=>{v(),h();},size:"sm"})]})})]}),[y,v,l,s]),k=useCallback(h=>{invariant(h instanceof Set,"Key must be a set");let I=[...h][0];I&&t(parseColor(I).toFormat(Q));},[t]);return jsxs(Fragment,{children:[jsx(F,{}),jsxs("div",{className:classNames(rd,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:g,children:n}),jsxs(D,{display:"flex",children:[!!m.length&&m.includes(e.toString(Q))&&jsx(M,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(h=>h!==e.toString(Q)));}}),i==="active"&&z,i==="lazy"&&(c==="mobile"?jsxs(be,{children:[jsx(nt,{children:z}),jsx(he,{style:{zIndex:1e5},children:({close:h})=>C(h)})]}):jsx(Oe,{type:"dialog",children:({close:h})=>jsxs(Fragment,{children:[jsx(Ae,{children:z}),jsx(De,{placement:"right top",className:dt,offset:6,children:C(h)})]})}))]})]}),!!m.length&&jsx(re,{items:f,layout:"grid","aria-labelledby":g,className:classNames(it,ct,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:ut,ref:u,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(Q)],onSelectionChange:k})]})};var $a=Po.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=B(Be),l=useCallback(p=>{if(p instanceof Set&&p.size){let c=[...p][0],m=a.find(d=>d.id===c);invariant(m,"Preset not found"),e(m.id===Ce?null:parseColor(m.id).toFormat(Q)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(ct,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:i,children:jsx(re,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:it,renderOption:ut,selectionMode:"single",selectedKeys:[t?.toString(or)||Ce],onSelectionChange:l})})});$a.displayName="ColorPresetList";var Qa=Po.forwardRef((e,t)=>{let o=Po.useRef(null),{hoverProps:r,isHovered:a}=useHover({isDisabled:e.isDisabled}),{buttonProps:n,isPressed:i}=useButton(e,o),{isFocusVisible:s,focusProps:l}=useFocusRing(),p=filterTruthyValues({"data-block-id":e["data-block-id"],"data-focused":s,"data-focus-visible":s,"data-disabled":e.isDisabled,"data-hovered":a,"data-pressed":i});return jsx("button",{...mergeProps(n,r,l,p),style:e.style,className:classNames(Zp({isHovered:a,isFocusVisible:s||e.isOpen,isDisabled:e.isDisabled,labelPosition:e.labelPosition}),"BaselineUI-ColorInputButton",e.className),ref:mergeRefs(t,o),children:e.children})});Qa.displayName="ColorInputButton";var Dd=Po.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=Po.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:l,isPressed:p}=useButton(r,n),{isFocusVisible:c,focusProps:m}=useFocusRing(),d=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":p});return jsxs("button",{...mergeProps(l,i,m,d),ref:mergeRefs(a,n),style:t,className:classNames(nd({isHovered:s||p||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(o,{size:16}),jsx("div",{className:$p,style:{backgroundColor:r.color}})]})});Dd.displayName="IconColorInputButton";var rr=Po.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:l,defaultValue:p,storePickedColorKey:c="baselinePickedColor",value:m,addColorButtonLabel:d,removeColorButtonLabel:u,customColorsLabel:y,renderTriggerButton:b,pickerMode:f="active",offset:v=2,placement:g=n==="start"?"bottom end":"bottom start","data-block-id":z,...C},k)=>{let h=Po.useRef(null),I=Po.useRef(null),x=useOverlayTriggerState(C),{triggerProps:N,overlayProps:T}=useOverlayTrigger({type:"listbox"},x,h),w=ie(C.portalContainer),[R,L]=useControlledState(m===void 0?void 0:Ge(m),Ge(p),j=>l?.(j?.toFormat("rgba")||null)),{formatMessage:P}=B(Be),S=useMemo(()=>md(P("noColor"),a),[a,P]),U=useMemo(()=>S.find(j=>j.id===Ce?!R:R?dd(R,parseColor(j.id)):!1),[S,R]),K=useId(),J=useMemo(()=>typeof i=="function"?i?.(R):i?cd(R,U,P("transparent")):!1,[R,i,P,U]),G=useMemo(()=>S.filter(j=>o||j.id!==Ce),[S,o]),ee=d||P("addColor"),W=u||P("removeColor"),V=y||P("customColors");return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Yp]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":z,style:t,ref:k,children:[C.label?jsx("label",{id:K,className:Qp({labelPosition:n}),children:C.label}):null,b?.({isOpen:x.isOpen,color:R,ref:h,colorName:J,triggerProps:N})||jsxs(Qa,{...mergeProps(N,{...C.label?{"aria-labelledby":K}:{"aria-label":C["aria-label"]}}),ref:h,isOpen:x.isOpen,isDisabled:C.isDisabled,labelPosition:n,children:[jsx(Ke,{isPresentational:!0,color:R?.toString("hexa")}),i?jsx("div",{className:Jp,children:J}):jsx(VisuallyHidden,{children:J})]})]}),x.isOpen?jsx(ae,{...C,portalContainer:w,placement:g,state:x,offset:v,className:classNames(dt,"BaselineUI-ColorInput-Popover"),triggerRef:h,overlayProps:T,children:jsxs(se,{size:"content",className:pt({includesCustomColorPicker:s}),ref:I,"aria-labelledby":K,"aria-label":C["aria-label"],children:[s&&f==="active"?jsxs(Fragment,{children:[jsx(yt,{color:R||zo,setColor:L,allowAlpha:r}),jsx(Ya,{color:R||zo,setColor:L,storePickedColorKey:c,addColorButtonLabel:ee,removeColorButtonLabel:W,customColorsLabel:V,pickerMode:f,allowAlpha:r})]}):null,!!G.length&&jsxs(Fragment,{children:[s&&f==="active"?jsx(F,{}):null,jsx($a,{autoFocus:s&&f==="active"?!1:"first",state:x,triggerRef:h,presets:G,color:R,setColor:L})]}),s&&f==="lazy"?jsx(Ya,{color:R||zo,setColor:L,storePickedColorKey:c,addColorButtonLabel:ee,removeColorButtonLabel:W,customColorsLabel:V,pickerMode:f,allowAlpha:r}):null]})}):null]})});rr.displayName="ColorInput";var Fd={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 vt=_({defaultClassName:"mnnh5s1 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6ki _1yep5z6kl _1yep5z6kx _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6vw _1yep5z6vx _1yep5z6vy _1yep5z6wk _1yep5z6wl _1yep5z6wm _1yep5z6x8 _1yep5z6x9 _1yep5z6xa _1yep5z6xw _1yep5z6xx _1yep5z6xy _1yep5z6122 _1yep5z616j _1yep5z616k",false:"_1yep5z6166 _1yep5z6116"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6115"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 _1yep5z6yl"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61mo"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61nd"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61mg"]]}),Hd="_1yep5z6d8",_t=_({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Vd=_({defaultClassName:"_1i0ytqa3 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6kw _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z611e",false:"_1yep5z611g"},isDisabled:{true:"_1i0ytqa7 _1yep5z6yl",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61n9 _1yep5z61rt _1yep5z61rv"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61mp"],[{isInline:!1,isDisabled:!0},"_1yep5z61mr"]]}),Od="_1i0ytqa0",zt=_({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z6115"},isDisabled:{true:"_1i0ytqad _1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),Ad=_({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jr _1yep5z6js _1yep5z6jt _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kv",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});var W5={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},Ud=Po.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:l,onChangeEnd:p,enableHistory:c=!1,isInline:m=!0,isDisabled:d,placeholder:u,clearLabel:y,undoLabel:b,redoLabel:f,footerClassName:v,canvasRef:g,value:z,footerStyle:C,"data-block-id":k,"aria-label":h="Drawing canvas",description:I="This is a canvas for drawing using a mouse or touch input.",...x},N)=>{let T=B(Fd),w=Po.useRef(null),[R,L]=Po.useState(z?tn(z):l?tn(l):[]),P=Po.useRef((z?.length||l?.length||0)-1),[S,U]=Po.useState(),K=useId(),{labelProps:J,fieldProps:G}=useLabel({...x,"aria-label":h,labelElementType:"span"}),{isFocusVisible:ee,focusProps:W}=useFocusRing({within:!0}),{hoverProps:V,isHovered:j}=useHover({isDisabled:d}),{undo:$,redo:ve,canRedo:ke,canUndo:de,push:_e}=Gi(R,{onAction:E=>{E&&(L(E),P.current=E.length-1,p?.(E.map(me=>getStroke(me,A))));},isDisabled:!c}),{keyboardProps:te}=useKeyboard({onKeyDown:E=>{E.key==="Backspace"?vr():E.key==="z"&&(E.metaKey||E.ctrlKey)&&(E.shiftKey?ke&&ve():de&&$());}}),A=Po.useMemo(()=>({...W5,...x}),[x]),ce=useCallback(E=>{E.persist(),E.buttons===1&&(invariant(S,"svgCoordinates must be defined"),L(me=>{let O=[...me];return O[P.current]=[...O[P.current],{x:a?clamp(E.clientX-S.left,0,S.width):E.clientX-S.left,y:a?clamp(E.clientY-S.top,0,S.height):E.clientY-S.top,pressure:E.pressure}],O}));},[S,a]),At=useCallback(E=>{E.persist();let me=E.currentTarget.getBoundingClientRect();U(me),E.target.setPointerCapture(E.pointerId),P.current+=1,L(O=>{let ne=[...O];return ne[P.current]=[{x:E.clientX-me.x,y:E.clientY-me.y,pressure:E.pressure}],ne});},[]),gr=Ne();useGranularEffect(()=>{gr||s?.(R.map(E=>getStroke(E,A)));},[R],[s,A,gr]);let vr=()=>{L([]),P.current=-1,_e([]);},jt=useCallback(()=>{p?.(R.map(E=>getStroke(E,A))),_e(R);},[R,p,A,_e]);return jsxs("div",{ref:mergeRefs(w,N),className:classNames(Od,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":d,"data-block-id":k,children:[x.label||c?jsxs("div",{className:Ad({isInline:m}),children:[x.label?jsx(Z,{type:"label",size:"sm",...J,children:x.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(M,{variant:"secondary",size:"sm",isDisabled:!de||d,icon:UndoIcon,onPress:$,"aria-label":b||T.formatMessage("undo")}),jsx(M,{variant:"secondary",size:"sm",isDisabled:!ke||d,icon:RedoIcon,onPress:ve,"aria-label":f||T.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(W,te,V,G),tabIndex:d?void 0:0,className:classNames(vt({isInline:m,isHovered:j}),Vd({isFocusVisible:ee,isInline:m,isDisabled:!!d}),o),"aria-describedby":x["aria-describedby"]||K,style:r,ref:g,children:[jsx(VisuallyHidden,{children:jsx("div",{id:K,children:I})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:At,onPointerMove:ce,onPointerUp:jt,children:(z?tn(z):R).map((E,me)=>jsx("path",{d:getSvgPathFromStroke(getStroke(E,A)),stroke:i,strokeWidth:n},me))})]}),u||y?jsx("div",{style:C,className:classNames(zt({isInline:m,isDisabled:d}),v),children:(R.length||!u)&&y?jsx(H,{size:"sm",variant:"ghost",label:y,isDisabled:d,onPress:vr}):jsx(H,{size:"sm",variant:"ghost",label:u,isDisabled:!0})}):null]})});Ud.displayName="FreehandCanvas";var tn=e=>e.map(t=>t.map(([o,r])=>({x:o,y:r,pressure:0})));var qd="_1vac7ws0",Kd=_({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Wd(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 Xd(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 cz=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),$d=Po.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:l,onDoubleClick:p,onDragStart:c,onDragEnd:m,onDrag:d,onResizeStart:u,onResizeEnd:y,onResize:b,onRotateStart:f,onRotateEnd:v,onRotate:g,onSnap:z,isSnappable:C,elementGuidelines:k,hideAnchorOnDrag:h=!0,title:I,rotationPosition:x,autoUpdate:N,bound:T,snapRotationDegrees:w,snapRotationThreshold:R,scrollableAncestor:L,renderDirections:P,stopPropagation:S,transformOrigin:U,preventDefault:K},J)=>{let G=useRef(null),ee=useRef(null),[W,V]=useState(document),j=useRef(W.createElement("div")),[$,ve]=useState({}),[ke,de]=useState(!1),[_e,te]=useState(!1),[A,ce]=useState(),At=Wd(k,W);useLayoutEffect(()=>{let O=j.current;return j.current=W.createElement("div"),()=>{O.remove();}},[W]);let{keyboardProps:gr}=useKeyboard({onKeyDown:O=>{let ne=O.shiftKey?10:1,ye=O.metaKey||O.ctrlKey;ye&&O.shiftKey&&(ne=45);function Ve(Do,Cu="x"){ye?ee.current?.request("rotatable",{deltaRotate:Do*ne},!0):ee.current?.request("draggable",Cu==="x"?{deltaX:Do*ne}:{deltaY:Do*ne},!0);}switch(O.key){case"ArrowRight":{Ve(1);break}case"ArrowLeft":{Ve(-1);break}case"ArrowUp":{Ve(-1,"y");break}case"ArrowDown":Ve(1,"y");}requestAnimationFrame(()=>{ee.current?.updateRect();});}});useEffect(()=>{let O=getOwnerDocument(G.current);V(O);let ne=j.current;O.body.append(j.current);function ye(Do){te(Do.shiftKey);}function Ve(){te(!1);}return O.addEventListener("keydown",ye),O.addEventListener("keyup",Ve),()=>{O.removeEventListener("keydown",ye),O.removeEventListener("keyup",Ve),ne.remove();}},[]),Xd({scrollable:L,onScroll:()=>{ee.current?.updateRect();},ownerDocument:W});let vr=useCallback(O=>{ve(ne=>({...ne,...O.style})),i?.(O);},[i]),jt=useCallback(O=>{if(de(!0),G.current?.focus(),T){let ye=getHTMLElement(T,W)?.getBoundingClientRect();ce({position:"client",left:ye?.left??0,top:ye?.top??0,right:ye?.right??0,bottom:ye?.bottom??0});}c?.(O);},[T,W,c]),E=useCallback(O=>{de(!1),m?.(O);},[m]),me=t({style:{...$.width&&{width:$.width},...$.height&&{height:$.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...gr,ref:mergeRefs(G,J),style:{display:"inline-block",...n,...$},className:classNames(qd,e),onDoubleClick:p,tabIndex:0,title:I,children:me}),createPortal(jsx(cz,{ref:ee,target:G,draggable:a,resizable:r,rotatable:o,keepRatio:_e,throttleDrag:1,snappable:C||!!T,elementGuidelines:At,snapRenderThreshold:.9,className:Kd({isDragging:ke&&h}),onRender:vr,onDragStart:jt,onDragEnd:E,useResizeObserver:N,useMutationObserver:N,onRenderEnd:l,onDrag:d,onResizeStart:u,onResizeEnd:y,onResize:b,onRotateStart:f,onRotateEnd:v,onRotate:g,onRenderStart:s,onSnap:z,rotationPosition:x,bounds:A,snapRotationDegrees:w,snapRotationThreshold:R,renderDirections:P,stopPropagation:S,preventDefault:K,transformOrigin:U}),j.current)]})});$d.displayName="Transform";var Zd={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 ec=Po.forwardRef(({className:e,style:t,isInline:o=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:l,onDrop:p,onPaste:c,includeCheckeredBackground:m=!0,"data-block-id":d,pickerButtonStyle:u,pickerButtonClassName:y,footerClassName:b,footerStyle:f,clearLabel:v,placeholder:g,labelStyle:z,labelClassName:C,...k},h)=>{let I=Po.useRef(null),x=Po.useRef(null),{formatMessage:N}=B(Zd),[T,w]=useControlledState(n,a||null,A=>{invariant(typeof A!="string"),k.onValueChange?.(A?[A]:[]);}),R=useMemo(()=>kz(T||void 0),[T]),{fieldProps:L,labelProps:P}=useField(k),{dropProps:S,isDropTarget:U}=useDrop({ref:I,onDrop:async A=>{if(l)return;let ce=await ya({items:A.items});ce.length&&w(ce[0]),p?.(A);},...k}),{clipboardProps:K}=useClipboard({onPaste:async A=>{if(l)return;let ce=await ya({items:A});ce.length&&w(ce[0]),c?.(A);},...k}),J=()=>{w(null),x.current&&(x.current.value="");},G={type:"file",onChange:A=>{let ce=[...A.target.files];w(ce[0]),k.onChange?.(A);},accept:r,disabled:l},{focusProps:ee,isFocused:W,isFocusVisible:V}=useFocusRing({within:!0}),{hoverProps:j,isHovered:$}=useHover({isDisabled:l}),{imgProps:ve,isLoading:ke,isLoaded:de}=ao({src:R,alt:i||""}),_e={label:s||N("selectImage"),onPress:()=>I.current?.click(),variant:"secondary",isDisabled:l,excludeFromTabOrder:!0,className:classNames(Rr({isFocusVisible:V}),{[Hd]:U&&!l},y),style:u},te=filterTruthyValues({"data-loaded":de,"data-block-id":d,"data-hovered":$,"data-focused":W,"data-drop-target":U,"data-disabled":l,"data-focus-visible":V});return jsxs(D,{...te,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:t,ref:h,children:[jsxs("label",{...mergeProps(S,j,ee,P),className:classNames(vt({isInline:o,isHovered:$,isDisabled:l,hasLoadedImage:!!R&&de,showFocusRing:U||!!R&&V}),C),style:z,ref:I,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(L,K,G),ref:x})}),!R&&jsx(H,{..._e}),!!R&&(ke?jsx(go,{}):jsx("img",{className:_t({isInline:o,isDisabled:l,hasLoadedImage:!!R&&de&&m}),...ve}))]}),g||v?jsx("div",{style:f,className:classNames(zt({isInline:o,isDisabled:l}),b),children:(R||!g)&&v?jsx(H,{size:"sm",variant:"ghost",label:v,isDisabled:l,onPress:J}):jsx(H,{size:"sm",variant:"ghost",label:g,isDisabled:!0})}):null]})});ec.displayName="ImageDropZone";function kz(e){return e instanceof File?URL.createObjectURL(e):e}var oc="_1vm2oh49 _1yep5z6ho _1yep5z6hp _1yep5z6hq _1yep5z6fv",ln="_1vm2oh48 _1yep5z6kw _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6jc _1yep5z6jd _1yep5z6je",rc=_({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6l1 _1yep5z6kz _1yep5z6hk _1yep5z6l2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6ki _1yep5z6kx _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z6121 _1yep5z616i _1yep5z616k",false:"_1yep5z611g"},isFocusVisible:{true:"_1yep5z6126 _1yep5z616c _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6yl"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61mp"],[{accent:"theme",isInline:!0},"_1yep5z61me"],[{accent:"positive",isInline:!1},"_1yep5z61mr"],[{accent:"theme",isInline:!1},"_1yep5z61mg"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61ny _1yep5z61rl _1yep5z61rn _1yep5z61ro"],[{isHovered:!0,isInline:!0},"_1yep5z61ro _1yep5z61ny _1yep5z61rl _1yep5z61rn"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61mq"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61mi"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61mf"]]});var nc=Po.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:l,onPress:p,onDelete:c,deleteAriaLabel:m,addAriaLabel:d,accent:u="positive","data-block-id":y,...b},f)=>{let{focusProps:v,isFocused:g,isFocusVisible:z}=useFocusRing({within:!0}),{isHovered:C,hoverProps:k}=useHover({isDisabled:o}),{pressProps:h}=usePress({isDisabled:o,onPress:p});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let I=filterTruthyValues({"data-hovered":C,"data-focus-visible":z,"data-focused":g,"data-disabled":o});return jsxs("div",{...b,className:classNames(rc({isInline:r,isFocusVisible:z,isDisabled:o,isHovered:C,accent:u}),"BaselineUI-Preview",e),"data-block-id":y,"aria-label":b["aria-label"]||a||s,style:t,ref:f,children:[typeof i=="string"?jsx("button",{disabled:o,...mergeProps(k,v,h,I),className:ln,"aria-label":d,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(k,v,h,I),disabled:o,style:l,"aria-label":d,className:ln,children:[n?jsx("img",{src:n,alt:a,className:_t({isInline:r,isDisabled:o})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(M,{isDisabled:o,className:oc,"aria-label":m,size:"xs",icon:TrashIcon,onPress:c}):null]})});nc.displayName="Preview";var ic="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69c _1yep5z69d _1yep5z69e",sc=_({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),lc="cw3m0n7",pc=_({defaultClassName:"cw3m0n0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6i9 _1yep5z6ia _1yep5z6ib",variantClassNames:{labelPosition:{end:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6ut _1yep5z6uu _1yep5z6uv",start:"_1yep5z613q _1yep5z613r _1yep5z613s _1yep5z6152 _1yep5z6153 _1yep5z6154"}},defaultVariants:{},compoundVariants:[]}),dc="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ks",cc=_({defaultClassName:"cw3m0n3 _16vugd05",variantClassNames:{isFocusVisible:{true:"_16vugd08"},isSelected:{true:"_16vugd07"},isDisabled:{true:"_16vugd0a"}},defaultVariants:{},compoundVariants:[]});var jz=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:pc({labelPosition:n}),children:[jsx("div",{className:cc({isSelected:o,isFocusVisible:r,isDisabled:a}),children:o?jsx("div",{className:lc}):null}),e?jsxs("div",{className:ic,children:[jsx("span",{className:Kr({isDisabled:a}),children:e}),t?jsx("span",{className:sc({isDisabled:a}),children:t}):null]}):null]}),mc=({state:e,renderOption:t=jz,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let l=!!s.isDisabled||!!s.disabledValues?.includes(o.id),p=Po.useRef(null),{inputProps:c,isPressed:m,isSelected:d}=useRadio({...s,isDisabled:l,children:o.label,value:o.id},e,p),{focusProps:u,isFocusVisible:y,isFocused:b}=useFocusRing(),{isHovered:f}=useHover({isDisabled:l}),v=filterTruthyValues({"data-selected":d,"data-focused":b,"data-focus-visible":y,"data-hovered":f,"data-disabled":l,"data-pressed":m,"data-read-only":i});return jsxs("label",{...v,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,u),ref:p})}),t(o,{isFocusVisible:y,isSelected:d,isFocused:b,isHovered:f,isDisabled:l,optionLabelPosition:r,isReadOnly:i})]})};var kt=Po.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":l,"aria-describedby":p,"aria-details":c,"data-block-id":m,...d},u)=>{let y=useRadioGroupState(d),{radioGroupProps:b,labelProps:f,descriptionProps:v,errorMessageProps:g}=useRadioGroup({...d,"aria-label":s,"aria-labelledby":l,"aria-describedby":p,"aria-details":c},y),z=fe({...d,descriptionProps:v,errorMessageProps:g,labelPosition:n}),C=filterTruthyValues({"data-orientation":d.orientation,"data-block-id":m,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxs("div",{...mergeProps(b,C),className:classNames(Ie({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:u,children:[d.label||z?jsxs("div",{className:we({labelPosition:n,hasMessage:!!z}),children:[jsx("span",{...f,className:classNames(Re,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&z]}):null,jsxs("div",{className:classNames({[Qe]:d.isDisabled}),children:[jsx("div",{className:classNames(dc,o),style:r,children:a.map(k=>jsx(mc,{state:y,renderOption:i,item:k,value:k.id,...d},k.id))}),n==="top"&&z]})]})});kt.displayName="RadioGroup";var uc=({id:e,defaultMessage:t,elementType:o=Fragment$1})=>{invariant(e||t,"`id` or `defaultMessage` is required.");let r=B();return jsx(o,{children:r.formatMessage(e)||t})};uc.displayName="MessageFormat";var yc=Po.forwardRef(({className:e,style:t,children:o,role:r="group",isDisabled:a,...n},i)=>{let{hoverProps:s,isHovered:l}=useHover({isDisabled:a});return jsx("div",{...s,role:r,"data-hovered":l,"data-disabled":a,className:e,style:t,...n,ref:i,children:o})});yc.displayName="Group";var fc="_1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",bc="_1yep5z61ov _1yep5z61ow _1yep5z61ox _1yep5z61g1 _1yep5z61g2 _1yep5z61g3";var vc=Po.forwardRef(({items:e,optionsContainerClassName:t,...o},r)=>{let a=useMemo(()=>e.map(n=>({id:n.color,label:n.label})),[e]);return jsx(kt,{items:a,optionsContainerClassName:classNames(bc,t),orientation:"horizontal",renderOption:({label:n,id:i},{isSelected:s,isFocusVisible:l})=>jsxs("div",{className:fc,children:[jsx(Ke,{isFocusVisible:l,color:i,isSelected:s}),jsx(VisuallyHidden,{children:n})]}),...o,className:classNames(o.className,"BaselineUI-ColorPresetInput"),ref:r})});vc.displayName="ColorPresetInput";var yn="UNSUPPORTED_IN_MENU";function hc(e){return useMemo(()=>Po.Children.toArray(e).map(t=>{let o=t,r=uniqueId("item"),a=nr(o,Oe),n=zc(o),i,s;if(a){let v=nr(a,Ae);invariant(v),i=zc(v),s=nr(a,De).props.children;}else n?i=n:i=o;let{onPress:l,label:p,"aria-label":c,iconStart:m,isDisabled:d,icon:u}=i.props,y=p||c||yn;invariant(typeof y=="string","ActionGroup children must have a string label");let b=`${r}-${y}`;return createElement(Item,{...{key:b,onPress:l,textValue:y,"aria-label":c,icon:m||u,dialogContent:s,isDisabled:d},key:b},o)}),[e])}function nr(e,t){return t?flatMapDeep(Po.Children.toArray(e),r=>Po.isValidElement(r)&&r.props.children?[r,...Po.Children.toArray(r.props.children)]:[r]).find(r=>Po.isValidElement(r)&&r.type===t):void 0}function zc(e){return nr(e,H)||nr(e,M)}var Cc="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6hl _1yep5z6hm _1yep5z6hn _1yep5z6kv _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6kn",xc={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var bn=Po.forwardRef(({className:e,style:t,children:o,collapsibleMenuProps:r,collapsibleMenuTrigger:a,"data-block-id":n,renderSpacer:i,...s},l)=>{let{formatMessage:p}=B(),[c,m]=useState(),d=hc(o),u=useListState({...s,children:d}),y=useObjectRef(l),b=useRef(null),[{visibleItems:f,isMeasuring:v},g]=useValueEffect({visibleItems:u.collection.size,isMeasuring:!1}),z=useCallback(()=>{let T=w=>{if(b.current&&y.current){let R=[...b.current.children],L=y.current.getBoundingClientRect().width,P=w<u.collection.size,S=0,U=0;if(P){let K=R.pop();K&&(S+=wc(K,!1,!0));}for(let[K,J]of R.entries())if(S+=wc(J,K===0,K===R.length-1),Math.round(S)<=Math.round(L))U++;else break;return U}return w};g(function*(){yield {visibleItems:u.collection.size,isMeasuring:!0};let w=T(u.collection.size),R=w<u.collection.size&&w>0;yield {visibleItems:w,isMeasuring:R},R&&(yield {visibleItems:T(w),isMeasuring:!1});});},[g,y,u.collection.size]),C=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);useResizeObserver({ref:C,onResize:z}),useLayoutEffect$1(z,[u.collection,z]);let{toolbarProps:k}=useToolbar(s,y),h=[...u.collection],I=h.slice(0,f),x=h.slice(f).filter(T=>T.textValue!==yn),N=x.length>0;return useEffect(()=>{m(void 0);},[x.length]),useEffect(()=>{s.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[s.orientation]),jsxs(FocusScope,{children:[jsx("div",{...k,className:e,"data-block-id":n,"data-collapse":!0,style:{...t,flexBasis:v?"100%":void 0},ref:y,children:jsxs("div",{ref:b,className:Cc,children:[I.map(T=>T.rendered),N?jsxs(Fragment,{children:[!v&&i?.(),jsx(Ar,{placement:"bottom end",...r,disabledKeys:x.filter(T=>T.props?.isDisabled).map(T=>T.key),items:x.map(T=>{let w=T.textValue||T["aria-label"];return invariant(w,"ActionItem must have a label"),{id:T.key,label:w,icon:T.props.icon}}),onAction:T=>{let w=u.collection.getItem(T);invariant(w,"Item not found");let{onPress:R,dialogContent:L}=w.props;R?.(),m(L);},children:a||jsx(M,{variant:"toolbar",size:"md",icon:MoreIcon,"aria-label":p(Ch.more)})})]}):null]})}),jsx(be,{isOpen:!!c,onOpenChange:T=>{T||m(void 0);},children:jsx(he,{enableDrawer:"auto",style:{zIndex:1e5},children:c?Po.cloneElement(c,{inheritDrawer:!0}):null})})]})});bn.displayName="CollapsibleToolbar";function wc(e,t,o){let a=getOwnerWindow(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:Ic(a.marginLeft))+(o?0:Ic(a.marginRight))}function Ic(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var Ch=q({more:{id:"more",defaultMessage:"More"}});var gn=Po.forwardRef(({className:e,style:t,"data-block-id":o,"aria-controls":r,...a},n)=>{let i=Po.useRef(null),{toolbarProps:s}=useToolbar(a,i);return jsx("div",{...s,"aria-controls":r,className:classNames(xc[a.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":o,ref:mergeRefs(n,i),children:a.children})});gn.displayName="WrappedToolbar";var Rt=Po.forwardRef((e,t)=>{let o=e.isCollapsible?bn:gn;return jsx(o,{...e,ref:t})});Rt.displayName="Toolbar";var Nc=_({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),Sc=_({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z610d"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61rl _1yep5z61o5 _1yep5z61lo"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6ft"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61rm _1yep5z61rl _1yep5z61nz _1yep5z61lp"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61rl _1yep5z61rn _1yep5z61ny _1yep5z61ro"]]}),Mc=_({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1yep5z610c"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61ln"]]}),Lc=_({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z616d _1yep5z616c _1yep5z612n _1yep5z616a"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z610d"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61mg"],[{isSelected:!0,isDisabled:!1},"_1yep5z61mg _1yep5z61lq"],[{isSelected:!0,isDisabled:!0},"_1yep5z61mg _1yep5z61lo"]]}),Bc=_({defaultClassName:"_1j5skr70 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6kx _1yep5z6ky _1yep5z6ks _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6jl _1yep5z6jm _1yep5z6jn _1yep5z6fs _1yep5z6f0",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z610e"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61lp"],[{isSelected:!1,isDisabled:!0},"_1yep5z61lo _1yep5z61me"],[{isSelected:!1,isHovered:!0},"_1yep5z61mf"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61ro _1yep5z61rn _1yep5z61ny _1yep5z61rl"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]});var Vh={xxs:8,xs:12,sm:16,md:20,lg:24},Fe=Po.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,...i},s)=>{let l=useToggleState(i),{buttonProps:p,isPressed:c,ref:m}=kr(i,l),{hoverProps:d,isHovered:u}=useHover({isDisabled:i.isDisabled}),{isFocusVisible:y,isFocused:b,focusProps:f}=useFocusRing(),v=useMemo(()=>typeof o=="function"?o:l.isSelected?o.selected:o.unselected,[o,l.isSelected]),g={isSelected:l.isSelected,isHovered:u,isFocusVisible:y,isDisabled:!!i.isDisabled},z=filterTruthyValues({"data-hovered":u,"data-selected":l.isSelected,"data-focus-visible":y,"data-disabled":i.isDisabled,"data-block-id":n,"data-focused":b,"data-pressed":c});return jsx("button",{...mergeProps(p,d,f,z),className:classNames(a==="toolbar"&&Bc(g),a==="primary"&&Sc(g),a==="secondary"&&Mc(g),a==="tertiary"&&Lc(g),Nc({size:r}),"BaselineUI-ToggleIconButton",e),style:t,ref:mergeRefs(m,s),children:jsx(v,{size:Vh[r]})})});Fe.displayName="ToggleIconButton";var Ec="f6jv6bm",Fc="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6j0 _1yep5z6j1 _1yep5z6j2",Ro="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Hc=_({defaultClassName:"f6jv6b0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6fs",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6uw _1yep5z6ux _1yep5z6uy _1yep5z6142 _1yep5z6143 _1yep5z6144",false:"_1yep5z613n _1yep5z613o _1yep5z613p"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61h7 _1yep5z61h8 _1yep5z61h9 _1yep5z61hv _1yep5z61hw _1yep5z61hx _1yep5z61ij _1yep5z61ik _1yep5z61il _1yep5z61j7 _1yep5z61j8 _1yep5z61j9 _1yep5z61rv _1yep5z61rt _1yep5z61nc"]]}),wt=_({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6ky",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),Vc="f6jv6bj _1yep5z6vz _1yep5z6w0 _1yep5z6w1 _1yep5z6wn _1yep5z6wo _1yep5z6wp _1yep5z6xb _1yep5z6xc _1yep5z6xd _1yep5z6xz _1yep5z6y0 _1yep5z6y1",Oc="f6jv6bk";var Ac="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6l6 _1yep5z6l1 _1yep5z6kz _1yep5z6hc _1yep5z6eu",jc=_({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ky _1yep5z6ki _1yep5z6kl _1yep5z6kx",variantClassNames:{isHovered:{true:"_1yep5z6115"},isDisabled:{true:"_1yep5z6yl"}},defaultVariants:{},compoundVariants:[]}),Uc="f6jv6bi _1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6fs _1yep5z6l0 _1yep5z6kz _1yep5z6hf _1yep5z6l3",qc="_1yep5z6j6 _1yep5z6j7 _1yep5z6j8",Kc="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu _1yep5z6e3 _1yep5z6kv",Gc=_({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jc _1yep5z6jd _1yep5z6je",variantClassNames:{isInline:{true:"_1yep5z6oz _1yep5z6p0 _1yep5z6p1 _1yep5z616k _1yep5z616i _1yep5z6121",false:"_1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6we _1yep5z6wf _1yep5z6wg _1yep5z6x2 _1yep5z6x3 _1yep5z6x4 _1yep5z6xq _1yep5z6xr _1yep5z6xs _1yep5z6ye _1yep5z6yf _1yep5z6yg"}},defaultVariants:{},compoundVariants:[]}),Wc="f6jv6bl",Xc="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6hx _1yep5z6hy _1yep5z6hz _1yep5z6eu",It=_({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),Tt="f6jv6b9 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it";var $c=[["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:sr}}=layoutSprinkleValues,Zc=({isOpen:e,onClose:t})=>{let{formatMessage:o}=B(),r=useId();return jsx(be,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(he,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(se,{"aria-labelledby":r,className:Vc,drawerBackground:"subtle",children:[jsxs(D,{paddingLeft:sr.padding.horizontal.lg,paddingRight:sr.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:Oc,children:[jsx(Z,{id:r,elementType:"h3",type:"title",size:"md",children:o(lr.help)}),jsx(M,{icon:XIcon$1,size:"md",variant:"secondary","aria-label":o(lr.close),onPress:t})]}),jsx(F,{className:Wc}),jsxs(D,{paddingX:sr.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(D,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:sr.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(lr.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(lr.shortcut)})]})}),jsx("div",{role:"rowgroup",children:$c.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(D,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:sr.padding.vertical.xs,style:{minHeight:40},children:[jsx(Z,{type:"subtitle",size:"sm",role:"cell",children:o(lr[camelCase(a)])}),jsx(Z,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==$c.length-1&&jsx(F,{})]},a))})]})]})})})},lr=q({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 Nt=Po.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:l,editableContentAriaLabel:p,editorHandle:c,autoFocus:m,saveOnEnter:d,onSave:u},y)=>{let b=Po.useRef(null),[f,v]=useControlledState(e,t||"",o),g=useCallback(w=>{v(w.currentTarget.value||"");},[v]),z=useCallback(w=>{(d&&w.key==="Enter"&&!w.shiftKey||(w.ctrlKey||w.metaKey)&&w.key==="Enter")&&(w.preventDefault(),u());},[d,u]);useImperativeHandle(y,()=>({clear:()=>{v("");}}));let C=useCallback(w=>{w.currentTarget.style.height="16px",w.currentTarget.style.height=w.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let w=b.current;w&&(w.style.height="16px",w.style.height=w.scrollHeight+"px");},[s],[f]),useImperativeHandle(c,()=>({setCaretPosition:w=>{b.current&&(b.current.focus(),b.current.setSelectionRange(w,w));}}));let{focusProps:k,isFocused:h,isFocusVisible:I}=useFocusRing(),{hoverProps:x,isHovered:N}=useHover({}),T=filterTruthyValues({"data-focus-visible":I,"data-hovered":N,"data-focused":h});return jsx("textarea",{...mergeProps(k,x,T),ref:mergeRefs(b,n),className:classNames(s?Kc:[wt(),It({isInline:i}),Xc]),autoFocus:m,onChange:g,disabled:l,onInput:C,value:f,placeholder:r,spellCheck:a,"aria-label":p,onKeyDown:z})});Nt.displayName="PlainEditor";var cr="mention",St="mention_input",pm=Po.forwardRef(({onCancel:e,editor:t,element:o,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(Lt),l=useSelected(),[p,c]=useState(""),{contains:m}=useFilter({sensitivity:"base"}),{formatMessage:d}=B(),u=useMemo(()=>{let P=i.filter(S=>p===""||m(S.displayName,p)).map(S=>({id:S.id,label:S.displayName,data:S}));return s?take(P,s):P},[i,s,p,m]),y=useCallback(P=>jsx(Item,{children:P.label},P.id),[]),b=useCallback((P=!1)=>{let S=findNodePath(t,o);S&&(removeNodes(t,{at:S}),P&&focusEditor(t));},[t,o]),f=useComboBoxState({items:u,children:y,menuTrigger:"focus",onSelectionChange:P=>{b(!0),r?.(P);}}),v=Po.useRef(null),g=Po.useRef(null),z=Po.useRef(null),C=Po.useRef(null),k=useHTMLInputCursorState(g);useInteractOutside({ref:C,onInteractOutside:()=>{f.close();}});let{inputProps:h,listBoxProps:I}=useComboBox({defaultItems:u,inputRef:g,buttonRef:v,listBoxRef:z,popoverRef:C,menuTrigger:"focus","aria-label":d(PC.mention)},f);useEffect(()=>{g.current?.focus();},[]);let x=useCallback((P="manual",S=!1)=>{b(S),e?.(P,f.inputValue);},[e,b,f.inputValue]),N=useRef(l);useEffect(()=>{N.current&&!l&&x("deselect"),N.current=l;},[l,x]);let T=k?.atStart??!1,w=k?.atEnd??!1,R=useCallback(P=>{P.key==="Backspace"&&T?x("backspace",!0):P.key==="Escape"?x("escape",!0):P.key==="ArrowLeft"&&T?x("arrowLeft",!0):P.key==="ArrowRight"&&w&&x("arrowRight",!0);let S=Hotkeys.isUndo(P)&&t.history.undos.length>0,U=Hotkeys.isRedo(P)&&t.history.redos.length>0;(S||U)&&(P.preventDefault(),t[S?"undo":"redo"](),focusEditor(t));},[T,w,x,t]),L=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let P=getOwnerWindow(g.current),S=g.current?P?.getComputedStyle(g.current).font:void 0;return {width:S?getTextDimensions({text:f.inputValue,font:S}).width+10:"4ch"}}},[f.inputValue]);return jsxs(Fragment,{children:[jsx("input",{...mergeProps(h,{onKeyDown:R,onBlur:()=>{x("blur",!0);},onChange:P=>{c(P.target.value);}}),style:L,className:Ac,ref:mergeRefs(a,g)}),f.isOpen?jsx(ae,{triggerRef:n,className:Uc,isNonModal:!0,ref:C,state:f,children:jsx(re,{...I,items:[...f.collection.getKeys()].map(P=>f.collection.getItem(P)?.value),autoFocus:"first",UNSAFE_state:f,ref:z,className:sprinkles({width:"full"}),renderOption:cm})}):null]})});pm.displayName="MentionInputContentElement";var Cn=withRef(({className:e,...t},o)=>{let{children:r,editor:a,element:n}=t,{items:i}=useContext(Lt),s=useRef(null),[l,p]=useState(null);useEffect(()=>{let d=findNodePath(a,n);if(!d)return;let u=getPointBefore(a,d);if(!u)return;let y=createPointRef(a,u);return p(y),()=>{y.unref();}},[a,n]);let c=useCallback(()=>{let d=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),isFirefox()&&d&&focusEditor(a);},[a]),m=useCallback(d=>{if(!d)return;let u=s.current?.getRootNode()instanceof ShadowRoot,y=i.find(f=>f.id===d);invariant(y,"User not found");let b={type:cr,value:y.id,displayName:y.displayName,children:[{text:""}]};insertNodes(a,[b,{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(pm,{onCancel:(d,u)=>{d!=="backspace"&&insertText(a,"@"+u,{at:l?.current??void 0}),(d==="arrowLeft"||d==="arrowRight")&&moveSelection(a,{distance:1,reverse:d==="arrowLeft"});},onSelectionChange:m,ref:s,element:n,editor:a}),r]})});Cn.displayName="MentionInputElement";var xn=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]})});xn.displayName="MentionElement";var dm=(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)){Mt(e);return}a(i);},e},PC=q({mention:{defaultMessage:"Mention",id:"mention"}});function um({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("p",{children:t})})}function AC(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}function jC(e){return "text"in e}function mr(e){if(!e)return "";function t(o){if(jC(o)){let a=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="${AC(filterTruthyValues({color:o.color||void 0,backgroundColor:o.backgroundColor||void 0}))}">${a}</span>`),a}let r=o.children?.map(mr).join("");switch(o.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${o.url}">${r}</a>`;case cr: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 UC(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 In(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let t=new DOMParser().parseFromString(ym.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")?`
|
|
56
|
+
`:"<p>";return bm(t.body)}function bm(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=UC(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=>bm(a,o));switch(r.length===0&&r.push(jsx$1("text",o,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",t,`
|
|
57
|
+
`);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:cr,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 gm(e){let t=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[o]=t||[{url:""}];return o?.url}function Mt(e){let t={children:[{text:" "}],type:St};e.insertNode(t);}var qC=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:cr,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:St}],withOverrides:dm}),vm=createPlugins([createParagraphPlugin({component:um}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:_m}),qC({component:xn})],{components:{[St]:Cn}});var xm=({isDisabled:e})=>{let{formatMessage:t}=B(),o=useEditorRef();return jsx(Oe,{type:"dialog",children:({close:r})=>jsxs(Fragment,{children:[jsx(Ae,{children:jsx(M,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(Ye.addLink),className:Ro,preventFocusOnPress:!0})}),jsx(De,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:jsx(se,{size:"content",style:{minWidth:240},children:jsx(QC,{close:()=>{r(),setTimeout(()=>{focusEditor(o,o.selection);},0);}})})})]})})},QC=({close:e})=>{let t=useEditorRef(),{formatMessage:o}=B(),r=useEditorSelector(p=>gm(p),[]),[a,n]=Po.useState(r?"show":"add"),[i,s]=Po.useState(r||""),l=jsx(D,{padding:"lg",children:jsx(yo,{label:o(Ye.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[l,jsx(D,{display:"flex",justifyContent:"flex-end",padding:"lg",className:Ec,children:jsx(H,{isDisabled:!isUrl(i,!0),label:o(Ye.addLink),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(D,{padding:"lg",children:jsx(Z,{type:"subtitle",size:"sm",children:r})}),jsxs(D,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(H,{label:o(Ye.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(H,{label:o(Ye.removeLink),size:"sm",onPress:()=>{unwrapLink(t),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[l,jsxs(D,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(H,{label:o(Ye.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(H,{label:o(Ye.save),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function _m({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("a",{className:jr({size:"sm"}),children:t})})}var Ye=q({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 ex=parseColor("#ffffff00").toString("hexa"),Tn=[{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"}];[...Tn,{label:"Transparent",color:ex}];var Bt=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(Fe,{variant:"tertiary",isSelected:a,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},Sn=({nodeType:e,"aria-label":t,isDisabled:o})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:l,triggerProps:p})=>jsx(M,{icon:e==="color"?TextIcon:HighlightTextIcon,"aria-label":t,size:"md",variant:"popover",isDisabled:o,className:Ro,preventFocusOnPress:!0,...p,ref:l}),[e,t,o]),s=useCallback(l=>{l?r(l.toString("rgba")):a();},[a,r]);return jsx(rr,{presets:Tn,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:o})};var Mx=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],Lt=Po.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Ln=Po.forwardRef(({value:e,defaultValue:t,onChange:o,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:l,containerRef:p,onHelpDialogOpenRequest:c,mentionableUsers:m,editorHandle:d,maxMentionableUsersSuggestions:u,autoFocus:y,editorRef:b,saveOnEnter:f,onSave:v},g)=>{let z=useRef(null),C=useId(),{formatMessage:k}=B(),h=useRef(null),I=h.current,x=useRef(null),N=useMemo(()=>I?.getRootNode()instanceof ShadowRoot,[I]),[T,w]=useControlledState(e?In(e):void 0,In(t||"<p></p>"),P=>{o&&o(mr(P));}),{keyboardProps:R}=useKeyboard({onKeyDown:P=>{(f&&P.key==="Enter"&&!P.shiftKey||(P.ctrlKey||P.metaKey)&&P.key==="Enter")&&(P.preventDefault(),v()),P.altKey&&P.key==="F10"?(P.preventDefault(),z.current&&z.current.querySelector("button")?.focus()):P.continuePropagation(),isFirefox()&&N&&x.current&&focusEditor(x.current);}});useEffect(()=>{s&&x.current&&deselect(x.current);},[s]),useImperativeHandle(g,()=>({startMention:()=>{x.current&&Mt(x.current);}})),useImperativeHandle(d,()=>({setCaretPosition:P=>{x.current&&(focusEditor(x.current),moveSelection(x.current,{distance:P,unit:"character"}));}}));let L=useMemo(()=>({items:m||[],containerRef:p,maxMentionableUsersSuggestions:u}),[m,p,u]);return jsx(Lt.Provider,{value:L,children:jsxs(Plate,{initialValue:T||Mx,plugins:vm,editorRef:mergeRefs(x,b||null),onChange:P=>{w(P);},children:[jsxs(Rt,{className:Tt,"aria-controls":C,ref:z,children:[jsxs(D,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(Bt,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:k(No.bold),isDisabled:s}),jsx(Bt,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:k(No.italic),isDisabled:s}),jsx(Bt,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:k(No.underline),isDisabled:s})]}),jsx(F,{orientation:"vertical"}),jsx(Sn,{nodeType:MARK_COLOR,"aria-label":k(No.fontColor),isDisabled:s}),jsx(F,{orientation:"vertical"}),jsx(Sn,{nodeType:MARK_BG_COLOR,"aria-label":k(No.backgroundColor),isDisabled:s}),jsx(F,{orientation:"vertical"}),jsx(xm,{isDisabled:s}),jsx(F,{orientation:"vertical"}),jsx(M,{className:Ro,icon:QuestionmarkCircleIcon,size:"sm","aria-label":k(No.help),onPress:c})]}),jsx(F,{variant:"secondary"}),jsx("div",{...R,ref:h,children:jsx(PlateContent,{id:C,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:y,spellCheck:a,"aria-label":l,className:classNames(wt({isDisabled:s}),It({isInline:i})),renderPlaceholder:({attributes:P,children:S})=>jsx("span",{...P,className:sprinkles({paddingY:"lg"}),children:S})})})]})})});Ln.displayName="RichEditor";var cm=({key:e,value:t},{isDisabled:o,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:o}),{label:l,data:p}=t;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:jc({isDisabled:o,isHovered:a}),"data-active":a,ref:i,children:[jsx(_o,{name:l,...p?.avatar}),jsxs(D,{display:"flex",flexDirection:"column",children:[jsx(Z,{type:"subtitle",size:"sm",children:l}),jsx(Z,{type:"helper",size:"sm",children:p?.description})]})]}),e===n.collection.getLastKey()?null:jsx(F,{})]})},No=q({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 Nm=Po.memo(Po.forwardRef(({className:e,style:t,"data-block-id":o,enableRichText:r=!1,onCancel:a,onSave:n,isInline:i=!0,submitButtonIcon:s=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:p,"aria-label":c,"aria-describedby":m,"aria-labelledby":d,"aria-details":u,editableContentAriaLabel:y="Editing Area",footerButtons:b,clearOnCancel:f,clearOnSave:v,...g},z)=>{let C=useRef(null),{formatMessage:k}=B(),h=useRef(null),I=useRef(null),x=useRef(null),N=!r&&g.variant==="minimal",T=useRef(null),[w,R]=Po.useState(g.value||g.defaultValue),L=g.isDisabled||g.isSaveDisabled||!getPlainText(w||""),{fieldProps:P}=useLabel({"aria-label":c,"aria-labelledby":d,"aria-describedby":m,"aria-details":u,labelElementType:"div"});N&&!g.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let S=useCallback(()=>{R(""),r?C.current?.reset():I.current?.clear();},[r]),U=useCallback(()=>{L||(n?.(r?mr(C.current?.children):h.current.value),v&&S());},[S,v,r,n,L]),K=jsx(M,{variant:"ghost","aria-label":l||k(Dn.save),icon:s,isDisabled:L,size:"md",excludeFromTabOrder:N,className:N?qc:void 0,onPress:U,preventFocusOnPress:!0}),[J,G]=Po.useState(!1),{keyboardProps:ee}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),G(!0));}}),W=useCallback(V=>{R(V),g.onChange?.(V);},[g]);return jsxs("div",{...mergeProps(P,r?ee:{}),role:"application",ref:mergeRefs(x,z),style:t,"data-block-id":o,className:classNames(Hc({isInline:i,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[N?jsxs(Fragment,{children:[i?jsx(_o,{className:Fc,name:g.avatarName||""}):null,jsxs("div",{className:Gc({isInline:i}),children:[jsx(Nt,{isMinimal:N,textBoxRef:h,isInline:i,editableContentAriaLabel:y,...g,onChange:W,onSave:U}),K]})]}):jsxs(Fragment,{children:[r?jsx(Ln,{containerRef:x,ref:T,editorRef:C,isInline:i,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{G(!0);},...g,onChange:W,onSave:U}):jsxs(Fragment,{children:[!i&&jsx(F,{variant:"secondary"}),jsx(Nt,{onCancel:a,textBoxRef:h,ref:I,isInline:i,editableContentAriaLabel:y,...g,onChange:V=>{R(V),g.onChange?.(V);},onSave:U})]}),jsx(F,{variant:"secondary"}),jsxs("div",{className:classNames(Tt,sprinkles({justifyContent:"space-between"})),children:[jsxs(D,{paddingX:"sm",gap:"sm",display:"flex",children:[r&&g.mentionableUsers?jsx(M,{icon:AtIcon,size:"sm","aria-label":k(Dn.mention),onPress:()=>T.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:j},$)=>V==="action"?jsx(M,{...j,size:"sm",isDisabled:g.isDisabled||j.isDisabled},$):jsx(Fe,{...j,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||j.isDisabled},$))]}),jsxs(D,{children:[!!a&&jsx(M,{variant:"secondary",icon:CrossCircleFilledIcon,isDisabled:g.isDisabled,size:"md",onPress:()=>{a(),f&&S();},"aria-label":p||k(Dn.cancel)}),K]})]})]}),jsx(Zc,{isOpen:J,onClose:()=>{G(!1);}})]})}));Nm.displayName="Editor";var Dn=q({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var Et=Po.forwardRef(({className:e,style:t,"data-block-id":o,isMounted:r,children:a,transitions:n,elementType:i="div",...s},l)=>{let p=useTransition(r,n),c=animated[i];return p((m,d)=>d&&jsx(c,{className:e,"data-block-id":o,style:{...t,...m},...s,ref:l,children:a}))});Et.displayName="Transition";var Sm="_8kqf970 _1yep5z6ow _1yep5z6ox _1yep5z6oy _1yep5z613b _1yep5z613c _1yep5z613d _1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6142 _1yep5z6143 _1yep5z6144 _1yep5z6yh _1yep5z6uq _1yep5z6ur _1yep5z6us _1yep5z6168";var Bm=2,Dm=Po.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s},l)=>{let p=Po.useRef(null),c=useInteractionModality(),[m,d]=Po.useState(!1),u=useCallback(()=>{let N=r?.current||getOwnerDocument(p.current).body;return getOwnerWindow(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+Bm>=0:N.scrollTop+N.clientHeight+Bm>=N.scrollHeight},[r]),[y,b]=Po.useState(u),f=Ne(),{buttonProps:v,isPressed:g}=useButton({onPress:()=>{let N=r?.current||getOwnerDocument(p.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},p),{focusProps:z,isFocused:C,isFocusVisible:k}=useFocusRing(),{hoverProps:h,isHovered:I}=useHover({}),x=filterTruthyValues({"data-block-id":s,"data-pressed":g,"data-focus-visible":k,"data-hovered":I,"data-focused":C});return useEffect(()=>{b(u());},[u]),useEffect(()=>{let N=r?.current||getOwnerDocument(p.current).body,T="onscrollend"in getOwnerWindow(N),w=()=>{setTimeout(()=>{d(!1),b(u());},n);},R=()=>{d(!0),T||w();};return N.addEventListener("scroll",R),N.addEventListener("scrollend",w),()=>{N.removeEventListener("scroll",R),N.removeEventListener("scrollend",w);}},[r,n,u]),jsxs(Et,{isMounted:(o?c!=="keyboard":!0)&&!m&&!y,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:f},...mergeProps(v,z,h,x),className:classNames(Sm,Gr({isFocusVisible:k,variant:"high-contrast",isHovered:I}),"BaselineUI-ScrollControlButton",e),style:t,ref:mergeRefs(l,p),children:[jsx(ArrowDownCircleFilledIcon,{size:16}),a]})});Dm.displayName="ScrollControlButton";var Hn="_1yep5z6jc _1yep5z6jd _1yep5z6je _1yep5z6jl _1yep5z6jm _1yep5z6jn",Em=_({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6le _1yep5z6lf _1yep5z6lg _1yep5z6nw _1yep5z6nx _1yep5z6ny"},hasNoCloseBtn:{true:"_1yep5z6lk _1yep5z6ll _1yep5z6lm _1yep5z6nw _1yep5z6nx _1yep5z6ny _1yep5z6p2 _1yep5z6p3 _1yep5z6p4 _1yep5z6mq _1yep5z6mr _1yep5z6ms"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61g7 _1yep5z61g8 _1yep5z61g9"]]}),Fm="_1v0p2z10";var Ht=Po.forwardRef(({className:e,style:t,"data-block-id":o,message:r,title:a,primaryActionLabel:n,cancelLabel:i,textInputProps:s,icon:l,iconColor:p,showCloseButton:c=!0,onPrimaryAction:m,onCancel:d,autoFocusButton:u,isPrimaryActionDisabled:y},b)=>{let f=useId(),{formatMessage:v}=B(),g=a&&jsx(Z,{id:f,type:"title",size:"sm",elementType:"h3",children:a});return jsxs(se,{className:e,style:t,"data-block-id":o,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":f,children:[jsxs("div",{className:Em({hasTitleAndIcon:!!(l&&a),hasNoCloseBtn:!c}),children:[jsxs(D,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:p},size:24}):null,!l&&g,c?jsx(M,{icon:XIcon$1,variant:"secondary",size:"md","aria-label":v(lP.close),onPress:d}):null]}),l?g:null]}),r?jsx(D,{elementType:"section",className:Fm,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:r}):null,s?jsx(D,{paddingX:"lg",paddingBottom:"lg",children:jsx(yo,{...s})}):null,i||n?jsxs(Fragment,{children:[jsx(F,{}),jsxs(D,{padding:"lg",display:"flex",gap:"xl",children:[i?jsx(H,{variant:"secondary",className:Hn,label:i,onPress:d,autoFocus:u==="cancel"}):null,n?jsx(H,{className:Hn,label:n,onPress:m,autoFocus:u==="primary",isDisabled:y}):null]})]}):null]})});Ht.displayName="AlertDialog";var lP=q({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var Hm="_1t55bp71",Vm="_1yep5z6e3 _1yep5z6eu _1yep5z6i6 _1yep5z6i7 _1yep5z6i8 _1yep5z69i _1yep5z69j _1yep5z69k",Om="_1t55bp70";var yP=uP(),Am=Po.forwardRef(({className:e,style:t,children:o,"data-block-id":r,showCaret:a},n)=>{let i=useMemo(()=>{let s=o;return (!o||Array.isArray(o)&&o.length===0)&&(s=""),yP.render(s)},[o]);return jsx("div",{className:classNames(Vm,Om,{[Hm]:a},"BaselineUI-Markdown",e),"data-block-id":r,style:t,ref:n,dangerouslySetInnerHTML:{__html:i}})});Am.displayName="Markdown";function Km(e){let{formatMessage:t,locale:o}=B(),[r,a]=Po.useState(!1),[n,i]=Po.useState(0),[s,l]=Po.useState(0),[p,c]=Po.useState(!1);useEffect(()=>{if(!e.current)return;let u=e.current,y=()=>{a(!1),i(0);},b=()=>{p||i(u.currentTime*100/u.duration);},f=()=>{l(u.duration);};return u.addEventListener("ended",y),u.addEventListener("timeupdate",b),u.addEventListener("loadedmetadata",f),()=>{u.removeEventListener("ended",y),u.removeEventListener("timeupdate",b),u.removeEventListener("loadedmetadata",f);}},[p,e]);let m=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(t(Um.playing),"polite")):(e.current.pause(),a(!1),announce(t(Um.paused),"polite"))))();},[t,e]),d=useCallback(u=>{e.current&&(e.current.currentTime=u*e.current.duration/100,announce(gP(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:m,seek:d,setProgress:i,formattedCurrentTime:e.current?.currentTime?qm(e.current?.currentTime):"00:00",formattedDuration:s?qm(s):"00:00",setIsSliderDragging:c}}var Um=q({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function gP(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 qm(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 Gm="_1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q",Wm="rta2n91 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6z9 _1yep5z6ut _1yep5z6uu _1yep5z6uv _1yep5z6166 _1yep5z6106",Xm="rta2n90";var Zm=Po.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,...n},i)=>{let s=Po.useRef(null),{isPlaying:l,progress:p,duration:c,togglePlay:m,seek:d,formattedDuration:u,formattedCurrentTime:y,setProgress:b,setIsSliderDragging:f}=Km(s),{formatMessage:v}=B(),g=filterTruthyValues({"data-block-id":a,"data-state":l?"playing":"paused","data-loaded":c>0});return jsxs("div",{...g,...n,className:classNames(Gm,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:i,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:s,children:r.map(({url:z,type:C})=>jsx("source",{src:z,type:C},z))})}),jsx(Fe,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:o,"aria-label":v(l?On.pause:On.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:Wm,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(Sr,{"aria-label":v(On.audioTimeline),value:p,minValue:0,maxValue:100,className:Xm,onChange:z=>{b(z),f(!0);},onChangeEnd:z=>{d(z),f(!1);}}),jsx("span",{"aria-hidden":!0,children:u})]})]})});Zm.displayName="AudioPlayer";var On=q({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var Qm="_1w920rnf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6fs _1yep5z6ho _1yep5z6hp _1yep5z6hq",Jm="_1w920rn1 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ic _1yep5z6id _1yep5z6ie _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z69i _1yep5z69j _1yep5z69k",eu="_1w920rn0 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6km",Ot=_({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6ir _1yep5z6is _1yep5z6it _1yep5z6hl _1yep5z6hm _1yep5z6hn",variantClassNames:{isFocusVisible:{true:"_1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isSelected:{true:"_1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isLoading:{true:"_1yep5z614w _1yep5z614x _1yep5z614y"},size:{sm:"_1w920rn6",md:"_1w920rn7"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn8 _1yep5z6l1 _1yep5z6kz _1yep5z6hc"]]}),ou="_1w920rnd _1yep5z6kw",ru=_({defaultClassName:"_1w920rn9 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6fw _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rna _1yep5z6l1 _1yep5z6kz _1yep5z6hc"},isSelected:{true:"_1w920rnb"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rnc _1yep5z61rm _1yep5z61rl _1yep5z61nz"]]}),tu="_1w920rne";var nu=({items:e,ulRef:t})=>{let{length:o}=e,r=Po.useRef(null);return useLayoutEffect(()=>{if(!r.current)return;let a=r.current.closest(".BaselineUI-ImageGallery")?.querySelector(`[data-image-key='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(a,"Node is not defined."),r.current?.prepend(a);},[e,t]),jsx("div",{className:Ot(),ref:r,children:jsx(D,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:tu,children:o})})};var iu=({item:{value:e},options:{optionProps:t,isFocusVisible:o,isSelected:r},liRef:a,fit:n="contain",size:i,onDelete:s,aspectRatio:l})=>{let p=useId(),{formatMessage:c}=B();invariant(e&&(e?.type==="option"||e?.type===void 0));let{imgProps:m,isLoading:d,isLoaded:u}=ao({src:e.data?.src,alt:e.data?.alt??""}),y=useTransition(u,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return jsxs("li",{...t,ref:a,className:Jm,"aria-labelledby":p,children:[jsx("div",{className:Ot({isFocusVisible:o,isSelected:r,isLoading:!0,size:i}),style:{aspectRatio:l?.toString()},"data-image-key":e.id,children:d?jsx(go,{"aria-label":c(br.loading)}):y((b,f)=>f&&jsx(animated.div,{role:"img","aria-label":m.alt,style:{...b,backgroundImage:`url(${m.src})`,backgroundSize:n},className:ou,children:s?jsx("div",{className:Qm,children:jsx(M,{"aria-label":c(br.delete),size:"xs",icon:XIcon$4,onPress:()=>{s(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null}))}),jsx("span",{id:p,className:ru({isFocusVisible:o,isSelected:r}),children:e.label})]})};var DP={width:0,display:"block"};var lu=Po.forwardRef(({className:e,style:t,items:o,fit:r="cover",onReorder:a,"data-block-id":n,onDelete:i,size:s="sm",aspectRatio:l=3/4,onListChange:p,onSelectionChange:c,...m},d)=>{let u=Po.useRef(null),[y,b]=useState([]),{formatMessage:f}=B(),v=os({initialItems:o.map(h=>({id:h.id,label:h.label,data:{src:h.src,alt:h.alt}})),onListChange:p,onSelectionChange:c}),g=useCallback(h=>{h.target.dropPosition==="before"?v.moveBefore(h.target.key,h.keys):h.target.dropPosition==="after"&&v.moveAfter(h.target.key,h.keys),a?.(h);},[v,a]),z=useCallback(()=>{i&&y.length&&(v.remove(...y),i(new Set(y)),b([]));},[y,v,i]),C=useCallback((h,I,x)=>jsx(iu,{item:h,options:I,liRef:x,fit:r,size:s,aspectRatio:l,onDelete:i?N=>{b([N]);}:void 0}),[l,r,i,s]),{keyboardProps:k}=useKeyboard({onKeyDown(h){if(h.key==="Backspace"||h.key==="Delete"){if(!i)return;if([...v.selectedKeys].length)b([...v.selectedKeys]);else {let x=v.getItem(h.target.dataset.key).id;b([x]);}}}});return jsxs("div",{...k,ref:d,style:t,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":n,children:[jsx(re,{...m,items:v.items,onReorder:g,layout:"grid",orientation:"vertical",className:eu,ref:u,dropIndicatorStyle:DP,renderOption:C,renderDragPreview:h=>jsx(nu,{items:h,ulRef:u}),onSelectionChange:v.setSelectedKeys,getItems:h=>[...h].map(I=>({src:v.getItem(I).src||"",alt:v.getItem(I).alt||"",key:I}))}),jsx(be,{isOpen:!![...y].length,onOpenChange:h=>{h||b([]);},children:jsx(he,{isDismissable:!0,children:jsx(Ht,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:f(br.delete),cancelLabel:f(br.cancel),onCancel:()=>{b([]);},onPrimaryAction:z,autoFocusButton:"cancel"})})})]})});lu.displayName="ImageGallery";var br=q({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var pu=_({defaultClassName:"_18v88n10 _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6kv",variantClassNames:{labelPosition:{top:"_1yep5z613n _1yep5z613o _1yep5z613p",start:"_1yep5z613k _1yep5z613l _1yep5z613m _1yep5z6152 _1yep5z6153 _1yep5z6154 _1yep5z6ut _1yep5z6uu _1yep5z6uv"}},defaultVariants:{},compoundVariants:[]}),du=_({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6kv _1yep5z6l6 _1yep5z6ky _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z6109"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),cu=_({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5 _1yep5z6ks",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6zp",warning:"_1yep5z6zx"},isReadOnly:{true:"_1yep5z610b"}},defaultVariants:{},compoundVariants:[]}),mu=_({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6i0 _1yep5z6i1 _1yep5z6i2 _1yep5z6i9 _1yep5z6ia _1yep5z6ib _1yep5z6l9 _1yep5z6l7 _1yep5z6gq _1yep5z6ir _1yep5z6is _1yep5z6it",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z611k",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6vt _1yep5z6vu _1yep5z6vv _1yep5z6wh _1yep5z6wi _1yep5z6wj _1yep5z6x5 _1yep5z6x6 _1yep5z6x7 _1yep5z6xt _1yep5z6xu _1yep5z6xv _1yep5z616k _1yep5z616i _1yep5z611y _1yep5z616b _1yep5z616a _1yep5z612n _1yep5z616d"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z612n"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61rv _1yep5z61rt _1yep5z61nc"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61nd"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61nd"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),uu=_({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z6109"}},defaultVariants:{},compoundVariants:[]}),yu=_({defaultClassName:"_18v88n19 _1yep5z6i3 _1yep5z6i4 _1yep5z6i5",variantClassNames:{labelPosition:{top:"_1yep5z6sh _1yep5z6si _1yep5z6sj",start:"_1yep5z6me _1yep5z6mf _1yep5z6mg _1yep5z613n _1yep5z613o _1yep5z613p"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61q7 _1yep5z61q8 _1yep5z61q9"]]}),fu="_1yep5z6kv",bu="_1yep5z6d7 _1yep5z6fs",gu=_({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6ky",variantClassNames:{isFocusVisible:{true:"_1yep5z6116 _1yep5z612v _1yep5z6169"},isHovered:{true:"_1yep5z6116 _1yep5z612v _1yep5z6169"},isOpen:{true:"_1yep5z612v _1yep5z6169"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61mh _1yep5z61o6 _1yep5z61rk"],[{isHovered:!0},"_1yep5z61mh _1yep5z61o6 _1yep5z61rk"],[{isOpen:!0},"_1yep5z61o6 _1yep5z61rk"]]});var hu=Po.forwardRef(({className:e,style:t,inputStyle:o,inputClassName:r,"data-block-id":a,label:n,items:i,showSelectedIcon:s=!1,onSelectionChange:l,onInputChange:p,isInvalid:c=!1,labelPosition:m="top",validationState:d="valid",variant:u="primary",toggleLabel:y,renderOption:b,showIcon:f=!0,filter:v,...g},z)=>{let{contains:C}=useFilter({sensitivity:"base"}),k=useComboBoxState({...g,defaultFilter:v||C,defaultItems:i,onSelectionChange:l,onInputChange:p,children:te=>te.type==="section"?jsx(Section,{items:te.children,title:te.id,children:A=>jsx(Item,{children:A.label},A.id)},te.id):jsx(Item,{children:te.label},te.id),validationState:c?"invalid":"valid"}),h=Po.useRef(null),I=Po.useRef(null),x=Po.useRef(null),N=Po.useRef(null),T=Po.useRef(null),{buttonProps:w,inputProps:R,listBoxProps:L,labelProps:P,errorMessageProps:S,descriptionProps:U,validationErrors:K}=useComboBox({...g,inputRef:I,defaultItems:i,buttonRef:h,listBoxRef:x,popoverRef:N,validationState:d==="error"?"invalid":"valid"},k),J=g.errorMessage||K.join(" "),G=fe({...g,errorMessage:J,descriptionProps:U,errorMessageProps:S,labelPosition:m});J&&(d="error");let{hoverProps:ee,isHovered:W}=useHover({isDisabled:g.isDisabled}),{isFocused:V,focusProps:j,isFocusVisible:$}=useFocusRing(),ve=uo({isReadOnly:g.isReadOnly,validationState:d}),ke=filterTruthyValues({"data-read-only":g.isReadOnly,"data-disabled":g.isDisabled,"data-validation-state":d,"data-focused":V,"data-focus-visible":$}),{labelProps:de,fieldProps:_e}=useLabel({label:n});return jsxs("div",{className:classNames(pu({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,style:t,ref:z,children:[n||m==="start"&&G?jsxs("div",{className:yu({labelPosition:m,hasMessage:!!G}),children:[jsx("label",{...mergeProps(P,de),className:uu({isDisabled:g.isDisabled}),children:n}),m==="start"&&G]}):null,jsxs("div",{...ee,className:mu({validationState:d,isHovered:W,isFocused:V,variant:u,isReadOnly:!!g.isReadOnly,isDisabled:!!g.isDisabled}),ref:T,children:[jsx("input",{...mergeProps(R,j,ke,_e),ref:I,className:classNames(du({isDisabled:g.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:o}),ve&&f?jsx(ve,{className:cu({validationState:d,isReadOnly:g.isReadOnly}),size:16}):null,jsx(H,{...w,ref:h,variant:"popover",label:y,className:gu({isFocusVisible:!g.isDisabled&&!g.isReadOnly&&$,isHovered:!g.isDisabled&&!g.isReadOnly&&W,isOpen:k.isOpen})})]}),k.isOpen?jsx(ae,{className:bu,ref:N,triggerRef:T,state:k,children:jsx(re,{...L,items:i,ref:x,UNSAFE_state:k,renderOption:b,selectionMode:"single",showSelectedIcon:s,className:fu})}):null,m==="top"&&G]})});hu.displayName="ComboBox";function oG(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}
|
|
50
58
|
|
|
51
|
-
export {
|
|
59
|
+
export { Wl as Accordion, op as AccordionItem, H as ActionButton, M as ActionIconButton, Ht as AlertDialog, Zm as AudioPlayer, _o as Avatar, D as Box, zl as Checkbox, rr as ColorInput, vc as ColorPresetInlineInput, Ke as ColorSwatch, hu as ComboBox, Nl as DateFormat, se as Dialog, Wp as DialogTitle, ui as DomNodeRenderer, rt as Drawer, Nm as Editor, Fs as FileUpload, Ud as FreehandCanvas, yc as Group, Yi as I18nProvider, Dd as IconColorInputButton, ec as ImageDropZone, lu as ImageGallery, Tp as InlineAlert, Is as Link, re as ListBox, Am as Markdown, Ar as Menu, uc as MessageFormat, be as Modal, B6 as ModalClose, he as ModalContent, nt as ModalTrigger, fo as NumberFormat, ze as NumberInput, Tl as Pagination, Oe as Popover, De as PopoverContent, Ae as PopoverTrigger, po as Portal, es as PortalContainerProvider, nc as Preview, Gs as ProgressBar, go as ProgressSpinner, kt as RadioGroup, el as Reaction, Dm as ScrollControlButton, Ai as SearchInput, Qr as Select, F as Separator, Sr as Slider, Ei as Switch, zp as TabItem, _p as Tabs, Fl as TagGroup, Z as Text, yo as TextInput, lo as ThemeProvider, fl as ToggleButton, Fe as ToggleIconButton, Rt as Toolbar, nl as Tooltip, $d as Transform, Et as Transition, q as defineMessages, oG as isInsideOverlayContent, no as useDevice, os as useDynamicListData, B as useI18n, ao as useImage, Ui as useIntersectionObserver, Ne as useIsFirstRender, Zi as useLocalStorage, xI as useMutationObserver, ie as usePortalContainer, qi as useResizeObserver, NI as useTextSelection, Gi as useUndoRedo, na as useUserPreferences };
|