@baseline-ui/core 0.33.0 → 0.33.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/Acknowledgements.md +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.mts +33 -6
- package/dist/index.d.ts +33 -6
- package/dist/index.js +90 -90
- package/dist/index.mjs +10 -10
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { classNames, invariant, filterTruthyValues, getSvgPathFromStroke, getHTMLElement, getTextDimensions, getPlainText, cleanKeyFromGlobImport, getOsSpecificKeyboardShortcutLabel, isUrl } from '@baseline-ui/utils';
|
|
2
|
-
import
|
|
2
|
+
import rt, { useMemo, useCallback, useContext, useEffect, createContext, useLayoutEffect, useState, useRef, useImperativeHandle, forwardRef, useReducer, Fragment as Fragment$1, createElement } from 'react';
|
|
3
3
|
import { useControlledState, clamp } from '@react-stately/utils';
|
|
4
4
|
import { useReducedMotion, useSpring, animated, useTransition, easings, config } from '@react-spring/web';
|
|
5
|
-
import { useSeparator, useHover, mergeProps, useOption, useLocale, useListBox, ListKeyboardDelegate, useFocusRing, DragPreview, usePress, useTooltip, Overlay, useTooltipTrigger, useOverlayPosition, useNumberField, useNumberFormatter, useSlider, useSliderThumb, VisuallyHidden, useDialog, usePopover, DismissButton, useKeyboard, FocusScope, useSwitch, useSearchField, useMenu, useMenuTrigger, useLink, useDrop, useId, useProgressBar, useTextField, useCheckbox, useTagGroup, useFocusManager, useButton, useSelect, HiddenSelect, useTabList, useTab, useOverlayTrigger, useLabel, useField, useClipboard, useRadioGroup, useFilter, useInteractOutside, useComboBox, useFocus, useGridListItem, useGridListSelectionCheckbox, useGridList, useDraggableCollection, useDroppableCollection, ListDropTargetDelegate,
|
|
5
|
+
import { useSeparator, useHover, mergeProps, useOption, useLocale, useListBox, ListKeyboardDelegate, useFocusRing, DragPreview, usePress, useTooltip, Overlay, useTooltipTrigger, useOverlayPosition, useNumberField, useNumberFormatter, useSlider, useSliderThumb, VisuallyHidden, useDialog, usePopover, DismissButton, useKeyboard, FocusScope, useSwitch, useSearchField, useMenu, useMenuTrigger, useLink, useDrop, useId, useProgressBar, useTextField, useCheckbox, useTagGroup, useFocusManager, useButton, useSelect, HiddenSelect, useTabList, useTab, useOverlayTrigger, useLabel, useField, useClipboard, useRadioGroup, useFilter, useInteractOutside, useComboBox, useObjectRef, useFocus, useGridListItem, useGridListSelectionCheckbox, useDraggableItem, useGridList, useDraggableCollection, useDroppableCollection, ListDropTargetDelegate, useDropIndicator, useListBoxSection, useToggleButton, I18nProvider, useMessageFormatter, useModalOverlay, useMenuSection, useMenuItem, useDateFormatter, useTag, useTabPanel, useRadio } from 'react-aria';
|
|
6
6
|
export { useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
|
|
7
7
|
import { useListState, useTooltipTriggerState, useNumberFieldState, useSliderState, useToggleState, useSearchFieldState, useTreeState, useMenuTriggerState, useSelectState, useTabListState, Item, useOverlayTriggerState, useRadioGroupState, useComboBoxState, useDraggableCollectionState, useDroppableCollectionState, Section } from 'react-stately';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -13,9 +13,9 @@ import { CaretDownIcon, MinusIcon, PlusIcon, ChevronRightIcon, XIcon as XIcon$1
|
|
|
13
13
|
import { ReadOnlyIcon, ErrorCircleFilledIcon, XCircleFilledIcon, UndoIcon, RedoIcon, TrashIcon, ArrowDownCircleFilledIcon, XIcon as XIcon$3, WarningFilledIcon, CheckmarkIcon as CheckmarkIcon$3, CheckmarkCircleFilledIcon, ErrorAltCircleFilledIcon, AvatarIcon, InfoCircleFilledIcon, CaretLeftIcon as CaretLeftIcon$1, CaretRightIcon as CaretRightIcon$1 } from '@baseline-ui/icons/16';
|
|
14
14
|
import { FocusableProvider, useFocusable, createFocusManager, useFocusRing as useFocusRing$1 } from '@react-aria/focus';
|
|
15
15
|
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
|
16
|
-
import
|
|
16
|
+
import cg from 'lodash/isEmpty';
|
|
17
17
|
import { XIcon, TextIcon, BoldIcon, ItalicIcon, UnderlineIcon, AtIcon, XCircleFilledIcon as XCircleFilledIcon$1, ArrowUpCircleFilledIcon, CheckmarkIcon as CheckmarkIcon$2, CheckCircleFilledIcon, ErrorAltCircleFilledIcon as ErrorAltCircleFilledIcon$1, InfoCircleFilledIcon as InfoCircleFilledIcon$1, WarningFilledIcon as WarningFilledIcon$1, PlusIcon as PlusIcon$1, MinusIcon as MinusIcon$2, LinkIcon, SearchIcon, CaretLeftIcon as CaretLeftIcon$2, CaretRightIcon as CaretRightIcon$2 } from '@baseline-ui/icons/20';
|
|
18
|
-
import
|
|
18
|
+
import u_, { createPortal } from 'react-dom';
|
|
19
19
|
import { CheckmarkIcon as CheckmarkIcon$1, MinusIcon as MinusIcon$1, XIcon as XIcon$2, CaretLeftIcon, CaretRightIcon } from '@baseline-ui/icons/12';
|
|
20
20
|
import { useInteractionModality, PressResponder } from '@react-aria/interactions';
|
|
21
21
|
import { parseColor, useColorAreaState, useColorFieldState, useColorSliderState } from '@react-stately/color';
|
|
@@ -30,11 +30,11 @@ import { createFontColorPlugin, createFontBackgroundColorPlugin, MARK_COLOR, MAR
|
|
|
30
30
|
import { createParagraphPlugin, ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph';
|
|
31
31
|
import { createLinkPlugin, ELEMENT_LINK, upsertLink, unwrapLink } from '@udecode/plate-link';
|
|
32
32
|
import { withRef, withProps } from '@udecode/cn';
|
|
33
|
-
import * as
|
|
33
|
+
import * as af from 'dompurify';
|
|
34
34
|
import { jsx as jsx$1 } from 'slate-hyperscript';
|
|
35
35
|
import { useHTMLInputCursorState } from '@udecode/plate-combobox';
|
|
36
36
|
import { useSelected } from 'slate-react';
|
|
37
|
-
import
|
|
37
|
+
import Z0 from 'markdown-it';
|
|
38
38
|
import { announce } from '@react-aria/live-announcer';
|
|
39
39
|
import { useActionGroup, useActionGroupItem } from '@react-aria/actiongroup';
|
|
40
40
|
import { ControlledTreeEnvironment, Tree } from 'react-complex-tree';
|
|
@@ -49,8 +49,8 @@ import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
|
|
|
49
49
|
* This notice may not be removed from this file.
|
|
50
50
|
*
|
|
51
51
|
*/
|
|
52
|
-
var xe=typeof document<"u"?ro.useLayoutEffect:()=>{};function La(e){let o=useRef(null);return xe(()=>{o.current=e;},[e]),useCallback((...t)=>{let r=o.current;return r?.(...t)},[])}function Ma(e){let[o,t]=useState(e),r=useRef(null),a=La(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}o===i.value?a():t(i.value);});xe(()=>{r.current&&a();});let n=La(i=>{r.current=i(o),a();});return [o,n]}var rr={prefix:String(Math.round(Math.random()*1e10)),current:0},Wi=ro.createContext(rr),By=ro.createContext(!1);var Fy=!!(typeof window<"u"&&window.document&&window.document.createElement),Ea=new WeakMap;function Hy(e=!1){let o=useContext(Wi),t=useRef(null);if(t.current===null&&!e){var r,a;let n=(a=ro.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=Ea.get(n);i==null?Ea.set(n,{id:o.current,state:n.memoizedState}):n.memoizedState!==i.state&&(o.current=i.id,Ea.delete(n));}t.current=++o.current;}return t.current}function Vy(e){let o=useContext(Wi);o===rr&&!Fy&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let t=Hy(!!e),r=o===rr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${o.prefix}`;return e||`${r}-${t}`}function Oy(e){let o=ro.useId(),[t]=useState(Xi()),r=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${rr.prefix}`;return e||`${r}-${o}`}var Ba=typeof ro.useId=="function"?Oy:Vy;function jy(){return !1}function Ay(){return !0}function $y(e){return ()=>{}}function Xi(){return typeof ro.useSyncExternalStore=="function"?ro.useSyncExternalStore($y,jy,Ay):useContext(By)}var Wy=!!(typeof window<"u"&&window.document&&window.document.createElement),ar=new Map;function nr(e){let[o,t]=useState(e),r=useRef(null),a=Ba(o),n=useCallback(i=>{r.current=i;},[]);return Wy&&ar.set(a,n),xe(()=>{let i=a;return ()=>{ar.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,t(i));}),a}function Fa(e,o){if(e===o)return e;let t=ar.get(e);if(t)return t(o),o;let r=ar.get(o);return r?(r(e),e):o}function Yi(...e){return (...o)=>{for(let t of e)typeof t=="function"&&t(...o);}}var ue=e=>{var o;return (o=e?.ownerDocument)!==null&&o!==void 0?o:document},ne=e=>e&&"window"in e&&e.window===e?e:ue(e).defaultView||window,Ve=e=>{if(!e)return document;if(!e.isConnected)return null;let o=e.getRootNode?e.getRootNode():document;return Qi(o)||Ji(o)?o:null};function Zi(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Qi(e){return Zi(e)&&e.nodeType===Node.DOCUMENT_NODE}function Ji(e){return Zi(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function es(e){var o,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(o=0;o<a;o++)e[o]&&(t=es(e[o]))&&(r&&(r+=" "),r+=t);}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Xy(){for(var e,o,t=0,r="",a=arguments.length;t<a;t++)(e=arguments[t])&&(o=es(e))&&(r&&(r+=" "),r+=o);return r}var os=Xy;function _o(...e){let o={...e[0]};for(let t=1;t<e.length;t++){let r=e[t];for(let a in r){let n=o[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?o[a]=Yi(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?o[a]=os(n,i):a==="id"&&n&&i?o.id=Fa(n,i):o[a]=i!==void 0?i:n;}}return o}function M(...e){return e.length===1&&e[0]?e[0]:o=>{for(let t of e)typeof t=="function"?t(o):t!=null&&(t.current=o);}}var Yy=new Set(["id"]),Zy=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Qy=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Jy=/^(data-.*)$/;function Ha(e,o={}){let{labelable:t,isLink:r,propNames:a}=o,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Yy.has(i)||t&&Zy.has(i)||r&&Qy.has(i)||a?.has(i)||Jy.test(i))&&(n[i]=e[i]);return n}function ir(e){var o;return typeof window>"u"||window.navigator==null?!1:((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent)}function Va(e){var o;return typeof window<"u"&&window.navigator!=null?e.test(((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.platform)||window.navigator.platform):!1}function Se(e){let o=null;return ()=>(o==null&&(o=e()),o)}var Oa=Se(function(){return Va(/^Mac/i)}),ts=Se(function(){return Va(/^iPhone/i)}),rs=Se(function(){return Va(/^iPad/i)||Oa()&&navigator.maxTouchPoints>1}),sr=Se(function(){return ts()||rs()}),ja=Se(function(){return ir(/Android/i)}),ut=Se(function(){return ir(/Firefox/i)});function oe(e){let o=useRef(null);return useMemo(()=>({get current(){return o.current},set current(t){o.current=t,typeof e=="function"?e(t):e&&(e.current=t);}}),[e])}function n1(){return typeof window.ResizeObserver<"u"}function Aa(e){let{ref:o,box:t,onResize:r}=e;useEffect(()=>{let a=o?.current;if(a)if(n1()){let n=new window.ResizeObserver(i=>{i.length&&r();});return n.observe(a,{box:t}),()=>{a&&n.unobserve(a);}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1);}},[r,o,t]);}function zo(e){return !!e&&"label"in e&&!!e.label}function lr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function l1(e){return lr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:o=>jsx(Item,{textValue:o.label,children:o.label},o.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function ae(){return useCallback(e=>l1(e),[])}function is(e,o,t){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=o.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,t);let n=useDroppableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:o.collection,disabledKeys:o.disabledKeys,ref:t,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(o.collection,t)},n,t);return {collectionProps:i,dragState:a,dropState:n}}function g1(e,o){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,o||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (o==="string"?String:Number)(e)}function v1(e){var o=g1(e,"string");return typeof o=="symbol"?o:String(o)}function _1(e,o,t){return o=v1(o),o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function ss(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,r);}return t}function ls(e){for(var o=1;o<arguments.length;o++){var t=arguments[o]!=null?arguments[o]:{};o%2?ss(Object(t),!0).forEach(function(r){_1(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ss(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e}function ps(e,o){var t={};for(var r in e)t[r]=o(e[r],r);return t}var z1=(e,o,t)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=o[r])!==null&&a!==void 0?a:t[r]))return !1}return !0},z=e=>{var o=t=>{var r=e.defaultClassName,a=ls(ls({},e.defaultVariants),t);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,u]of e.compoundVariants)z1(c,a,e.defaultVariants)&&(r+=" "+u);return r};return o.variants=()=>Object.keys(e.variantClassNames),o.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return ps(e.variantClassNames,t=>ps(t,r=>r.split(" ")[0]))}},o};var cs=z({defaultClassName:"_6n12k9b _1yep5z6lh _1yep5z6lg _1yep5z6i1 _1yep5z6kz",variantClassNames:{isDropTarget:{true:"_1yep5z613h"},orientation:{vertical:"_1yep5z6174",horizontal:"_1yep5z6175"}},defaultVariants:{},compoundVariants:[]}),ds="_6n12k98 _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij",us=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),ms=z({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6kz _1yep5z6l2 _1yep5z6lf _1yep5z6le _1yep5z6lc _1yep5z6l9",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z613h _1yep5z617a _1yep5z6178 _1yep5z617b _1yep5z613u _1yep5z613v _1yep5z613w"},isHovered:{true:"_1yep5z611u",false:"_1yep5z611t"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),fs="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",ys="_6n12k90";var bs=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var O=ro.forwardRef(({className:e,style:o,variant:t="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(bs({isVertical:r==="vertical",isSecondary:t==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:o,role:a?void 0:c.role,ref:l})});O.displayName="Separator";function R1(e){return sprinkles.properties.has(e)}var L=ro.forwardRef(({elementType:e="div",children:o,...t},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in t)R1(l)?s[l]=t[l]:p[l]=t[l];return {sprinkleProps:s,domProps:p}},[t]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:o})});L.displayName="Box";var ft=ro.forwardRef(({item:e,isDisabled:o,isFocusVisible:t,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:u},m)=>{invariant(e.value&&zo(e.value),"Item cannot be a section");let{icon:d,label:y}=e.value,{hoverProps:f,isHovered:b}=useHover({isDisabled:o}),v=filterTruthyValues({"data-selected":r,"data-disabled":o,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":t,"data-selection-mode":u.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,f,v),className:classNames(ms({isHovered:b,isFocused:t,isFirstChild:u.collection.getFirstKey()===e.key,isLastChild:u.collection.getLastKey()===e.key,isDisabled:o}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(L,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,d?jsx(d,{size:24}):null,jsx("span",{...p,children:y})]}),i?jsx("span",{className:us({isDisabled:o}),...s,children:i}):null]})});ft.displayName="DefaultRenderOption";var qa=({dropState:e,orientation:o="vertical",dropIndicatorStyle:t,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(cs({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:t}),...n})=>{let i=ro.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:o},i)};var zs=({item:e,children:o,state:t,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(qa,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),o(n),t.collection.getKeyAfter(e.key)==null&&jsx(qa,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};zs.displayName="DraggableListOption";var yt=ro.forwardRef(({item:e,renderOption:o=(m,d,y)=>jsx(ft,{item:m,liProps:d.optionProps,...d,ref:y}),showSelectedIcon:t,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},u)=>{let m=ro.useRef(null),d=useOption({key:e.key},r,m),{value:y}=e;invariant(y&&zo(y),"ListSection should not be passed to ListOption");let f={style:typeof l=="function"?l(y):l,className:typeof c=="function"?c(y):c};return a&&n?jsx(zs,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:b=>o(e,{...d,showSelectedIcon:t,_state:r,optionProps:{...mergeProps(d.optionProps,b),...f}},M(m,u))}):o(e,{...d,showSelectedIcon:t,_state:r,optionProps:{...d.optionProps,...f}},M(m,u))});yt.displayName="Option";var Ps=({section:e,state:o,sectionClassName:t,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=ro.useRef(null),{itemProps:l,groupProps:c,headingProps:u}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=o.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:d}=e;invariant(d&&lr(d),"section must be a ListSection");let y=typeof r=="function"?r(d):r,f=typeof t=="function"?t(d):t;return jsxs(Fragment,{children:[e.key===o.collection.getFirstKey()?null:jsx(O,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...y},className:classNames(ys,f,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(L,{...u,className:classNames("BaselineUI-ListBox-SectionHeader",fs),ref:p,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...m].map(b=>jsx(yt,{item:b,state:o,...s},b.key))})]})]})};function dr({type:e="listbox",handle:o},t,r){let a=useCallback(i=>e==="listbox"?r.current?.querySelector(`[data-key="${i}"][role="option"]`):r.current?.querySelector(`[data-key="${i}"][role="row"]`),[e,r]),n=useCallback((i,s)=>{let p=a(i);p&&p?.scrollIntoView({block:"nearest",inline:"nearest",...s});},[a]);useImperativeHandle(o,()=>({scrollIntoView:n,setFocusedKey:i=>{t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(i),n(i),a(i)?.focus();}}),[n,t.selectionManager,a]),useGranularEffect(()=>{let i=Ve(r.current)instanceof ShadowRoot,s=t.selectionManager.focusedKey;i&&s&&n(s);},[t.selectionManager.focusedKey],[n,r]);}var ao=ro.createContext(null),Ka=ro.forwardRef(({className:e,layout:o="stack",orientation:t="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:u,listBoxHandle:m,...d},y)=>{let f=ro.useRef(null),{direction:b}=useLocale(),v=ro.useRef(null),{listBoxProps:_}=useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:u.collection,ref:v,layout:o,orientation:t,direction:b,disabledKeys:u.disabledKeys})},u,v);dr({handle:m},u,v);let g=useReducedMotion(),h=useCallback(T=>{let P=ue(v.current);c&&(!g&&"startViewTransition"in P?P.startViewTransition(()=>{c(T);}):c(T));},[c,g]),{collectionProps:R,dragState:I,dropState:x}=is({...d,onReorder:h,layout:o,orientation:t,enableReorder:i,preview:f},u,v),{isFocusVisible:C,isFocused:S,focusProps:N}=useFocusRing(),k=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":o,"data-empty":u.collection.size===0,"data-focused":S,"data-focus-visible":C,"data-orientation":t});return jsxs("ul",{...mergeProps(_,N,k,R),className:classNames(ds,"BaselineUI-ListBox",e),style:a,ref:M(y,v),children:[[...u.collection].map(T=>{let P={key:T.key,state:u,dragState:I,dropState:x,renderOption:n,renderDropIndicator:d.renderDropIndicator,renderSectionHeader:d.renderSectionHeader,showSelectedIcon:r,orientation:t,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName,sectionClassName:d.sectionClassName,sectionStyle:d.sectionStyle,showSectionHeader:d.showSectionHeader,withSectionHeaderPadding:d.withSectionHeaderPadding};return T.type==="section"?jsx(Ps,{...P,section:T}):jsx(yt,{...P,item:T})}),l?jsx(DragPreview,{ref:f,children:l}):null]})});Ka.displayName="ListBoxCore";var Is=ro.forwardRef((e,o)=>{let t=ae(),r=useListState({...e,children:t});return jsx(Ka,{...e,ref:o,state:r})});Is.displayName="ListBoxStandalone";var le=ro.forwardRef((e,o)=>{let t=useContext(ao);return useEffect(()=>{if(!e.items&&!t)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,t]),t?jsx(Ka,{...e,ref:o,state:t}):jsx(Is,{...e,ref:o})});le.displayName="ListBox";var ur="uf19bsf _1yep5z6kz",ws=z({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5 _1yep5z6le _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6l9",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6wd _1yep5z6we _1yep5z6wf _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z610z"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6wv _1yep5z6ww _1yep5z6wx _1yep5z6xj _1yep5z6xk _1yep5z6xl _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx",popover:"uf19bse _1yep5z6pg _1yep5z6ph _1yep5z6pi _1yep5z6n4 _1yep5z6n5 _1yep5z6n6 _1yep5z6lv _1yep5z6lw _1yep5z6lx _1yep5z6o7 _1yep5z6o8 _1yep5z6o9 _1yep5z6vg _1yep5z6vh _1yep5z6vi"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61nn"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61nn"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mq"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mp _1yep5z61nn"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61mv"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61pc _1yep5z61t0 _1yep5z61t4 _1yep5z61t1"],[{variant:"ghost",isDisabled:!1},"_1yep5z61mu"],[{variant:"popover",size:"lg"},"_1yep5z61i2 _1yep5z61i3 _1yep5z61i4 _1yep5z61iq _1yep5z61ir _1yep5z61is _1yep5z61je _1yep5z61jf _1yep5z61jg _1yep5z61k2 _1yep5z61k3 _1yep5z61k4"]]});var bt=ro.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...o})=>{let t=ro.useRef(null),r=useOverlayTriggerState(o),a=useOverlayTrigger(o,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:t}),[r,a]);return jsx(bt.Provider,{value:n,children:e})};var Ts={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Ss="_1gzftth1 _1yep5z6ih _1yep5z6ii _1yep5z6ij",Ns="_1gzftth6",Ls="_1gzftth8",Ms="_1gzftth7",Es="var(--_1gzftth0)";function DS(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Ds(e){return typeof e=="object"&&typeof e.left=="number"&&typeof e.top=="number"&&(typeof e.width=="number"||e.width===void 0)&&(typeof e.height=="number"||e.height===void 0)}var mr=ro.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:o})=>{let{state:t,overlayTriggerAria:r,triggerRef:a}=useContext(bt);invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:t.isOpen,ref:a}),[n,t.isOpen,a]);return invariant(!o&&e||o&&!e,"Either one of anchorRect or children has to be provided."),invariant(!o||Ds(o),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(mr.Provider,{value:i,children:o?jsx("button",{className:classNames(Ls,"BaselineUI-PopoverTrigger-Hidden"),style:o,ref:a,tabIndex:-1},JSON.stringify(o)):e})};var fr=({label:e,tooltip:o})=>({tooltipProps:useMemo(()=>{let r={size:"sm",variant:"inverse",text:e,includeArrow:!1,placement:"bottom start",offset:4};if(typeof o=="object")return {...r,...o};if(o)return r},[e,o])});function yr({tooltip:e,...o},t){let[r,a]=useState(o["aria-label"]||""),n=o["aria-labelledby"];useEffect(()=>{if(n){let p=ue(t.current).querySelector(`#${n}`);p&&a(p.textContent||"");}},[n,t]);let{tooltipProps:i}=fr({label:r,tooltip:e});return {tooltipProps:i}}var br=e=>{let o=ro.useRef(null),{ref:t,...r}=useContext(mr)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},o),{isFocusVisible:i,isFocused:s,focusProps:p}=useFocusRing(),{hoverProps:l,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:_o(a,p,l),isPressed:n,ref:M(o,t||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},gr=(e,o)=>{let t=ro.useRef(null),{ref:r,...a}=useContext(mr)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},o,t);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=useFocusRing(),{hoverProps:c,isHovered:u}=useHover({isDisabled:e.isDisabled});return {buttonProps:_o(n,l,c),isPressed:i,ref:M(t,r||null),isFocusVisible:s,isFocused:p,isHovered:u,uiStateOptions:{isHovered:u,isFocused:p,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:o.isSelected}}};var vr=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6dy _1yep5z6kz",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9"},isDisabled:{true:"oom8bsa"},isFocusVisible:{true:"oom8bsb"},isHovered:{true:"oom8bsc"},size:{sm:"oom8bsd",md:"oom8bse",lg:"oom8bsf"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsg"],[{variant:"secondary",isHovered:!0},"oom8bsh"],[{variant:"tertiary",isHovered:!0},"oom8bsi"],[{variant:"popover",isHovered:!0},"oom8bsj"],[{variant:"ghost",isHovered:!0},"oom8bsk"],[{variant:"success",isHovered:!0},"oom8bsl"],[{variant:"warning",isHovered:!0},"oom8bsm"],[{variant:"error",isHovered:!0},"oom8bsn"],[{variant:"primary",isFocusVisible:!0},"oom8bso"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsp"],[{variant:"success",isFocusVisible:!0},"oom8bsq"],[{variant:"warning",isFocusVisible:!0},"oom8bsr"],[{variant:"error",isFocusVisible:!0},"oom8bss"]]}),Wa=z({defaultClassName:"oom8bst _1yep5z6kz",variantClassNames:{isDisabled:{true:"oom8bsu"},isFocusVisible:{true:"oom8bsv"},isHovered:{true:"_1yep5z610u"},variant:{primary:"_1yep5z6111",secondary:"_1yep5z610x",tertiary:"_1yep5z6112",ghost:"_1yep5z6112",popover:"_1yep5z610x",toolbar:"_1yep5z610x",success:"_1yep5z6110",warning:"_1yep5z6110",error:"_1yep5z6110"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:!0},"_1yep5z61mt"],[{variant:"ghost",isHovered:!0},"_1yep5z61mv"],[{variant:"tertiary",isFocusVisible:!0},"_1yep5z61mt"],[{variant:"secondary",isDisabled:!0},"_1yep5z61mr"],[{variant:"tertiary",isDisabled:!0},"_1yep5z61mr"],[{variant:"ghost",isDisabled:!0},"_1yep5z61mr"],[{variant:"popover",isDisabled:!0},"_1yep5z61mr"],[{variant:"toolbar",isDisabled:!0},"_1yep5z61mr"]]});var Sb={sm:16,md:20,lg:24},q=ro.forwardRef(({label:e,style:o,className:t,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...u},m)=>{let{buttonProps:d,isPressed:y,ref:f,isFocusVisible:b,isFocused:v,isHovered:_,uiStateOptions:g}=br({...u,elementType:i,isDisabled:s}),h=Sb[p],R=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":s,"data-focused":v,"data-focus-visible":b,"data-hovered":_,"data-pressed":y});return jsxs(i,{...mergeProps(d,R),className:classNames(vr({isDisabled:!!s,isFocusVisible:b,isHovered:_,variant:n,size:p}),"BaselineUI-ActionButton",typeof t=="function"?t(g):t),style:typeof o=="function"?o(g):o,ref:M(m,f),children:[!!r&&jsx(r,{size:h,className:Wa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsx(a,{size:h,className:Wa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:ur})]})});q.displayName="ActionButton";var js=ro.forwardRef(({className:e,style:o,node:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=ro.useRef(null);ro.useEffect(()=>{let c=s.current;return c?.append(t),()=>{c?.contains(t)&&t.remove();}},[t]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...p,className:e,style:o,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:M(i,s)})});js.displayName="DomNodeRenderer";var As="_14uvjig0 z9nup81",$s="_14uvjig7",Us="_14uvjig3",qs=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),Ks=z({defaultClassName:"_14uvjigf _14uvjig1",variantClassNames:{active:{true:"_14uvjigg _14uvjig2"},isDisabled:{true:"_14uvjigh"},isReadOnly:{true:"_14uvjigi"},isFocusVisible:{true:"_14uvjigj _14uvjig2"},isHovered:{true:"_14uvjigk _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),Gs="_14uvjige _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",Ws="_14uvjig8",Xs=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var Co=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),_r=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),Po=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Oe="nrh1eh3",je=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Ae=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),ko=z({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function ke({description:e,errorMessageProps:o,descriptionProps:t,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...t,className:Co({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...o,className:Co({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:Co({isDisabled:i,labelPosition:n}),children:r}):null}var Ys=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),Zs="_1lnwne0";var Qs=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),Js=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Qa=ro.forwardRef(({children:e,state:o,overlayProps:t,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:o.isOpen},o),u=useMemo(()=>{switch(a){case"top":return {x:0,y:4};case"bottom":return {x:0,y:-4};case"left":return {x:4,y:0};case"right":return {x:-4,y:0};default:return {x:0,y:0}}},[a]),m=useReducedMotion(),[d]=useSpring(()=>({from:{opacity:0,transform:`translate(${u.x}px, ${u.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!m})),y=a==="center"?"bottom":a;return jsxs(animated.span,{...t,style:{...d,...t.style},ref:l,"data-placement":y,children:[p?jsx("div",{className:Qs({placement:y,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:Js({variant:n,size:i}),children:e})]})});Qa.displayName="TooltipContent";function tl({ref:e,onIntersect:o,isDisabled:t,threshold:r,rootMargin:a,root:n}){let i=ro.useRef(null);useEffect(()=>{if(t){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{o(s);},{root:n?.current,rootMargin:a,threshold:r});},[o,t,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function rl({ref:e,onResize:o,isDisabled:t}){let r=ro.useRef(null),[a,n]=ro.useState();return ro.useEffect(()=>{if(t){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),o?.(i);});},[o,t,n]),ro.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function Io({src:e,alt:o}){let[t,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:t,hasError:a,isLoading:i,imgProps:{src:t?e:void 0,alt:o}}}function wo(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var al="SET_STATE",hr="UNDO",xr="REDO",Xb=(e,o)=>{let{past:t,present:r,future:a}=e;switch(o.type){case al:return {past:[...t,r],present:o.data,future:[]};case hr:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[r,...a]};case xr:return {past:[...t,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},nl=(e={},{isDisabled:o,onAction:t})=>{let r=wo(),[a,n]=useReducer(Xb,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=f=>{n({type:al,data:f});},c=useRef(),u=()=>{c.current=hr,n({type:hr});},m=()=>{c.current=xr,n({type:xr});},d=!!i?.length,y=!!p?.length;return useGranularEffect(()=>{(c.current===hr||c.current===xr)&&(t?.(s,c.current),c.current=void 0);},[s],[t,r]),{state:s,push:o?()=>{}:l,undo:o?()=>{}:u,redo:o?()=>{}:m,pastStates:i,futureStates:p,canUndo:d,canRedo:y}};var en=ro.createContext({messages:{},shouldLogMissingMessages:!0}),ll=({children:e,messages:o={},shouldLogMissingMessages:t=!0,...r})=>{let a=ro.useMemo(()=>({messages:o,shouldLogMissingMessages:t}),[o,t]);return jsx(I18nProvider,{...r,children:jsx(en.Provider,{value:a,children:e})})};ll.displayName="I18nProvider";function F(e){let{messages:o,shouldLogMissingMessages:t}=useContext(en);useEffect(()=>{!e&&Qb(o)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,o]);let r=useMessageFormatter(e?cleanKeyFromGlobImport(e):o),a=useLocale();return {formatMessage:(n,i)=>{if(typeof n=="object")try{return r(n.id,i)}catch{return t&&console.log(`BUI \u{1F30D}: Translation not found for key: \`${n.id.toString()}\`. The default message, i.e. \`${n.defaultMessage}\`, will be used instead.`),n.defaultMessage||n.id}else try{return r(n,i)}catch{return t&&console.log(`BUI \u{1F30D}: Translation not found for key: \`${n.toString()}\`. The default message, i.e. \`${n.toString()}\`, will be used instead.`),n}},locale:a}}var U=e=>e;function TL(e,o,t){let r=ro.useRef(null);return ro.useEffect(()=>{if(e)return r.current=new MutationObserver(t),r.current.observe(e,o),()=>{r.current&&r.current.disconnect();}},[e,o,t]),r.current}function cl(e,o){let[t,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):o}catch(n){return console.log(n),o}});return [t,n=>{try{let i=n instanceof Function?n(t):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function BL({ref:e,onSelectionChange:o,onSelectionEnd:t,isDisabled:r}){let a=ro.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=ne(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&t?.(i);},onPressStart(){let n=ne(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=ne(n).getSelection();l&&e.current?.contains(l.anchorNode)&&o(l);}let s=ue(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,o,r]);}function Ro(e){let o=useCallback(()=>{let a=ne(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[t,r]=ro.useState(o);return xe(()=>{let a=ne(e),n=()=>{r(o());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,o]),t}var on=ro.createContext(void 0),ul=({portalContainer:e,children:o})=>jsx(on.Provider,{value:e,children:o});ul.displayName="PortalContainerProvider";function ge(e){let o=useContext(on);return e||o}var ml=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var fl="z9nup80",To="z9nup83",yl="z9nup87";function tn(e=window){let[o,t]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=u=>{t(u.matches?"dark":"light");};return l.matches&&t("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=u=>{a(u.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=u=>{i(u.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=u=>{p(u.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:o,highContrast:r,reducedMotion:n,transparency:s}}var So=createContext({theme:lightTheme,setTheme:()=>{}});var bl="var(--hj25q10)";var kr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},No=ro.forwardRef(({theme:e="system",children:o,setTheme:t,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:u,highContrast:m,transparency:d}=tn(),{name:y,theme:f}=useMemo(()=>{switch(e){case"system":return c==="light"?kr.LIGHT:kr.DARK;case"light":return kr.LIGHT;case"dark":return kr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=Ro(),v={"data-theme":y,"data-block-id":i,"data-block-class":s,"data-reduced-motion":u,"data-high-contrast":m,"data-transparency":d,"data-device":b},_=useMemo(()=>({theme:f,setTheme:t}),[f,t]);return jsx(So.Provider,{value:_,children:jsx("div",{...mergeProps(n,v),className:classNames(fl,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,f),...assignInlineVars({[bl]:l==="rtl"?"-1":"1"}),...a},ref:p,children:o})})});No.displayName="ThemeProvider";var $e=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(So);return jsx(Overlay,{...n,children:jsx(No,{ref:i,theme:s,style:o,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:t})})});$e.displayName="Portal";var te=ro.forwardRef(({children:e,placement:o="bottom",delay:t=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":u,...m},d)=>{let y=ro.useRef(null),f=ro.useRef(null),b=!m.text||m.isDisabled,v=useTooltipTriggerState({...m,delay:t,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:g}=useTooltipTrigger({...m,isDisabled:b,delay:t,closeDelay:r},v,y),h=ge(s),{overlayProps:R,arrowProps:I,placement:x,updatePosition:C}=useOverlayPosition({arrowSize:i?13:0,targetRef:y,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:f,placement:o,isOpen:v.isOpen,...m});return tl({ref:f,threshold:1,onIntersect:C,isDisabled:!v.isOpen}),rl({ref:y,onResize:C,isDisabled:!v.isOpen}),jsxs(FocusableProvider,{..._,ref:y,children:[e,v.isOpen?jsx($e,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":u,children:jsx(Qa,{ref:M(d,f),state:v,arrowProps:I,overlayProps:R,placement:x,tooltipProps:g,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});te.displayName="Tooltip";var Ir=ro.forwardRef(({elementType:e,children:o,...t},r)=>{let a=oe(r),{focusableProps:n}=useFocusable(t,a);return jsx(e??"div",{ref:a,...n,children:o})});Ir.displayName="Focusable";var Hg={xxs:8,xs:12,sm:16,md:20,lg:24},E=ro.forwardRef((e,o)=>{let t=oe(o),{tooltipProps:r}=yr(e,t);return r?jsx(te,{...r,children:jsx(an,{...e,ref:t})}):jsx(an,{...e,ref:t})});E.displayName="ActionIconButton";var an=ro.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{let l=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!l&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,c]);let{buttonProps:u,isPressed:m,ref:d,isFocusVisible:y,isFocused:f,isHovered:b,uiStateOptions:v}=br({...s,elementType:i}),_=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":f,"data-focus-visible":y,"data-disabled":s.isDisabled,"data-hovered":b,"data-pressed":m});return jsxs(i,{...mergeProps(u,_),className:classNames(ws({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:y,isHovered:b}),"BaselineUI-ActionIconButton",typeof e=="function"?e(v):e),ref:M(p,d),style:typeof o=="function"?o(v):o,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(t,{role:"presentation",size:Hg[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:ur})]})});an.displayName="ActionIconButtonCore";var Me=ro.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=ro.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:u}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:y}=useFocusRing(),{labelProps:f,decrementButtonProps:b,inputProps:v,incrementButtonProps:_,groupProps:g,descriptionProps:h,errorMessageProps:R}=useNumberField(n,l,s),I=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorCircleFilledIcon:null,[n.isInvalid,n.isReadOnly]),x=ke({description:n.description,errorMessageProps:R,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:t,isDisabled:n.isDisabled}),C=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":u,"data-focused":y,"data-focus-visible":d,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:o,className:classNames(Ae({labelPosition:t}),"BaselineUI-NumberInput",e),...C,ref:i,children:[n.label?jsxs("div",{className:je({labelPosition:t,hasMessage:!!x}),children:[jsx("label",{...f,className:Oe,children:n.label}),t==="start"&&x]}):null,jsxs("div",{className:classNames({[To]:n.isDisabled}),children:[jsxs("div",{...mergeProps(g,c),className:classNames(ko({isHovered:u,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:y,variant:r}),{[Zs]:t==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(v,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",_r({isDisabled:n.isDisabled,labelPosition:t}))}),I?jsx(I,{className:Po({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:Ys({isHoveredOrFocused:u||y,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(E,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(O,{style:{height:16},orientation:"vertical"}),jsx(E,{variant:"secondary",size:"xxs",icon:PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),t==="top"&&x]})]})});Me.displayName="NumberInput";var Eo=ro.forwardRef(({className:e,style:o,onChange:t,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,"data-block-id":y,"data-block-class":f,defaultValue:b,isReadOnly:v,label:_,id:g,includeNumberInput:h},R)=>{let I=ro.useRef(null),x={onChange:t===void 0?void 0:w=>{t(w[0]);},isDisabled:n||v,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:w=>{r(w[0]);},value:l===void 0?void 0:[l],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,id:g,label:_},C=useNumberFormatter(a),S=useSliderState({...x,numberFormatter:C}),{trackProps:N,groupProps:k,labelProps:T}=useSlider(x,S,I),P=jsx(Me,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":T.id,value:S.getThumbValue(0),formatOptions:a,onChange:w=>{S.setThumbValue(0,w);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...k,style:o,"data-block-id":y,"data-block-class":f,className:classNames(As,"BaselineUI-Slider",e),children:[_?jsxs("div",{className:Us,children:[jsx("label",{...T,className:classNames(qs({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?P:null]}):null,jsxs("div",{className:$s,children:[jsx("div",{...N,className:classNames(Ws,"BaselineUI-Slider-Track"),ref:M(I,R),"data-testid":"track",children:jsx(nv,{state:S,trackRef:I,isDisabled:n,isReadOnly:v})}),h&&!_?P:null]})]})});Eo.displayName="Slider";function nv({state:e,trackRef:o,isDisabled:t,isReadOnly:r}){let a=ro.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:o,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:u,isHovered:m}=useHover({isDisabled:t}),d=filterTruthyValues({"data-disabled":t,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(Xs({isDisabled:t,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...mergeProps(n,u,d),className:classNames(Gs,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:classNames(Ks({isDisabled:t,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb")}),jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})]})]})}var Il=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610m",title:"_1yep5z610m",label:"_1yep5z610n",value:"_1yep5z610n",helper:"_1yep5z610o",body:"_1yep5z610m"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61kx"],[{type:"title",size:"md"},"_1yep5z61l0"],[{type:"title",size:"lg"},"_1yep5z61l3"],[{type:"body",size:"sm"},"_1yep5z61ln"],[{type:"body",size:"md"},"_1yep5z61lq"],[{type:"body",size:"lg"},"_1yep5z61lq"],[{type:"subtitle",size:"sm"},"_1yep5z61lj"],[{type:"subtitle",size:"md"},"_1yep5z61lm"],[{type:"subtitle",size:"lg"},"_1yep5z61lm"],[{type:"label",size:"md"},"_1yep5z61ll"],[{type:"label",size:"lg"},"_1yep5z61ll"],[{type:"value",size:"md"},"_1yep5z61ll"],[{type:"value",size:"lg"},"_1yep5z61ll"],[{type:"helper",size:"sm"},"_1yep5z61lf"]]});var Q=ro.forwardRef(({elementType:e="span",type:o="title",children:t,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Il({size:r,type:o}),"BaselineUI-Text",a.className),ref:n,children:t}));Q.displayName="Text";var wl=z({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6lq _1yep5z6lo _1yep5z6gz _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{background:{subtle:"_1yep5z611t",medium:"_1yep5z611u"},isFocusVisible:{true:"_1yep5z6178 _1yep5z617a _1yep5z617b _1yep5z613h"}},defaultVariants:{},compoundVariants:[]}),Rl="siobe25",Tl="var(--siobe20)";var Tr=ro.forwardRef(({className:e,style:o,children:t,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,...l},c)=>{let{formatMessage:u}=F(),m=ro.useRef(null),{dialogProps:d,titleProps:y}=useDialog(l,m),{focusProps:f,isFocusVisible:b}=useFocusRing();return jsxs("div",{...mergeProps(d,f),className:classNames(wl({background:r,isFocusVisible:b}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:o,ref:M(c,m),children:[jsxs(L,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Rl,children:[jsx(Q,{type:"title",size:"sm",...y,className:yl,children:a}),jsxs(L,{children:[n?jsx(E,{...n,variant:"secondary"}):null,jsx(E,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":u(yv.close)})]})]}),jsx(O,{variant:r==="subtle"?"primary":"secondary"}),t]})});Tr.displayName="Drawer";var yv=U({close:{id:"close",defaultMessage:"Close"}});function Ll(e,o,t){let{isDisabled:r}=e,a=useReducedMotion(),[n,i]=ro.useState("100vh");useEffect(()=>{if(!sr()&&!ja())return;let d=ne(t.current);function y(){i(`${d?.visualViewport.height}px`);}return y(),d?.visualViewport.addEventListener("resize",y),()=>{d?.visualViewport.removeEventListener("resize",y);}},[t]);let[{y:s},p]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),l=useRef(0),c=useCallback(()=>{p.start({y:l.current,onRest:()=>{o.close();}});},[p,o]),u=useCallback(d=>{d.target.closest("[data-drawer]")||c();},[c]);useGranularLayoutEffect(()=>{l.current=t.current?.offsetHeight||0,p.set({y:l.current}),p.start({y:0,immediate:!!a});},[],[p,a]);let m=s.to({range:[0,l.current/2,l.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:s.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:m},onPointerDown:r?void 0:u},close:c,containerHeight:r?void 0:n}}var Ml=z({defaultClassName:"aml2vl0 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i8 _1yep5z6i9 _1yep5z6ia",variantClassNames:{enableDrawer:{false:"_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),El="_1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6gb _1yep5z6i8 _1yep5z6i9 _1yep5z6ia";var qe=ro.createContext({state:null,triggerProps:{},overlayProps:{}}),Ie=({children:e,...o})=>{let t=useOverlayTriggerState(o),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},t),n=useMemo(()=>({state:t,triggerProps:r,overlayProps:a}),[t,r,a]);return jsx(qe.Provider,{value:n,children:e})};Ie.displayName="Modal";var pn=ro.createContext({isDrawer:!1,closeDrawer:()=>{}}),cn=ro.createContext({setIsPopoverSafelyClosed:()=>{}}),Dv=animated(No),Bv=({children:e,className:o,style:t,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=ro.useContext(qe),[u,m]=ro.useState(!0),d=Ro(n),y=ge(n),f=typeof s=="boolean"&&s||s==="auto"&&d==="mobile";invariant(c,"ModalContent must be a child of Modal");let b=ro.useRef(null),v=typeof r=="function"?r(f):r,_=typeof a=="function"?a(f):a,{underlayProps:g,overlayProps:h,close:R,containerHeight:I}=Ll({isDisabled:!f,isDismissable:v&&u},c,b),{modalProps:x,underlayProps:C}=useModalOverlay({isDismissable:!f&&u,isKeyboardDismissDisabled:_},c,b),{theme:S}=useContext(So),N=useReducedMotion(),k=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!N||i,config:{easing:easings.easeInBounce}}),T=useMemo(()=>({...x.style,...f?{...h.style,width:"100%"}:k}),[h.style,x.style,f,k]),P=useMemo(()=>({isDrawer:f,closeDrawer:R}),[f,R]),w=useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsx(Overlay,{portalContainer:y,children:jsx(pn.Provider,{value:P,children:jsx(cn.Provider,{value:w,children:jsxs(Dv,{className:classNames(Ml({enableDrawer:f}),o),theme:S,"data-block-id":p,"data-block-class":l,style:{...t,height:f?I:"auto",...assignInlineVars({[Tl]:I})},children:[jsx(animated.div,{...mergeProps(C,g,{onPointerDown:f?g.onPointerDown:C.onPointerDown}),"data-testid":"underlay",style:g.style,className:classNames(El,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(x,h),style:T,ref:b,"data-drawer":f,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})})},Fv=animated(Bv),Ee=({children:e,style:o,...t})=>{let{state:r}=ro.useContext(qe);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||t.disableAnimation})((i,s)=>s&&jsx(Fv,{...t,style:{...o,...i},children:typeof e=="function"?e(r):e}))};var Vl=z({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z612r _1yep5z617g _1yep5z617i",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx _1yep5z6174"},isFocusVisible:{true:"_1yep5z613h _1yep5z617b _1yep5z617a _1yep5z6178"}},defaultVariants:{},compoundVariants:[]});var un=ro.createContext({titleProps:{}}),me=ro.forwardRef(({children:e,className:o,style:t,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let u=ro.useRef(null),m=ro.useRef(null),{isDrawer:d,closeDrawer:y}=useContext(pn),[f,b]=ro.useState(""),{focusProps:v,isFocusVisible:_}=useFocusRing();useLayoutEffect(()=>{let I=m.current?.getRootNode(),x=l["aria-label"]||"";l["aria-labelledby"]&&(x=I?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(x);},[l]);let{dialogProps:g,titleProps:h}=useDialog(l,u),R=useMemo(()=>({titleProps:h}),[h]);return d&&r?jsx(Tr,{title:f,onCloseRequest:y,className:o,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:M(m,c),background:p,children:e}):jsx(un.Provider,{value:R,children:jsx("section",{...mergeProps(g,v),"data-block-id":i,"data-block-class":s,ref:M(u,c),style:t,className:classNames(Vl({size:d?"content":a,variant:n,isDrawer:d,isFocusVisible:_}),"BaselineUI-Dialog",o),children:e})})});me.displayName="Dialog";var Ol=ro.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:a}=useContext(un);return ro.isValidElement(e)?ro.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,o),style:{...e.props.style,...t}}):jsx("h3",{...a,ref:r,className:o,style:t,children:e})});Ol.displayName="DialogTitle";function jl({placement:e,isOpen:o}){let t=useReducedMotion();return useTransition(o,{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 $l=({children:e,isOpen:o,popoverContentRef:t,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,p]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(cn);useEffect(()=>{o?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[o]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let u=t.current;return useEffect(()=>{u&&p(u.getBoundingClientRect());},[u]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?e_.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var{color:fn}=themeVars,ye=ro.forwardRef(({className:e,style:o,state:t,overlayProps:r,underlayClassName:a,children:n,includeArrow:i=!1,offset:s=2,portalContainer:p,contentContainerClassName:l,contentContainerStyle:c,"data-block-id":u,"data-block-class":m,...d},y)=>{let f=ro.useRef(null),b=ge(p),v=i?8:0,{underlayProps:_,popoverProps:g,placement:h,arrowProps:R}=usePopover({...d,offset:s+v,popoverRef:f,containerPadding:d.containerPadding||0},t);delete g.style?.position;let I=jl({placement:h,isOpen:t.isOpen}),x=h==="center"?"bottom":h;return jsx($l,{isOpen:t.isOpen,popoverContentRef:f,portalContainer:b,style:g.style,children:I((C,S)=>S&&jsxs($e,{portalContainer:b,style:o,ref:y,"data-block-id":u,"data-block-class":m,children:[!d.isNonModal&&jsx("div",{..._,className:classNames(Ms,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...g,style:{...g.style,...C,...assignInlineVars({[Es]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:M(f,y),className:classNames(Ss,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(N=>h?.includes(N)),children:[i?jsxs("svg",{className:classNames(Ts[x],"BaselineUI-PopoverContent-Arrow"),...R,style:{...R.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:fn.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:fn.background.primary.subtle,stroke:fn.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:t.close}),jsx("div",{...r,style:c,className:classNames(Ns,l),children:typeof n=="function"?n(t):n}),jsx(DismissButton,{onDismiss:t.close})]})]}))})});ye.displayName="PopoverContentCore";var we=ro.forwardRef((e,o)=>{let{state:t,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(bt);return invariant(a),t?jsx(ye,{ref:o,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:t}):null});we.displayName="PopoverContent";var Kl=z({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),Ke="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Gl=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Mr="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1",Wl="_1yep5z66x _1yep5z66y _1yep5z66z",Xl="_1mdhlqv5 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k";var Jl=ro.forwardRef(({className:e,style:o,onChange:t,"data-block-id":r,icon:a,formatValue:n=u=>u,tooltipProps:i,popoverContentProps:s,isDisabled:p,...l},c)=>{let u=oe(c),[m,d]=useControlledState(l.value,l.defaultValue||0,t),[y,f]=ro.useState(!1),{keyboardProps:b}=useKeyboard({onKeyDown:g=>{(g.key==="Enter"||g.key==="Escape")&&f(!1);}}),v=n(m||0),_=i?.isDisabled||l["aria-label"]?`${l["aria-label"]}, ${v}`:v.toString();return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:o,ref:u,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:y,onOpenChange:f,children:[jsx(Le,{children:jsx(te,{text:l["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:p,...i,children:jsx(q,{label:v,variant:"popover","aria-label":_,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(we,{placement:"bottom start",...s,className:classNames(Ke,s?.className),children:jsx(me,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(L,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...b,children:jsx(Eo,{...l,onChange:g=>{d(g),t?.(g);},value:m})})})})})]})]})});Jl.displayName="IconSlider";var ep=z({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),op=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),tp="bpklwad",rp=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),ap="bpklwa6",np=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var pp=ro.forwardRef(({className:e,label:o,labelPosition:t="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=ro.useRef(null),c=useToggleState(s),{inputProps:u,isPressed:m}=useSwitch(s,c,l),{isFocusVisible:d,focusProps:y}=useFocusRing(),{hoverProps:f,isHovered:b}=useHover({isDisabled:s.isDisabled}),v=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":d,"data-disabled":s.isDisabled,"data-focus-visible":d,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":b,"data-pressed":m}),_=jsx("div",{className:classNames(ep({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(op({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(v,f),className:classNames(rp({labelPosition:t}),"BaselineUI-Switch",e),style:a,ref:p,children:[o?jsx("span",{className:classNames(tp,"BaselineUI-Switch-Label"),children:o}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,y),ref:l})}),r?jsxs("div",{className:np({labelPosition:t}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",ap),children:c.isSelected?r.on:r.off}),_]}):_]})});pp.displayName="Switch";var cp="_19n40yy9",dp=z({defaultClassName:"_19n40yy0",variantClassNames:{size:{lg:"_19n40yy1",md:"_19n40yy2",sm:"_19n40yy3"},variant:{primary:"_19n40yy4",ghost:"_19n40yy5"},isFocused:{true:"_19n40yy6"},hasText:{true:"_19n40yy7"},isDisabled:{true:"_19n40yy8"}},defaultVariants:{},compoundVariants:[]});var N_={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},fp=ro.forwardRef(({className:e,size:o="md",variant:t="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=ro.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:u}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:d,isFocused:y}=useFocusRing({within:!0,isTextInput:!0}),f=N_[o],b=o==="sm"?XIcon$2:XIcon$3,v=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":y,"data-disabled":i.isDisabled,"data-focus-visible":d});return jsxs("div",{...v,className:classNames(dp({size:o,isFocused:y,variant:t,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(f,{size:o==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:cp,ref:p}),l.value!==""&&jsx(E,{icon:b,...u,size:o==="sm"?"xs":"sm",variant:"secondary"})]})});fp.displayName="SearchInput";var yp="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 _1yep5z6lh _1yep5z6lg _1yep5z6hs _1yep5z6lk _1yep5z6g1",bp="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var gn=({section:e,showSelectedIcon:o,state:t})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==t.collection.getFirstKey()&&jsx(O,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:bp,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(Er,{item:i,state:t,showSelectedIcon:o},i.key)))})]})]})};gn.displayName="MenuSection";var Er=({item:e,state:o,className:t,showSelectedIcon:r})=>{let a=ro.useRef(null),n=useMenuItem({key:e.key},o,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(ft,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:t}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:o,showSelectedIcon:r})};Er.displayName="MenuItem";var _n=ro.forwardRef(({className:e,itemClassName:o,onContentKeyDown:t,...r},a)=>{let n=useTreeState(r),i=ro.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:t});return jsx("ul",{...mergeProps(s,p),className:classNames(yp,e),ref:M(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(gn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(Er,{item:l,state:n,className:o,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});_n.displayName="MenuContent";var Dr=ro.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:t,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u,triggerLabel:m,renderTrigger:d=({buttonProps:v,ref:_})=>jsx(q,{...v,variant:"popover",ref:_}),portalContainer:y,...f},b)=>{let v=ro.useRef(null),_=ge(y),g=useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o}),{menuTriggerProps:h,menuProps:R}=useMenuTrigger({isDisabled:r,type:"menu"},g,v),I=ae(),x=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:g.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(g.isOpen):m}),[h,r,g.isOpen,m]);return useEffect(()=>{!m&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,m]),jsxs(Fragment,{children:[d({buttonProps:x,ref:v}),jsx(ye,{triggerRef:v,state:g,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u||2,className:classNames(Ke,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsx(_n,{className:a,...R,...f,ref:b,autoFocus:g.focusStrategy||"first",children:I})})]})});Dr.displayName="Menu";var Br=z({defaultClassName:"_13f0naj0",variantClassNames:{variant:{default:"_13f0naj1",inline:"_13f0naj2"},isHovered:{true:"_13f0naj3"},isFocusVisible:{true:"_13f0naj4"},isDisabled:{true:"_13f0naj5"},size:{sm:"_13f0naj6",md:"_13f0naj7",lg:"_13f0naj8"},type:{body:"_13f0naj9",label:"_13f0naja"},isActive:{true:"_13f0najb"}},defaultVariants:{},compoundVariants:[[{isActive:!0,isDisabled:!1},"_13f0najc"],[{type:"body",size:"sm"},"_13f0najd"],[{type:"body",size:"md"},"_13f0naje"],[{type:"body",size:"lg"},"_13f0najf"],[{type:"label",size:"sm"},"_13f0najg"],[{type:"label",size:"md"},"_13f0najh"],[{type:"label",size:"lg"},"_13f0naji"]]});var hp=ro.forwardRef(({className:e,style:o,children:t,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,role:c,...u},m)=>{let d=ro.useRef(null),{linkProps:y,isPressed:f}=useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:b,isFocused:v,focusProps:_}=useFocusRing(),{hoverProps:g,isHovered:h}=useHover({isDisabled:u.isDisabled}),R=n,I=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-disabled":u.isDisabled,"data-focused":v,"data-pressed":f,"data-focus-visible":b,"data-hovered":h,role:c,title:l});return jsx(R,{...mergeProps(y,_,g,I),className:classNames(Br({variant:r,isFocusVisible:b,isHovered:h,isDisabled:u.isDisabled,size:a,isActive:f,type:i}),"BaselineUI-Link",e),ref:M(d,m),style:o,children:t})});hp.displayName="Link";function xp({isDisabled:e,onValueChange:o,onChange:t,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let d=[...m.target.files||[]];o?.(d),t?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function xn({items:e}){let o=e.filter(t=>t.kind==="file").map(async t=>(invariant(t.kind==="file"),t.getFile()));return await Promise.all(o)}var Cp=z({defaultClassName:"_180w5ed0",variantClassNames:{variant:{default:"_180w5ed1",inline:"_180w5ed2"},hoveredOrFocusedOrActive:{true:"_180w5ed3"},disabled:{true:"_180w5ed4"}},defaultVariants:{},compoundVariants:[[{variant:"inline",hoveredOrFocusedOrActive:!0},"_180w5ed5"],[{variant:"default",hoveredOrFocusedOrActive:!0},"_180w5ed6"],[{variant:"default",disabled:!0},"_180w5ed7"],[{variant:"inline",disabled:!0},"_180w5ed8"]]}),Pp=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),kp=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Ip=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Sp=ro.forwardRef(({className:e,label:o,description:t,icon:r,variant:a="default",...n},i)=>{let s=ro.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=xp(n),{dropProps:u}=useDrop({ref:s,onDrop:async({items:b})=>{let v=b.filter(g=>g.kind==="file").map(async g=>(invariant(g.kind==="file"),g.getFile())),_=await Promise.all(v);n.onValueChange?.(_);}}),{focusProps:m,isFocusVisible:d}=useFocusRing(),{hoverProps:y,isHovered:f}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(u,y,c),className:classNames(Cp({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:f||d}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,p)})}),r?jsx(r,{size:20,className:kp({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Ip({disabled:n.isDisabled,hovered:f}),children:o}),t?jsx("div",{...l,className:Pp({disabled:n.isDisabled}),children:t}):null]})]})});Sp.displayName="FileUpload";var Np="_12vfhl40 z9nup81",Lp="_12vfhl41 z9nup82",Mp=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Ep="_12vfhl42",Dp="_12vfhl47",Bp="_12vfhl46 z9nup82",Fp="_12vfhl45",Hp=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Vp=ro.forwardRef(({className:e,style:o,variant:t="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:u,progressBarProps:m}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:d=0,maxValue:y=100,value:f=0,label:b}=p,v=(f-d)/(y-d),_=`${Math.round(v*100)}%`,g=jsx("output",{className:Hp({hasLabel:!!b}),children:m["aria-valuetext"]}),h=t==="error"?n:a;return jsxs("div",{...m,style:o,className:classNames(Np,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Lp,children:[jsx("label",{...u,className:Ep,children:b}),r?g:null]}):null,jsxs("div",{className:Fp,children:[jsxs("div",{className:Bp,children:[jsx("div",{className:Dp,children:jsx("div",{style:{width:_},className:Mp({variant:t})})}),!b&&r?g:null]}),h?jsx("div",{className:Co({hasError:t==="error"}),id:c,children:h}):null]})]})});Vp.displayName="ProgressBar";function Vo({isReadOnly:e,validationState:o}){return e?ReadOnlyIcon:o==="error"?ErrorCircleFilledIcon:o==="warning"?WarningFilledIcon:null}var Ge=ro.forwardRef(({className:e,validationState:o,variant:t="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let u=ro.useRef(null),{inputProps:m,labelProps:d,descriptionProps:y,errorMessageProps:f,validationErrors:b}=useTextField({...l,validationState:o?o==="error"?"invalid":"valid":void 0},u),v=l.errorMessage||b.join(" "),_=ke({...l,errorMessage:v,descriptionProps:y,errorMessageProps:f,labelPosition:a});v&&(o="error");let{hoverProps:g,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:R,focusProps:I,isFocusVisible:x}=useFocusRing(),C=Vo({isReadOnly:l.isReadOnly,validationState:o??"valid"}),S=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":o,"data-focused":R,"data-focus-visible":x});return jsxs("div",{className:classNames(Ae({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&_?jsxs("div",{className:je({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...d,className:Oe,children:l.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[To]:l.isDisabled}),children:[jsxs("div",{...g,className:ko({validationState:o??"valid",isHovered:h,isFocused:R,variant:t,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,I,S),className:classNames(_r({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:u}),C?jsx(C,{className:Po({validationState:o??"valid",isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Ge.displayName="TextInput";var Oo=({value:e,...o})=>{let t=useNumberFormatter(o);return jsx(Fragment,{children:t.format(e)})};Oo.displayName="NumberFormat";var jp="_1yep5z6ik _1yep5z6il _1yep5z6im",Ap=z({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup83"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0,isReadOnly:!1},"_9b1tml7"],[{isSelected:!0,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml8"],[{isSelected:!1,isHovered:!0,isDisabled:!1,isReadOnly:!1},"_9b1tml9"],[{isSelected:!0,isDisabled:!0},"_9b1tmla"],[{isSelected:!0,isReadOnly:!0},"_9b1tmlb"]]}),$p=z({defaultClassName:"_9b1tmlf",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_9b1tmlk"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"_9b1tmll"],[{isSelected:!0,isDisabled:!0},"_9b1tmlm"],[{isSelected:!1,isDisabled:!0},"_9b1tmln"]]}),Up=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var Gp=ro.forwardRef(({className:e,count:o,style:t,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let u=ro.useRef(null),m=useToggleState({...s,...l}),{inputProps:d,isPressed:y,isDisabled:f,isReadOnly:b,isSelected:v}=useSwitch({...s,...l},m,u),{focusProps:_,isFocused:g,isFocusVisible:h}=useFocusRing(),{hoverProps:R,isHovered:I}=useHover({}),x=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":g,"data-focus-visible":h,"data-disabled":f,"data-hovered":I,"data-pressed":y,"data-selected":v});return jsxs("label",{ref:p,style:t,className:classNames(jp,"BaselineUI-Reaction",e),...x,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,..._,ref:u})}),jsxs("div",{...R,className:Ap({isSelected:v,isFocusVisible:h,isHovered:I,isReadOnly:b,isDisabled:f}),children:[jsx("div",{className:Up({isDisabled:f,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:$p({isSelected:m.isSelected,isDisabled:f,isReadOnly:b,size:r}),children:jsx(Oo,{value:o})})]})]})});Gp.displayName="Reaction";var Wp="_1azy5686",Xp="_1azy5685",Yp="var(--_1azy5680)",Zp="_1azy5688",Qp="_1azy5689",Jp="_1azy5681 z9nup82",ec="_1azy5682";var oc="_1azy5687";var K6={sm:16,md:20},G6={sm:[CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon],md:[CheckCircleFilledIcon,ErrorAltCircleFilledIcon$1]},Ao=ro.forwardRef(({className:e,style:o,size:t="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=K6[t],u=c/2-2,m=2*u*Math.PI,d=G6[t][r==="success"?0:1];return jsxs("div",{className:classNames(Jp,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[Yp]:`${m}px`}),...o},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:ec,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:Wp,cx:c/2,cy:c/2,r:u}),r==="active"&&jsx("circle",{role:"presentation",className:Xp,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsx(d,{className:oc,size:c}),r==="error"&&jsx(d,{className:Zp,size:c})]}),i.label?jsx("span",{...p,className:Qp,children:i.label}):null]})});Ao.displayName="ProgressSpinner";var Vr=z({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kpa"],[{isSelected:!0,isDisabled:!0},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),tc=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z610z"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]});var J6={sm:16,md:20,lg:24},Or=ro.forwardRef(({className:e,style:o,iconStart:t,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=useToggleState(i),{buttonProps:l,isPressed:c,ref:u,isFocusVisible:m,isFocused:d,isHovered:y,uiStateOptions:f}=gr(i,p),b=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":d,"data-focus-visible":m,"data-disabled":i.isDisabled,"data-hovered":y,"data-pressed":c,"data-selected":p.isSelected});return jsxs(a,{...mergeProps(l,b),className:classNames(Vr({isHovered:y,isFocusVisible:m,isSelected:p.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(f):e),style:typeof o=="function"?o(f):o,ref:M(u,s),children:[t?jsx(t,{size:J6[r],className:tc({isDisabled:i.isDisabled,isSelected:p.isSelected})}):null,i.label]})});Or.displayName="ToggleButton";var jr=z({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),rc=z({defaultClassName:"_16vugd02 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{labelPosition:{end:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6va _1yep5z6vb _1yep5z6vc",start:"_1yep5z614o _1yep5z614p _1yep5z614q _1yep5z6160 _1yep5z6161 _1yep5z6162"}},defaultVariants:{},compoundVariants:[]}),ac=z({defaultClassName:"_16vugd06",variantClassNames:{isIndeterminate:{true:"_16vugd05"},isSelected:{true:"_16vugd05"},isFocusVisible:{true:"_16vugd09"},isHovered:{true:"_16vugd0a"},isDisabled:{true:"_16vugd0b"},isReadOnly:{true:"_16vugd0c"},hasError:{true:"_16vugd0d"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0e"]]});var sc=ro.forwardRef(({className:e,style:o,label:t,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:u,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:y,isDisabled:f,isSelected:b,isReadOnly:v}=useCheckbox({...i,children:t},l,p),{hoverProps:_,isHovered:g}=useHover({isDisabled:f}),h=filterTruthyValues({"data-disabled":f,"data-readonly":v,"data-hovered":g,"data-selected":b,"data-pressed":y,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":u,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(rc({labelPosition:r}),"BaselineUI-Checkbox",e),style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:p})}),jsxs("div",{..._,className:ac({isSelected:b&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:f,isReadOnly:v,hasError:i.isInvalid,isHovered:g}),children:[b&&!i.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),t?jsx("span",{className:jr({isDisabled:f}),children:t}):null]})});sc.displayName="Checkbox";var lc={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 pc=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),cc="_1nsi9h1f _1yep5z6ln _1yep5z6lf _1yep5z6eu",dc=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6g1 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z6zn",sm:"_1nsi9h12 _1yep5z6zq",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6yz _1yep5z617i _1yep5z617g _1yep5z612q",pinned:"_1yep5z6174"}},defaultVariants:{},compoundVariants:[]}),uc=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]});var R5={style:"decimal"},T5={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},gc=ro.forwardRef(({className:e,style:o,minValue:t=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...u},m)=>{let{locale:d}=useLocale(),y=F(lc),f={...u,formatOptions:R5,minValue:t,incrementAriaLabel:a||y.formatMessage("nextPage"),decrementAriaLabel:n||y.formatMessage("prevPage"),defaultValue:r,"aria-label":i||y.formatMessage("goToPage")},b=ro.useRef(null),v=useNumberFieldState({...f,locale:d}),{inputProps:_,decrementButtonProps:g,incrementButtonProps:h,groupProps:R}=useNumberField({...f,onKeyDown:B=>{B.key==="Enter"&&b.current?.blur(),u.onKeyDown?.(B);},isDisabled:c},v,b),{hoverProps:I,isHovered:x}=useHover({}),{focusProps:C,isFocused:S,isFocusVisible:N}=useFocusRing(),k=p==="floating",[T,P]=T5[s],w=filterTruthyValues({"data-focus-visible":N,"data-focused":S,"data-hovered":x,"data-block-id":u["data-block-id"],"data-block-class":u["data-block-class"]}),H=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(R,I,w),className:classNames(dc({size:s,variant:p}),"BaselineUI-Pagination",e),style:o,ref:m,children:[l?null:jsxs(Fragment,{children:[jsx(E,{icon:T,...g,elementType:"div",size:s,style:{height:"100%",...k&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||g.isDisabled}),p==="floating"&&jsx(O,{orientation:"vertical"})]}),jsxs("div",{className:pc({isFocused:S,variant:p,size:s}),"aria-label":y.formatMessage("pageXofY",{arg0:_.value,arg1:v.maxValue}),children:[jsx("input",{...mergeProps(_,C),ref:b,className:classNames("BaselineUI-Pagination-Input",cc),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:uc({isDisabled:c}),children:["/ ",jsx(Oo,{value:v.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(O,{orientation:"vertical"}),jsx(E,{icon:P,...h,elementType:"div",size:s,style:{height:"100%",...k&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||h.isDisabled})]})]})});gc.displayName="Pagination";var vc=({date:e,...o})=>{let t=useDateFormatter(o);return jsx(Fragment,{children:t.format(e)})};vc.displayName="DateFormat";var wt=z({defaultClassName:"_1f789qjr",variantClassNames:{variant:{neutral:"_1yep5z610x",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z6110"},isDisabled:{true:"_1yep5z61mr"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Ar=z({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"]]}),_c="_1f789qjz",zc="_1f789qj0",hc=z({defaultClassName:"_1f789qj10",variantClassNames:{variant:{neutral:"_1f789qj11",red:"_1f789qj12",green:"_1f789qj13",blue:"_1f789qj14","high-contrast":"_1f789qj15"},isHovered:{true:"_1f789qj16"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qj17"],[{isHovered:!0,variant:"red"},"_1f789qj18"],[{isHovered:!0,variant:"blue"},"_1f789qj19"],[{isHovered:!0,variant:"green"},"_1f789qj1a"],[{isHovered:!0,variant:"high-contrast"},"_1f789qj1b"]]}),$r=z({defaultClassName:"_1f789qjj",variantClassNames:{variant:{neutral:"_1yep5z610m",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z610r"},isDisabled:{true:"_1yep5z61mi"},isSelected:{true:"_1yep5z610s"}},defaultVariants:{},compoundVariants:[]});var kc=({item:e,state:o,variant:t="neutral"})=>{let r=ro.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:u,allowsSelection:m}=useTag({item:e},o,r),d=ro.useRef(null),{buttonProps:y}=useButton(p,d),{hoverProps:f,isHovered:b}=useHover({isDisabled:c}),{hoverProps:v,isHovered:_}=useHover({isDisabled:c}),g=e.value?.icon,h=e.value?.data?.variant??t;return jsx("div",{...mergeProps(i,a,v),ref:r,className:classNames(Ar({isFocusVisible:n,variant:h,isDisabled:c,allowsRemoving:l,isSelected:u,allowsSelection:m,isHovered:_}),$r({variant:h,isDisabled:c,isSelected:u}),"BaselineUI-Tag"),children:jsxs("div",{...s,className:_c,children:[u?jsx(CheckmarkIcon$3,{size:16,className:wt({variant:h,isDisabled:c,isSelected:u})}):null,!u&&g?jsx(g,{size:16,className:wt({variant:h,isDisabled:c,isSelected:u})}):null,e.rendered,l?jsx("button",{...mergeProps(y,f),className:hc({variant:h,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var Rc=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,...n},i)=>{let s=useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),p=ae(),l=ro.useRef(null),c=useListState({...n,items:s,children:p}),{gridProps:u}=useTagGroup(n,c,l);return jsx("div",{...u,className:classNames(zc,"BaselineUI-TagGroup",e),style:o,"data-block-id":t,"data-block-class":r,ref:M(i,l),children:[...c.collection].map(m=>jsx(kc,{state:c,item:m,variant:n.variant},m.key))})});Rc.displayName="TagGroup";var Tc="_1yep5z6lc",Sc=z({defaultClassName:"_1kvz17db _1yep5z6kz _1yep5z6l1",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Nc=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6kz _1yep5z6l0",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Lc="_1yep5z6ev _1yep5z6dy",Mc=z({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6kz _1yep5z6l2",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6g2",false:"_1yep5z6g3"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Ec="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Dc=z({defaultClassName:"_1kvz17d7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var wn=ro.forwardRef(({children:e,className:o,style:t},r)=>{let{headers:a}=useContext(We),{disabledKeys:n}=useContext(We),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=Ve(s.target),l=[...a?.keys()||[]].findIndex(y=>a?.get(y)?.current===p?.activeElement),c=a?.get(l||0),u=a?.size||0,m=y=>{let f=a.get(y-1<0?u-1:y-1);n?.has(f?.current?.getAttribute("data-key")||"")?m(y-1):f?.current?.focus();},d=y=>{let f=a.get((y+1)%u);n?.has(f?.current?.getAttribute("data-key")||"")?d(y+1):f?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),d(-1);break}case"End":{s.preventDefault(),m(u);break}case"ArrowDown":{s.preventDefault(),d(l);break}case"ArrowUp":{s.preventDefault(),m(l);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:t,className:classNames(Tc,o),ref:r,children:ro.Children.map(e,(s,p)=>ro.cloneElement(s,{index:p}))})});wn.displayName="AccordionBase";var We=ro.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Hc=ro.forwardRef(({children:e,disabledKeys:o,defaultExpandedKeys:t=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=ro.useState(t),u=ro.useRef(new Map).current,[m,d]=ro.useState(a);useEffect(()=>{d(m);},[m]),useEffect(()=>{n?.(l);},[l,n]);let y=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:o,headers:u,expansionMode:m}),[r,l,o,u,m]);return jsx(We.Provider,{value:y,children:jsx(FocusScope,{children:jsx(wn,{className:i,style:s,ref:p,children:e})})})});Hc.displayName="Accordion";var Tn=ro.forwardRef(({title:e,actions:o,controlId:t,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=ro.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:y}=useContext(We),f=d?.has(r),b=useFocusManager();invariant(b);let{focusNext:v,focusPrevious:_}=b,{keyboardProps:g}=useKeyboard({onKeyDown:w=>{w.key==="ArrowRight"?v({wrap:!0}):w.key==="ArrowLeft"?_({wrap:!0}):w.continuePropagation();},isDisabled:f});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),y?.set(n,l);},[n,y]);let h=()=>{u(w=>{let D=new Set(w);return D.has(r)?D.delete(r):(m==="single"&&D.clear(),D.add(r)),D});},{buttonProps:R}=useButton({"aria-expanded":c.has(r),"aria-controls":t,onPress:h,isDisabled:f},l),{pressProps:I}=usePress({onPress:h,isDisabled:f}),{focusProps:x,isFocusVisible:C}=useFocusRing(),{hoverProps:S,isHovered:N}=useHover({isDisabled:f}),{focusProps:k,isFocusVisible:T}=useFocusRing({within:!0}),P=c.has(r);return jsxs("h3",{...mergeProps(g,I,S,k),className:Mc({isFocusVisible:C,isHovered:N,isDisabled:f}),ref:p,children:[jsxs("div",{className:Dc({isDisabled:!!f}),children:[jsx(ChevronRightIcon,{className:Nc({isExpanded:P}),size:8}),jsx("button",{...mergeProps(R,x),id:a,"data-key":r,className:Ec,ref:l,children:e})]}),o?.length?jsx("div",{"data-testid":"action-buttons",className:Sc({showActionsOnTriggerOnly:s,isTriggered:T||N}),children:o.map((w,D)=>jsx(E,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:f,...w},D))}):null,i?jsx("div",{className:Lc,children:i}):null]})});Tn.displayName="AccordionHeader";var Kc=ro.forwardRef(({title:e,actions:o,children:t,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),u=useId(),{expandedKeys:m}=useContext(We),d=ro.useRef(null),y=m.has(r),f=wo(),b=useReducedMotion(),v=useTransition(y?[r]:[],{from:!f&&!b&&{height:0,opacity:0},enter:()=>async _=>{await _({height:d.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:_=>_.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(Tn,{value:r,actions:o,id:u,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),v(_=>jsx(animated.div,{role:"region","aria-labelledby":u,id:c,style:{..._,overflow:"hidden"},children:jsx("div",{ref:d,className:s,style:i,children:t})}))]})});Kc.displayName="AccordionItem";var Nt=ro.forwardRef(({variant:e,isOpen:o,selectedIcon:t,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=ro.useRef(null),{buttonProps:d,isPressed:y}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:f,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:v,isFocused:_,isFocusVisible:g}=useFocusRing(),h=Vo({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(d.disabled=!1);let R=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":_,"data-focus-visible":g,"data-hovered":b,"data-pressed":y,"data-open":o,"data-block-id":p,"data-block-class":l});return jsxs("button",{...mergeProps(d,f,v,R),ref:M(u,m),className:classNames(Gl({isFocused:g,isDisabled:c.isDisabled}),ko({variant:e,isHovered:b,isFocused:g,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:Xl,children:[t?jsx(t,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(Po({validationState:r,isReadOnly:!!c.isReadOnly}),Wl),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:Kl({isOpen:o})})})]})});Nt.displayName="SelectButton";var qr=ro.createContext({state:null,popoverAnchorRef:null}),Ln=ro.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:u,renderTrigger:m=({buttonProps:f,selectedValue:b,valueProps:v,isOpen:_,ref:g})=>{let h=b&&"icon"in b&&b.icon;return jsx(Nt,{...f,className:l,style:c,isOpen:_,isReadOnly:d.isReadOnly,ref:g,variant:r,validationState:d.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:d.placeholder,valueProps:v})},...d},y)=>{let{popoverAnchorRef:f}=useContext(qr),b=ro.useRef(null),v=ge(d.portalContainer),{labelProps:_,triggerProps:g,valueProps:h,menuProps:R,descriptionProps:I,errorMessageProps:x}=useSelect({...d,validationState:d.validationState==="error"?"invalid":"valid"},u,b),C=ke({...d,descriptionProps:I,errorMessageProps:x,labelPosition:t}),S=u.selectedItem?.value??null;return jsxs(ao.Provider,{value:u,children:[jsxs("div",{style:o,className:classNames(Ae({labelPosition:t}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:y,children:[d.label||C?jsxs("div",{className:je({labelPosition:t,hasMessage:!!C}),children:[d.label?jsx("div",{..._,className:classNames(Oe,"BaselineUI-Select-Label"),children:d.label}):null,t==="start"&&C]}):null,jsx(HiddenSelect,{state:u,triggerRef:b,isDisabled:d.isDisabled,label:d.label,name:d.name}),m({buttonProps:g,selectedValue:S,valueProps:h,isOpen:u.isOpen,ref:b}),t==="top"&&C]}),u?jsx(ye,{placement:p,portalContainer:v,offset:d.offset||2,state:u,triggerRef:f||b,style:o,className:classNames(Ke,"BaselineUI-Select-Popover"),...d,children:jsx(le,{...R,label:d.label,items:d.items,showSelectedIcon:d.showSelectedIcon,className:Mr,optionStyle:i,optionClassName:s})}):null]})});Ln.displayName="SelectCore";var Zc=ro.forwardRef((e,o)=>{let t=ae(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:t});return jsx(Ln,{...e,ref:o,state:r})});Zc.displayName="SelectStandalone";var Ye=ro.forwardRef((e,o)=>{let{state:t}=useContext(qr);return useEffect(()=>{invariant(t||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,t]),t?jsx(Ln,{state:t,...e,ref:o}):jsx(Zc,{...e,ref:o})});Ye.displayName="Select";var Jc=ro.forwardRef(({className:e,style:o,variant:t,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=ro.useRef(null),l=useCallback(({buttonProps:c,selectedValue:u,valueProps:m,isOpen:d,ref:y})=>{let f=u&&"icon"in u&&u.icon;return jsx(te,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(Nt,{...c,isOpen:d,isReadOnly:i.isReadOnly,ref:y,variant:t,validationState:i.validationState,selectedIcon:f||void 0,label:u?"label"in u&&u?.label:i.placeholder,valueProps:m})})},[i,n,t]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:o,ref:M(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(Ye,{...i,renderTrigger:l})]})});Jc.displayName="IconSelect";var ed="_1017q4c5",od=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),td="_1017q4c4";var Tz={sm:AvatarIcon,md:AvatarIcon$1},qo=ro.forwardRef(({className:e,style:o,size:t="md",icon:r=Tz[t],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":u},m)=>{let{imgProps:d}=Io({src:n,alt:a}),y=a?.split(" ").map(f=>f[0]).join("");return jsxs("span",{className:classNames(od({size:t,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:o,"aria-disabled":s,"data-block-id":c,"data-block-class":u,children:[n?jsx("img",{...d,loading:l,className:td}):null,!i&&!n&&jsx(r,{size:t==="sm"?16:24}),i&&!n?t==="sm"?y[0]:y:null,p?jsx("div",{"data-testid":"notification",className:ed}):null]})});qo.displayName="Avatar";var rd="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",ad=z({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6kz _1yep5z6l2 _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z610m"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z610q"},variant:{primary:"_1x62fhbb _1yep5z6zn",ghost:"_1yep5z6zq"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61me"],[{variant:"primary",isSelected:!0},"_1yep5z61nl"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61ml"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61nm"]]}),nd=z({defaultClassName:"_1x62fhb3 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),id="_1x62fhbl",En=z({defaultClassName:"_1x62fhbf _1yep5z6f6",variantClassNames:{isHovered:{true:"_1yep5z610x"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z610z"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mp"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61mu"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1yep5z61mr"]]}),sd="_1yep5z6lj _1yep5z6lg _1yep5z6hp _1yep5z6li",ld=z({defaultClassName:"_1x62fhb0 _1yep5z6lc _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1yep5z611v",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var pd=({state:e,...o})=>{let t=ro.useRef(null),{tabPanelProps:r}=useTabPanel(o,e,t),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:t,className:classNames({[sd]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var Fn=ro.forwardRef(({className:e,style:o,tabHeaderStyle:t,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),u=ro.useRef(null),{tabListProps:m}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,u);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:o,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(ld({variant:a}),r),style:t,children:[jsx("div",{...m,className:nd({variant:a}),ref:u,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(dd,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,y)=>jsx("div",{className:rd,children:jsx(E,{...d,variant:"secondary",size:"sm",className:classNames(id,d.className)})},y))]}),jsx(pd,{state:c},c.selectedItem?.key)]})});Fn.displayName="TabsBase";var dd=({item:e,onRemove:o,state:t,variant:r})=>{let{key:a,value:n}=e,i=ro.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},t,i),{hoverProps:c,isHovered:u}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:y,titleClassName:f}=n,{focusProps:b,isFocusVisible:v,isFocused:_}=useFocusRing(),{keyboardProps:g}=useKeyboard({onKeyDown:R=>{R.key==="Backspace"&&o?o(a):R.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":u,"data-focus-visible":v});return jsxs("div",{...mergeProps(g,s,c,b,h),className:classNames(ad({isHovered:u,isSelected:p,isFocusVisible:v,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",f),style:y,ref:i,children:[d?jsx(d,{size:20,className:En({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null,m,o?jsx(E,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{o(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:p||_||u?1:0},className:En({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null]})};dd.displayName="TabButton";var md=ro.forwardRef(({children:e,...o},t)=>{let r=useMemo(()=>ro.Children.map(e,a=>!a||!ro.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(Fn,{...o,ref:t,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});md.displayName="Tabs";var fd=({children:e,title:o,value:t})=>(invariant(t,"TabItem requires a value prop"),invariant(o,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);fd.displayName="TabItem";var yd={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 bd=z({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),gd=z({defaultClassName:"kfun6y0 z9nup82",variantClassNames:{variant:{info:"kfun6y1",warning:"kfun6y2",error:"kfun6y3",success:"kfun6y4"},arrangement:{single:"kfun6y5",multi:"kfun6y6",compact:"kfun6y7"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:!1,arrangement:"single"},"kfun6ya"],[{hasButton:!0,arrangement:"compact"},"kfun6yb"],[{hasCloseButton:!0,arrangement:"compact"},"kfun6yc"]]}),vd=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),_d=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),zd=z({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),hd=z({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),xd=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var ih={error:{sm:ErrorAltCircleFilledIcon,md:ErrorAltCircleFilledIcon$1},info:{sm:InfoCircleFilledIcon,md:InfoCircleFilledIcon$1},success:{sm:CheckmarkCircleFilledIcon,md:CheckCircleFilledIcon},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Cd=ro.forwardRef(({className:e,description:o,actionLabel:t,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":u},m)=>{let d=F(yd),y=t&&jsx(q,{variant:s==="compact"?"tertiary":"ghost",label:t,onPress:r}),f=ih[n][l];return jsxs("div",{className:classNames(gd({variant:n,arrangement:s,hasButton:!!t||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":u,style:a,role:"alert",ref:m,children:[jsxs("div",{className:xd({arrangement:s}),children:[jsx(f,{className:zd({variant:n}),size:16}),jsxs("div",{className:bd({arrangement:s}),children:[jsx("h3",{className:hd({size:l}),children:i}),jsx("section",{className:vd({size:l}),children:o})]}),s==="compact"&&y]}),jsxs("div",{className:_d({arrangement:s}),children:[s!=="compact"&&y,p?jsx(E,{variant:"secondary",icon:XCircleFilledIcon,size:"sm",onPress:p,"aria-label":d.formatMessage("close")}):null]})]})});Cd.displayName="InlineAlert";var Ze={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 Xr=({children:e})=>{let{triggerProps:o}=ro.useContext(qe);return jsx(PressResponder,{...o,children:e})};Xr.displayName="ModalTrigger";var mh=({children:e})=>{let{state:o}=ro.useContext(qe);return jsx(PressResponder,{onPress:()=>{o?.close();},children:e})};var Pd="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lc",kd="_1dbkl5e",Id=z({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6ln _1yep5z6lf _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6le _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z610q"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),wd="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka",Rd=z({defaultClassName:"_1dbkl50 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6o7 _1yep5z6o8 _1yep5z6o9",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Yr="_1dbkl5l _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69f _1yep5z69g _1yep5z69h",Td="_1dbkl5f z9nup87",Zr="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",Sd="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lf",Nd="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Qr=z({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6mv _1yep5z6mw _1yep5z6mx"}},defaultVariants:{},compoundVariants:[]}),On="_1dbkl5v _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",Ld=z({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lo _1yep5z6gz _1yep5z6lf _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z612o"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z6174"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61ok"]]}),Md=z({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f5 _1yep5z6le _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6l2",variantClassNames:{isHovered:{true:"_1yep5z611v"},isFocusVisible:{true:"_1yep5z617a _1yep5z6178 _1yep5z617b _1yep5z613h"},isDisabled:{true:"_1yep5z610z"}},defaultVariants:{},compoundVariants:[]}),Et="_1dbkl5u",Jr="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",ea="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",jn="_1dbkl5x",Ed="_1dbkl5w",An="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69l _1yep5z69m _1yep5z69n",oa=z({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lj _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6lo _1yep5z6lr",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z6178 _1yep5z613h _1yep5z617a"}},defaultVariants:{},compoundVariants:[]}),$n="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7";var Dd=z({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6l9 _1yep5z6i1 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617d"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61t2 _1yep5z61t0 _1yep5z61p9 _1yep5z61t5"],[{isSelected:!0,isDisabled:!0},"_1yep5z61t2 _1yep5z61t0 _1yep5z61p9 _1yep5z61t5 _1yep5z61pj"],[{isHovered:!0,isSelected:!1},"_1yep5z61t5 _1yep5z61t2 _1yep5z61t0 _1yep5z61pd"]]}),Bd="_1344e9q9 _1yep5z6fl";var Qe=ro.forwardRef(({color:e,isFocusVisible:o,isSelected:t,isInteractive:r,isDisabled:a,style:n,className:i,id:s,tooltip:p,"data-block-id":l,"data-block-class":c,...u},m)=>{let d=e&&e!==Re&&(typeof e=="string"?parseColor(e):e),{formatMessage:y}=F(),f=!d,{colorSwatchProps:b}=useColorSwatch({color:f?"#000000":e}),{hoverProps:v,isHovered:_}=useHover({isDisabled:a||!r}),g=filterTruthyValues({"data-focus-visible":o,"data-selected":t,"data-hovered":_,"data-block-id":l,"data-block-class":c,"data-disabled":a,"data-interactive":r}),h=f?y(Fd.none):b["aria-label"],R=u["aria-label"]??h,{tooltipProps:I}=fr({tooltip:p,label:R}),x=jsx("div",{...mergeProps(v,g,f?{}:b),style:n,"aria-label":f?y(Fd.none):b["aria-label"],role:"img",className:classNames(Dd({removeBlendMode:f,isFocusVisible:o,isDisabled:!!a,isSelected:!!t,isHovered:_}),"BaselineUI-ColorSwatch",i),ref:m,id:s,...u,children:jsx(L,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:d?Hd(d,4):void 0,children:f?jsx("div",{className:Bd}):null})});return I&&!a?jsx(te,{...I,children:jsx(Ir,{children:x})}):x});Qe.displayName="ColorSwatch";var Fd=U({none:{id:"none",defaultMessage:"None"}});var Od=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Ft=parseColor("#000000").toFormat("hsla"),ie="hsla",Bt="hexa";function so(e){return typeof e=="string"?parseColor(e).toFormat(ie):e?e.toFormat(ie):null}function jd(e,o){return e?.getChannelValue("alpha")?o?.toString(Bt)===e.toString(Bt):!o?.getChannelValue("alpha")}function Ad(e,o,t){return o?.label?o.label:e?.getChannelValue("alpha")===0?t:e?.toString("rgba")}var Re="NONE";function $d(e,o){let t=o?.map(a=>({id:parseColor(a.color).toString(Bt),label:a.label}))||[],r={id:Re,label:e};return [...t,r]}var ta=(e,{optionProps:o,isFocusVisible:t,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...o,ref:a,className:Sd,children:jsx(Qe,{color:e.value.id,isFocusVisible:t,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),Hd=(e,o=4)=>{let t=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:t?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${o}px ${o}px`}};var qd=({value:e,...o})=>{let t=ro.useRef(null),r=ro.useRef(null),a=ro.useRef(null),n=useColorAreaState({...o,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...o,value:e,inputXRef:t,inputYRef:r,containerRef:a},n);useEffect(()=>{t.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(Pd,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(oa({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:so(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:t,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var Wd=({color:e,setColor:o,allowAlpha:t,...r})=>{let a=useColorFieldState({value:e,onChange:u=>{o(so(u)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Ft);}}),n=ro.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(On,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:Ld({isFocused:p,isHovered:c,allowAlpha:t})}),t?jsx(Yd,{color:e,setColor:o}):null]})},Xd=({color:e,setColor:o,allowAlpha:t})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(On,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"rgba":"rgb",children:[jsx(Me,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Et,onChange:n=>{o(r.withChannelValue("red",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Et,onChange:n=>{o(r.withChannelValue("green",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Et,onChange:n=>{o(r.withChannelValue("blue",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),t?jsx(Yd,{color:e,setColor:o}):null]})},Bh={style:"percent",maximumFractionDigits:0},Yd=({color:e,setColor:o})=>{let{locale:t}=useLocale(),r=useCallback(a=>{o(e.withChannelValue("alpha",a));},[e,o]);return jsx(Me,{"aria-label":e.getChannelName("alpha",t),value:e.getChannelValue("alpha"),formatOptions:Bh,className:Et,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var Gn=({channel:e,...o})=>{let{locale:t}=useLocale(),r=useColorSliderState({...o,channel:e,locale:t}),a=ro.useRef(null),n=ro.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...o,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,t)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(Zr,{[ml({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:$n}),jsx("div",{className:Zr,style:i.style}),jsxs("div",{className:classNames(oa({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:$n,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:Zr}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var ra=({color:e,setColor:o,allowAlpha:t,onChangeEnd:r})=>{let[a,n]=ro.useState("hex"),{formatMessage:i}=F(Ze);return jsxs(Fragment,{children:[jsx(qd,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:o,onChangeEnd:r}),jsxs("div",{className:An,children:[jsx(Gn,{channel:"hue",value:e,onChange:o,onChangeEnd:r}),t?jsx(Gn,{channel:"alpha",value:e,onChange:o,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(An,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Ye,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Od,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(Wd,{color:e,setColor:s=>{o(s),r?.(s);},allowAlpha:t}),a==="rgb"&&jsx(Xd,{color:e,setColor:s=>{o(s),r?.(s);},allowAlpha:t})]})]})};var ru=({color:e,setColor:o,storePickedColorKey:t,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Ze),c=ro.useRef(null),u=Ro(c.current),[m,d]=cl(t,[]),y=ro.useRef(null),[f,b]=ro.useState(e),v=ro.useMemo(()=>m.map(x=>({id:x,label:parseColor(x).getColorName(p),description:x})),[m,p]),_=useCallback(()=>{let x=i==="active"?e:f;if(m.includes(x.toString(ie))){y.current?.querySelector(`[data-key='${x.toString(ie)}']`)?.classList.add(jn);return}d([...m,x.toString(ie)]);},[m,e,d,f,i]);useEffect(()=>{let x=y.current;function C(S){S.animationName===Ed&&S.target?.classList.remove(jn);}return x?.addEventListener("animationend",C),()=>{x?.removeEventListener("animationend",C);}},[]);let g=useId(),h=jsx(E,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),R=useCallback(x=>jsxs(me,{size:"content",className:Qr({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(ra,{color:f,setColor:b,allowAlpha:s}),jsx(O,{}),jsx(L,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(L,{display:"inline-flex",gap:"lg",children:[jsx(q,{label:l("cancel"),size:"sm",variant:"secondary",onPress:x}),jsx(q,{label:l("add"),variant:"primary",onPress:()=>{_(),x();},size:"sm"})]})})]}),[f,_,l,s]),I=useCallback(x=>{invariant(x instanceof Set,"Key must be a set");let C=[...x][0];C&&o(parseColor(C).toFormat(ie));},[o]);return jsxs(Fragment,{children:[jsx(O,{}),jsxs("div",{className:classNames(Nd,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:g,children:n}),jsxs(L,{display:"flex",children:[!!m.length&&m.includes(e.toString(ie))&&jsx(E,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(x=>x!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(u==="mobile"?jsxs(Ie,{children:[jsx(Xr,{children:h}),jsx(Ee,{style:{zIndex:1e5},children:({close:x})=>R(x)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:h}),jsx(we,{placement:"right top",className:Jr,offset:6,children:({close:x})=>R(x)})]}))]})]}),!!m.length&&jsx(le,{items:v,layout:"grid","aria-labelledby":g,className:classNames(Yr,ea,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:ta,ref:y,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:I})]})};var Yn=ro.forwardRef(({setColor:e,color:o,triggerRef:t,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Ze),p=useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],u=a.find(m=>m.id===c);invariant(u,"Preset not found"),e(u.id===Re?null:parseColor(u.id).toFormat(ie)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(ea,"BaselineUI-ColorInput-Presets"),style:{minWidth:t.current?.offsetWidth},ref:i,children:jsx(le,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:Yr,renderOption:ta,selectionMode:"single",selectedKeys:[o?.toString(Bt)||Re],onSelectionChange:p})})});Yn.displayName="ColorPresetList";var Vt=ro.forwardRef(({color:e,colorLabel:o,colorName:t,...r},a)=>{let n=ro.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l}),d=nr(),y=nr();return jsxs("button",{...mergeProps(p,i,u,m),style:r.style,className:classNames(Id({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:M(a,n),id:d,"aria-labelledby":r["aria-labelledby"]||`${d} ${y}`,children:[jsx(Qe,{color:e?.toString("hexa")}),o?jsx("div",{className:Td,id:y,"aria-hidden":"true",children:t}):typeof t=="string"&&jsx(VisuallyHidden,{children:t})]})});Vt.displayName="ColorInputButton";var ia=ro.forwardRef(({className:e,style:o,icon:t,...r},a)=>{let n=ro.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,u,m),ref:M(a,n),style:o,className:classNames(Md({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(t,{size:16}),jsx("div",{className:kd,style:{backgroundColor:r.color||void 0}})]})});ia.displayName="IconColorInputButton";function uu({colorLabel:e,color:o,presets:t}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>t.find(p=>p.id===Re?!o:o?jd(o,parseColor(p.id)):!1),[t,o]),i=useMemo(()=>typeof e=="function"?e?.(o):e?Ad(o,n,r(lx.transparent)):!1,[o,e,r,n]),s=useMemo(()=>{if(n?.label)return n.label;o?.getColorName(a);},[o,a,n?.label]);return {colorName:i,humanReadableName:s}}var lx=U({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Wo=ro.forwardRef(({className:e,style:o,allowRemoval:t,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,onChangeEnd:l,defaultValue:c,storePickedColorKey:u="baselinePickedColor",value:m,addColorButtonLabel:d,removeColorButtonLabel:y,customColorsLabel:f,renderTriggerButton:b=({isOpen:C,color:S,ref:N,colorName:k,triggerProps:T,labelId:P})=>jsx(Vt,{...mergeProps(T,{...I.label?{"aria-labelledby":P}:{"aria-label":I["aria-label"]}}),ref:N,isOpen:C,isDisabled:I.isDisabled,labelPosition:n,color:S,colorLabel:i,colorName:k}),pickerMode:v="active",offset:_=2,placement:g=n==="start"?"bottom end":"bottom start","data-block-id":h,"data-block-class":R,...I},x)=>{let C=ro.useRef(null),S=ro.useRef(null),N=useOverlayTriggerState(I),{triggerProps:k,overlayProps:T}=useOverlayTrigger({type:"listbox"},N,C),P=ge(I.portalContainer),[w,D]=useControlledState(m===void 0?void 0:so(m),so(c),K=>p?.(K?.toFormat("rgba")||null)),{formatMessage:H}=F(Ze),B=useMemo(()=>$d(H(sa.noColor),a),[a,H]),j=useId(),{colorName:A}=uu({colorLabel:i,color:w,presets:B}),X=useMemo(()=>B.filter(K=>t||K.id!==Re),[B,t]),$=d||H(sa.addColor),re=y||H(sa.removeColor),V=f||H(sa.customColors),Y=jsx(ru,{color:w||Ft,setColor:K=>{D(K),l?.(K?.toFormat("rgba")||null);},storePickedColorKey:u,addColorButtonLabel:$,removeColorButtonLabel:re,customColorsLabel:V,pickerMode:v,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[wd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":R,style:o,ref:x,children:[I.label?jsx("label",{id:j,className:Rd({labelPosition:n}),children:I.label}):null,b({isOpen:N.isOpen,color:w,ref:C,colorName:A,triggerProps:k,labelId:j})]}),jsx(ye,{...I,portalContainer:P,placement:g,state:N,offset:_,className:classNames(Jr,"BaselineUI-ColorInput-Popover"),triggerRef:C,overlayProps:T,children:jsxs(me,{size:"content",className:Qr({includesCustomColorPicker:s}),ref:S,"aria-labelledby":j,"aria-label":I["aria-label"],children:[s&&v==="active"?jsxs(Fragment,{children:[jsx(ra,{color:w||Ft,setColor:D,allowAlpha:r,onChangeEnd:K=>{l?.(K?.toFormat("rgba")||null);}}),Y]}):null,!!X.length&&jsxs(Fragment,{children:[s&&v==="active"?jsx(O,{}):null,jsx(Yn,{autoFocus:s&&v==="active"?!1:"first",state:N,triggerRef:C,presets:X,color:w,setColor:K=>{D(K),l?.(K?.toFormat("rgba")||null);}})]}),s&&v==="lazy"?Y:null]})})]})});Wo.displayName="ColorInput";var sa=U({addColor:{defaultMessage:"Add color",id:"addColor"},removeColor:{defaultMessage:"Remove color",id:"removeColor"},customColors:{defaultMessage:"Custom colors",id:"customColors"},noColor:{defaultMessage:"No color",id:"noColor"},transparent:{defaultMessage:"Transparent",id:"transparent"}});var bu=ro.forwardRef(({className:e,style:o,icon:t,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=ro.useRef(null),l=useCallback(({isOpen:c,color:u,ref:m,colorName:d,triggerProps:y})=>jsx(te,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(Vt,{...y,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:u,colorLabel:!1,colorName:d}):jsx(ia,{...y,isOpen:c,icon:TextIcon,color:u?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:o,ref:M(s,p),children:[r==="standard"&&t?jsx(t,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Wo,{...i,colorLabel:!1,renderTriggerButton:l})]})});bu.displayName="IconColorInput";var gu={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 la=z({defaultClassName:"mnnh5s1 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6kz _1yep5z6l2 _1yep5z6le _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6lc",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6wd _1yep5z6we _1yep5z6wf _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z612s _1yep5z617h _1yep5z617i",false:"_1yep5z6174 _1yep5z611w"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z611v"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z6130 _1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"mnnh5s8 _1yep5z6z2"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61nv"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61ok"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61nn"]]}),vu="_1yep5z6d8",pa=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var _u=z({defaultClassName:"_1i0ytqa3 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6ld _1yep5z6lf",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z6124",false:"_1yep5z6126"},isDisabled:{true:"_1i0ytqa7 _1yep5z6z2",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61og _1yep5z61t8 _1yep5z61ta"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61nw"],[{isInline:!1,isDisabled:!0},"_1yep5z61ny"]]}),zu="_1i0ytqa0",ca=z({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6lc",variantClassNames:{isInline:{false:"_1yep5z611v"},isDisabled:{true:"_1i0ytqad _1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),hu=z({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lc",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function xu({line:e,options:o}){let t=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/Xo),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!t.current[i])){let l=e.slice(i*Xo-(i>0?1:0),i*Xo+Xo);n=getSvgPathFromStroke(getStroke(l.map(([c,u,m])=>({x:c,y:u,pressure:m})),o)),l.length>=(i>0?Xo+1:Xo)&&(t.current[i]=n);}return n},[e,o]);return [...t.current,r]}var Xo=60*3;var Hx={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},Pu=ro.forwardRef(({className:e,style:o,canvasClassName:t,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:u=!0,isDisabled:m,placeholder:d,clearLabel:y,undoLabel:f,redoLabel:b,footerClassName:v,canvasRef:_,value:g,footerStyle:h,"data-block-id":R,"data-block-class":I,"aria-label":x="Drawing canvas",description:C="This is a canvas for drawing using a mouse or touch input.",...S},N)=>{let k=F(gu),T=ro.useRef(null),[P,w]=ro.useState(g||p||[]),D=ro.useMemo(()=>({...Hx,...S}),[S]),[H,B]=ro.useState(),j=useId(),{labelProps:A,fieldProps:X}=useLabel({...S,"aria-label":x,labelElementType:"span"}),{isFocusVisible:$,focusProps:re}=useFocusRing({within:!0}),{hoverProps:V,isHovered:Y}=useHover({isDisabled:m}),{undo:K,redo:Ce,canRedo:Pe,canUndo:ze,push:Te}=nl(P,{onAction:G=>{G&&(w(G),l?.(G));},isDisabled:!c}),{keyboardProps:He}=useKeyboard({onKeyDown:G=>{G.key==="Backspace"?vo():G.key==="z"&&(G.metaKey||G.ctrlKey)&&(G.shiftKey?Pe&&Ce():ze&&K());}}),[ee,de]=useState(!1),lt=useCallback(G=>{let W=G.currentTarget.getBoundingClientRect();B(W),G.target.setPointerCapture(G.pointerId);let pe=[G.clientX-W.x,G.clientY-W.y,G.pressure];w(Z=>[...Z,[pe]]),de(!0);},[]),pt=useCallback(G=>{if(G.buttons!==1||!H)return;let pe=wu(G.nativeEvent).map(Z=>[a?clamp(Z.clientX-H.left,0,H.width):Z.clientX-H.left,a?clamp(Z.clientY-H.top,0,H.height):Z.clientY-H.top,Z.pressure]);w(Z=>{let he=[...Z];return he[Z.length-1]=[...he[Z.length-1],...pe],he});},[H,a]),ct=()=>{H&&(l?.(P),Te(P),de(!1));};useEffect(()=>{s?.(P);},[P,s]);let vo=()=>{w([]),s?.([]),Te([]);};return jsxs("div",{ref:M(T,N),className:classNames(zu,"BaselineUI-FreehandCanvas",e),style:o,"aria-disabled":m,"data-block-id":R,"data-block-class":I,children:[S.label||c?jsxs("div",{className:hu({isInline:u}),children:[S.label?jsx(Q,{type:"label",size:"sm",...A,children:S.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(E,{variant:"secondary",size:"sm",isDisabled:!ze||m,icon:UndoIcon,onPress:K,"aria-label":f||k.formatMessage("undo")}),jsx(E,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:RedoIcon,onPress:Ce,"aria-label":b||k.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(re,He,V,X),tabIndex:m?void 0:0,className:classNames(la({isInline:u,isHovered:Y}),_u({isFocusVisible:$,isInline:u,isDisabled:!!m}),t),"aria-describedby":S["aria-describedby"]||j,style:r,ref:_,children:[jsx(VisuallyHidden,{children:jsx("div",{id:j,children:C})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:lt,onPointerMove:pt,onPointerUp:ct,children:(g||P).map((G,W,pe)=>W<pe.length-1||!ee?jsx(ku,{line:G,options:D,strokeColor:i,strokeWidth:n},W):jsx(Iu,{line:G,options:D,strokeColor:i,strokeWidth:n},W))})]}),d||y?jsx("div",{style:h,className:classNames(ca({isInline:u,isDisabled:m}),v),children:(P.length||!d)&&y?jsx(q,{size:"sm",variant:"ghost",label:y,isDisabled:m,onPress:vo}):jsx(q,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});Pu.displayName="FreehandCanvas";var ku=ro.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),o)),[e,o]);return jsx("path",{d:a,stroke:t,strokeWidth:r})});ku.displayName="Stroke";var Iu=ro.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=xu({line:e,options:o});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:t,strokeWidth:r},i))})});Iu.displayName="SplitStroke";function wu(e){if(typeof e.getCoalescedEvents=="function"){let o=e.getCoalescedEvents();return o.length>0?o.flatMap(t=>wu(t)):[e]}return [e]}var Ru="_1vac7ws0",Tu=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Nu(e,o){let[t,r]=useState([]),a=()=>e?.flatMap(n=>[...o.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),t}function Lu(e){let{scrollable:o,ownerDocument:t,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(o,t);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",r),()=>{a.removeEventListener("scroll",r);}},[o,r,t]);}var oC=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Eu=ro.forwardRef(({className:e,children:o,isRotatable:t,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:u,onDrag:m,onResizeStart:d,onResizeEnd:y,onResize:f,onRotateStart:b,onRotateEnd:v,onRotate:_,onSnap:g,isSnappable:h,elementGuidelines:R,hideAnchorOnDrag:I=!0,title:x,rotationPosition:C,autoUpdate:S,bound:N,snapRotationDegrees:k,snapRotationThreshold:T,scrollableAncestor:P,renderDirections:w,stopPropagation:D,transformOrigin:H,preventDefault:B},j)=>{let A=useRef(null),X=useRef(null),[$,re]=useState(document),V=useRef($.createElement("div")),[Y,K]=useState({}),[Ce,Pe]=useState(!1),[ze,Te]=useState(!1),[He,ee]=useState(),de=Nu(R,$);useLayoutEffect(()=>{let W=V.current;return V.current=$.createElement("div"),()=>{W.remove();}},[$]);let{keyboardProps:lt}=useKeyboard({onKeyDown:W=>{let pe=W.shiftKey?10:1,Z=W.metaKey||W.ctrlKey;Z&&W.shiftKey&&(pe=45);function he(dt,Ry="x"){Z?X.current?.request("rotatable",{deltaRotate:dt*pe},!0):X.current?.request("draggable",Ry==="x"?{deltaX:dt*pe}:{deltaY:dt*pe},!0);}switch(W.key){case"ArrowRight":{he(1);break}case"ArrowLeft":{he(-1);break}case"ArrowUp":{he(-1,"y");break}case"ArrowDown":he(1,"y");}requestAnimationFrame(()=>{X.current?.updateRect();});}});useEffect(()=>{let W=ue(A.current);re(W);let pe=V.current;W.body.append(V.current);function Z(dt){Te(dt.shiftKey);}function he(){Te(!1);}return W.addEventListener("keydown",Z),W.addEventListener("keyup",he),()=>{W.removeEventListener("keydown",Z),W.removeEventListener("keyup",he),pe.remove();}},[]),Lu({scrollable:P,onScroll:()=>{X.current?.updateRect();},ownerDocument:$});let pt=useCallback(W=>{K(pe=>({...pe,...W.style})),i?.(W);},[i]),ct=useCallback(W=>{if(Pe(!0),A.current?.focus(),N){let Z=getHTMLElement(N,$)?.getBoundingClientRect();ee({position:"client",left:Z?.left??0,top:Z?.top??0,right:Z?.right??0,bottom:Z?.bottom??0});}c?.(W);},[N,$,c]),vo=useCallback(W=>{Pe(!1),u?.(W);},[u]),G=o({style:{...Y.width&&{width:Y.width},...Y.height&&{height:Y.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...lt,ref:M(A,j),style:{display:"inline-block",...n,...Y},className:classNames(Ru,e),onDoubleClick:l,tabIndex:0,title:x,children:G}),createPortal(jsx(oC,{ref:X,target:A,draggable:a,resizable:r,rotatable:t,keepRatio:ze,throttleDrag:1,snappable:h||!!N,elementGuidelines:de,snapRenderThreshold:.9,className:Tu({isDragging:Ce&&I}),onRender:pt,onDragStart:ct,onDragEnd:vo,useResizeObserver:S,useMutationObserver:S,onRenderEnd:p,onDrag:m,onResizeStart:d,onResizeEnd:y,onResize:f,onRotateStart:b,onRotateEnd:v,onRotate:_,onRenderStart:s,onSnap:g,rotationPosition:C,bounds:He,snapRotationDegrees:k,snapRotationThreshold:T,renderDirections:w,stopPropagation:D,preventDefault:B,transformOrigin:H}),V.current)]})});Eu.displayName="Transform";var Du={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 Hu=ro.forwardRef(({className:e,style:o,isInline:t=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:u=!0,"data-block-id":m,"data-block-class":d,pickerButtonStyle:y,pickerButtonClassName:f,footerClassName:b,footerStyle:v,clearLabel:_,placeholder:g,labelStyle:h,labelClassName:R,...I},x)=>{let C=ro.useRef(null),S=ro.useRef(null),{formatMessage:N}=F(Du),[k,T]=useControlledState(n,a||null,ee=>{invariant(typeof ee!="string"),I.onValueChange?.(ee?[ee]:[]);}),P=useMemo(()=>yC(k||void 0),[k]),{fieldProps:w,labelProps:D}=useField(I),{dropProps:H,isDropTarget:B}=useDrop({ref:C,onDrop:async ee=>{if(p)return;let de=await xn({items:ee.items});de.length&&T(de[0]),l?.(ee);},...I}),{clipboardProps:j}=useClipboard({onPaste:async ee=>{if(p)return;let de=await xn({items:ee});de.length&&T(de[0]),c?.(ee);},...I}),A=()=>{T(null),S.current&&(S.current.value="");},X={type:"file",onChange:ee=>{let de=[...ee.target.files];T(de[0]),I.onChange?.(ee);},accept:r,disabled:p},{focusProps:$,isFocused:re,isFocusVisible:V}=useFocusRing({within:!0}),{hoverProps:Y,isHovered:K}=useHover({isDisabled:p}),{imgProps:Ce,isLoading:Pe,isLoaded:ze}=Io({src:P,alt:i||""}),Te={label:s||N("selectImage"),onPress:()=>C.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(vr({isFocusVisible:V}),{[vu]:B&&!p},f),style:y},He=filterTruthyValues({"data-loaded":ze,"data-block-id":m,"data-block-class":d,"data-hovered":K,"data-focused":re,"data-drop-target":B,"data-disabled":p,"data-focus-visible":V});return jsxs(L,{...He,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:o,ref:x,children:[jsxs("label",{...mergeProps(H,Y,$,D),className:classNames(la({isInline:t,isHovered:K,isDisabled:p,hasLoadedImage:!!P&&ze,showFocusRing:B||!!P&&V}),R),style:h,ref:C,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(w,j,X),ref:S})}),!P&&jsx(q,{...Te}),!!P&&(Pe?jsx(Ao,{}):jsx("img",{className:pa({isInline:t,isDisabled:p,hasLoadedImage:!!P&&ze&&u}),...Ce}))]}),g||_?jsx("div",{style:v,className:classNames(ca({isInline:t,isDisabled:p}),b),children:(P||!g)&&_?jsx(q,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:A}):jsx(q,{size:"sm",variant:"ghost",label:g,isDisabled:!0})}):null]})});Hu.displayName="ImageDropZone";function yC(e){return e instanceof File?URL.createObjectURL(e):e}var Vu="_1vm2oh49 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6g4",ai="_1vm2oh48 _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6jt _1yep5z6ju _1yep5z6jv",Ou=z({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6li _1yep5z6lg _1yep5z6i1 _1yep5z6lj _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6le _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z612r _1yep5z617g _1yep5z617i",false:"_1yep5z6126"},isFocusVisible:{true:"_1yep5z6130 _1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6z2"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61nw"],[{accent:"theme",isInline:!0},"_1yep5z61nl"],[{accent:"positive",isInline:!1},"_1yep5z61ny"],[{accent:"theme",isInline:!1},"_1yep5z61nn"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61p9 _1yep5z61t0 _1yep5z61t2 _1yep5z61t3"],[{isHovered:!0,isInline:!0},"_1yep5z61t3 _1yep5z61p9 _1yep5z61t0 _1yep5z61t2"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61nx"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61np"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61nm"]]});var $u=ro.forwardRef(({className:e,style:o,isDisabled:t,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:u,addAriaLabel:m,accent:d="positive","data-block-id":y,"data-block-class":f,...b},v)=>{let{focusProps:_,isFocused:g,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:R,hoverProps:I}=useHover({isDisabled:t}),{pressProps:x}=usePress({isDisabled:t,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let C=filterTruthyValues({"data-hovered":R,"data-focus-visible":h,"data-focused":g,"data-disabled":t});return jsxs("div",{...b,className:classNames(Ou({isInline:r,isFocusVisible:h,isDisabled:t,isHovered:R,accent:d}),"BaselineUI-Preview",e),"data-block-id":y,"data-block-class":f,"aria-label":b["aria-label"]||a||s,style:o,ref:v,children:[typeof i=="string"?jsx("button",{disabled:t,...mergeProps(I,_,x,C),className:ai,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(I,_,x,C),disabled:t,style:p,"aria-label":m,className:ai,children:[n?jsx("img",{src:n,alt:a,className:pa({isInline:r,isDisabled:t})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(E,{isDisabled:t,className:Vu,"aria-label":u,size:"xs",icon:TrashIcon,onPress:c}):null]})});$u.displayName="Preview";var Uu="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e",qu=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),Ku="cw3m0n7",Gu=z({defaultClassName:"cw3m0n0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{labelPosition:{end:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6va _1yep5z6vb _1yep5z6vc",start:"_1yep5z614o _1yep5z614p _1yep5z614q _1yep5z6160 _1yep5z6161 _1yep5z6162"}},defaultVariants:{},compoundVariants:[]}),Wu="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6l9",Xu=z({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var LC=({label:e,description:o},{isSelected:t,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:Gu({labelPosition:n}),children:[jsx("div",{className:Xu({isSelected:t,isFocusVisible:r,isDisabled:a}),children:t?jsx("div",{className:Ku}):null}),e?jsxs("div",{className:Uu,children:[jsx("span",{className:jr({isDisabled:a}),children:e}),o?jsx("span",{className:qu({isDisabled:a}),children:o}):null]}):null]}),Yu=({state:e,renderOption:o=LC,item:t,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(t.id),l=ro.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=useRadio({...s,isDisabled:p,children:t.label,value:t.id},e,l),{focusProps:d,isFocusVisible:y,isFocused:f}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),v=filterTruthyValues({"data-selected":m,"data-focused":f,"data-focus-visible":y,"data-hovered":b,"data-disabled":p,"data-pressed":u,"data-read-only":i});return jsxs("label",{...v,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,d),ref:l})}),o(t,{isFocusVisible:y,isSelected:m,isFocused:f,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var Zu=ro.forwardRef(({className:e,style:o,optionsContainerClassName:t,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":u,"data-block-class":m,...d},y)=>{let f=useRadioGroupState(d),{radioGroupProps:b,labelProps:v,descriptionProps:_,errorMessageProps:g}=useRadioGroup({...d,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},f),h=ke({...d,descriptionProps:_,errorMessageProps:g,labelPosition:n}),R=filterTruthyValues({"data-orientation":d.orientation,"data-block-id":u,"data-block-class":m,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxs("div",{...mergeProps(b,R),className:classNames(Ae({labelPosition:n}),"BaselineUI-RadioGroup",e),style:o,ref:y,children:[d.label||h?jsxs("div",{className:je({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...v,className:classNames(Oe,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsxs("div",{className:classNames({[To]:d.isDisabled}),children:[jsx("div",{className:classNames(Wu,t),style:r,children:a.map(I=>jsx(Yu,{state:f,renderOption:i,item:I,...d,value:I.id},I.id))}),n==="top"&&h]})]})});Zu.displayName="RadioGroup";var Qu=({id:e,defaultMessage:o,elementType:t=Fragment$1})=>{invariant(e||o,"`id` or `defaultMessage` is required.");let r=F();return jsx(t,{children:r.formatMessage(e)||o})};Qu.displayName="MessageFormat";var Ju=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:o,...s,ref:p,children:t})});Ju.displayName="Group";var pi="UNSUPPORTED_IN_MENU";function tm(e){return useMemo(()=>ro.Children.toArray(e).map(o=>{let t=o,r=uniqueId("item"),a=Ut(t,Ne),n=om(t),i,s;if(a){let v=Ut(a,Le);invariant(v),i=om(v),s=Ut(a,we).props.children;}else n?i=n:i=t;let{onPress:p,label:l,"aria-label":c,iconStart:u,isDisabled:m,icon:d}=i.props,y=l||c||pi;invariant(typeof y=="string","ActionGroup children must have a string label");let f=`${r}-${y}`;return createElement(Item,{...{key:f,onPress:p,textValue:y,"aria-label":c,icon:u||d,dialogContent:s,isDisabled:m},key:f},t)}),[e])}function Ut(e,o){return o?flatMapDeep(ro.Children.toArray(e),r=>ro.isValidElement(r)&&r.props.children?[r,...ro.Children.toArray(r.props.children)]:[r]).find(r=>ro.isValidElement(r)&&r.type===o):void 0}function om(e){return Ut(e,q)||Ut(e,E)}var rm="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l4",am={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var di=ro.forwardRef(({className:e,style:o,children:t,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=F(),[u,m]=useState(),d=tm(t),y=useListState({...p,children:d}),f=oe(l),b=useRef(null),[{visibleItems:v,isMeasuring:_},g]=Ma({visibleItems:y.collection.size,isMeasuring:!1}),h=useCallback(()=>{let T=P=>{if(b.current&&f.current){let w=[...b.current.children],D=f.current.getBoundingClientRect().width,H=P<y.collection.size,B=0,j=0;if(H){let A=w.pop();A&&(B+=lm(A,!1,!0));}for(let[A,X]of w.entries())if(B+=lm(X,A===0,A===w.length-1),Math.round(B)<=Math.round(D))j++;else break;return j}return P};g(function*(){yield {visibleItems:y.collection.size,isMeasuring:!0};let P=T(y.collection.size),w=P<y.collection.size&&P>0;yield {visibleItems:P,isMeasuring:w},w&&(yield {visibleItems:T(P),isMeasuring:!1});});},[g,f,y.collection.size]),R=useMemo(()=>({get current(){return f.current?.parentElement}}),[f]);Aa({ref:R,onResize:h}),xe(h,[y.collection,h]);let{toolbarProps:I}=useToolbar(p,f),x=[...y.collection],C=x.slice(0,v),S=x.slice(v).filter(T=>T.textValue!==pi),N=S.length>0;useEffect(()=>{m(void 0);},[S.length]),useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:k}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(I,k),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...o,flexBasis:_?"100%":void 0},ref:f,children:jsxs("div",{ref:b,className:rm,children:[C.map(T=>T.rendered),N?jsxs(Fragment,{children:[!_&&i?jsx(L,{flexGrow:1}):null,jsx(Dr,{placement:"bottom end",renderTrigger:({buttonProps:T,ref:P})=>jsx(E,{...T,size:"md",icon:MoreIcon,"aria-label":c(nP.more),variant:"toolbar",ref:P}),...r,disabledKeys:S.filter(T=>T.props?.isDisabled).map(T=>T.key),items:S.map(T=>{let P=T.textValue||T["aria-label"];return invariant(P,"ActionItem must have a label"),{id:T.key,label:P,icon:T.props.icon}}),onAction:T=>{let P=y.collection.getItem(T);invariant(P,"Item not found");let{onPress:w,dialogContent:D}=P.props;w?.(),m(D);}})]}):null]})}),jsx(Ie,{isOpen:!!u,onOpenChange:T=>{T||m(void 0);},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:1e5},children:u?ro.cloneElement(u,{inheritDrawer:!0}):null})})]})});di.displayName="CollapsibleToolbar";function lm(e,o,t){let a=ne(e).getComputedStyle(e);return e.getBoundingClientRect().width+(o?0:pm(a.marginLeft))+(t?0:pm(a.marginRight))}function pm(e){let o=Number.parseInt(e,10);return Number.isNaN(o)?0:o}var nP=U({more:{id:"more",defaultMessage:"More"}});var ui=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=ro.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(am[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:o,"data-block-id":t,"data-block-class":r,ref:M(s,p),children:i.children})});ui.displayName="WrappedToolbar";var fa=ro.forwardRef((e,o)=>{let t=e.isCollapsible?di:ui;return jsx(t,{...e,ref:o})});fa.displayName="Toolbar";var dm=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),um=z({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z610z"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61t3 _1yep5z61t2 _1yep5z61t0 _1yep5z61pj _1yep5z61mr"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6g3"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61t3 _1yep5z61t2 _1yep5z61p9 _1yep5z61t0"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61t1 _1yep5z61t0 _1yep5z61pa _1yep5z61ms"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61t0 _1yep5z61t2 _1yep5z61p9 _1yep5z61t3"]]}),mm=z({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617b _1yep5z617a _1yep5z613h _1yep5z6178"},isSelected:{true:"_1yep5z610y"},isDisabled:{true:"z9nup83 _1yep5z610z"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61mq"]]}),fm=z({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617b _1yep5z617a _1yep5z613h _1yep5z6178"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z610z"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61nn"],[{isSelected:!0,isDisabled:!1},"_1yep5z61nn _1yep5z61mu"],[{isSelected:!0,isDisabled:!0},"_1yep5z61nn _1yep5z61mr"]]}),ym=z({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z6111"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61mt"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61mr"],[{isSelected:!1,isHovered:!0},"_1yep5z61nn"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61t3 _1yep5z61t2 _1yep5z61p9 _1yep5z61t0"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61t1 _1yep5z61t0 _1yep5z61pa"]]});var _P={xxs:8,xs:12,sm:16,md:20,lg:24},be=ro.forwardRef((e,o)=>{let t=oe(o),{tooltipProps:r}=yr(e,t);return r?jsx(te,{...r,children:jsx(mi,{...e,ref:o})}):jsx(mi,{...e,ref:o})});be.displayName="ToggleIconButton";var mi=ro.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:u,ref:m,isFocusVisible:d,isFocused:y,isHovered:f,uiStateOptions:b}=gr(s,l),v=useMemo(()=>typeof t=="function"?t:l.isSelected?t.selected:t.unselected,[t,l.isSelected]),_={isSelected:l.isSelected,isHovered:f,isFocusVisible:d,isDisabled:!!s.isDisabled},g=filterTruthyValues({"data-hovered":f,"data-selected":l.isSelected,"data-focus-visible":d,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":y,"data-pressed":u});return jsx("button",{...mergeProps(c,g),className:classNames(a==="toolbar"&&ym(_),a==="primary"&&um(_),a==="secondary"&&mm(_),a==="tertiary"&&fm(_),dm({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof o=="function"?o(b):o,ref:M(m,p),children:jsx(v,{size:_P[r]})})});mi.displayName="ToggleIconButtonCore";var gm="f6jv6bm",vm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jh _1yep5z6ji _1yep5z6jj",Qo="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",_m=z({defaultClassName:"f6jv6b0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6g1",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6vd _1yep5z6ve _1yep5z6vf _1yep5z6150 _1yep5z6151 _1yep5z6152",false:"_1yep5z614l _1yep5z614m _1yep5z614n"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61i5 _1yep5z61i6 _1yep5z61i7 _1yep5z61it _1yep5z61iu _1yep5z61iv _1yep5z61jh _1yep5z61ji _1yep5z61jj _1yep5z61k5 _1yep5z61k6 _1yep5z61k7 _1yep5z61ta _1yep5z61t8 _1yep5z61oj"]]}),ya=z({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6lf",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),zm="f6jv6bj _1yep5z6wg _1yep5z6wh _1yep5z6wi _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi",hm="f6jv6bk";var xm="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6ln _1yep5z6li _1yep5z6lg _1yep5z6hp _1yep5z6eu",Cm=z({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lf _1yep5z6kz _1yep5z6l2 _1yep5z6le",variantClassNames:{isHovered:{true:"_1yep5z611v"},isDisabled:{true:"_1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),Pm="f6jv6bi _1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1 _1yep5z6lh _1yep5z6lg _1yep5z6hs _1yep5z6lk",km="_1yep5z6jn _1yep5z6jo _1yep5z6jp",Im="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu _1yep5z6e3 _1yep5z6lc",wm=z({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jt _1yep5z6ju _1yep5z6jv",variantClassNames:{isInline:{true:"_1yep5z6pg _1yep5z6ph _1yep5z6pi _1yep5z617i _1yep5z617g _1yep5z612r",false:"_1yep5z6pj _1yep5z6pk _1yep5z6pl _1yep5z6wv _1yep5z6ww _1yep5z6wx _1yep5z6xj _1yep5z6xk _1yep5z6xl _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx"}},defaultVariants:{},compoundVariants:[]}),Rm="f6jv6bl",Tm="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu",ba=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),ga="f6jv6b9 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Kt="f6jv6bo";var Nm=[["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:Gt}}=layoutSprinkleValues,Lm=({isOpen:e,onClose:o})=>{let{formatMessage:t}=F(),r=useId();return jsx(Ie,{isOpen:e,onOpenChange:a=>{a||o();},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(me,{"aria-labelledby":r,className:zm,drawerBackground:"subtle",children:[jsxs(L,{paddingLeft:Gt.padding.horizontal.lg,paddingRight:Gt.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:hm,children:[jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:t(Wt.help)}),jsx(E,{icon:XIcon,size:"md",variant:"secondary","aria-label":t(Wt.close),onPress:o})]}),jsx(O,{className:Rm}),jsxs(L,{paddingX:Gt.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Gt.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:t(Wt.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:t(Wt.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Nm.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Gt.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:t(Wt[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==Nm.length-1&&jsx(O,{})]},a))})]})]})})})},Wt=U({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 va=ro.forwardRef(({value:e,defaultValue:o,onChange:t,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:u,saveOnEnter:m,onSave:d},y)=>{let f=ro.useRef(null),[b,v]=useControlledState(e,o||"",t),_=useCallback(k=>{v(k.currentTarget.value||"");},[v]),g=useCallback(k=>{(m&&k.key==="Enter"&&!k.shiftKey||(k.ctrlKey||k.metaKey)&&k.key==="Enter")&&(k.preventDefault(),d());},[m,d]);useImperativeHandle(y,()=>({clear:()=>{v("");}}));let h=useCallback(k=>{k.currentTarget.style.height="16px",k.currentTarget.style.height=k.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let k=f.current;k&&(k.style.height="16px",k.style.height=k.scrollHeight+"px");},[s],[b]),useImperativeHandle(c,()=>({setCaretPosition:k=>{f.current&&(f.current.focus(),f.current.setSelectionRange(k,k));},focus:()=>{f.current&&f.current.focus();}}));let{focusProps:R,isFocused:I,isFocusVisible:x}=useFocusRing(),{hoverProps:C,isHovered:S}=useHover({}),N=filterTruthyValues({"data-focus-visible":x,"data-hovered":S,"data-focused":I});return jsx("textarea",{...mergeProps(R,C,N),ref:M(f,n),className:classNames(s?Im:[ya(),ba({isInline:i}),Tm]),autoFocus:u,onChange:_,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:g})});va.displayName="PlainEditor";var Zt="mention",_a="mention_input",Um=ro.forwardRef(({onCancel:e,editor:o,element:t,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ha),p=useSelected(),[l,c]=useState(""),{contains:u}=useFilter({sensitivity:"base"}),{formatMessage:m}=F(),d=useMemo(()=>{let w=i.filter(D=>l===""||u(D.displayName,l)).map(D=>({id:D.id,label:D.displayName,data:D}));return s?take(w,s):w},[i,s,l,u]),y=useCallback(w=>jsx(Item,{children:w.label},w.id),[]),f=useCallback((w=!1)=>{let D=findNodePath(o,t);D&&(removeNodes(o,{at:D}),w&&focusEditor(o));},[o,t]),b=useComboBoxState({items:d,children:y,menuTrigger:"focus",onSelectionChange:w=>{f(!0),r?.(w);}}),v=ro.useRef(null),_=ro.useRef(null),g=ro.useRef(null),h=ro.useRef(null),R=useHTMLInputCursorState(_);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:I,listBoxProps:x}=useComboBox({defaultItems:d,inputRef:_,buttonRef:v,listBoxRef:g,popoverRef:h,menuTrigger:"focus","aria-label":m(ek.mention)},b);useEffect(()=>{_.current?.focus();},[]);let C=useCallback((w="manual",D=!1)=>{f(D),e?.(w,b.inputValue);},[e,f,b.inputValue]),S=useRef(p);useEffect(()=>{S.current&&!p&&C("deselect"),S.current=p;},[p,C]);let N=R?.atStart??!1,k=R?.atEnd??!1,T=useCallback(w=>{w.key==="Backspace"&&N?C("backspace",!0):w.key==="Escape"?C("escape",!0):w.key==="ArrowLeft"&&N?C("arrowLeft",!0):w.key==="ArrowRight"&&k&&C("arrowRight",!0);let D=Hotkeys.isUndo(w)&&o.history.undos.length>0,H=Hotkeys.isRedo(w)&&o.history.redos.length>0;(D||H)&&(w.preventDefault(),o[D?"undo":"redo"](),focusEditor(o));},[N,k,C,o]),P=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let w=ne(_.current),D=_.current?w?.getComputedStyle(_.current).font:void 0;return {width:D?getTextDimensions({text:b.inputValue,font:D}).width+10:"4ch"}}},[b.inputValue]);return jsxs(ao.Provider,{value:b,children:[jsx("input",{...mergeProps(I,{onKeyDown:T,onBlur:()=>{C("blur",!0);},onChange:w=>{c(w.target.value);}}),style:P,className:xm,ref:M(a,_)}),jsx(ye,{triggerRef:n,className:Pm,isNonModal:!0,ref:h,state:b,children:jsx(le,{...x,items:void 0,autoFocus:"first",ref:g,className:sprinkles({width:"full"}),renderOption:Km})})]})});Um.displayName="MentionInputContentElement";var vi=withRef(({className:e,...o},t)=>{let{children:r,editor:a,element:n}=o,{items:i}=useContext(ha),s=useRef(null),[p,l]=useState(null);useEffect(()=>{let m=findNodePath(a,n);if(!m)return;let d=getPointBefore(a,m);if(!d)return;let y=createPointRef(a,d);return l(y),()=>{y.unref();}},[a,n]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),ut()&&m&&focusEditor(a);},[a]),u=useCallback(m=>{if(!m)return;let d=s.current?.getRootNode()instanceof ShadowRoot,y=i.find(b=>b.id===m);invariant(y,"User not found");let f={type:Zt,value:y.id,displayName:y.displayName,children:[{text:""}]};insertNodes(a,[f,{text:" "}]),d?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:t,...o,children:[jsx(Um,{onCancel:(m,d)=>{m!=="backspace"&&insertText(a,"@"+d,{at:p?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:u,ref:s,element:n,editor:a}),r]})});vi.displayName="MentionInputElement";var _i=withRef(({className:e,onClick:o,children:t,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:getHandler(o,n),ref:a,...r,children:["@",n.displayName,t]})});_i.displayName="MentionElement";var qm=(e,{options:{trigger:o,triggerPreviousCharPattern:t,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===o;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(t?.test(s)){za(e);return}a(i);},e},ek=U({mention:{defaultMessage:"Mention",id:"mention"}});function Wm({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("p",{children:o})})}function bk(e){return Object.entries(e).map(([o,t])=>`${kebabCase(o)}:${t}`).filter(([,o])=>!!o).join(";")}function gk(e){return "text"in e}function vk(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Qt(e){if(!e)return "";function o(t){if(gk(t)){let a=vk(t.text);return t.bold&&(a=`<b>${a}</b>`),t.italic&&(a=`<i>${a}</i>`),t.underline&&(a=`<u>${a}</u>`),(t.color||t.backgroundColor)&&(a=`<span style="${bk(filterTruthyValues({color:t.color||void 0,backgroundColor:t.backgroundColor||void 0}))}">${a}</span>`),a}let r=t.children?.map(Qt).join("");switch(t.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${t.url}">${r}</a>`;case Zt:return `<span data-user-id="${t.value}">${t.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(t=>o(t)).join(""):o(e)}function _k(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(o=>o.split(":").map(t=>t.trim())).map(([o,t])=>[camelCase(o),t]))):{}}function Pi(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let o=new DOMParser().parseFromString(Xm.default.sanitize(e),"text/html"),t=o.querySelectorAll("[style]");for(let a of t)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=o.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
|
|
53
|
-
`:"<p>";return
|
|
54
|
-
`);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:Zt,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 Qm(e){let o=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[t]=o||[{url:""}];return t?.url}function za(e){let o={children:[{text:" "}],type:_a};e.insertNode(o);}var zk=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:Zt,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:_a}],withOverrides:qm}),Jm=createPlugins([createParagraphPlugin({component:Wm}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:ef}),zk({component:_i})],{components:{[_a]:vi}});var af=({isDisabled:e})=>{let{formatMessage:o}=F(),t=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:jsx(E,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":o(mo.addLink),className:Qo,preventFocusOnPress:!0})}),jsx(we,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(me,{size:"content",style:{minWidth:240},children:jsx(Rk,{close:()=>{r(),setTimeout(()=>{focusEditor(t,t.selection);},0);}})})})]})},Rk=({close:e})=>{let o=useEditorRef(),{formatMessage:t}=F(),r=useEditorSelector(l=>Qm(l),[]),[a,n]=ro.useState(r?"show":"add"),[i,s]=ro.useState(r||""),p=jsx(L,{padding:"lg",children:jsx(Ge,{label:t(mo.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(L,{display:"flex",justifyContent:"flex-end",padding:"lg",className:gm,children:jsx(q,{isDisabled:!isUrl(i,!0),label:t(mo.addLink),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(L,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(q,{label:t(mo.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(q,{label:t(mo.removeLink),size:"sm",onPress:()=>{unwrapLink(o),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(q,{label:t(mo.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(q,{label:t(mo.save),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function ef({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("a",{className:Br({size:"sm"}),children:o})})}var mo=U({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 Sk=parseColor("#ffffff00").toString("hexa"),ki=[{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"}];[...ki,{label:"Transparent",color:Sk}];var Ca=({nodeType:e,icon:o,ariaLabel:t,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(be,{variant:"tertiary",isSelected:a,size:"sm",icon:o,"aria-label":t,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},wi=({nodeType:e,"aria-label":o,isDisabled:t})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:p,triggerProps:l})=>jsx(E,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":o,size:"md",variant:"popover",isDisabled:t,className:Qo,preventFocusOnPress:!0,...l,ref:p}),[e,o,t]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Wo,{presets:ki,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:t})};var i0=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ha=ro.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Si=ro.forwardRef(({value:e,defaultValue:o,onChange:t,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:u,editorHandle:m,maxMentionableUsersSuggestions:d,autoFocus:y,editorRef:f,saveOnEnter:b,onSave:v},_)=>{let g=useRef(null),h=useId(),{formatMessage:R}=F(),I=useRef(null),x=I.current,C=useRef(null),S=useMemo(()=>x?.getRootNode()instanceof ShadowRoot,[x]),[N,k]=useControlledState(e?Pi(e):void 0,Pi(o||"<p></p>"),w=>{t&&t(Qt(w));}),{keyboardProps:T}=useKeyboard({onKeyDown:w=>{(b&&w.key==="Enter"&&!w.shiftKey||(w.ctrlKey||w.metaKey)&&w.key==="Enter")&&(w.preventDefault(),v()),w.altKey&&w.key==="F10"?(w.preventDefault(),g.current&&g.current.querySelector("button")?.focus()):w.continuePropagation(),ut()&&S&&C.current&&focusEditor(C.current);}});useEffect(()=>{s&&C.current&&deselect(C.current);},[s]),useImperativeHandle(_,()=>({startMention:()=>{C.current&&!I.current?.querySelector("input[role='combobox']")&&za(C.current);}})),useImperativeHandle(m,()=>({setCaretPosition:w=>{C.current&&(focusEditor(C.current),moveSelection(C.current,{distance:w,unit:"character"}));},focus:()=>{C.current&&focusEditor(C.current);}}));let P=useMemo(()=>({items:u||[],containerRef:l,maxMentionableUsersSuggestions:d}),[u,l,d]);return jsx(ha.Provider,{value:P,children:jsxs(Plate,{initialValue:N||i0,plugins:Jm,editorRef:M(C,f||null),onChange:w=>{k(w);},children:[jsxs(fa,{className:ga,"aria-controls":h,ref:g,children:[jsxs(L,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(Ca,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:R(tt.bold),isDisabled:s}),jsx(Ca,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:R(tt.italic),isDisabled:s}),jsx(Ca,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:R(tt.underline),isDisabled:s})]}),jsx(O,{orientation:"vertical",className:Kt}),jsx(wi,{nodeType:MARK_COLOR,"aria-label":R(tt.fontColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:Kt}),jsx(wi,{nodeType:MARK_BG_COLOR,"aria-label":R(tt.backgroundColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:Kt}),jsx(af,{isDisabled:s}),jsx(O,{orientation:"vertical",className:Kt}),jsx(E,{className:Qo,icon:QuestionmarkCircleIcon,size:"sm","aria-label":R(tt.help),onPress:c})]}),jsx(O,{variant:"secondary"}),jsx("div",{...T,ref:I,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:y,spellCheck:a,"aria-label":p,className:classNames(ya({isDisabled:s}),ba({isInline:i})),renderPlaceholder:({attributes:w,children:D})=>jsx("span",{...w,className:sprinkles({paddingY:"lg"}),children:D})})})]})})});Si.displayName="RichEditor";var Km=({key:e,value:o},{isDisabled:t,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:t}),{label:p,data:l}=o;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:Cm({isDisabled:t,isHovered:a}),"data-active":a,ref:i,children:[jsx(qo,{name:p,...l?.avatar}),jsxs(L,{display:"flex",flexDirection:"column",children:[jsx(Q,{type:"subtitle",size:"sm",children:p}),jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(O,{})]})},tt=U({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 df=ro.memo(ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":u,"aria-describedby":m,"aria-labelledby":d,"aria-details":y,editableContentAriaLabel:f="Editing Area",footerButtons:b,clearOnCancel:v,clearOnSave:_,...g},h)=>{let R=useRef(null),{formatMessage:I}=F(),x=useRef(null),C=useRef(null),S=useRef(null),N=!a&&g.variant==="minimal",k=useRef(null),[T,P]=ro.useState(g.value||g.defaultValue),w=g.isDisabled||g.isSaveDisabled||!getPlainText(T||""),{fieldProps:D}=useLabel({"aria-label":u,"aria-labelledby":d,"aria-describedby":m,"aria-details":y,labelElementType:"div"});N&&!g.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let H=useCallback(()=>{P(""),a?R.current?.reset():C.current?.clear();},[a]),B=useCallback(()=>{w||(i?.(a?Qt(R.current?.children):x.current.value),_&&H());},[H,_,a,i,w]),j=jsx(E,{variant:"ghost","aria-label":l||I(Li.save),icon:p,isDisabled:w,size:"md",excludeFromTabOrder:N,className:N?km:void 0,onPress:B,preventFocusOnPress:!0}),[A,X]=ro.useState(!1),{keyboardProps:$}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),X(!0));}}),re=useCallback(V=>{P(V),g.onChange?.(V);},[g]);return jsxs("div",{...mergeProps(D,a?$:{}),role:"application",ref:M(S,h),style:o,"data-block-id":t,"data-block-class":r,className:classNames(_m({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx(qo,{className:vm,name:g.avatarName||""}):null,jsxs("div",{className:wm({isInline:s}),children:[jsx(va,{isMinimal:N,textBoxRef:x,isInline:s,editableContentAriaLabel:f,...g,onChange:re,onSave:B}),j]})]}):jsxs(Fragment,{children:[a?jsx(Si,{containerRef:S,ref:k,editorRef:R,isInline:s,editableContentAriaLabel:f,onHelpDialogOpenRequest:()=>{X(!0);},...g,onChange:re,onSave:B}):jsxs(Fragment,{children:[!s&&jsx(O,{variant:"secondary"}),jsx(va,{onCancel:n,textBoxRef:x,ref:C,isInline:s,editableContentAriaLabel:f,...g,onChange:V=>{P(V),g.onChange?.(V);},onSave:B})]}),jsx(O,{variant:"secondary"}),jsxs("div",{className:classNames(ga,sprinkles({justifyContent:"space-between"})),children:[jsxs(L,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&g.mentionableUsers?jsx(E,{icon:AtIcon,size:"sm","aria-label":I(Li.mention),onPress:()=>k.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:Y},K)=>V==="action"?jsx(E,{...Y,size:"sm",isDisabled:g.isDisabled||Y.isDisabled},K):jsx(be,{...Y,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||Y.isDisabled},K))]}),jsxs(L,{children:[!!n&&jsx(E,{variant:"secondary",icon:XCircleFilledIcon$1,isDisabled:g.isDisabled,size:"md",onPress:()=>{n(),v&&H();},"aria-label":c||I(Li.cancel)}),j]})]})]}),jsx(Lm,{isOpen:A,onClose:()=>{X(!1);}})]})}));df.displayName="Editor";var Li=U({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var ka=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),u=animated[s];return c((m,d)=>d&&jsx(u,{className:e,"data-block-id":t,"data-block-class":r,style:{...o,...m},...p,ref:l,children:n}))});ka.displayName="Transition";var uf="_8kqf970 _1yep5z6pd _1yep5z6pe _1yep5z6pf _1yep5z6149 _1yep5z614a _1yep5z614b _1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6150 _1yep5z6151 _1yep5z6152 _1yep5z6yy _1yep5z6v7 _1yep5z6v8 _1yep5z6v9 _1yep5z6176";var ff=2,yf=ro.forwardRef(({className:e,style:o,hideForKeyboard:t,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=ro.useRef(null),u=useInteractionModality(),[m,d]=ro.useState(!1),y=useCallback(()=>{let N=r?.current||ue(c.current).body;return ne(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+ff>=0:N.scrollTop+N.clientHeight+ff>=N.scrollHeight},[r]),[f,b]=ro.useState(y),v=wo(),{buttonProps:_,isPressed:g}=useButton({onPress:()=>{let N=r?.current||ue(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:h,isFocused:R,isFocusVisible:I}=useFocusRing(),{hoverProps:x,isHovered:C}=useHover({}),S=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":g,"data-focus-visible":I,"data-hovered":C,"data-focused":R});return useEffect(()=>{b(y());},[y]),useEffect(()=>{let N=r?.current||ue(c.current).body,k="onscrollend"in ne(N),T=()=>{setTimeout(()=>{d(!1),b(y());},n);},P=()=>{d(!0),k||T();};return N.addEventListener("scroll",P),N.addEventListener("scrollend",T),()=>{N.removeEventListener("scroll",P),N.removeEventListener("scrollend",T);}},[r,n,y]),jsxs(ka,{isMounted:(t?u!=="keyboard":!0)&&!m&&!f,elementType:"button",transitions:{from:{opacity:0,transform:"translateX(-50%) translateY(10px)"},enter:{opacity:1,transform:"translateX(-50%) translateY(0)"},leave:{opacity:0,transform:"translateX(-50%) translateY(10px)"},immediate:v},...mergeProps(_,h,x,S),className:classNames(uf,Ar({isFocusVisible:I,variant:"high-contrast",isHovered:C}),$r({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:o,ref:M(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:wt({variant:"high-contrast"})}),a]})});yf.displayName="ScrollControlButton";var Ei="_1yep5z6jt _1yep5z6ju _1yep5z6jv _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",bf=z({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6lv _1yep5z6lw _1yep5z6lx _1yep5z6od _1yep5z6oe _1yep5z6of"},hasNoCloseBtn:{true:"_1yep5z6m1 _1yep5z6m2 _1yep5z6m3 _1yep5z6od _1yep5z6oe _1yep5z6of _1yep5z6pj _1yep5z6pk _1yep5z6pl _1yep5z6n7 _1yep5z6n8 _1yep5z6n9"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61h5 _1yep5z61h6 _1yep5z61h7"]]}),gf="_1v0p2z10";var wa=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:u=!0,onPrimaryAction:m,onCancel:d,autoFocusButton:y,isPrimaryActionDisabled:f},b)=>{let v=useId(),{formatMessage:_}=F(),g=n&&jsx(Q,{id:v,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(me,{className:e,style:o,"data-block-id":t,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":v,children:[jsxs("div",{className:bf({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!u}),children:[jsxs(L,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&g,u?jsx(E,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(E0.close),onPress:d}):null]}),l?g:null]}),a?jsx(L,{elementType:"section",className:gf,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(L,{paddingX:"lg",paddingBottom:"lg",children:jsx(Ge,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(O,{}),jsxs(L,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(q,{variant:"secondary",className:Ei,label:s,onPress:d,autoFocus:y==="cancel"}):null,i?jsx(q,{className:Ei,label:i,onPress:m,autoFocus:y==="primary",isDisabled:f}):null]})]}):null]})});wa.displayName="AlertDialog";var E0=U({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var vf="_1t55bp71",_f="_1yep5z6e3 _1yep5z6eu _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69i _1yep5z69j _1yep5z69k",zf="_1t55bp70";var O0=V0(),hf=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=t;return (!t||Array.isArray(t)&&t.length===0)&&(p=""),O0.render(p)},[t]);return jsx("div",{className:classNames(_f,zf,{[vf]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:o,ref:i,dangerouslySetInnerHTML:{__html:s}})});hf.displayName="Markdown";function kf(e){let{formatMessage:o,locale:t}=F(),[r,a]=ro.useState(!1),[n,i]=ro.useState(0),[s,p]=ro.useState(0),[l,c]=ro.useState(!1);useEffect(()=>{if(!e.current)return;let d=e.current,y=()=>{a(!1),i(0);},f=()=>{l||i(d.currentTime*100/d.duration);},b=()=>{p(d.duration);};return d.addEventListener("ended",y),d.addEventListener("timeupdate",f),d.addEventListener("loadedmetadata",b),()=>{d.removeEventListener("ended",y),d.removeEventListener("timeupdate",f),d.removeEventListener("loadedmetadata",b);}},[l,e]);let u=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(o(Cf.playing),"polite")):(e.current.pause(),a(!1),announce(o(Cf.paused),"polite"))))();},[o,e]),m=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce($0(e.current.currentTime,t.locale),"assertive"));},[t.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:u,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?Pf(e.current?.currentTime):"00:00",formattedDuration:s?Pf(s):"00:00",setIsSliderDragging:c}}var Cf=U({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function $0(e,o){let t=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...t&&{hours:t},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(o,{style:"long"}).format(n)}function Pf(e){let o=Math.floor(e%3600/60),t=Math.floor(e%60);return [o,t].map(r=>r.toString().padStart(2,"0")).join(":")}var If="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q",wf="rta2n91 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6zq _1yep5z6va _1yep5z6vb _1yep5z6vc _1yep5z6174 _1yep5z610n",Rf="rta2n90";var Nf=ro.forwardRef(({className:e,style:o,size:t="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro.useRef(null),{isPlaying:l,progress:c,duration:u,togglePlay:m,seek:d,formattedDuration:y,formattedCurrentTime:f,setProgress:b,setIsSliderDragging:v}=kf(p),{formatMessage:_}=F(),g=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":u>0});return jsxs("div",{...g,...i,className:classNames(If,"BaselineUI-AudioPlayer",e),role:"group",style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:R})=>jsx("source",{src:h,type:R},h))})}),jsx(be,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:t,"aria-label":_(l?Bi.pause:Bi.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:wf,children:[jsx("span",{"aria-hidden":!0,children:f}),jsx(Eo,{"aria-label":_(Bi.audioTimeline),value:c,minValue:0,maxValue:100,className:Rf,onChange:h=>{b(h),v(!0);},onChangeEnd:h=>{d(h),v(!1);}}),jsx("span",{"aria-hidden":!0,children:y})]})]})});Nf.displayName="AudioPlayer";var Bi=U({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var Lf="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7",Mf="_1w920rn1 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k",Ef="_1w920rn0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l3",Ta=z({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",variantClassNames:{isFocusVisible:{true:"_1yep5z6li _1yep5z6lg _1yep5z6hp"},isSelected:{true:"_1yep5z6li _1yep5z6lg _1yep5z6hp"},isLoading:{true:"_1yep5z615u _1yep5z615v _1yep5z615w"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn6 _1yep5z6li _1yep5z6lg _1yep5z6hp"]]}),Df="_1w920rnb _1yep5z6ld",Bf=z({defaultClassName:"_1w920rn7 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6g5 _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6li _1yep5z6lg _1yep5z6hp"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rna _1yep5z61t1 _1yep5z61t0 _1yep5z61pa"]]}),Ff="_1w920rnc";var Vf=({items:e,ulRef:o})=>{let{length:t}=e,r=ro.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,o]),jsx("div",{className:Ta(),ref:r,children:jsx(L,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:Ff,children:t})})};function Of(e,o){return e.find(t=>t.id===o)}function jf(e,o,t){let r=e.findIndex(i=>i.id===o),a=[...t].map(i=>e.findIndex(s=>s.id===i)),n=[...e];for(let i of a){let[s]=n.splice(i,1);n.splice(r,0,s);}return n}function Af(e,o,t){let r=e.findIndex(s=>s.id===o),a=[...t].map(s=>e.findIndex(p=>p.id===s)),n=[...e],i=0;for(let s of a){let[p]=n.splice(s-i,1);n.splice(r,0,p),i++;}return n}function Fi(e){return e.map(o=>({id:o.id,label:o.label,data:{src:o.src,alt:o.alt}}))}function Sa(e){return e.map(o=>({id:o.id,label:o.label,src:o.data?.src,alt:o.data?.alt}))}var aI=({fit:e,item:o,deleteElement:t})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:n,isLoaded:i}=Io({src:o.data?.src,alt:o.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(Ao,{"aria-label":r(or.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Df,children:t}))},$f=({item:{value:e},options:{optionProps:o,isFocusVisible:t,isSelected:r},liRef:a,fit:n="contain",onDelete:i,className:s,imageClassName:p,imageLabelClassName:l,imageDimensions:c,style:u,renderImage:m=(d,{deleteElement:y})=>jsx(aI,{item:d,deleteElement:y,fit:n})})=>{let d=useId(),{formatMessage:y}=F();invariant(e&&zo(e),"Expected value to be a list option");let f=i?jsx("div",{className:Lf,children:jsx(E,{"aria-label":y(or.delete),size:"xs",icon:XIcon$2,onPress:()=>{i(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,b=useCallback(v=>{let _={},g=typeof v=="function"?v(Sa([e])[0],{isSelected:r}):v;return g&&(_.width=typeof g.width=="string"?Vi[g.width]:g.width,_.aspectRatio="height"in g?`${_.width} / ${g.height}`:g?.aspectRatio?.toString()),_},[r,e]);return jsxs("li",{...o,ref:a,className:classNames(Mf,s),"aria-labelledby":d,style:u,children:[jsx(L,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(Ta({isFocusVisible:t,isSelected:r,isLoading:!0}),p),style:b(c),"data-image-key":e.id,children:m(e,{deleteElement:f??void 0,onDelete:i})})}),jsx("span",{id:d,className:classNames(Bf({isFocusVisible:t,isSelected:r}),l),children:e.label})]})};var cI={width:0,display:"block"};var Vi=(t=>(t[t.sm=102]="sm",t[t.md=170]="md",t))(Vi||{}),Kf=ro.forwardRef(({className:e,style:o,fit:t="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:u,imageContainerClassName:m,imageClassName:d,labelClassName:y,onListChange:f,renderImage:b,imageDimensions:v={width:s,aspectRatio:p},imageContainerStyle:_,...g},h)=>{let R=ro.useRef(null),[I,x]=useState([]),{formatMessage:C}=F();useEffect(()=>{(p||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,p]);let[S,N]=useControlledState(g.selectedKeys,g.defaultSelectedKeys??[],g.onSelectionChange),[k,T]=useControlledState(l?Fi(l):void 0,Fi(c),f?B=>{f?.(Sa(B));}:void 0),P=useCallback(B=>{let j=B.target.key,A=B.keys;if(B.target.dropPosition==="before"){let X=jf(k,j,A);T(X);}else if(B.target.dropPosition==="after"){let X=Af(k,j,A);T(X);}r?.(B);},[k,r,T]),w=useCallback(()=>{i&&I.length&&(T(k.filter(B=>!I.includes(B.id))),i(new Set(I)),x([]));},[I,k,i,T]),D=useCallback((B,j,A)=>jsx($f,{item:B,options:j,liRef:A,fit:t,onDelete:i?X=>{x([X]);}:void 0,renderImage:b,className:m,imageClassName:d,imageLabelClassName:y,imageDimensions:v,style:_}),[t,i,b,m,d,y,v,_]),{keyboardProps:H}=useKeyboard({onKeyDown(B){if(u?.(B),B.key==="Backspace"||B.key==="Delete"){if(!i)return;if([...S].length)x([...S]);else {let A=B.target.dataset.key;x([A]);}}}});return jsxs("div",{...H,ref:h,style:o,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(le,{...g,selectedKeys:S,items:k,onReorder:P,layout:"grid",orientation:"vertical",className:Ef,ref:R,dropIndicatorStyle:cI,renderOption:D,renderDragPreview:B=>jsx(Vf,{items:B,ulRef:R}),onSelectionChange:N,getItems:B=>[...B].map(j=>{let A=Of(k,j);return {src:A?.src||"",alt:A?.alt||"",key:j}})}),jsx(Ie,{isOpen:!![...I].length,onOpenChange:B=>{B||x([]);},children:jsx(Ee,{isDismissable:!0,children:jsx(wa,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:C(or.delete),cancelLabel:C(or.cancel),onCancel:()=>{x([]);},onPrimaryAction:w,autoFocusButton:"cancel"})})})]})});Kf.displayName="ImageGallery";var or=U({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var Gf="_1sexph00",Wf="_1sexph01 _1yep5z617n _1yep5z617o _1yep5z617p _1yep5z619z _1yep5z61a0 _1yep5z61a1 _1yep5z61b5 _1yep5z61b6 _1yep5z61b7 _1yep5z618t _1yep5z618u _1yep5z618v _1yep5z61rj _1yep5z61rk _1yep5z61rl";var Zf=ro.forwardRef(({className:e,style:o,items:t,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:u,defaultSelected:m,onButtonSelectionChange:d,moreAriaLabel:y,optionStyle:f,optionClassName:b,triggerClassName:v,triggerStyle:_,tooltipProps:g,...h},R)=>{let{formatMessage:I}=F(),x=ae(),C=useSelectState({items:t,...h,defaultSelectedKey:h.defaultSelectedKey||t?.[0]?.id,children:x,validationState:h.validationState==="error"?"invalid":"valid"}),[S,N]=useControlledState(u,!!m,$=>{d?.({isSelected:$,selectedKey:C.selectedKey});}),{hoverProps:k,isHovered:T}=useHover({isDisabled:s}),P=useMemo(()=>{let $=C.collection.getItem(C.selectedKey),re=$?.textValue||$?.["aria-label"],V=$?.value,Y=V?.icon,K={size:i,isSelected:S,onPress:Ce=>{N(!S),c?.(Ce);},isDisabled:s,excludeFromTabOrder:l,className:typeof b=="function"?b(V,{isButton:!0,isSelected:S}):b,style:typeof f=="function"?f(V,{isButton:!0,isSelected:S}):f};return n&&Y?jsx(te,{variant:"inverse",size:"sm",includeArrow:!1,text:re,placement:"bottom start",offset:4,...typeof g=="function"?g("button"):g,children:jsx(be,{icon:Y,"aria-label":re,variant:"toolbar",...K})}):jsx(Or,{iconStart:Y,label:re,variant:"toolbar",...K})},[l,n,S,s,c,b,f,N,i,C.collection,C.selectedKey,g]),w=h["aria-label"],D=useCallback(({buttonProps:$,ref:re})=>{delete $["aria-labelledby"];let V=y||`${I(_I.more)} ${w}`;return jsx(te,{variant:"inverse",size:"sm",includeArrow:!1,text:V,placement:"bottom start",offset:4,...g,children:jsx(PressResponder,{...$,children:jsx(E,{"aria-label":V,ref:re,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:Y})=>classNames(Vr({isSelected:S,isFocusVisible:Y}),Wf,v),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[w,l,I,S,s,y,i,g,v,_]),H=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":T,"data-selected":S,"data-disabled":s,"data-expanded":C.isOpen}),B=oe(R),j=useMemo(()=>({state:C,popoverAnchorRef:B}),[C,B]),A=useCallback($=>typeof b=="function"?b($,{isButton:!1,isSelected:C.selectionManager.isSelected($.id)}):b,[b,C.selectionManager]),X=useCallback($=>typeof f=="function"?f($,{isButton:!1,isSelected:C.selectionManager.isSelected($.id)}):f,[f,C.selectionManager]);return jsx(qr.Provider,{value:j,children:jsxs(L,{...k,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(Gf,"BaselineUI-ButtonSelect",e),"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],"aria-describedby":h["aria-describedby"],"aria-details":h["aria-details"],style:o,ref:B,...H,children:[P,jsx(Ye,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:t,...h,style:{width:20},optionClassName:A,optionStyle:X,variant:"ghost",renderTrigger:D})]})})});Zf.displayName="ButtonSelect";var _I=U({more:{id:"more",defaultMessage:"More"}});var Qf=z({defaultClassName:"_18v88n10 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6lc",variantClassNames:{labelPosition:{top:"_1yep5z614l _1yep5z614m _1yep5z614n",start:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),Jf=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6lc _1yep5z6ln _1yep5z6lf _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z610q"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),ey=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6l9",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6106",warning:"_1yep5z610e"},isReadOnly:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]}),oy=z({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6lq _1yep5z6lo _1yep5z6gz _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z612a",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z617i _1yep5z617g _1yep5z612o _1yep5z6179 _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z613h"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61ta _1yep5z61t8 _1yep5z61oj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61ok"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61ok"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),ty=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),ry=z({defaultClassName:"_18v88n19 _1yep5z6ik _1yep5z6il _1yep5z6im",variantClassNames:{labelPosition:{top:"_1yep5z6sy _1yep5z6sz _1yep5z6t0",start:"_1yep5z6mv _1yep5z6mw _1yep5z6mx _1yep5z614l _1yep5z614m _1yep5z614n"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61rm _1yep5z61rn _1yep5z61ro"]]}),ay=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lf",variantClassNames:{isFocusVisible:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isHovered:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isOpen:{true:"_1yep5z613t _1yep5z6177"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isHovered:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isOpen:!0},"_1yep5z61pl _1yep5z61sz"]]});var sy=ro.forwardRef(({className:e,style:o,inputStyle:t,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:u=!1,labelPosition:m="top",validationState:d="valid",variant:y="primary",toggleLabel:f,renderOption:b,showIcon:v=!0,filter:_,minValue:g,maxValue:h,inputType:R="text",onInputSubmit:I,...x},C)=>{let{contains:S}=useFilter({sensitivity:"base"}),N=ae(),k=useComboBoxState({...x,defaultFilter:_||S,defaultItems:s,onSelectionChange:l,onInputChange:c,children:N,validationState:u?"invalid":"valid"}),T=ro.useRef(null),P=ro.useRef(null),w=ro.useRef(null),D=ro.useRef(null),H=ro.useRef(null),{buttonProps:B,inputProps:j,listBoxProps:A,labelProps:X,errorMessageProps:$,descriptionProps:re,validationErrors:V}=useComboBox({...x,inputRef:P,defaultItems:s,buttonRef:T,listBoxRef:w,popoverRef:D,validationState:d==="error"?"invalid":"valid"},k),Y=x.errorMessage||V.join(" "),K=ke({...x,errorMessage:Y,descriptionProps:re,errorMessageProps:$,labelPosition:m});Y&&(d="error");let{hoverProps:Ce,isHovered:Pe}=useHover({isDisabled:x.isDisabled}),{isFocused:ze,focusProps:Te,isFocusVisible:He}=useFocusRing(),ee=Vo({isReadOnly:x.isReadOnly,validationState:d}),de=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":d,"data-focused":ze,"data-focus-visible":He}),{labelProps:lt,fieldProps:pt}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]}),{keyboardProps:ct}=useKeyboard({onKeyDown:G=>{G.key==="Enter"&&I?.(j.value?.toString()??"");}}),{focusProps:vo}=useFocus({onBlur:()=>{j.value&&I?.(j.value?.toString()??"");}});return jsx(ao.Provider,{value:k,children:jsxs("div",{className:classNames(Qf({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:o,ref:C,children:[i||m==="start"&&K?jsxs("div",{className:ry({labelPosition:m,hasMessage:!!K}),children:[jsx("label",{...mergeProps(X,lt),className:ty({isDisabled:x.isDisabled}),children:i}),m==="start"&&K]}):null,jsxs("div",{...Ce,className:oy({validationState:d,isHovered:Pe,isFocused:ze,variant:y,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:H,children:[jsx("input",{...mergeProps(j,Te,de,pt,vo,ct,R==="number"?{type:"number",min:g,max:h,onKeyDown:G=>{(G.key==="ArrowUp"||G.key==="ArrowDown")&&G.preventDefault();}}:null),ref:P,className:classNames(Jf({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:t}),ee&&v?jsx(ee,{className:ey({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsx(q,{...B,ref:T,variant:"popover",label:f,className:ay({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&He,isHovered:!x.isDisabled&&!x.isReadOnly&&Pe,isOpen:k.isOpen})})]}),jsx(ye,{className:Ke,ref:D,triggerRef:H,state:k,children:jsx(le,{...A,items:s,ref:w,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:Mr})}),m==="top"&&K]})})});sy.displayName="ComboBox";var $i=ro.forwardRef(({item:e,renderGridItem:o,state:t},r)=>{let a=oe(r),n=useGridListItem({node:e},t,a),i=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:s}=useGridListSelectionCheckbox({key:e.key},t);return o(e,{...n,checkBoxProps:i?s:void 0},a)});$i.displayName="GridListItem";var FI=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},py=ro.forwardRef(({className:e,style:o,isEditing:t=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,...i},s)=>{let p=ae(),l=useListState({...i,children:p}),c=oe(s),{gridProps:u}=useGridList(i,l,c);dr({handle:n,type:"gridlist"},l,c);let m=t?FI:u.onKeyDownCapture;return jsx("ul",{...u,className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,onKeyDownCapture:m,children:[...l.collection].map(d=>jsx($i,{item:d,state:l,renderGridItem:i.renderGridItem},d.key))})});py.displayName="GridList";var cy="_1yep5z6f5",dy="_1dc3b8m0";var uy=ro.forwardRef(({className:e,selectionMode:o,style:t,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...p},l)=>{let c=oe(l),u=ae(),m=useListState({...p,selectionMode:o,suppressTextValueWarning:!0,children:u}),{actionGroupProps:d}=useActionGroup({...p,selectionMode:o,children:u},m,c),y=[...m.collection].map(f=>(invariant(f.value),jsx(qI,{item:f,state:m,isDisabled:p.isDisabled,onAction:p.onAction,tooltipProps:n,renderActionItem:s},f.key)));return i?jsxs(L,{...d,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:t,ref:c,children:[jsx(i,{size:24,className:cy}),jsx(L,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:y})]}):jsx(L,{...d,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:t,ref:c,children:y})});uy.displayName="ActionGroup";var qI=({item:e,state:o,tooltipProps:t,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},o),s=n||o.selectionManager.isDisabled(e.key),p=o.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof t=="function"?t(e.value):t),[t,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(te,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(E,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[dy]:p},"BaselineUI-ActionGroup-Item")})})})};var my="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",fy="_1yep5z61qa _1yep5z61qb _1yep5z61qc _1yep5z61gz _1yep5z61h0 _1yep5z61h1";var by=ro.forwardRef(({className:e,style:o,items:t,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:u,labelPosition:m="top","data-block-id":d,"data-block-class":y,shouldFocusWrap:f,...b},v)=>{let _=useMemo(()=>t.map(h=>({id:h.color,label:h.label})),[t]),g=useId();return useEffect(()=>{!a&&!b["aria-label"]&&!b["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,b]),jsxs(L,{...Ha(b),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":d,"data-block-class":y,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:o,ref:v,children:[n||a?jsxs(L,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Q,{id:g,type:"label",size:"sm",children:a}):null]}):null,jsx(le,{className:classNames(fy,r),selectionMode:"single",items:_,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?_.map(h=>h.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:h=>{p?.([...h][0]);},optionClassName:c,optionStyle:u,renderOption:({key:h,textValue:R},{isSelected:I,isFocusVisible:x,isDisabled:C,optionProps:S},N)=>jsx("li",{...S,"data-disabled":C,className:classNames(my,S.className),ref:N,children:jsx(Qe,{isFocusVisible:x,color:h,isSelected:I,"aria-label":R,isInteractive:!0,isDisabled:C,tooltip:!0})}),shouldFocusWrap:f,...b,"aria-labelledby":a?g:b["aria-labelledby"]})]})});by.displayName="ColorSwatchPicker";var gy="_10dw1p96",vy="_10dw1p95",_y=z({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lf _1yep5z6l2 _1yep5z6kz",variantClassNames:{isSelected:{true:"_1yep5z611v"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z613h _1yep5z617a _1yep5z6178"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isSelected:!1,isRenaming:!1},"_1yep5z61nm _1yep5z61pf _1yep5z61t1 _1yep5z61t0"]]});var xy=({context:e,depth:o,children:t,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:p,primaryActionAriaLabel:l,secondaryActionAriaLabel:c,onRename:u,onAction:m,renderItemTitle:d=y=>y.data.label})=>{let{formatMessage:y}=F(),{hoverProps:f,isHovered:b}=useHover({}),v=useRef(null),{onKeyDown:_,...g}=e.interactiveElementProps;delete g.onFocus,delete g.onClick;let h=createFocusManager(v),R=useCallback(P=>{if(P.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))v.current?.setAttribute("tabindex","-1"),P.preventDefault(),P.stopPropagation(),h.focusNext();else switch(P.key){case"ArrowLeft":{h.focusPrevious()?(P.preventDefault(),P.stopPropagation()):(_?.(P),e.focusItem(!0));break}case"Enter":{e.toggleExpandedState();break}default:_?.(P);}},[e,h,_,r,v]),I=useMemo(()=>{let P=s,w=p,D=typeof l=="function"?l(r.index):l,H=typeof c=="function"?c(r.index):c;return P||w?jsxs(L,{display:"flex",flexDirection:"row",children:[P?jsx(be,{icon:P,"aria-label":D,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,w?jsx(be,{icon:w,"aria-label":H,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{n?.(r.index);},tooltip:!0}):null]}):null},[s,r.index,p,l,c,a,n]),x=useCallback(P=>{P.key==="Enter"?(u?.({key:r.index,value:P.target.value}),e.stopRenamingItem()):P.key==="Escape"?(e.stopRenamingItem(),v.current?.setAttribute("tabindex","0"),v.current?.focus()):P.key!=="ArrowRight"&&P.key!=="ArrowLeft"&&P.key!=="ArrowUp"&&P.key!=="ArrowDown"&&!P.metaKey&&P.continuePropagation();},[r.index,e,u,v]),C=r.data.icon,S=!!u,{pressProps:N}=usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:k,focusProps:T}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:R,onFocus:()=>{e.focusItem(!1);}},N,T,f,e.itemContainerWithoutChildrenProps,g),className:classNames(vy,_y({isHovered:b,isSelected:e.isSelected,isFocusVisible:k,isRenaming:e.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":r.index,"data-expanded":r.isFolder?e.isExpanded:void 0,"aria-expanded":r.isFolder?e.isExpanded:void 0,"aria-selected":e.isSelected,"data-depth":o,"aria-level":o+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:v,children:jsxs(L,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?I:null,jsxs(L,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(L,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${o*2} * ${themeVars.spacing.lg})`},children:[jsx(E,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":y(e.isExpanded?Gi.collapse:Gi.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(gy,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),C?jsx(C,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(L,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:P=>{S&&(P.stopPropagation(),P.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:P=>{P.stopPropagation();},children:jsx(Ge,{defaultValue:r.data.label,autoFocus:!0,onBlur:P=>{u?.({key:r.index,value:P.target.value}),e.stopRenamingItem();},"aria-label":y(Gi.rename),onKeyDown:x,className:"BaselineUI-TreeView-RenameInput"})}):jsx(Q,{type:"label",size:"sm",className:classNames(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:d(r)}),r.data.description?jsx(Q,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.data.description}):null]})]}),i==="end"?I:null]})}),t]})},Gi=U({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function yw(e,{posInset:o,setSize:t}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:o,setSize:t},isFolder:!!e.children?.length}}function bw(e,o){let t={};function r(a,n,i){if(t[a.id]=o(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),t}var Iy=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,actionsPosition:m="start",onRename:d,onAction:y,renderItemTitle:f,...b},v)=>{let _=ae(),g=useRef(null),h=useTreeState({...b,items:a.children,children:_}),R=useMemo(()=>Object.fromEntries(Object.entries(bw(a,yw)).map(([k,T])=>[k,{...T,canRename:!!d}])),[a,d]),I=useId(),[x,C]=ro.useState(a.children?.[0]?.id??""),S=useRef(x),N=useMemo(()=>({[`tree-${I}`]:{focusedItem:x,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[x,h.expandedKeys,h.selectionManager.selectedKeys,I]);return useEffect(()=>{if(!g.current)return;let k=Ve(g.current),T=k instanceof ShadowRoot,P=g.current?.contains(k?.activeElement??null);T&&P&&Ve(g.current)?.querySelector(`[data-rct-item-id="${x}"]`)?.focus();},[x]),jsx(ControlledTreeEnvironment,{items:R,getItemTitle:k=>k.data?.label,viewState:N,onExpandItem:k=>{h.setExpandedKeys(new Set([...h.expandedKeys,k.index])),b.onExpand?.(k.index.toString());},onFocusItem:k=>{C(k.index),k.index&&(S.current=k.index);},onCollapseItem:k=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(T=>T!==k.index))),b.onCollapse?.(k.index.toString());},onSelectItems:k=>{h.selectionManager.setSelectedKeys(new Set(k));},renderItem:k=>jsx(xy,{...k,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:m,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,onRename:d,onAction:y,renderItemTitle:f}),renderLiveDescriptorContainer:({children:k})=>jsx($e,{children:jsx(VisuallyHidden,{children:k})}),renderTreeContainer:({containerProps:k,children:T})=>jsx("div",{..._o(k,{onBlur:P=>{P.currentTarget.contains(P.relatedTarget)||P.currentTarget.querySelector(`[data-key="${S.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":t,"data-block-class":r,style:{...o,...k.style},className:classNames(e,"BaselineUI-TreeView"),ref:M(v,k.ref,g),role:"treegrid",children:T}),renderItemsContainer:({children:k})=>k,children:jsx(Tree,{treeId:`tree-${I}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});Iy.displayName="TreeView";var Cw=forwardRef(({className:e,isCollapsible:o=!1,...t},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:o,ref:a,id:n,...t})});Cw.displayName="Panel";var Sw=forwardRef(({className:e,...o},t)=>{let r=useRef(null);return useImperativeHandle(t,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...o})});Sw.displayName="PanelGroup";var wy="_6abhjk0";var Ew=({className:e,isDisabled:o=!1,...t})=>jsx(PanelResizeHandle,{disabled:o,className:classNames(wy,"BaselineUI-PanelResizeHandle",e),...t});Ew.displayName="PanelResizeHandle";
|
|
52
|
+
var xe=typeof document<"u"?rt.useLayoutEffect:()=>{};function Fa(e){let t=useRef(null);return xe(()=>{t.current=e;},[e]),useCallback((...o)=>{let r=t.current;return r?.(...o)},[])}function Ha(e){let[t,o]=useState(e),r=useRef(null),a=Fa(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}t===i.value?a():o(i.value);});xe(()=>{r.current&&a();});let n=Fa(i=>{r.current=i(t),a();});return [t,n]}var ir={prefix:String(Math.round(Math.random()*1e10)),current:0},rs=rt.createContext(ir),Gy=rt.createContext(!1);var Wy=!!(typeof window<"u"&&window.document&&window.document.createElement),Va=new WeakMap;function Xy(e=!1){let t=useContext(rs),o=useRef(null);if(o.current===null&&!e){var r,a;let n=(a=rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=Va.get(n);i==null?Va.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==i.state&&(t.current=i.id,Va.delete(n));}o.current=++t.current;}return o.current}function Yy(e){let t=useContext(rs);t===ir&&!Wy&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let o=Xy(!!e),r=t===ir&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${o}`}function Zy(e){let t=rt.useId(),[o]=useState(as()),r=o||process.env.NODE_ENV==="test"?"react-aria":`react-aria${ir.prefix}`;return e||`${r}-${t}`}var ja=typeof rt.useId=="function"?Zy:Yy;function Qy(){return !1}function Jy(){return !0}function e1(e){return ()=>{}}function as(){return typeof rt.useSyncExternalStore=="function"?rt.useSyncExternalStore(e1,Qy,Jy):useContext(Gy)}var n1=!!(typeof window<"u"&&window.document&&window.document.createElement),sr=new Map;function lr(e){let[t,o]=useState(e),r=useRef(null),a=ja(t),n=useCallback(i=>{r.current=i;},[]);return n1&&sr.set(a,n),xe(()=>{let i=a;return ()=>{sr.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,o(i));}),a}function Aa(e,t){if(e===t)return e;let o=sr.get(e);if(o)return o(t),t;let r=sr.get(t);return r?(r(e),e):t}function ns(...e){return (...t)=>{for(let o of e)typeof o=="function"&&o(...t);}}var ue=e=>{var t;return (t=e?.ownerDocument)!==null&&t!==void 0?t:document},ie=e=>e&&"window"in e&&e.window===e?e:ue(e).defaultView||window,Ve=e=>{if(!e)return document;if(!e.isConnected)return null;let t=e.getRootNode?e.getRootNode():document;return ss(t)||ls(t)?t:null};function is(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function ss(e){return is(e)&&e.nodeType===Node.DOCUMENT_NODE}function ls(e){return is(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function ps(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=ps(e[t]))&&(r&&(r+=" "),r+=o);}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function i1(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=ps(e))&&(r&&(r+=" "),r+=t);return r}var cs=i1;function zt(...e){let t={...e[0]};for(let o=1;o<e.length;o++){let r=e[o];for(let a in r){let n=t[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=ns(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?t[a]=cs(n,i):a==="id"&&n&&i?t.id=Aa(n,i):t[a]=i!==void 0?i:n;}}return t}function M(...e){return e.length===1&&e[0]?e[0]:t=>{for(let o of e)typeof o=="function"?o(t):o!=null&&(o.current=t);}}var s1=new Set(["id"]),l1=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),p1=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),c1=/^(data-.*)$/;function $a(e,t={}){let{labelable:o,isLink:r,propNames:a}=t,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(s1.has(i)||o&&l1.has(i)||r&&p1.has(i)||a?.has(i)||c1.test(i))&&(n[i]=e[i]);return n}function pr(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(o=>e.test(o.brand)))||e.test(window.navigator.userAgent)}function Ua(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Te(e){let t=null;return ()=>(t==null&&(t=e()),t)}var qa=Te(function(){return Ua(/^Mac/i)}),ds=Te(function(){return Ua(/^iPhone/i)}),us=Te(function(){return Ua(/^iPad/i)||qa()&&navigator.maxTouchPoints>1}),cr=Te(function(){return ds()||us()}),Ka=Te(function(){return pr(/Android/i)}),fo=Te(function(){return pr(/Firefox/i)});function te(e){let t=useRef(null);return useMemo(()=>({get current(){return t.current},set current(o){t.current=o,typeof e=="function"?e(o):e&&(e.current=o);}}),[e])}function b1(){return typeof window.ResizeObserver<"u"}function Ga(e){let{ref:t,box:o,onResize:r}=e;useEffect(()=>{let a=t?.current;if(a)if(b1()){let n=new window.ResizeObserver(i=>{i.length&&r();});return n.observe(a,{box:o}),()=>{a&&n.unobserve(a);}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1);}},[r,t,o]);}function ht(e){return !!e&&"label"in e&&!!e.label}function dr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function _1(e){return dr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:t=>jsx(Item,{textValue:t.label,children:t.label},t.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function ae(){return useCallback(e=>_1(e),[])}function ur(e,t,o){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=t.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,o);let n=useDroppableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:t.collection,disabledKeys:t.disabledKeys,ref:o,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(t.collection,o)},n,o);return {collectionProps:i,dragState:a,dropState:n}}function R1(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}function S1(e){var t=R1(e,"string");return typeof t=="symbol"?t:String(t)}function T1(e,t,o){return t=S1(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ys(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 bs(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?ys(Object(o),!0).forEach(function(r){T1(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ys(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function gs(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var N1=(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},h=e=>{var t=o=>{var r=e.defaultClassName,a=bs(bs({},e.defaultVariants),o);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,u]of e.compoundVariants)N1(c,a,e.defaultVariants)&&(r+=" "+u);return r};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return gs(e.variantClassNames,o=>gs(o,r=>r.split(" ")[0]))}},t};var vs=h({defaultClassName:"_6n12k9b _1yep5z6lh _1yep5z6lg _1yep5z6i1 _1yep5z6kz",variantClassNames:{isDropTarget:{true:"_1yep5z613h"},orientation:{vertical:"_1yep5z6174",horizontal:"_1yep5z6175"}},defaultVariants:{},compoundVariants:[]}),_s="_6n12k98 _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij",zs=h({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),hs=h({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6kz _1yep5z6l2 _1yep5z6lf _1yep5z6le _1yep5z6lc _1yep5z6l9",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z613h _1yep5z617a _1yep5z6178 _1yep5z617b _1yep5z613u _1yep5z613v _1yep5z613w"},isHovered:{true:"_1yep5z611u",false:"_1yep5z611t"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),xs="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Cs="_6n12k90";var Ps=h({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var j=rt.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(Ps({isVertical:r==="vertical",isSecondary:o==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:t,role:a?void 0:c.role,ref:l})});j.displayName="Separator";function V1(e){return sprinkles.properties.has(e)}var L=rt.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in o)V1(l)?s[l]=o[l]:p[l]=o[l];return {sprinkleProps:s,domProps:p}},[o]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:t})});L.displayName="Box";var bo=rt.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:u},m)=>{invariant(e.value&&ht(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=useHover({isDisabled:t}),v=filterTruthyValues({"data-selected":r,"data-disabled":t,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":o,"data-selection-mode":u.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,v),className:classNames(hs({isHovered:b,isFocused:o,isFirstChild:u.collection.getFirstKey()===e.key,isLastChild:u.collection.getLastKey()===e.key,isDisabled:t}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(L,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,d?jsx(d,{size:24}):null,jsx("span",{...p,children:f})]}),i?jsx("span",{className:zs({isDisabled:t}),...s,children:i}):null]})});bo.displayName="DefaultRenderOption";var xt=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(vs({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let i=rt.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:t},i)};function Ct(e,t,o){return typeof e=="function"?e(t,o):e}function mr(e,t,o){return typeof e=="function"?e(t,o):e}var Rs=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(xt,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(xt,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};Rs.displayName="DraggableListOption";var go=rt.forwardRef(({item:e,renderOption:t=(m,d,f)=>jsx(bo,{item:m,liProps:d.optionProps,...d,ref:f}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},u)=>{let m=rt.useRef(null),d=useOption({key:e.key},r,m),{value:f}=e;invariant(f&&ht(f),"ListSection should not be passed to ListOption");let y={isFocusVisible:d.isFocusVisible,isSelected:d.isSelected,isFocused:d.isFocused,isDisabled:d.isDisabled,isPressed:d.isPressed},b={style:mr(l,f,y),className:Ct(c,f,y)};return a&&n?jsx(Rs,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:v=>t(e,{...d,showSelectedIcon:o,_state:r,optionProps:{...mergeProps(d.optionProps,v),...b}},M(m,u))}):t(e,{...d,showSelectedIcon:o,_state:r,optionProps:{...d.optionProps,...b}},M(m,u))});go.displayName="Option";var Ls=({section:e,state:t,sectionClassName:o,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=rt.useRef(null),{itemProps:l,groupProps:c,headingProps:u}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=t.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:d}=e;invariant(d&&dr(d),"section must be a ListSection");let f=typeof r=="function"?r(d):r,y=typeof o=="function"?o(d):o;return jsxs(Fragment,{children:[e.key===t.collection.getFirstKey()?null:jsx(j,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...f},className:classNames(Cs,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(L,{...u,className:classNames("BaselineUI-ListBox-SectionHeader",xs),ref:p,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...m].map(b=>jsx(go,{item:b,state:t,...s},b.key))})]})]})};function br({type:e="listbox",handle:t},o,r){let a=useCallback(i=>e==="listbox"?r.current?.querySelector(`[data-key="${i}"][role="option"]`):r.current?.querySelector(`[data-key="${i}"][role="row"]`),[e,r]),n=useCallback((i,s)=>{let p=a(i);p&&p?.scrollIntoView({block:"nearest",inline:"nearest",...s});},[a]);useImperativeHandle(t,()=>({scrollIntoView:n,setFocusedKey:i=>{o.selectionManager.setFocused(!0),o.selectionManager.setFocusedKey(i),n(i),a(i)?.focus();}}),[n,o.selectionManager,a]),useGranularEffect(()=>{let i=Ve(r.current)instanceof ShadowRoot,s=o.selectionManager.focusedKey;i&&s&&n(s);},[o.selectionManager.focusedKey],[n,r]);}var at=rt.createContext(null),Ya=rt.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:u,listBoxHandle:m,...d},f)=>{let y=rt.useRef(null),{direction:b}=useLocale(),v=rt.useRef(null),{listBoxProps:_}=useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:u.collection,ref:v,layout:t,orientation:o,direction:b,disabledKeys:u.disabledKeys})},u,v);br({handle:m},u,v);let g=useReducedMotion(),z=useCallback(T=>{let k=ue(v.current);c&&(!g&&"startViewTransition"in k?k.startViewTransition(()=>{c(T);}):c(T));},[c,g]),{collectionProps:R,dragState:P,dropState:C}=ur({...d,onReorder:z,layout:t,orientation:o,enableReorder:i,preview:y},u,v),{isFocusVisible:x,isFocused:S,focusProps:N}=useFocusRing(),w=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":t,"data-empty":u.collection.size===0,"data-focused":S,"data-focus-visible":x,"data-orientation":o});return jsxs("ul",{...mergeProps(_,N,w,R),className:classNames(_s,"BaselineUI-ListBox",e),style:a,ref:M(f,v),children:[[...u.collection].map(T=>{let k={key:T.key,state:u,dragState:P,dropState:C,renderOption:n,renderDropIndicator:d.renderDropIndicator,renderSectionHeader:d.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName,sectionClassName:d.sectionClassName,sectionStyle:d.sectionStyle,showSectionHeader:d.showSectionHeader,withSectionHeaderPadding:d.withSectionHeaderPadding};return T.type==="section"?jsx(Ls,{...k,section:T}):jsx(go,{...k,item:T})}),l?jsx(DragPreview,{ref:y,children:l}):null]})});Ya.displayName="ListBoxCore";var Es=rt.forwardRef((e,t)=>{let o=ae(),r=useListState({...e,children:o});return jsx(Ya,{...e,ref:t,state:r})});Es.displayName="ListBoxStandalone";var pe=rt.forwardRef((e,t)=>{let o=useContext(at);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx(Ya,{...e,ref:t,state:o}):jsx(Es,{...e,ref:t})});pe.displayName="ListBox";var gr="uf19bsf _1yep5z6kz",Ds=h({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5 _1yep5z6le _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6l9",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6wd _1yep5z6we _1yep5z6wf _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z610z"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6wv _1yep5z6ww _1yep5z6wx _1yep5z6xj _1yep5z6xk _1yep5z6xl _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx",popover:"uf19bse _1yep5z6pg _1yep5z6ph _1yep5z6pi _1yep5z6n4 _1yep5z6n5 _1yep5z6n6 _1yep5z6lv _1yep5z6lw _1yep5z6lx _1yep5z6o7 _1yep5z6o8 _1yep5z6o9 _1yep5z6vg _1yep5z6vh _1yep5z6vi"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61nn"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61nn"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mq"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mp _1yep5z61nn"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61mv"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61pc _1yep5z61t0 _1yep5z61t4 _1yep5z61t1"],[{variant:"ghost",isDisabled:!1},"_1yep5z61mu"],[{variant:"popover",size:"lg"},"_1yep5z61i2 _1yep5z61i3 _1yep5z61i4 _1yep5z61iq _1yep5z61ir _1yep5z61is _1yep5z61je _1yep5z61jf _1yep5z61jg _1yep5z61k2 _1yep5z61k3 _1yep5z61k4"]]});var vo=rt.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...t})=>{let o=rt.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:e})};var Fs={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Hs="_1gzftth1 _1yep5z6ih _1yep5z6ii _1yep5z6ij",Vs="_1gzftth6",Os="_1gzftth8",js="_1gzftth7",As="var(--_1gzftth0)";function iN(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function $s(e){return typeof e=="object"&&typeof e.left=="number"&&typeof e.top=="number"&&(typeof e.width=="number"||e.width===void 0)&&(typeof e.height=="number"||e.height===void 0)}var vr=rt.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:t})=>{let{state:o,overlayTriggerAria:r,triggerRef:a}=useContext(vo);invariant(o,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:o.isOpen,ref:a}),[n,o.isOpen,a]);return invariant(!t&&e||t&&!e,"Either one of anchorRect or children has to be provided."),invariant(!t||$s(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(vr.Provider,{value:i,children:t?jsx("div",{className:classNames(Os,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:a,tabIndex:-1},JSON.stringify(t)):e})};var _r=({label:e,tooltip:t})=>({tooltipProps:useMemo(()=>{let r={size:"sm",variant:"inverse",text:e,includeArrow:!1,placement:"bottom start",offset:4};if(typeof t=="object")return {...r,...t};if(t)return r},[e,t])});function zr({tooltip:e,"aria-label":t,"aria-labelledby":o},r){let[a,n]=useState(t||"");useEffect(()=>{if(o){let p=ue(r.current).querySelector(`#${o}`);p&&n(p.textContent||"");}else t&&n(t);},[o,r,t]);let{tooltipProps:i}=_r({label:a,tooltip:e});return {tooltipProps:i}}var hr=e=>{let t=rt.useRef(null),{ref:o,...r}=useContext(vr)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t),{isFocusVisible:i,isFocused:s,focusProps:p}=useFocusRing(),{hoverProps:l,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:zt(a,p,l),isPressed:n,ref:M(t,o||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},xr=(e,t)=>{let o=rt.useRef(null),{ref:r,...a}=useContext(vr)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},t,o);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=useFocusRing(),{hoverProps:c,isHovered:u}=useHover({isDisabled:e.isDisabled});return {buttonProps:zt(n,l,c),isPressed:i,ref:M(o,r||null),isFocusVisible:s,isFocused:p,isHovered:u,uiStateOptions:{isHovered:u,isFocused:p,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:t.isSelected}}};var Cr=h({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6dy _1yep5z6kz",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9"},isDisabled:{true:"oom8bsa"},isFocusVisible:{true:"oom8bsb"},isHovered:{true:"oom8bsc"},size:{sm:"oom8bsd",md:"oom8bse",lg:"oom8bsf"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsg"],[{variant:"secondary",isHovered:!0},"oom8bsh"],[{variant:"tertiary",isHovered:!0},"oom8bsi"],[{variant:"popover",isHovered:!0},"oom8bsj"],[{variant:"ghost",isHovered:!0},"oom8bsk"],[{variant:"success",isHovered:!0},"oom8bsl"],[{variant:"warning",isHovered:!0},"oom8bsm"],[{variant:"error",isHovered:!0},"oom8bsn"],[{variant:"primary",isFocusVisible:!0},"oom8bso"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsp"],[{variant:"success",isFocusVisible:!0},"oom8bsq"],[{variant:"warning",isFocusVisible:!0},"oom8bsr"],[{variant:"error",isFocusVisible:!0},"oom8bss"]]}),Qa=h({defaultClassName:"oom8bst _1yep5z6kz",variantClassNames:{isDisabled:{true:"oom8bsu"},isFocusVisible:{true:"oom8bsv"},isHovered:{true:"_1yep5z610u"},variant:{primary:"_1yep5z6111",secondary:"_1yep5z610x",tertiary:"_1yep5z6112",ghost:"_1yep5z6112",popover:"_1yep5z610x",toolbar:"_1yep5z610x",success:"_1yep5z6110",warning:"_1yep5z6110",error:"_1yep5z6110"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:!0},"_1yep5z61mt"],[{variant:"ghost",isHovered:!0},"_1yep5z61mv"],[{variant:"tertiary",isFocusVisible:!0},"_1yep5z61mt"],[{variant:"secondary",isDisabled:!0},"_1yep5z61mr"],[{variant:"tertiary",isDisabled:!0},"_1yep5z61mr"],[{variant:"ghost",isDisabled:!0},"_1yep5z61mr"],[{variant:"popover",isDisabled:!0},"_1yep5z61mr"],[{variant:"toolbar",isDisabled:!0},"_1yep5z61mr"]]});var jb={sm:16,md:20,lg:24},q=rt.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...u},m)=>{let{buttonProps:d,isPressed:f,ref:y,isFocusVisible:b,isFocused:v,isHovered:_,uiStateOptions:g}=hr({...u,elementType:i,isDisabled:s}),z=jb[p],R=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":s,"data-focused":v,"data-focus-visible":b,"data-hovered":_,"data-pressed":f});return jsxs(i,{...mergeProps(d,R),className:classNames(Cr({isDisabled:!!s,isFocusVisible:b,isHovered:_,variant:n,size:p}),"BaselineUI-ActionButton",typeof o=="function"?o(g):o),style:typeof t=="function"?t(g):t,ref:M(m,y),children:[!!r&&jsx(r,{size:z,className:Qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsx(a,{size:z,className:Qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:gr})]})});q.displayName="ActionButton";var Xs=rt.forwardRef(({className:e,style:t,node:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=rt.useRef(null);rt.useEffect(()=>{let c=s.current;return c?.append(o),()=>{c?.contains(o)&&o.remove();}},[o]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...p,className:e,style:t,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:M(i,s)})});Xs.displayName="DomNodeRenderer";var Ys="_14uvjig0 z9nup81",Zs="_14uvjig7",Qs="_14uvjig3",Js=h({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),el=h({defaultClassName:"_14uvjigf _14uvjig1",variantClassNames:{active:{true:"_14uvjigg _14uvjig2"},isDisabled:{true:"_14uvjigh"},isReadOnly:{true:"_14uvjigi"},isFocusVisible:{true:"_14uvjigj _14uvjig2"},isHovered:{true:"_14uvjigk _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),tl="_14uvjige _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",ol="_14uvjig8",rl=h({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var It=h({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),Pr=h({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),wt=h({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Oe="nrh1eh3",je=h({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Ae=h({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),Rt=h({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function ke({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...o,className:It({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...t,className:It({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:It({isDisabled:i,labelPosition:n}),children:r}):null}var al=h({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),nl="_1lnwne0";var il=h({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),sl=h({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var on=rt.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:t.isOpen},t),u=useMemo(()=>{switch(a){case"top":return {x:0,y:4};case"bottom":return {x:0,y:-4};case"left":return {x:4,y:0};case"right":return {x:-4,y:0};default:return {x:0,y:0}}},[a]),m=useReducedMotion(),[d]=useSpring(()=>({from:{opacity:0,transform:`translate(${u.x}px, ${u.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!m})),f=a==="center"?"bottom":a;return jsxs(animated.span,{...o,style:{...d,...o.style},ref:l,"data-placement":f,children:[p?jsx("div",{className:il({placement:f,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:sl({variant:n,size:i}),children:e})]})});on.displayName="TooltipContent";function cl({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let i=rt.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 dl({ref:e,onResize:t,isDisabled:o}){let r=rt.useRef(null),[a,n]=rt.useState();return rt.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),t?.(i);});},[t,o,n]),rt.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function St({src:e,alt:t}){let[o,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:o,hasError:a,isLoading:i,imgProps:{src:o?e:void 0,alt:t}}}function Tt(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var ul="SET_STATE",Ir="UNDO",wr="REDO",ig=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case ul:return {past:[...o,r],present:t.data,future:[]};case Ir:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case wr:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},ml=(e={},{isDisabled:t,onAction:o})=>{let r=Tt(),[a,n]=useReducer(ig,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=y=>{n({type:ul,data:y});},c=useRef(),u=()=>{c.current=Ir,n({type:Ir});},m=()=>{c.current=wr,n({type:wr});},d=!!i?.length,f=!!p?.length;return useGranularEffect(()=>{(c.current===Ir||c.current===wr)&&(o?.(s,c.current),c.current=void 0);},[s],[o,r]),{state:s,push:t?()=>{}:l,undo:t?()=>{}:u,redo:t?()=>{}:m,pastStates:i,futureStates:p,canUndo:d,canRedo:f}};var an=rt.createContext({messages:{},shouldLogMissingMessages:!0,hasMissingErrorLoggedFor:{current:new Set}}),bl=({children:e,messages:t={},shouldLogMissingMessages:o=!0,...r})=>{let a=useRef(new Set),n=rt.useMemo(()=>({messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:a}),[t,o,a]);return jsx(I18nProvider,{...r,children:jsx(an.Provider,{value:n,children:e})})};bl.displayName="I18nProvider";function F(e){let{messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:r}=useContext(an);useEffect(()=>{!e&&cg(t)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,t]);let a=useMessageFormatter(e?cleanKeyFromGlobImport(e):t),n=useLocale();useEffect(()=>{r.current.clear();},[r,n.locale]),useEffect(()=>{o&&!r.current.has(n.locale)&&r.current.add(n.locale);},[r,n.locale,o]);let i=useCallback(s=>{o&&!r.current.has(s)&&(console.log(`BUI \u{1F30D}: Translation not found for key: \`${s}\` for locale: \`${n.locale}\`. The default message, i.e. \`${s}\`, will be used instead.`),r.current.add(s));},[r,n.locale,o]);return {formatMessage:(s,p)=>{if(typeof s=="object")try{return a(s.id,p)}catch{return i(s.id),s.defaultMessage||s.id}else try{return a(s,p)}catch{return i(s),s}},locale:n}}var U=e=>e;function e8(e,t,o){let r=rt.useRef(null);return rt.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 vl(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 s8({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=rt.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=ie(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&o?.(i);},onPressStart(){let n=ie(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=ie(n).getSelection();l&&e.current?.contains(l.anchorNode)&&t(l);}let s=ue(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,t,r]);}function Nt(e){let t=useCallback(()=>{let a=ie(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[o,r]=rt.useState(t);return xe(()=>{let a=ie(e),n=()=>{r(t());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,t]),o}var sn=rt.createContext(void 0),zl=({portalContainer:e,children:t})=>jsx(sn.Provider,{value:e,children:t});zl.displayName="PortalContainerProvider";function ve(e){let t=useContext(sn);return e||t}var hl=h({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var xl="z9nup80",Lt="z9nup83",Cl="z9nup87";function ln(e=window){let[t,o]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=u=>{o(u.matches?"dark":"light");};return l.matches&&o("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=u=>{a(u.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=u=>{i(u.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=u=>{p(u.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:t,highContrast:r,reducedMotion:n,transparency:s}}var Mt=createContext({theme:lightTheme,setTheme:()=>{}});var Pl="var(--hj25q10)";var Tr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},Et=rt.forwardRef(({theme:e="system",children:t,setTheme:o,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:u,highContrast:m,transparency:d}=ln(),{name:f,theme:y}=useMemo(()=>{switch(e){case"system":return c==="light"?Tr.LIGHT:Tr.DARK;case"light":return Tr.LIGHT;case"dark":return Tr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=Nt(),v={"data-theme":f,"data-block-id":i,"data-block-class":s,"data-reduced-motion":u,"data-high-contrast":m,"data-transparency":d,"data-device":b},_=useMemo(()=>({theme:y,setTheme:o}),[y,o]);return jsx(Mt.Provider,{value:_,children:jsx("div",{...mergeProps(n,v),className:classNames(xl,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[Pl]:l==="rtl"?"-1":"1"}),...a},ref:p,children:t})})});Et.displayName="ThemeProvider";var $e=rt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(Mt);return jsx(Overlay,{...n,children:jsx(Et,{ref:i,theme:s,style:t,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:o})})});$e.displayName="Portal";var oe=rt.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":u,...m},d)=>{let f=rt.useRef(null),y=rt.useRef(null),b=!m.text||m.isDisabled,v=useTooltipTriggerState({...m,delay:o,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:g}=useTooltipTrigger({...m,isDisabled:b,delay:o,closeDelay:r},v,f),z=ve(s),{overlayProps:R,arrowProps:P,placement:C,updatePosition:x}=useOverlayPosition({arrowSize:i?13:0,targetRef:f,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:y,placement:t,isOpen:v.isOpen,...m});return cl({ref:y,threshold:1,onIntersect:x,isDisabled:!v.isOpen}),dl({ref:f,onResize:x,isDisabled:!v.isOpen}),jsxs(FocusableProvider,{..._,ref:f,children:[e,v.isOpen?jsx($e,{disableFocusManagement:!0,portalContainer:z,className:p,style:l,"data-block-id":c,"data-block-class":u,children:jsx(on,{ref:M(d,y),state:v,arrowProps:P,overlayProps:R,placement:C,tooltipProps:g,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});oe.displayName="Tooltip";var Nr=rt.forwardRef(({elementType:e,children:t,...o},r)=>{let a=te(r),{focusableProps:n}=useFocusable(o,a);return jsx(e??"div",{ref:a,...n,children:t})});Nr.displayName="Focusable";var Yg={xxs:8,xs:12,sm:16,md:20,lg:24},E=rt.forwardRef((e,t)=>{let o=te(t),{tooltipProps:r}=zr(e,o);return r?jsx(oe,{...r,children:jsx(cn,{...e,ref:o})}):jsx(cn,{...e,ref:o})});E.displayName="ActionIconButton";var cn=rt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{let l=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!l&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,c]);let{buttonProps:u,isPressed:m,ref:d,isFocusVisible:f,isFocused:y,isHovered:b,uiStateOptions:v}=hr({...s,elementType:i}),_=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":y,"data-focus-visible":f,"data-disabled":s.isDisabled,"data-hovered":b,"data-pressed":m});return jsxs(i,{...mergeProps(u,_),className:classNames(Ds({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:f,isHovered:b}),"BaselineUI-ActionIconButton",typeof e=="function"?e(v):e),ref:M(p,d),style:typeof t=="function"?t(v):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:Yg[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:gr})]})});cn.displayName="ActionIconButtonCore";var Me=rt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=rt.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:u}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing(),{labelProps:y,decrementButtonProps:b,inputProps:v,incrementButtonProps:_,groupProps:g,descriptionProps:z,errorMessageProps:R}=useNumberField(n,l,s),P=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorCircleFilledIcon:null,[n.isInvalid,n.isReadOnly]),C=ke({description:n.description,errorMessageProps:R,descriptionProps:z,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),x=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":u,"data-focused":f,"data-focus-visible":d,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:t,className:classNames(Ae({labelPosition:o}),"BaselineUI-NumberInput",e),...x,ref:i,children:[n.label?jsxs("div",{className:je({labelPosition:o,hasMessage:!!C}),children:[jsx("label",{...y,className:Oe,children:n.label}),o==="start"&&C]}):null,jsxs("div",{className:classNames({[Lt]:n.isDisabled}),children:[jsxs("div",{...mergeProps(g,c),className:classNames(Rt({isHovered:u,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:f,variant:r}),{[nl]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(v,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",Pr({isDisabled:n.isDisabled,labelPosition:o}))}),P?jsx(P,{className:wt({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:al({isHoveredOrFocused:u||f,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(E,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(j,{style:{height:16},orientation:"vertical"}),jsx(E,{variant:"secondary",size:"xxs",icon:PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),o==="top"&&C]})]})});Me.displayName="NumberInput";var Ft=rt.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,"data-block-id":f,"data-block-class":y,defaultValue:b,isReadOnly:v,label:_,id:g,includeNumberInput:z},R)=>{let P=rt.useRef(null),C={onChange:o===void 0?void 0:I=>{o(I[0]);},isDisabled:n||v,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:I=>{r(I[0]);},value:l===void 0?void 0:[l],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,id:g,label:_},x=useNumberFormatter(a),S=useSliderState({...C,numberFormatter:x}),{trackProps:N,groupProps:w,labelProps:T}=useSlider(C,S,P),k=jsx(Me,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":T.id,value:S.getThumbValue(0),formatOptions:a,onChange:I=>{S.setThumbValue(0,I);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...w,style:t,"data-block-id":f,"data-block-class":y,className:classNames(Ys,"BaselineUI-Slider",e),children:[_?jsxs("div",{className:Qs,children:[jsx("label",{...T,className:classNames(Js({isDisabled:n,hasNumberInput:!!z}),"BaselineUI-Slider-Label"),children:_}),z?k:null]}):null,jsxs("div",{className:Zs,children:[jsx("div",{...N,className:classNames(ol,"BaselineUI-Slider-Track"),ref:M(P,R),"data-testid":"track",children:jsx(gv,{state:S,trackRef:P,isDisabled:n,isReadOnly:v})}),z&&!_?k:null]})]})});Ft.displayName="Slider";function gv({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=rt.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:t,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:u,isHovered:m}=useHover({isDisabled:o}),d=filterTruthyValues({"data-disabled":o,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(rl({isDisabled:o,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...mergeProps(n,u,d),className:classNames(tl,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:classNames(el({isDisabled:o,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb")}),jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})]})]})}var El=h({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610m",title:"_1yep5z610m",label:"_1yep5z610n",value:"_1yep5z610n",helper:"_1yep5z610o",body:"_1yep5z610m"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61kx"],[{type:"title",size:"md"},"_1yep5z61l0"],[{type:"title",size:"lg"},"_1yep5z61l3"],[{type:"body",size:"sm"},"_1yep5z61ln"],[{type:"body",size:"md"},"_1yep5z61lq"],[{type:"body",size:"lg"},"_1yep5z61lq"],[{type:"subtitle",size:"sm"},"_1yep5z61lj"],[{type:"subtitle",size:"md"},"_1yep5z61lm"],[{type:"subtitle",size:"lg"},"_1yep5z61lm"],[{type:"label",size:"md"},"_1yep5z61ll"],[{type:"label",size:"lg"},"_1yep5z61ll"],[{type:"value",size:"md"},"_1yep5z61ll"],[{type:"value",size:"lg"},"_1yep5z61ll"],[{type:"helper",size:"sm"},"_1yep5z61lf"]]});var Q=rt.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(El({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));Q.displayName="Text";var Dl=h({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6lq _1yep5z6lo _1yep5z6gz _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{background:{subtle:"_1yep5z611t",medium:"_1yep5z611u"},isFocusVisible:{true:"_1yep5z6178 _1yep5z617a _1yep5z617b _1yep5z613h"}},defaultVariants:{},compoundVariants:[]}),Bl="siobe25",Fl="var(--siobe20)";var Er=rt.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,...l},c)=>{let{formatMessage:u}=F(),m=rt.useRef(null),{dialogProps:d,titleProps:f}=useDialog(l,m),{focusProps:y,isFocusVisible:b}=useFocusRing();return jsxs("div",{...mergeProps(d,y),className:classNames(Dl({background:r,isFocusVisible:b}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:t,ref:M(c,m),children:[jsxs(L,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Bl,children:[jsx(Q,{type:"title",size:"sm",...f,className:Cl,children:a}),jsxs(L,{children:[n?jsx(E,{...n,variant:"secondary"}):null,jsx(E,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":u(wv.close)})]})]}),jsx(j,{variant:r==="subtle"?"primary":"secondary"}),o]})});Er.displayName="Drawer";var wv=U({close:{id:"close",defaultMessage:"Close"}});function Ol(e,t,o){let{isDisabled:r}=e,a=useReducedMotion(),[n,i]=rt.useState("100vh");useEffect(()=>{if(!cr()&&!Ka())return;let d=ie(o.current);function f(){i(`${d?.visualViewport.height}px`);}return f(),d?.visualViewport.addEventListener("resize",f),()=>{d?.visualViewport.removeEventListener("resize",f);}},[o]);let[{y:s},p]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),l=useRef(0),c=useCallback(()=>{p.start({y:l.current,onRest:()=>{t.close();}});},[p,t]),u=useCallback(d=>{d.target.closest("[data-drawer]")||c();},[c]);useGranularLayoutEffect(()=>{l.current=o.current?.offsetHeight||0,p.set({y:l.current}),p.start({y:0,immediate:!!a});},[],[p,a]);let m=s.to({range:[0,l.current/2,l.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:s.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:m},onPointerDown:r||!e.isDismissable?void 0:u},close:c,containerHeight:r?void 0:n}}var jl=h({defaultClassName:"aml2vl0 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i8 _1yep5z6i9 _1yep5z6ia",variantClassNames:{enableDrawer:{false:"_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),Al="_1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6gb _1yep5z6i8 _1yep5z6i9 _1yep5z6ia";var qe=rt.createContext({state:null,triggerProps:{},overlayProps:{}}),Ie=({children:e,...t})=>{let o=useOverlayTriggerState(t),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},o),n=useMemo(()=>({state:o,triggerProps:r,overlayProps:a}),[o,r,a]);return jsx(qe.Provider,{value:n,children:e})};Ie.displayName="Modal";var fn=rt.createContext({isDrawer:!1,closeDrawer:()=>{}}),yn=rt.createContext({setIsPopoverSafelyClosed:()=>{}}),Gv=animated(Et),Wv=({children:e,className:t,style:o,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=rt.useContext(qe),[u,m]=rt.useState(!0),d=Nt(n),f=ve(n),y=typeof s=="boolean"&&s||s==="auto"&&d==="mobile";invariant(c,"ModalContent must be a child of Modal");let b=rt.useRef(null),v=typeof r=="function"?r(y):r,_=typeof a=="function"?a(y):a,{underlayProps:g,overlayProps:z,close:R,containerHeight:P}=Ol({isDisabled:!y,isDismissable:v&&u},c,b),{modalProps:C,underlayProps:x}=useModalOverlay({isDismissable:!y&&u,isKeyboardDismissDisabled:_},c,b),{theme:S}=useContext(Mt),N=useReducedMotion(),w=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!N||i,config:{easing:easings.easeInBounce}}),T=useMemo(()=>({...C.style,...y?{...z.style,width:"100%"}:w}),[z.style,C.style,y,w]),k=useMemo(()=>({isDrawer:y,closeDrawer:R}),[y,R]),I=useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsx(Overlay,{portalContainer:f,children:jsx(fn.Provider,{value:k,children:jsx(yn.Provider,{value:I,children:jsxs(Gv,{className:classNames(jl({enableDrawer:y}),t),theme:S,"data-block-id":p,"data-block-class":l,style:{...o,height:y?P:"auto",...assignInlineVars({[Fl]:P})},children:[jsx(animated.div,{...mergeProps(x,g,{onPointerDown:y?g.onPointerDown:x.onPointerDown}),"data-testid":"underlay",style:g.style,className:classNames(Al,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(C,z),style:T,ref:b,"data-drawer":y,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})})},Xv=animated(Wv),Ee=({children:e,style:t,...o})=>{let{state:r}=rt.useContext(qe);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(Xv,{...o,style:{...t,...i},children:typeof e=="function"?e(r):e}))};var Gl=h({defaultClassName:"cjv3et0 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1 _1yep5z6d7",variantClassNames:{size:{sm:"cjv3et1",md:"cjv3et2",lg:"cjv3et3",content:"cjv3et4"},variant:{primary:"_1yep5z612r _1yep5z617g _1yep5z617i",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx _1yep5z6174"},isFocusVisible:{true:"_1yep5z613h _1yep5z617b _1yep5z617a _1yep5z6178"}},defaultVariants:{},compoundVariants:[]});var gn=rt.createContext({titleProps:{}}),me=rt.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let u=rt.useRef(null),m=rt.useRef(null),{isDrawer:d,closeDrawer:f}=useContext(fn),[y,b]=rt.useState(""),{focusProps:v,isFocusVisible:_}=useFocusRing();useLayoutEffect(()=>{let P=m.current?.getRootNode(),C=l["aria-label"]||"";l["aria-labelledby"]&&(C=P?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(C);},[l]);let{dialogProps:g,titleProps:z}=useDialog(l,u),R=useMemo(()=>({titleProps:z}),[z]);return d&&r?jsx(Er,{title:y,onCloseRequest:f,className:t,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:M(m,c),background:p,children:e}):jsx(gn.Provider,{value:R,children:jsx("section",{...mergeProps(g,v),"data-block-id":i,"data-block-class":s,ref:M(u,c),style:o,className:classNames(Gl({size:d?"content":a,variant:n,isDrawer:d,isFocusVisible:_}),"BaselineUI-Dialog",t),children:e})})});me.displayName="Dialog";var Wl=rt.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(gn);return rt.isValidElement(e)?rt.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,t),style:{...e.props.style,...o}}):jsx("h3",{...a,ref:r,className:t,style:o,children:e})});Wl.displayName="DialogTitle";function Xl({placement:e,isOpen:t}){let o=useReducedMotion();return useTransition(t,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!o,config:config.stiff})}var Zl=({children:e,isOpen:t,popoverContentRef:o,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,p]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(yn);useEffect(()=>{t?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[t]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let u=o.current;return useEffect(()=>{u&&p(u.getBoundingClientRect());},[u]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?u_.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var{color:_n}=themeVars,be=rt.forwardRef(({className:e,style:t,state:o,overlayProps:r,underlayClassName:a,children:n,includeArrow:i=!1,offset:s=2,portalContainer:p,contentContainerClassName:l,contentContainerStyle:c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=rt.useRef(null),b=ve(p),v=i?8:0,{underlayProps:_,popoverProps:g,placement:z,arrowProps:R}=usePopover({...d,offset:s+v,popoverRef:y,containerPadding:d.containerPadding||0},o);delete g.style?.position;let P=Xl({placement:z,isOpen:o.isOpen}),C=z==="center"?"bottom":z;return jsx(Zl,{isOpen:o.isOpen,popoverContentRef:y,portalContainer:b,style:g.style,children:P((x,S)=>S&&jsxs($e,{portalContainer:b,style:t,ref:f,"data-block-id":u,"data-block-class":m,children:[!d.isNonModal&&jsx("div",{..._,className:classNames(js,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...g,style:{...g.style,...x,...assignInlineVars({[As]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:M(y,f),className:classNames(Hs,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(N=>z?.includes(N)),children:[i?jsxs("svg",{className:classNames(Fs[C],"BaselineUI-PopoverContent-Arrow"),...R,style:{...R.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:_n.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:_n.background.primary.subtle,stroke:_n.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:o.close}),jsx("div",{...r,style:c,className:classNames(Vs,l),children:typeof n=="function"?n(o):n}),jsx(DismissButton,{onDismiss:o.close})]})]}))})});be.displayName="PopoverContentCore";var we=rt.forwardRef((e,t)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(vo);return invariant(a),o?jsx(be,{ref:t,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:o}):null});we.displayName="PopoverContent";var ep=h({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),Ke="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",tp=h({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Hr="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1",op="_1yep5z66x _1yep5z66y _1yep5z66z",rp="_1mdhlqv5 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k";var sp=rt.forwardRef(({className:e,style:t,onChange:o,"data-block-id":r,icon:a,formatValue:n=u=>u,tooltipProps:i,popoverContentProps:s,isDisabled:p,...l},c)=>{let u=te(c),[m,d]=useControlledState(l.value,l.defaultValue||0,o),[f,y]=rt.useState(!1),{keyboardProps:b}=useKeyboard({onKeyDown:g=>{(g.key==="Enter"||g.key==="Escape")&&y(!1);}}),v=n(m||0),_=i?.isDisabled||l["aria-label"]?`${l["aria-label"]}, ${v}`:v.toString();return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:t,ref:u,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:f,onOpenChange:y,children:[jsx(Le,{children:jsx(oe,{text:l["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:p,...i,children:jsx(q,{label:v,variant:"popover","aria-label":_,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(we,{placement:"bottom start",...s,className:classNames(Ke,s?.className),children:jsx(me,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(L,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...b,children:jsx(Ft,{...l,onChange:g=>{d(g),o?.(g);},value:m})})})})})]})]})});sp.displayName="IconSlider";var lp=h({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),pp=h({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),cp="bpklwad",dp=h({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),up="bpklwa6",mp=h({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var gp=rt.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=rt.useRef(null),c=useToggleState(s),{inputProps:u,isPressed:m}=useSwitch(s,c,l),{isFocusVisible:d,focusProps:f}=useFocusRing(),{hoverProps:y,isHovered:b}=useHover({isDisabled:s.isDisabled}),v=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":d,"data-disabled":s.isDisabled,"data-focus-visible":d,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":b,"data-pressed":m}),_=jsx("div",{className:classNames(lp({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(pp({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(v,y),className:classNames(dp({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:p,children:[t?jsx("span",{className:classNames(cp,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,f),ref:l})}),r?jsxs("div",{className:mp({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",up),children:c.isSelected?r.on:r.off}),_]}):_]})});gp.displayName="Switch";var vp="_19n40yy9",_p=h({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 $_={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},xp=rt.forwardRef(({className:e,size:t="md",variant:o="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=rt.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:u}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing({within:!0,isTextInput:!0}),y=$_[t],b=t==="sm"?XIcon$2:XIcon$3,v=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":f,"data-disabled":i.isDisabled,"data-focus-visible":d});return jsxs("div",{...v,className:classNames(_p({size:t,isFocused:f,variant:o,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(y,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:vp,ref:p}),l.value!==""&&jsx(E,{icon:b,...u,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});xp.displayName="SearchInput";var Cp="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 _1yep5z6lh _1yep5z6lg _1yep5z6hs _1yep5z6lk _1yep5z6g1",Pp="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var xn=({section:e,showSelectedIcon:t,state:o})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==o.collection.getFirstKey()&&jsx(j,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:Pp,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(Vr,{item:i,state:o,showSelectedIcon:t},i.key)))})]})]})};xn.displayName="MenuSection";var Vr=({item:e,state:t,className:o,showSelectedIcon:r})=>{let a=rt.useRef(null),n=useMenuItem({key:e.key},t,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(bo,{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})};Vr.displayName="MenuItem";var Pn=rt.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),i=rt.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(s,p),className:classNames(Cp,e),ref:M(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(xn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(Vr,{item:l,state:n,className:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});Pn.displayName="MenuContent";var Or=rt.forwardRef(({defaultOpen:e,onOpenChange:t,isOpen:o,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u,triggerLabel:m,renderTrigger:d=({buttonProps:v,ref:_})=>jsx(q,{...v,variant:"popover",ref:_}),portalContainer:f,...y},b)=>{let v=rt.useRef(null),_=ve(f),g=useMenuTriggerState({defaultOpen:e,isOpen:o,onOpenChange:t}),{menuTriggerProps:z,menuProps:R}=useMenuTrigger({isDisabled:r,type:"menu"},g,v),P=ae(),C=useMemo(()=>mergeProps(z,{isDisabled:r,isSelected:g.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(g.isOpen):m}),[z,r,g.isOpen,m]);return useEffect(()=>{!m&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,m]),jsxs(Fragment,{children:[d({buttonProps:C,ref:v}),jsx(be,{triggerRef:v,state:g,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u||2,className:classNames(Ke,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsx(Pn,{className:a,...R,...y,ref:b,autoFocus:g.focusStrategy||"first",children:P})})]})});Or.displayName="Menu";var jr=h({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 Sp=rt.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,role:c,...u},m)=>{let d=rt.useRef(null),{linkProps:f,isPressed:y}=useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:b,isFocused:v,focusProps:_}=useFocusRing(),{hoverProps:g,isHovered:z}=useHover({isDisabled:u.isDisabled}),R=n,P=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-disabled":u.isDisabled,"data-focused":v,"data-pressed":y,"data-focus-visible":b,"data-hovered":z,role:c,title:l});return jsx(R,{...mergeProps(f,_,g,P),className:classNames(jr({variant:r,isFocusVisible:b,isHovered:z,isDisabled:u.isDisabled,size:a,isActive:y,type:i}),"BaselineUI-Link",e),ref:M(d,m),style:t,children:o})});Sp.displayName="Link";function Tp({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let d=[...m.target.files||[]];t?.(d),o?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function wn({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 Np=h({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"]]}),Lp=h({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Mp=h({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Ep=h({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Hp=rt.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},i)=>{let s=rt.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=Tp(n),{dropProps:u}=useDrop({ref:s,onDrop:async({items:b})=>{let v=b.filter(g=>g.kind==="file").map(async g=>(invariant(g.kind==="file"),g.getFile())),_=await Promise.all(v);n.onValueChange?.(_);}}),{focusProps:m,isFocusVisible:d}=useFocusRing(),{hoverProps:f,isHovered:y}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(u,f,c),className:classNames(Np({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,p)})}),r?jsx(r,{size:20,className:Mp({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Ep({disabled:n.isDisabled,hovered:y}),children:t}),o?jsx("div",{...l,className:Lp({disabled:n.isDisabled}),children:o}):null]})]})});Hp.displayName="FileUpload";var Vp="_12vfhl40 z9nup81",Op="_12vfhl41 z9nup82",jp=h({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Ap="_12vfhl42",$p="_12vfhl47",Up="_12vfhl46 z9nup82",qp="_12vfhl45",Kp=h({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Gp=rt.forwardRef(({className:e,style:t,variant:o="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:u,progressBarProps:m}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:d=0,maxValue:f=100,value:y=0,label:b}=p,v=(y-d)/(f-d),_=`${Math.round(v*100)}%`,g=jsx("output",{className:Kp({hasLabel:!!b}),children:m["aria-valuetext"]}),z=o==="error"?n:a;return jsxs("div",{...m,style:t,className:classNames(Vp,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Op,children:[jsx("label",{...u,className:Ap,children:b}),r?g:null]}):null,jsxs("div",{className:qp,children:[jsxs("div",{className:Up,children:[jsx("div",{className:$p,children:jsx("div",{style:{width:_},className:jp({variant:o})})}),!b&&r?g:null]}),z?jsx("div",{className:It({hasError:o==="error"}),id:c,children:z}):null]})]})});Gp.displayName="ProgressBar";function At({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorCircleFilledIcon:t==="warning"?WarningFilledIcon:null}var Ge=rt.forwardRef(({className:e,validationState:t,variant:o="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let u=rt.useRef(null),{inputProps:m,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=useTextField({...l,validationState:t?t==="error"?"invalid":"valid":void 0},u),v=l.errorMessage||b.join(" "),_=ke({...l,errorMessage:v,descriptionProps:f,errorMessageProps:y,labelPosition:a});v&&(t="error");let{hoverProps:g,isHovered:z}=useHover({isDisabled:l.isDisabled}),{isFocused:R,focusProps:P,isFocusVisible:C}=useFocusRing(),x=At({isReadOnly:l.isReadOnly,validationState:t??"valid"}),S=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":t,"data-focused":R,"data-focus-visible":C});return jsxs("div",{className:classNames(Ae({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&_?jsxs("div",{className:je({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...d,className:Oe,children:l.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[Lt]:l.isDisabled}),children:[jsxs("div",{...g,className:Rt({validationState:t??"valid",isHovered:z,isFocused:R,variant:o,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,P,S),className:classNames(Pr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:u}),x?jsx(x,{className:wt({validationState:t??"valid",isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Ge.displayName="TextInput";var $t=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};$t.displayName="NumberFormat";var Xp="_1yep5z6ik _1yep5z6il _1yep5z6im",Yp=h({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"]]}),Zp=h({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"]]}),Qp=h({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var tc=rt.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let u=rt.useRef(null),m=useToggleState({...s,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:v}=useSwitch({...s,...l},m,u),{focusProps:_,isFocused:g,isFocusVisible:z}=useFocusRing(),{hoverProps:R,isHovered:P}=useHover({}),C=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":g,"data-focus-visible":z,"data-disabled":y,"data-hovered":P,"data-pressed":f,"data-selected":v});return jsxs("label",{ref:p,style:o,className:classNames(Xp,"BaselineUI-Reaction",e),...C,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,..._,ref:u})}),jsxs("div",{...R,className:Yp({isSelected:v,isFocusVisible:z,isHovered:P,isReadOnly:b,isDisabled:y}),children:[jsx("div",{className:Qp({isDisabled:y,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:Zp({isSelected:m.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsx($t,{value:t})})]})]})});tc.displayName="Reaction";var oc="_1azy5686",rc="_1azy5685",ac="var(--_1azy5680)",nc="_1azy5688",ic="_1azy5689",sc="_1azy5681 z9nup82",lc="_1azy5682";var pc="_1azy5687";var a5={sm:16,md:20},n5={sm:[CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon],md:[CheckCircleFilledIcon,ErrorAltCircleFilledIcon$1]},qt=rt.forwardRef(({className:e,style:t,size:o="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=a5[o],u=c/2-2,m=2*u*Math.PI,d=n5[o][r==="success"?0:1];return jsxs("div",{className:classNames(sc,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[ac]:`${m}px`}),...t},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:lc,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:oc,cx:c/2,cy:c/2,r:u}),r==="active"&&jsx("circle",{role:"presentation",className:rc,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsx(d,{className:pc,size:c}),r==="error"&&jsx(d,{className:nc,size:c})]}),i.label?jsx("span",{...p,className:ic,children:i.label}):null]})});qt.displayName="ProgressSpinner";var Ur=h({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kpa"],[{isSelected:!0,isDisabled:!0},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),cc=h({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z610z"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]});var d5={sm:16,md:20,lg:24},qr=rt.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=useToggleState(i),{buttonProps:l,isPressed:c,ref:u,isFocusVisible:m,isFocused:d,isHovered:f,uiStateOptions:y}=xr(i,p),b=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":d,"data-focus-visible":m,"data-disabled":i.isDisabled,"data-hovered":f,"data-pressed":c,"data-selected":p.isSelected});return jsxs(a,{...mergeProps(l,b),className:classNames(Ur({isHovered:f,isFocusVisible:m,isSelected:p.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(y):e),style:typeof t=="function"?t(y):t,ref:M(u,s),children:[o?jsx(o,{size:d5[r],className:cc({isDisabled:i.isDisabled,isSelected:p.isSelected})}):null,i.label]})});qr.displayName="ToggleButton";var Kr=h({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),dc=h({defaultClassName:"_16vugd02 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{labelPosition:{end:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6va _1yep5z6vb _1yep5z6vc",start:"_1yep5z614o _1yep5z614p _1yep5z614q _1yep5z6160 _1yep5z6161 _1yep5z6162"}},defaultVariants:{},compoundVariants:[]}),uc=h({defaultClassName:"_16vugd06",variantClassNames:{isIndeterminate:{true:"_16vugd05"},isSelected:{true:"_16vugd05"},isFocusVisible:{true:"_16vugd09"},isHovered:{true:"_16vugd0a"},isDisabled:{true:"_16vugd0b"},isReadOnly:{true:"_16vugd0c"},hasError:{true:"_16vugd0d"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_16vugd0e"]]});var yc=rt.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=rt.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:u,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:v}=useCheckbox({...i,children:o},l,p),{hoverProps:_,isHovered:g}=useHover({isDisabled:y}),z=filterTruthyValues({"data-disabled":y,"data-readonly":v,"data-hovered":g,"data-selected":b,"data-pressed":f,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":u,"data-block-id":a,"data-block-class":n});return jsxs("label",{...z,className:classNames(dc({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:p})}),jsxs("div",{..._,className:uc({isSelected:b&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:y,isReadOnly:v,hasError:i.isInvalid,isHovered:g}),children:[b&&!i.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:Kr({isDisabled:y}),children:o}):null]})});yc.displayName="Checkbox";var bc={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 gc=h({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),vc="_1nsi9h1f _1yep5z6ln _1yep5z6lf _1yep5z6eu",_c=h({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6g1 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z6zn",sm:"_1nsi9h12 _1yep5z6zq",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6yz _1yep5z617i _1yep5z617g _1yep5z612q",pinned:"_1yep5z6174"}},defaultVariants:{},compoundVariants:[]}),zc=h({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]});var O5={style:"decimal"},j5={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},kc=rt.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...u},m)=>{let{locale:d}=useLocale(),f=F(bc),y={...u,formatOptions:O5,minValue:o,incrementAriaLabel:a||f.formatMessage("nextPage"),decrementAriaLabel:n||f.formatMessage("prevPage"),defaultValue:r,"aria-label":i||f.formatMessage("goToPage")},b=rt.useRef(null),v=useNumberFieldState({...y,locale:d}),{inputProps:_,decrementButtonProps:g,incrementButtonProps:z,groupProps:R}=useNumberField({...y,onKeyDown:B=>{B.key==="Enter"&&b.current?.blur(),u.onKeyDown?.(B);},isDisabled:c},v,b),{hoverProps:P,isHovered:C}=useHover({}),{focusProps:x,isFocused:S,isFocusVisible:N}=useFocusRing(),w=p==="floating",[T,k]=j5[s],I=filterTruthyValues({"data-focus-visible":N,"data-focused":S,"data-hovered":C,"data-block-id":u["data-block-id"],"data-block-class":u["data-block-class"]}),H=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(R,P,I),className:classNames(_c({size:s,variant:p}),"BaselineUI-Pagination",e),style:t,ref:m,children:[l?null:jsxs(Fragment,{children:[jsx(E,{icon:T,...g,elementType:"div",size:s,style:{height:"100%",...w&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||g.isDisabled}),p==="floating"&&jsx(j,{orientation:"vertical"})]}),jsxs("div",{className:gc({isFocused:S,variant:p,size:s}),"aria-label":f.formatMessage("pageXofY",{arg0:_.value,arg1:v.maxValue}),children:[jsx("input",{...mergeProps(_,x),ref:b,className:classNames("BaselineUI-Pagination-Input",vc),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:zc({isDisabled:c}),children:["/ ",jsx($t,{value:v.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(j,{orientation:"vertical"}),jsx(E,{icon:k,...z,elementType:"div",size:s,style:{height:"100%",...w&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||z.isDisabled})]})]})});kc.displayName="Pagination";var Ic=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};Ic.displayName="DateFormat";var So=h({defaultClassName:"_1f789qjr",variantClassNames:{variant:{neutral:"_1yep5z610x",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z6110"},isDisabled:{true:"_1yep5z61mr"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Gr=h({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"]]}),wc="_1f789qjz",Rc="_1f789qj0",Sc=h({defaultClassName:"_1f789qj10",variantClassNames:{variant:{neutral:"_1f789qj11",red:"_1f789qj12",green:"_1f789qj13",blue:"_1f789qj14","high-contrast":"_1f789qj15"},isHovered:{true:"_1f789qj16"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qj17"],[{isHovered:!0,variant:"red"},"_1f789qj18"],[{isHovered:!0,variant:"blue"},"_1f789qj19"],[{isHovered:!0,variant:"green"},"_1f789qj1a"],[{isHovered:!0,variant:"high-contrast"},"_1f789qj1b"]]}),Wr=h({defaultClassName:"_1f789qjj",variantClassNames:{variant:{neutral:"_1yep5z610m",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z610r"},isDisabled:{true:"_1yep5z61mi"},isSelected:{true:"_1yep5z610s"}},defaultVariants:{},compoundVariants:[]});var Mc=({item:e,state:t,variant:o="neutral"})=>{let r=rt.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:u,allowsSelection:m}=useTag({item:e},t,r),d=rt.useRef(null),{buttonProps:f}=useButton(p,d),{hoverProps:y,isHovered:b}=useHover({isDisabled:c}),{hoverProps:v,isHovered:_}=useHover({isDisabled:c}),g=e.value?.icon,z=e.value?.data?.variant??o;return jsx("div",{...mergeProps(i,a,v),ref:r,className:classNames(Gr({isFocusVisible:n,variant:z,isDisabled:c,allowsRemoving:l,isSelected:u,allowsSelection:m,isHovered:_}),Wr({variant:z,isDisabled:c,isSelected:u}),"BaselineUI-Tag"),children:jsxs("div",{...s,className:wc,children:[u?jsx(CheckmarkIcon$3,{size:16,className:So({variant:z,isDisabled:c,isSelected:u})}):null,!u&&g?jsx(g,{size:16,className:So({variant:z,isDisabled:c,isSelected:u})}):null,e.rendered,l?jsx("button",{...mergeProps(f,y),className:Sc({variant:z,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var Bc=rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,...n},i)=>{let s=useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),p=ae(),l=rt.useRef(null),c=useListState({...n,items:s,children:p}),{gridProps:u}=useTagGroup(n,c,l);return jsx("div",{...u,className:classNames(Rc,"BaselineUI-TagGroup",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(i,l),children:[...c.collection].map(m=>jsx(Mc,{state:c,item:m,variant:n.variant},m.key))})});Bc.displayName="TagGroup";var Fc="_1yep5z6lc",Hc=h({defaultClassName:"_1kvz17db _1yep5z6kz _1yep5z6l1",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Vc=h({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6kz _1yep5z6l0",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Oc="_1yep5z6ev _1yep5z6dy",jc=h({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6kz _1yep5z6l2",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6g2",false:"_1yep5z6g3"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Ac="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",$c=h({defaultClassName:"_1kvz17d7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Ln=rt.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext(We),{disabledKeys:n}=useContext(We),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=Ve(s.target),l=[...a?.keys()||[]].findIndex(f=>a?.get(f)?.current===p?.activeElement),c=a?.get(l||0),u=a?.size||0,m=f=>{let y=a.get(f-1<0?u-1:f-1);n?.has(y?.current?.getAttribute("data-key")||"")?m(f-1):y?.current?.focus();},d=f=>{let y=a.get((f+1)%u);n?.has(y?.current?.getAttribute("data-key")||"")?d(f+1):y?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),d(-1);break}case"End":{s.preventDefault(),m(u);break}case"ArrowDown":{s.preventDefault(),d(l);break}case"ArrowUp":{s.preventDefault(),m(l);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:o,className:classNames(Fc,t),ref:r,children:rt.Children.map(e,(s,p)=>rt.cloneElement(s,{index:p}))})});Ln.displayName="AccordionBase";var We=rt.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Kc=rt.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=rt.useState(o),u=rt.useRef(new Map).current,[m,d]=rt.useState(a);useEffect(()=>{d(m);},[m]),useEffect(()=>{n?.(l);},[l,n]);let f=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:t,headers:u,expansionMode:m}),[r,l,t,u,m]);return jsx(We.Provider,{value:f,children:jsx(FocusScope,{children:jsx(Ln,{className:i,style:s,ref:p,children:e})})})});Kc.displayName="Accordion";var En=rt.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=rt.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:f}=useContext(We),y=d?.has(r),b=useFocusManager();invariant(b);let{focusNext:v,focusPrevious:_}=b,{keyboardProps:g}=useKeyboard({onKeyDown:I=>{I.key==="ArrowRight"?v({wrap:!0}):I.key==="ArrowLeft"?_({wrap:!0}):I.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),f?.set(n,l);},[n,f]);let z=()=>{u(I=>{let D=new Set(I);return D.has(r)?D.delete(r):(m==="single"&&D.clear(),D.add(r)),D});},{buttonProps:R}=useButton({"aria-expanded":c.has(r),"aria-controls":o,onPress:z,isDisabled:y},l),{pressProps:P}=usePress({onPress:z,isDisabled:y}),{focusProps:C,isFocusVisible:x}=useFocusRing(),{hoverProps:S,isHovered:N}=useHover({isDisabled:y}),{focusProps:w,isFocusVisible:T}=useFocusRing({within:!0}),k=c.has(r);return jsxs("h3",{...mergeProps(g,P,S,w),className:jc({isFocusVisible:x,isHovered:N,isDisabled:y}),ref:p,children:[jsxs("div",{className:$c({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:Vc({isExpanded:k}),size:8}),jsx("button",{...mergeProps(R,C),id:a,"data-key":r,className:Ac,ref:l,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:Hc({showActionsOnTriggerOnly:s,isTriggered:T||N}),children:t.map((I,D)=>jsx(E,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...I},D))}):null,i?jsx("div",{className:Oc,children:i}):null]})});En.displayName="AccordionHeader";var ed=rt.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),u=useId(),{expandedKeys:m}=useContext(We),d=rt.useRef(null),f=m.has(r),y=Tt(),b=useReducedMotion(),v=useTransition(f?[r]:[],{from:!y&&!b&&{height:0,opacity:0},enter:()=>async _=>{await _({height:d.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:_=>_.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(En,{value:r,actions:t,id:u,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),v(_=>jsx(animated.div,{role:"region","aria-labelledby":u,id:c,style:{..._,overflow:"hidden"},children:jsx("div",{ref:d,className:s,style:i,children:o})}))]})});ed.displayName="AccordionItem";var Mo=rt.forwardRef(({variant:e,isOpen:t,selectedIcon:o,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=rt.useRef(null),{buttonProps:d,isPressed:f}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:v,isFocused:_,isFocusVisible:g}=useFocusRing(),z=At({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(d.disabled=!1);let R=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":_,"data-focus-visible":g,"data-hovered":b,"data-pressed":f,"data-open":t,"data-block-id":p,"data-block-class":l});return jsxs("button",{...mergeProps(d,y,v,R),ref:M(u,m),className:classNames(tp({isFocused:g,isDisabled:c.isDisabled}),Rt({variant:e,isHovered:b,isFocused:g,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:rp,children:[o?jsx(o,{size:24}):null,jsx("span",{...a,children:n})]}),z?jsx("span",{"aria-hidden":!0,className:classNames(wt({validationState:r,isReadOnly:!!c.isReadOnly}),op),children:jsx(z,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:ep({isOpen:t})})})]})});Mo.displayName="SelectButton";var Yr=rt.createContext({state:null,popoverAnchorRef:null}),Fn=rt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:u,renderTrigger:m=({buttonProps:y,selectedValue:b,valueProps:v,isOpen:_,ref:g})=>{let z=b&&"icon"in b&&b.icon;return jsx(Mo,{...y,className:l,style:c,isOpen:_,isReadOnly:d.isReadOnly,ref:g,variant:r,validationState:d.validationState,selectedIcon:z||void 0,label:b?"label"in b&&b?.label:d.placeholder,valueProps:v})},...d},f)=>{let{popoverAnchorRef:y}=useContext(Yr),b=rt.useRef(null),v=ve(d.portalContainer),{labelProps:_,triggerProps:g,valueProps:z,menuProps:R,descriptionProps:P,errorMessageProps:C}=useSelect({...d,validationState:d.validationState==="error"?"invalid":"valid"},u,b),x=ke({...d,descriptionProps:P,errorMessageProps:C,labelPosition:o}),S=u.selectedItem?.value??null;return jsxs(at.Provider,{value:u,children:[jsxs("div",{style:t,className:classNames(Ae({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:f,children:[d.label||x?jsxs("div",{className:je({labelPosition:o,hasMessage:!!x}),children:[d.label?jsx("div",{..._,className:classNames(Oe,"BaselineUI-Select-Label"),children:d.label}):null,o==="start"&&x]}):null,jsx(HiddenSelect,{state:u,triggerRef:b,isDisabled:d.isDisabled,label:d.label,name:d.name}),m({buttonProps:g,selectedValue:S,valueProps:z,isOpen:u.isOpen,ref:b}),o==="top"&&x]}),u?jsx(be,{placement:p,portalContainer:v,offset:d.offset||2,state:u,triggerRef:y||b,style:t,className:classNames(Ke,"BaselineUI-Select-Popover"),...d,children:jsx(pe,{...R,label:d.label,items:d.items,showSelectedIcon:d.showSelectedIcon,className:Hr,optionStyle:i,optionClassName:s})}):null]})});Fn.displayName="SelectCore";var nd=rt.forwardRef((e,t)=>{let o=ae(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:o});return jsx(Fn,{...e,ref:t,state:r})});nd.displayName="SelectStandalone";var Ye=rt.forwardRef((e,t)=>{let{state:o}=useContext(Yr);return useEffect(()=>{invariant(o||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,o]),o?jsx(Fn,{state:o,...e,ref:t}):jsx(nd,{...e,ref:t})});Ye.displayName="Select";var sd=rt.forwardRef(({className:e,style:t,variant:o,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=rt.useRef(null),l=useCallback(({buttonProps:c,selectedValue:u,valueProps:m,isOpen:d,ref:f})=>{let y=u&&"icon"in u&&u.icon;return jsx(oe,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(Mo,{...c,isOpen:d,isReadOnly:i.isReadOnly,ref:f,variant:o,validationState:i.validationState,selectedIcon:y||void 0,label:u?"label"in u&&u?.label:i.placeholder,valueProps:m})})},[i,n,o]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:t,ref:M(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(Ye,{...i,renderTrigger:l})]})});sd.displayName="IconSelect";var ld="_1017q4c5",pd=h({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),cd="_1017q4c4";var jz={sm:AvatarIcon,md:AvatarIcon$1},Wt=rt.forwardRef(({className:e,style:t,size:o="md",icon:r=jz[o],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":u},m)=>{let{imgProps:d}=St({src:n,alt:a}),f=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(pd({size:o,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:t,"aria-disabled":s,"data-block-id":c,"data-block-class":u,children:[n?jsx("img",{...d,loading:l,className:cd}):null,!i&&!n&&jsx(r,{size:o==="sm"?16:24}),i&&!n?o==="sm"?f[0]:f:null,p?jsx("div",{"data-testid":"notification",className:ld}):null]})});Wt.displayName="Avatar";var dd="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",ud=h({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6kz _1yep5z6l2 _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z610m"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z610q"},variant:{primary:"_1x62fhbb _1yep5z6zn",ghost:"_1yep5z6zq"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61me"],[{variant:"primary",isSelected:!0},"_1yep5z61nl"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61ml"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61nm"]]}),md=h({defaultClassName:"_1x62fhb3 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),fd="_1x62fhbl",Vn=h({defaultClassName:"_1x62fhbf _1yep5z6f6",variantClassNames:{isHovered:{true:"_1yep5z610x"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z610z"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mp"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61mu"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1yep5z61mr"]]}),yd="_1yep5z6lj _1yep5z6lg _1yep5z6hp _1yep5z6li",bd=h({defaultClassName:"_1x62fhb0 _1yep5z6lc _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1yep5z611v",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var gd=({state:e,...t})=>{let o=rt.useRef(null),{tabPanelProps:r}=useTabPanel(t,e,o),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[yd]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var An=rt.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),u=rt.useRef(null),{tabListProps:m}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,u);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:t,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(bd({variant:a}),r),style:o,children:[jsx("div",{...m,className:md({variant:a}),ref:u,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(_d,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,f)=>jsx("div",{className:dd,children:jsx(E,{...d,variant:"secondary",size:"sm",className:classNames(fd,d.className)})},f))]}),jsx(gd,{state:c},c.selectedItem?.key)]})});An.displayName="TabsBase";var _d=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,i=rt.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},o,i),{hoverProps:c,isHovered:u}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:f,titleClassName:y}=n,{focusProps:b,isFocusVisible:v,isFocused:_}=useFocusRing(),{keyboardProps:g}=useKeyboard({onKeyDown:R=>{R.key==="Backspace"&&t?t(a):R.continuePropagation();}}),z=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":u,"data-focus-visible":v});return jsxs("div",{...mergeProps(g,s,c,b,z),className:classNames(ud({isHovered:u,isSelected:p,isFocusVisible:v,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",y),style:f,ref:i,children:[d?jsx(d,{size:20,className:Vn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null,m,t?jsx(E,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:p||_||u?1:0},className:Vn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null]})};_d.displayName="TabButton";var hd=rt.forwardRef(({children:e,...t},o)=>{let r=useMemo(()=>rt.Children.map(e,a=>!a||!rt.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(An,{...t,ref:o,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});hd.displayName="Tabs";var xd=({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);xd.displayName="TabItem";var Cd={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 Pd=h({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),kd=h({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"]]}),Id=h({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),wd=h({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Rd=h({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),Sd=h({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),Td=h({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var vh={error:{sm:ErrorAltCircleFilledIcon,md:ErrorAltCircleFilledIcon$1},info:{sm:InfoCircleFilledIcon,md:InfoCircleFilledIcon$1},success:{sm:CheckmarkCircleFilledIcon,md:CheckCircleFilledIcon},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Nd=rt.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":u},m)=>{let d=F(Cd),f=o&&jsx(q,{variant:s==="compact"?"tertiary":"ghost",label:o,onPress:r}),y=vh[n][l];return jsxs("div",{className:classNames(kd({variant:n,arrangement:s,hasButton:!!o||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":u,style:a,role:"alert",ref:m,children:[jsxs("div",{className:Td({arrangement:s}),children:[jsx(y,{className:Rd({variant:n}),size:16}),jsxs("div",{className:Pd({arrangement:s}),children:[jsx("h3",{className:Sd({size:l}),children:i}),jsx("section",{className:Id({size:l}),children:t})]}),s==="compact"&&f]}),jsxs("div",{className:wd({arrangement:s}),children:[s!=="compact"&&f,p?jsx(E,{variant:"secondary",icon:XCircleFilledIcon,size:"sm",onPress:p,"aria-label":d.formatMessage("close")}):null]})]})});Nd.displayName="InlineAlert";var Ze={ar:{add:"\u0625\u0636\u0627\u0641\u0629",addColor:"\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",cancel:"\u0625\u0644\u063A\u0627\u0621",colorFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",colorPresets:"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",customColors:"\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",newColor:"\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",noColor:"\u0644\u0627 \u064A\u0648\u062C\u062F",removeColor:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",transparent:"\u0634\u0641\u0627\u0641"},cs:{add:"P\u0159idat",addColor:"P\u0159idat barvu",cancel:"Zru\u0161it",colorFormat:"Form\xE1t barvy",colorPresets:"P\u0159edvolby barev",customColors:"Vlastn\xED barvy",newColor:"Vlastn\xED barva",noColor:"Nen\xED",removeColor:"Odebrat barvu",transparent:"Pr\u016Fhledn\xE1"},cy:{add:"Ychwanegu",addColor:"Ychwanegu Lliw",cancel:"Canslo",colorFormat:"Fformat Lliw",colorPresets:"Rhagosodiadau Lliw",customColors:"Lliwiau Custom",newColor:"Lliw Personol Newydd",noColor:"Dim",removeColor:"Tynnu Lliw",transparent:"Tryloyw"},da:{add:"Tilf\xF8j",addColor:"Tilf\xF8j Farve",cancel:"Annuller",colorFormat:"Farveformat",colorPresets:"Farvevalg",customColors:"Brugerdefinerede farver",newColor:"Ny tilpasset farve",noColor:"Ingen",removeColor:"Fjern Farve",transparent:"Transparent"},de:{add:"Hinzuf\xFCgen",addColor:"Farbe hinzuf\xFCgen",cancel:"Abbrechen",colorFormat:"Farbformat",colorPresets:"Farbvorlagen",customColors:"Benutzerdefinierte Farben",newColor:"Neue benutzerdefinierte Farbe",noColor:"Kein",removeColor:"Farbe entfernen",transparent:"Transparent"},el:{add:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",addColor:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",colorFormat:"\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",colorPresets:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",customColors:"\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",newColor:"\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",noColor:"\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",removeColor:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",transparent:"\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2"},"en-GB":{add:"Add",addColor:"Add Colour",cancel:"Cancel",colorFormat:"Colour Format",colorPresets:"Colour Presets",customColors:"Custom Colours",newColor:"New Custom Colour",noColor:"None",removeColor:"Remove Colour",transparent:"Transparent"},en:{add:"Add",addColor:"Add Color",cancel:"Cancel",colorFormat:"Color Format",colorPresets:"Color Presets",customColors:"Custom Colors",newColor:"New Custom Color",noColor:"None",removeColor:"Remove Color",transparent:"Transparent"},es:{add:"A\xF1adir",addColor:"A\xF1adir color",cancel:"Cancelar",colorFormat:"Formato de color",colorPresets:"Preajustes de color",customColors:"Colores personalizados",newColor:"Nuevo color personalizado",noColor:"Ninguna",removeColor:"Eliminar color",transparent:"Transparente"},fi:{add:"Lis\xE4\xE4",addColor:"Lis\xE4\xE4 v\xE4ri",cancel:"Kumoa",colorFormat:"V\xE4rimuoto",colorPresets:"V\xE4rin esiasetukset",customColors:"Mukautetut v\xE4rit",newColor:"Uusi muokattu v\xE4ri",noColor:"Ei mit\xE4\xE4n",removeColor:"Poista v\xE4ri",transparent:"L\xE4pin\xE4kyv\xE4"},"fr-CA":{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},fr:{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},he:{add:"\u05D4\u05D5\u05E1\u05E4\u05D4",addColor:"\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC",colorFormat:"\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",colorPresets:"\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",customColors:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",newColor:"\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",noColor:"\u05DC\u05DC\u05D0",removeColor:"\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3"},hr:{add:"Dodati",addColor:"Dodaj boju",cancel:"Otka\u017Ei",colorFormat:"Format boje",colorPresets:"Prijedlozi boja",customColors:"Prilago\u0111ene boje",newColor:"Nova prilago\u0111ena boja",noColor:"Prazno",removeColor:"Ukloni boju",transparent:"Prozirna"},id:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batalkan",colorFormat:"Format Warna",colorPresets:"Preset Warna",customColors:"Warna Kustom",newColor:"Warna Khusus Baru",noColor:"Tidak ada",removeColor:"Hapus Warna",transparent:"Transparan"},it:{add:"Aggiungi",addColor:"Aggiungi colore",cancel:"Annulla",colorFormat:"Formato del colore",colorPresets:"Colori predefiniti",customColors:"Colori personalizzati",newColor:"Nuovo colore personalizzato",noColor:"Nessuno",removeColor:"Rimuovi colore",transparent:"Trasparente"},ja:{add:"\u8FFD\u52A0",addColor:"\u8272\u3092\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorFormat:"\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",colorPresets:"\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",customColors:"\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",newColor:"\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",noColor:"\u306A\u3057",removeColor:"\u8272\u3092\u524A\u9664",transparent:"\u900F\u660E"},ko:{add:"\uCD94\uAC00",addColor:"\uC0C9\uC0C1 \uCD94\uAC00",cancel:"\uCDE8\uC18C",colorFormat:"\uC0C9\uC0C1 \uD615\uC2DD",colorPresets:"\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",customColors:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",newColor:"\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",noColor:"\uC5C6\uC74C",removeColor:"\uC0C9\uC0C1 \uC81C\uAC70",transparent:"\uD22C\uBA85"},ms:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batal",colorFormat:"Format Warna",colorPresets:"Praset Warna",customColors:"Warna Kustom",newColor:"Warna Tersuai Baharu",noColor:"Tiada",removeColor:"Buang Warna",transparent:"Lut Sinar"},"nb-NO":{add:"Legg til",addColor:"Legg til farge",cancel:"Avbryt",colorFormat:"Fargeformat",colorPresets:"Fargeinnstillinger",customColors:"Egendefinerte farger",newColor:"Ny tilpasset farge",noColor:"Ingen",removeColor:"Fjern farge",transparent:"Gjennomsiktig"},nl:{add:"Voeg toe",addColor:"Kleur toevoegen",cancel:"Annuleer",colorFormat:"Kleurformaat",colorPresets:"Kleurvoorinstellingen",customColors:"Aangepaste kleuren",newColor:"Nieuwe aangepaste kleur",noColor:"Geen",removeColor:"Kleur verwijderen",transparent:"Doorzichtig"},pl:{add:"Dodaj",addColor:"Dodaj kolor",cancel:"Anuluj",colorFormat:"Format koloru",colorPresets:"Wst\u0119pnie ustawione kolory",customColors:"Niestandardowe kolory",newColor:"Nowy kolor niestandardowy",noColor:"Brak",removeColor:"Usu\u0144 kolor",transparent:"Prze\u015Bwiecaj\u0105ce"},"pt-PT":{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Predefini\xE7\xF5es de cor",customColors:"Cores personalizadas",newColor:"Nova cor personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},pt:{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Pr\xE9-ajustes de Cores",customColors:"Cores personalizadas",newColor:"Nova Cor Personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},ru:{add:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",addColor:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",colorPresets:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",customColors:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",newColor:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",noColor:"\u041D\u0435\u0442",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",transparent:"\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439"},sk:{add:"Prida\u0165",addColor:"Prida\u0165 farbu",cancel:"Zru\u0161i\u0165",colorFormat:"Form\xE1t farby",colorPresets:"Predvo\u013Eby farieb",customColors:"Vlastn\xE9 farby",newColor:"Vlastn\xE1 farba",noColor:"\u017Diadny",removeColor:"Odstr\xE1ni\u0165 farbu",transparent:"Prieh\u013Eadn\xE1"},sl:{add:"Dodaj",addColor:"Dodaj barvo",cancel:"Prekli\u010Di",colorFormat:"Barvni format",colorPresets:"Barvne predloge",customColors:"Prilagojene barve",newColor:"Nova barva po meri",noColor:"Prazna stran",removeColor:"Odstrani barvo",transparent:"Prosojna"},sv:{add:"L\xE4gg till",addColor:"L\xE4gg till f\xE4rg",cancel:"Avbryt",colorFormat:"F\xE4rgformat",colorPresets:"F\xF6rval f\xF6r f\xE4rger",customColors:"Anpassade f\xE4rger",newColor:"Ny anpassad f\xE4rg",noColor:"Ingen",removeColor:"Ta bort f\xE4rg",transparent:"Genomskinligt"},th:{add:"\u0E40\u0E1E\u0E34\u0E48\u0E21",addColor:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",colorFormat:"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",colorPresets:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",customColors:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",newColor:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",noColor:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",removeColor:"\u0E25\u0E1A\u0E2A\u0E35",transparent:"\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A"},tr:{add:"Ekle",addColor:"Renk Ekle",cancel:"Vazge\xE7",colorFormat:"Renk Format\u0131",colorPresets:"Renk \xD6nayarlar\u0131",customColors:"\xD6zel Renkler",newColor:"Yeni \xF6zel renk",noColor:"Hi\xE7biri",removeColor:"Rengi Kald\u0131r",transparent:"\u015Eeffaf"},uk:{add:"\u0414\u043E\u0434\u0430\u0442\u0438",addColor:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",cancel:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",colorPresets:"\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",customColors:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",newColor:"\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",noColor:"\u041D\u0435\u043C\u0430\u0454",removeColor:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",transparent:"\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439"},"zh-Hans":{add:"\u6DFB\u52A0",addColor:"\u6DFB\u52A0\u989C\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u989C\u8272\u683C\u5F0F",colorPresets:"\u989C\u8272\u9884\u8BBE",customColors:"\u81EA\u5B9A\u4E49\u989C\u8272",newColor:"\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",noColor:"\u65E0",removeColor:"\u79FB\u9664\u989C\u8272",transparent:"\u900F\u660E"},"zh-Hant":{add:"\u52A0\u5165",addColor:"\u6DFB\u52A0\u984F\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u984F\u8272\u683C\u5F0F",colorPresets:"\u984F\u8272\u9810\u8A2D\u9805",customColors:"\u81EA\u8A02\u984F\u8272",newColor:"\u65B0\u81EA\u8A02\u984F\u8272",noColor:"\u7121",removeColor:"\u79FB\u9664\u984F\u8272",transparent:"\u900F\u660E"}};var ea=({children:e})=>{let{triggerProps:t}=rt.useContext(qe);return jsx(PressResponder,{...t,children:e})};ea.displayName="ModalTrigger";var kh=({children:e})=>{let{state:t}=rt.useContext(qe);return jsx(PressResponder,{onPress:()=>{t?.close();},children:e})};var Ld="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lc",Md="_1dbkl5e",Ed=h({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 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6ln _1yep5z6lf _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6le _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z610q"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Dd="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka",Bd=h({defaultClassName:"_1dbkl50 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6o7 _1yep5z6o8 _1yep5z6o9",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),ta="_1dbkl5l _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69f _1yep5z69g _1yep5z69h",Fd="_1dbkl5f z9nup87",oa="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",Hd="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lf",Vd="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",ra=h({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6mv _1yep5z6mw _1yep5z6mx"}},defaultVariants:{},compoundVariants:[]}),qn="_1dbkl5v _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",Od=h({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lo _1yep5z6gz _1yep5z6lf _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z612o"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z6174"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61ok"]]}),jd=h({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 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f5 _1yep5z6le _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6l2",variantClassNames:{isHovered:{true:"_1yep5z611v"},isFocusVisible:{true:"_1yep5z617a _1yep5z6178 _1yep5z617b _1yep5z613h"},isDisabled:{true:"_1yep5z610z"}},defaultVariants:{},compoundVariants:[]}),Bo="_1dbkl5u",aa="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",na="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",Kn="_1dbkl5x",Ad="_1dbkl5w",Gn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69l _1yep5z69m _1yep5z69n",ia=h({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lj _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6lo _1yep5z6lr",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z6178 _1yep5z613h _1yep5z617a"}},defaultVariants:{},compoundVariants:[]}),Wn="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7";var $d=h({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6l9 _1yep5z6i1 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617d"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61t2 _1yep5z61t0 _1yep5z61p9 _1yep5z61t5"],[{isSelected:!0,isDisabled:!0},"_1yep5z61t2 _1yep5z61t0 _1yep5z61p9 _1yep5z61t5 _1yep5z61pj"],[{isHovered:!0,isSelected:!1},"_1yep5z61t5 _1yep5z61t2 _1yep5z61t0 _1yep5z61pd"]]}),Ud="_1344e9q9 _1yep5z6fl";var Qe=rt.forwardRef(({color:e,isFocusVisible:t,isSelected:o,isInteractive:r,isDisabled:a,style:n,className:i,id:s,tooltip:p,"data-block-id":l,"data-block-class":c,...u},m)=>{let d=e&&e!==Re&&(typeof e=="string"?parseColor(e):e),{formatMessage:f}=F(),y=!d,{colorSwatchProps:b}=useColorSwatch({color:y?"#000000":e}),{hoverProps:v,isHovered:_}=useHover({isDisabled:a||!r}),g=filterTruthyValues({"data-focus-visible":t,"data-selected":o,"data-hovered":_,"data-block-id":l,"data-block-class":c,"data-disabled":a,"data-interactive":r}),z=y?f(qd.none):b["aria-label"],R=u["aria-label"]??z,{tooltipProps:P}=_r({tooltip:p,label:R}),C=jsx("div",{...mergeProps(v,g,y?{}:b),style:n,"aria-label":y?f(qd.none):b["aria-label"],role:"img",className:classNames($d({removeBlendMode:y,isFocusVisible:t,isDisabled:!!a,isSelected:!!o,isHovered:_}),"BaselineUI-ColorSwatch",i),ref:m,id:s,...u,children:jsx(L,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:d?Kd(d,4):void 0,children:y?jsx("div",{className:Ud}):null})});return P&&!a?jsx(oe,{...P,children:jsx(Nr,{children:C})}):C});Qe.displayName="ColorSwatch";var qd=U({none:{id:"none",defaultMessage:"None"}});var Wd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Vo=parseColor("#000000").toFormat("hsla"),se="hsla",Ho="hexa";function st(e){return typeof e=="string"?parseColor(e).toFormat(se):e?e.toFormat(se):null}function Xd(e,t){return e?.getChannelValue("alpha")?t?.toString(Ho)===e.toString(Ho):!t?.getChannelValue("alpha")}function Yd(e,t,o){return t?.label?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var Re="NONE";function Zd(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString(Ho),label:a.label}))||[],r={id:Re,label:e};return [...o,r]}var sa=(e,{optionProps:t,isFocusVisible:o,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...t,ref:a,className:Hd,children:jsx(Qe,{color:e.value.id,isFocusVisible:o,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),Kd=(e,t=4)=>{let o=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:o?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${t}px ${t}px`}};var Jd=({value:e,...t})=>{let o=rt.useRef(null),r=rt.useRef(null),a=rt.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...t,value:e,inputXRef:o,inputYRef:r,containerRef:a},n);useEffect(()=>{o.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(Ld,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(ia({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:st(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var ou=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:u=>{t(st(u)?.toFormat(se).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Vo);}}),n=rt.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(qn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:Od({isFocused:p,isHovered:c,allowAlpha:o})}),o?jsx(au,{color:e,setColor:t}):null]})},ru=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(qn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(Me,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Bo,onChange:n=>{t(r.withChannelValue("red",n).toFormat(se));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Bo,onChange:n=>{t(r.withChannelValue("green",n).toFormat(se));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Bo,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(se));},step:1,minValue:0,maxValue:255}),o?jsx(au,{color:e,setColor:t}):null]})},Wh={style:"percent",maximumFractionDigits:0},au=({color:e,setColor:t})=>{let{locale:o}=useLocale(),r=useCallback(a=>{t(e.withChannelValue("alpha",a));},[e,t]);return jsx(Me,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:Wh,className:Bo,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var Qn=({channel:e,...t})=>{let{locale:o}=useLocale(),r=useColorSliderState({...t,channel:e,locale:o}),a=rt.useRef(null),n=rt.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...t,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(oa,{[hl({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:Wn}),jsx("div",{className:oa,style:i.style}),jsxs("div",{className:classNames(ia({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:Wn,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:oa}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var la=({color:e,setColor:t,allowAlpha:o,onChangeEnd:r})=>{let[a,n]=rt.useState("hex"),{formatMessage:i}=F(Ze);return jsxs(Fragment,{children:[jsx(Jd,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:t,onChangeEnd:r}),jsxs("div",{className:Gn,children:[jsx(Qn,{channel:"hue",value:e,onChange:t,onChangeEnd:r}),o?jsx(Qn,{channel:"alpha",value:e,onChange:t,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(Gn,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Ye,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Wd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(ou,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o}),a==="rgb"&&jsx(ru,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o})]})]})};var du=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Ze),c=rt.useRef(null),u=Nt(c.current),[m,d]=vl(o,[]),f=rt.useRef(null),[y,b]=rt.useState(e),v=rt.useMemo(()=>m.map(C=>({id:C,label:parseColor(C).getColorName(p),description:C})),[m,p]),_=useCallback(()=>{let C=i==="active"?e:y;if(m.includes(C.toString(se))){f.current?.querySelector(`[data-key='${C.toString(se)}']`)?.classList.add(Kn);return}d([...m,C.toString(se)]);},[m,e,d,y,i]);useEffect(()=>{let C=f.current;function x(S){S.animationName===Ad&&S.target?.classList.remove(Kn);}return C?.addEventListener("animationend",x),()=>{C?.removeEventListener("animationend",x);}},[]);let g=useId(),z=jsx(E,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),R=useCallback(C=>jsxs(me,{size:"content",className:ra({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(la,{color:y,setColor:b,allowAlpha:s}),jsx(j,{}),jsx(L,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(L,{display:"inline-flex",gap:"lg",children:[jsx(q,{label:l("cancel"),size:"sm",variant:"secondary",onPress:C}),jsx(q,{label:l("add"),variant:"primary",onPress:()=>{_(),C();},size:"sm"})]})})]}),[y,_,l,s]),P=useCallback(C=>{invariant(C instanceof Set,"Key must be a set");let x=[...C][0];x&&t(parseColor(x).toFormat(se));},[t]);return jsxs(Fragment,{children:[jsx(j,{}),jsxs("div",{className:classNames(Vd,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:g,children:n}),jsxs(L,{display:"flex",children:[!!m.length&&m.includes(e.toString(se))&&jsx(E,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(C=>C!==e.toString(se)));}}),i==="active"&&z,i==="lazy"&&(u==="mobile"?jsxs(Ie,{children:[jsx(ea,{children:z}),jsx(Ee,{style:{zIndex:1e5},children:({close:C})=>R(C)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:z}),jsx(we,{placement:"right top",className:aa,offset:6,children:({close:C})=>R(C)})]}))]})]}),!!m.length&&jsx(pe,{items:v,layout:"grid","aria-labelledby":g,className:classNames(ta,na,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:sa,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(se)],onSelectionChange:P})]})};var ti=rt.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Ze),p=useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],u=a.find(m=>m.id===c);invariant(u,"Preset not found"),e(u.id===Re?null:parseColor(u.id).toFormat(se)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(na,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:i,children:jsx(pe,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:ta,renderOption:sa,selectionMode:"single",selectedKeys:[t?.toString(Ho)||Re],onSelectionChange:p})})});ti.displayName="ColorPresetList";var jo=rt.forwardRef(({color:e,colorLabel:t,colorName:o,...r},a)=>{let n=rt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l}),d=lr(),f=lr();return jsxs("button",{...mergeProps(p,i,u,m),style:r.style,className:classNames(Ed({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:M(a,n),id:d,"aria-labelledby":r["aria-labelledby"]||`${d} ${f}`,children:[jsx(Qe,{color:e?.toString("hexa")}),t?jsx("div",{className:Fd,id:f,"aria-hidden":"true",children:o}):typeof o=="string"&&jsx(VisuallyHidden,{children:o})]})});jo.displayName="ColorInputButton";var da=rt.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=rt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,u,m),ref:M(a,n),style:t,className:classNames(jd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(o,{size:16}),jsx("div",{className:Md,style:{backgroundColor:r.color||void 0}})]})});da.displayName="IconColorInputButton";function zu({colorLabel:e,color:t,presets:o}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>o.find(p=>p.id===Re?!t:t?Xd(t,parseColor(p.id)):!1),[o,t]),i=useMemo(()=>typeof e=="function"?e?.(t):e?Yd(t,n,r(zx.transparent)):!1,[t,e,r,n]),s=useMemo(()=>{if(n?.label)return n.label;t?.getColorName(a);},[t,a,n?.label]);return {colorName:i,humanReadableName:s}}var zx=U({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Zt=rt.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,onChangeEnd:l,defaultValue:c,storePickedColorKey:u="baselinePickedColor",value:m,addColorButtonLabel:d,removeColorButtonLabel:f,customColorsLabel:y,renderTriggerButton:b=({isOpen:x,color:S,ref:N,colorName:w,triggerProps:T,labelId:k})=>jsx(jo,{...mergeProps(T,{...P.label?{"aria-labelledby":k}:{"aria-label":P["aria-label"]}}),ref:N,isOpen:x,isDisabled:P.isDisabled,labelPosition:n,color:S,colorLabel:i,colorName:w}),pickerMode:v="active",offset:_=2,placement:g=n==="start"?"bottom end":"bottom start","data-block-id":z,"data-block-class":R,...P},C)=>{let x=rt.useRef(null),S=rt.useRef(null),N=useOverlayTriggerState(P),{triggerProps:w,overlayProps:T}=useOverlayTrigger({type:"listbox"},N,x),k=ve(P.portalContainer),[I,D]=useControlledState(m===void 0?void 0:st(m),st(c),X=>p?.(X?.toFormat("rgba")||null)),{formatMessage:H}=F(Ze),B=useMemo(()=>Zd(H(ua.noColor),a),[a,H]),K=useId(),{colorName:A}=zu({colorLabel:i,color:I,presets:B}),G=useMemo(()=>B.filter(X=>o||X.id!==Re),[B,o]),O=d||H(ua.addColor),re=f||H(ua.removeColor),V=y||H(ua.customColors),Z=jsx(du,{color:I||Vo,setColor:X=>{D(X),l?.(X?.toFormat("rgba")||null);},storePickedColorKey:u,addColorButtonLabel:O,removeColorButtonLabel:re,customColorsLabel:V,pickerMode:v,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Dd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":z,"data-block-class":R,style:t,ref:C,children:[P.label?jsx("label",{id:K,className:Bd({labelPosition:n}),children:P.label}):null,b({isOpen:N.isOpen,color:I,ref:x,colorName:A,triggerProps:w,labelId:K})]}),jsx(be,{...P,portalContainer:k,placement:g,state:N,offset:_,className:classNames(aa,"BaselineUI-ColorInput-Popover"),triggerRef:x,overlayProps:T,children:jsxs(me,{size:"content",className:ra({includesCustomColorPicker:s}),ref:S,"aria-labelledby":K,"aria-label":P["aria-label"],children:[s&&v==="active"?jsxs(Fragment,{children:[jsx(la,{color:I||Vo,setColor:D,allowAlpha:r,onChangeEnd:X=>{l?.(X?.toFormat("rgba")||null);}}),Z]}):null,!!G.length&&jsxs(Fragment,{children:[s&&v==="active"?jsx(j,{}):null,jsx(ti,{autoFocus:s&&v==="active"?!1:"first",state:N,triggerRef:x,presets:G,color:I,setColor:X=>{D(X),l?.(X?.toFormat("rgba")||null);}})]}),s&&v==="lazy"?Z:null]})})]})});Zt.displayName="ColorInput";var ua=U({addColor:{defaultMessage:"Add color",id:"addColor"},removeColor:{defaultMessage:"Remove color",id:"removeColor"},customColors:{defaultMessage:"Custom colors",id:"customColors"},noColor:{defaultMessage:"No color",id:"noColor"},transparent:{defaultMessage:"Transparent",id:"transparent"}});var Pu=rt.forwardRef(({className:e,style:t,icon:o,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=rt.useRef(null),l=useCallback(({isOpen:c,color:u,ref:m,colorName:d,triggerProps:f})=>jsx(oe,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(jo,{...f,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:u,colorLabel:!1,colorName:d}):jsx(da,{...f,isOpen:c,icon:TextIcon,color:u?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:t,ref:M(s,p),children:[r==="standard"&&o?jsx(o,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Zt,{...i,colorLabel:!1,renderTriggerButton:l})]})});Pu.displayName="IconColorInput";var ku={ar:{redo:"\u0625\u0639\u0627\u062F\u0629",undo:"\u062A\u0631\u0627\u062C\u0639"},cs:{redo:"Opakovat",undo:"Zru\u0161it"},cy:{redo:"Ail-wneud",undo:"Dad-wneud"},da:{redo:"Gentag",undo:"Fortryd"},de:{redo:"Wiederholen",undo:"R\xFCckg\xE4ngig machen"},el:{redo:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",undo:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7"},"en-GB":{redo:"Redo",undo:"Undo"},en:{redo:"Redo",undo:"Undo"},es:{redo:"Rehacer",undo:"Deshacer"},fi:{redo:"Tee sittenkin",undo:"Peru"},"fr-CA":{redo:"R\xE9tablir",undo:"Annuler"},fr:{redo:"R\xE9tablir",undo:"Annuler"},he:{redo:"\u05D1\u05D9\u05E6\u05D5\u05E2 \u05DE\u05D7\u05D3\u05E9",undo:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4"},hr:{redo:"Ponovi",undo:"Vrati"},id:{redo:"Ulangi",undo:"Kembalikan"},it:{redo:"Ripristina",undo:"Annulla"},ja:{redo:"\u3084\u308A\u76F4\u3059",undo:"\u53D6\u308A\u6D88\u3059"},ko:{redo:"\uC2E4\uD589\uBCF5\uADC0",undo:"\uC2E4\uD589\uCDE8\uC18C"},ms:{redo:"Buat Semula",undo:"Buat Asal"},"nb-NO":{redo:"Gj\xF8r om igjen",undo:"Angre"},nl:{redo:"Opnieuw",undo:"Herstel"},pl:{redo:"Pon\xF3w",undo:"Cofnij"},"pt-PT":{redo:"Refazer",undo:"Desfazer"},pt:{redo:"Refazer",undo:"Desfazer"},ru:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"},sk:{redo:"Opakova\u0165",undo:"Zru\u0161i\u0165"},sl:{redo:"Uveljavi",undo:"Razveljavi"},sv:{redo:"G\xF6r om",undo:"\xC5ngra"},th:{redo:"\u0E17\u0E33\u0E0B\u0E49\u0E33",undo:"\u0E16\u0E2D\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A"},tr:{redo:"Yinele",undo:"Geri Al"},uk:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",undo:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"zh-Hans":{redo:"\u91CD\u505A",undo:"\u64A4\u9500"},"zh-Hant":{redo:"\u91CD\u4F5C",undo:"\u5FA9\u539F"}};var ma=h({defaultClassName:"mnnh5s1 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6kz _1yep5z6l2 _1yep5z6le _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6lc",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6wd _1yep5z6we _1yep5z6wf _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z612s _1yep5z617h _1yep5z617i",false:"_1yep5z6174 _1yep5z611w"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z611v"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z6130 _1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"mnnh5s8 _1yep5z6z2"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61nv"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61ok"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61nn"]]}),Iu="_1yep5z6d8",fa=h({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var wu=h({defaultClassName:"_1i0ytqa3 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6ld _1yep5z6lf",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z6124",false:"_1yep5z6126"},isDisabled:{true:"_1i0ytqa7 _1yep5z6z2",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61og _1yep5z61t8 _1yep5z61ta"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61nw"],[{isInline:!1,isDisabled:!0},"_1yep5z61ny"]]}),Ru="_1i0ytqa0",ya=h({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6lc",variantClassNames:{isInline:{false:"_1yep5z611v"},isDisabled:{true:"_1i0ytqad _1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),Su=h({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lc",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function Tu({line:e,options:t}){let o=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/Qt),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!o.current[i])){let l=e.slice(i*Qt-(i>0?1:0),i*Qt+Qt);n=getSvgPathFromStroke(getStroke(l.map(([c,u,m])=>({x:c,y:u,pressure:m})),t)),l.length>=(i>0?Qt+1:Qt)&&(o.current[i]=n);}return n},[e,t]);return [...o.current,r]}var Qt=60*3;var Yx={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},Lu=rt.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:u=!0,isDisabled:m,placeholder:d,clearLabel:f,undoLabel:y,redoLabel:b,footerClassName:v,canvasRef:_,value:g,footerStyle:z,"data-block-id":R,"data-block-class":P,"aria-label":C="Drawing canvas",description:x="This is a canvas for drawing using a mouse or touch input.",...S},N)=>{let w=F(ku),T=rt.useRef(null),[k,I]=rt.useState(g||p||[]),D=rt.useMemo(()=>({...Yx,...S}),[S]),[H,B]=rt.useState(),K=useId(),{labelProps:A,fieldProps:G}=useLabel({...S,"aria-label":C,labelElementType:"span"}),{isFocusVisible:O,focusProps:re}=useFocusRing({within:!0}),{hoverProps:V,isHovered:Z}=useHover({isDisabled:m}),{undo:X,redo:Ce,canRedo:Pe,canUndo:ye,push:Se}=ml(k,{onAction:Y=>{Y&&(I(Y),l?.(Y));},isDisabled:!c}),{keyboardProps:He}=useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?_t():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Pe&&Ce():ye&&X());}}),[ee,de]=useState(!1),gt=useCallback(Y=>{let $=Y.currentTarget.getBoundingClientRect();B($),Y.target.setPointerCapture(Y.pointerId);let ne=[Y.clientX-$.x,Y.clientY-$.y,Y.pressure];I(W=>[...W,[ne]]),de(!0);},[]),vt=useCallback(Y=>{if(Y.buttons!==1||!H)return;let ne=Du(Y.nativeEvent).map(W=>[a?clamp(W.clientX-H.left,0,H.width):W.clientX-H.left,a?clamp(W.clientY-H.top,0,H.height):W.clientY-H.top,W.pressure]);I(W=>{let he=[...W];return he[W.length-1]=[...he[W.length-1],...ne],he});},[H,a]),uo=()=>{H&&(l?.(k),Se(k),de(!1));};useEffect(()=>{s?.(k);},[k,s]);let _t=()=>{I([]),s?.([]),Se([]);};return jsxs("div",{ref:M(T,N),className:classNames(Ru,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":m,"data-block-id":R,"data-block-class":P,children:[S.label||c?jsxs("div",{className:Su({isInline:u}),children:[S.label?jsx(Q,{type:"label",size:"sm",...A,children:S.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(E,{variant:"secondary",size:"sm",isDisabled:!ye||m,icon:UndoIcon,onPress:X,"aria-label":y||w.formatMessage("undo")}),jsx(E,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:RedoIcon,onPress:Ce,"aria-label":b||w.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(re,He,V,G),tabIndex:m?void 0:0,className:classNames(ma({isInline:u,isHovered:Z}),wu({isFocusVisible:O,isInline:u,isDisabled:!!m}),o),"aria-describedby":S["aria-describedby"]||K,style:r,ref:_,children:[jsx(VisuallyHidden,{children:jsx("div",{id:K,children:x})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:gt,onPointerMove:vt,onPointerUp:uo,children:(g||k).map((Y,$,ne)=>$<ne.length-1||!ee?jsx(Mu,{line:Y,options:D,strokeColor:i,strokeWidth:n},$):jsx(Eu,{line:Y,options:D,strokeColor:i,strokeWidth:n},$))})]}),d||f?jsx("div",{style:z,className:classNames(ya({isInline:u,isDisabled:m}),v),children:(k.length||!d)&&f?jsx(q,{size:"sm",variant:"ghost",label:f,isDisabled:m,onPress:_t}):jsx(q,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});Lu.displayName="FreehandCanvas";var Mu=rt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),t)),[e,t]);return jsx("path",{d:a,stroke:o,strokeWidth:r})});Mu.displayName="Stroke";var Eu=rt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=Tu({line:e,options:t});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:o,strokeWidth:r},i))})});Eu.displayName="SplitStroke";function Du(e){if(typeof e.getCoalescedEvents=="function"){let t=e.getCoalescedEvents();return t.length>0?t.flatMap(o=>Du(o)):[e]}return [e]}var Bu="_1vac7ws0",Fu=h({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Vu(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 Ou(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 mC=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Au=rt.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:u,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:v,onRotate:_,onSnap:g,isSnappable:z,elementGuidelines:R,hideAnchorOnDrag:P=!0,title:C,rotationPosition:x,autoUpdate:S,bound:N,snapRotationDegrees:w,snapRotationThreshold:T,scrollableAncestor:k,renderDirections:I,stopPropagation:D,transformOrigin:H,preventDefault:B},K)=>{let A=useRef(null),G=useRef(null),[O,re]=useState(document),V=useRef(O.createElement("div")),[Z,X]=useState({}),[Ce,Pe]=useState(!1),[ye,Se]=useState(!1),[He,ee]=useState(),de=Vu(R,O);useLayoutEffect(()=>{let $=V.current;return V.current=O.createElement("div"),()=>{$.remove();}},[O]);let{keyboardProps:gt}=useKeyboard({onKeyDown:$=>{let ne=$.shiftKey?10:1,W=$.metaKey||$.ctrlKey;W&&$.shiftKey&&(ne=45);function he(mo,Vy="x"){W?G.current?.request("rotatable",{deltaRotate:mo*ne},!0):G.current?.request("draggable",Vy==="x"?{deltaX:mo*ne}:{deltaY:mo*ne},!0);}switch($.key){case"ArrowRight":{he(1);break}case"ArrowLeft":{he(-1);break}case"ArrowUp":{he(-1,"y");break}case"ArrowDown":he(1,"y");}requestAnimationFrame(()=>{G.current?.updateRect();});}});useEffect(()=>{let $=ue(A.current);re($);let ne=V.current;$.body.append(V.current);function W(mo){Se(mo.shiftKey);}function he(){Se(!1);}return $.addEventListener("keydown",W),$.addEventListener("keyup",he),()=>{$.removeEventListener("keydown",W),$.removeEventListener("keyup",he),ne.remove();}},[]),Ou({scrollable:k,onScroll:()=>{G.current?.updateRect();},ownerDocument:O});let vt=useCallback($=>{X(ne=>({...ne,...$.style})),i?.($);},[i]),uo=useCallback($=>{if(Pe(!0),A.current?.focus(),N){let W=getHTMLElement(N,O)?.getBoundingClientRect();ee({position:"client",left:W?.left??0,top:W?.top??0,right:W?.right??0,bottom:W?.bottom??0});}c?.($);},[N,O,c]),_t=useCallback($=>{Pe(!1),u?.($);},[u]),Y=t({style:{...Z.width&&{width:Z.width},...Z.height&&{height:Z.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...gt,ref:M(A,K),style:{display:"inline-block",...n,...Z},className:classNames(Bu,e),onDoubleClick:l,tabIndex:0,title:C,children:Y}),createPortal(jsx(mC,{ref:G,target:A,draggable:a,resizable:r,rotatable:o,keepRatio:ye,throttleDrag:1,snappable:z||!!N,elementGuidelines:de,snapRenderThreshold:.9,className:Fu({isDragging:Ce&&P}),onRender:vt,onDragStart:uo,onDragEnd:_t,useResizeObserver:S,useMutationObserver:S,onRenderEnd:p,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:v,onRotate:_,onRenderStart:s,onSnap:g,rotationPosition:x,bounds:He,snapRotationDegrees:w,snapRotationThreshold:T,renderDirections:I,stopPropagation:D,preventDefault:B,transformOrigin:H}),V.current)]})});Au.displayName="Transform";var $u={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 Ku=rt.forwardRef(({className:e,style:t,isInline:o=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:u=!0,"data-block-id":m,"data-block-class":d,pickerButtonStyle:f,pickerButtonClassName:y,footerClassName:b,footerStyle:v,clearLabel:_,placeholder:g,labelStyle:z,labelClassName:R,...P},C)=>{let x=rt.useRef(null),S=rt.useRef(null),{formatMessage:N}=F($u),[w,T]=useControlledState(n,a||null,ee=>{invariant(typeof ee!="string"),P.onValueChange?.(ee?[ee]:[]);}),k=useMemo(()=>wC(w||void 0),[w]),{fieldProps:I,labelProps:D}=useField(P),{dropProps:H,isDropTarget:B}=useDrop({ref:x,onDrop:async ee=>{if(p)return;let de=await wn({items:ee.items});de.length&&T(de[0]),l?.(ee);},...P}),{clipboardProps:K}=useClipboard({onPaste:async ee=>{if(p)return;let de=await wn({items:ee});de.length&&T(de[0]),c?.(ee);},...P}),A=()=>{T(null),S.current&&(S.current.value="");},G={type:"file",onChange:ee=>{let de=[...ee.target.files];T(de[0]),P.onChange?.(ee);},accept:r,disabled:p},{focusProps:O,isFocused:re,isFocusVisible:V}=useFocusRing({within:!0}),{hoverProps:Z,isHovered:X}=useHover({isDisabled:p}),{imgProps:Ce,isLoading:Pe,isLoaded:ye}=St({src:k,alt:i||""}),Se={label:s||N("selectImage"),onPress:()=>x.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(Cr({isFocusVisible:V}),{[Iu]:B&&!p},y),style:f},He=filterTruthyValues({"data-loaded":ye,"data-block-id":m,"data-block-class":d,"data-hovered":X,"data-focused":re,"data-drop-target":B,"data-disabled":p,"data-focus-visible":V});return jsxs(L,{...He,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:t,ref:C,children:[jsxs("label",{...mergeProps(H,Z,O,D),className:classNames(ma({isInline:o,isHovered:X,isDisabled:p,hasLoadedImage:!!k&&ye,showFocusRing:B||!!k&&V}),R),style:z,ref:x,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(I,K,G),ref:S})}),!k&&jsx(q,{...Se}),!!k&&(Pe?jsx(qt,{}):jsx("img",{className:fa({isInline:o,isDisabled:p,hasLoadedImage:!!k&&ye&&u}),...Ce}))]}),g||_?jsx("div",{style:v,className:classNames(ya({isInline:o,isDisabled:p}),b),children:(k||!g)&&_?jsx(q,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:A}):jsx(q,{size:"sm",variant:"ghost",label:g,isDisabled:!0})}):null]})});Ku.displayName="ImageDropZone";function wC(e){return e instanceof File?URL.createObjectURL(e):e}var Gu="_1vm2oh49 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6g4",pi="_1vm2oh48 _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6jt _1yep5z6ju _1yep5z6jv",Wu=h({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6li _1yep5z6lg _1yep5z6i1 _1yep5z6lj _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6le _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z612r _1yep5z617g _1yep5z617i",false:"_1yep5z6126"},isFocusVisible:{true:"_1yep5z6130 _1yep5z617a _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6z2"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61nw"],[{accent:"theme",isInline:!0},"_1yep5z61nl"],[{accent:"positive",isInline:!1},"_1yep5z61ny"],[{accent:"theme",isInline:!1},"_1yep5z61nn"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61p9 _1yep5z61t0 _1yep5z61t2 _1yep5z61t3"],[{isHovered:!0,isInline:!0},"_1yep5z61t3 _1yep5z61p9 _1yep5z61t0 _1yep5z61t2"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61nx"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61np"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61nm"]]});var Zu=rt.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:u,addAriaLabel:m,accent:d="positive","data-block-id":f,"data-block-class":y,...b},v)=>{let{focusProps:_,isFocused:g,isFocusVisible:z}=useFocusRing({within:!0}),{isHovered:R,hoverProps:P}=useHover({isDisabled:o}),{pressProps:C}=usePress({isDisabled:o,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let x=filterTruthyValues({"data-hovered":R,"data-focus-visible":z,"data-focused":g,"data-disabled":o});return jsxs("div",{...b,className:classNames(Wu({isInline:r,isFocusVisible:z,isDisabled:o,isHovered:R,accent:d}),"BaselineUI-Preview",e),"data-block-id":f,"data-block-class":y,"aria-label":b["aria-label"]||a||s,style:t,ref:v,children:[typeof i=="string"?jsx("button",{disabled:o,...mergeProps(P,_,C,x),className:pi,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(P,_,C,x),disabled:o,style:p,"aria-label":m,className:pi,children:[n?jsx("img",{src:n,alt:a,className:fa({isInline:r,isDisabled:o})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(E,{isDisabled:o,className:Gu,"aria-label":u,size:"xs",icon:TrashIcon,onPress:c}):null]})});Zu.displayName="Preview";var Qu="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e",Ju=h({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),em="cw3m0n7",tm=h({defaultClassName:"cw3m0n0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{labelPosition:{end:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6va _1yep5z6vb _1yep5z6vc",start:"_1yep5z614o _1yep5z614p _1yep5z614q _1yep5z6160 _1yep5z6161 _1yep5z6162"}},defaultVariants:{},compoundVariants:[]}),om="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6l9",rm=h({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var UC=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:tm({labelPosition:n}),children:[jsx("div",{className:rm({isSelected:o,isFocusVisible:r,isDisabled:a}),children:o?jsx("div",{className:em}):null}),e?jsxs("div",{className:Qu,children:[jsx("span",{className:Kr({isDisabled:a}),children:e}),t?jsx("span",{className:Ju({isDisabled:a}),children:t}):null]}):null]}),am=({state:e,renderOption:t=UC,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(o.id),l=rt.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=useRadio({...s,isDisabled:p,children:o.label,value:o.id},e,l),{focusProps:d,isFocusVisible:f,isFocused:y}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),v=filterTruthyValues({"data-selected":m,"data-focused":y,"data-focus-visible":f,"data-hovered":b,"data-disabled":p,"data-pressed":u,"data-read-only":i});return jsxs("label",{...v,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,d),ref:l})}),t(o,{isFocusVisible:f,isSelected:m,isFocused:y,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var im=rt.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=useRadioGroupState(d),{radioGroupProps:b,labelProps:v,descriptionProps:_,errorMessageProps:g}=useRadioGroup({...d,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},y),z=ke({...d,descriptionProps:_,errorMessageProps:g,labelPosition:n}),R=filterTruthyValues({"data-orientation":d.orientation,"data-block-id":u,"data-block-class":m,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxs("div",{...mergeProps(b,R),className:classNames(Ae({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:f,children:[d.label||z?jsxs("div",{className:je({labelPosition:n,hasMessage:!!z}),children:[jsx("span",{...v,className:classNames(Oe,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&z]}):null,jsx("div",{className:classNames(om,{[Lt]:d.isDisabled},o),style:r,children:a.map(P=>jsx(am,{state:y,renderOption:i,item:P,...d,value:P.id},P.id))}),n==="top"&&z]})});im.displayName="RadioGroup";var sm=({id:e,defaultMessage:t,elementType:o=Fragment$1})=>{invariant(e||t,"`id` or `defaultMessage` is required.");let r=F();return jsx(o,{children:r.formatMessage(e)||t})};sm.displayName="MessageFormat";var lm=rt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:t,...s,ref:p,children:o})});lm.displayName="Group";var fi="UNSUPPORTED_IN_MENU";function dm(e){return useMemo(()=>rt.Children.toArray(e).map(t=>{let o=t,r=uniqueId("item"),a=Ko(o,Ne),n=cm(o),i,s;if(a){let v=Ko(a,Le);invariant(v),i=cm(v),s=Ko(a,we).props.children;}else n?i=n:i=o;let{onPress:p,label:l,"aria-label":c,iconStart:u,isDisabled:m,icon:d}=i.props,f=l||c||fi;invariant(typeof f=="string","ActionGroup children must have a string label");let y=`${r}-${f}`;return createElement(Item,{...{key:y,onPress:p,textValue:f,"aria-label":c,icon:u||d,dialogContent:s,isDisabled:m},key:y},o)}),[e])}function Ko(e,t){return t?flatMapDeep(rt.Children.toArray(e),r=>rt.isValidElement(r)&&r.props.children?[r,...rt.Children.toArray(r.props.children)]:[r]).find(r=>rt.isValidElement(r)&&r.type===t):void 0}function cm(e){return Ko(e,q)||Ko(e,E)}var um="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l4",mm={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var bi=rt.forwardRef(({className:e,style:t,children:o,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=F(),[u,m]=useState(),d=dm(o),f=useListState({...p,children:d}),y=te(l),b=useRef(null),[{visibleItems:v,isMeasuring:_},g]=Ha({visibleItems:f.collection.size,isMeasuring:!1}),z=useCallback(()=>{let T=k=>{if(b.current&&y.current){let I=[...b.current.children],D=y.current.getBoundingClientRect().width,H=k<f.collection.size,B=0,K=0;if(H){let A=I.pop();A&&(B+=gm(A,!1,!0));}for(let[A,G]of I.entries())if(B+=gm(G,A===0,A===I.length-1),Math.round(B)<=Math.round(D))K++;else break;return K}return k};g(function*(){yield {visibleItems:f.collection.size,isMeasuring:!0};let k=T(f.collection.size),I=k<f.collection.size&&k>0;yield {visibleItems:k,isMeasuring:I},I&&(yield {visibleItems:T(k),isMeasuring:!1});});},[g,y,f.collection.size]),R=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);Ga({ref:R,onResize:z}),xe(z,[f.collection,z]);let{toolbarProps:P}=useToolbar(p,y),C=[...f.collection],x=C.slice(0,v),S=C.slice(v).filter(T=>T.textValue!==fi),N=S.length>0;useEffect(()=>{m(void 0);},[S.length]),useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:w}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(P,w),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...t,flexBasis:_?"100%":void 0},ref:y,children:jsxs("div",{ref:b,className:um,children:[x.map(T=>T.rendered),N?jsxs(Fragment,{children:[!_&&i?jsx(L,{flexGrow:1}):null,jsx(Or,{placement:"bottom end",renderTrigger:({buttonProps:T,ref:k})=>jsx(E,{...T,size:"md",icon:MoreIcon,"aria-label":c(gP.more),variant:"toolbar",ref:k}),...r,disabledKeys:S.filter(T=>T.props?.isDisabled).map(T=>T.key),items:S.map(T=>{let k=T.textValue||T["aria-label"];return invariant(k,"ActionItem must have a label"),{id:T.key,label:k,icon:T.props.icon}}),onAction:T=>{let k=f.collection.getItem(T);invariant(k,"Item not found");let{onPress:I,dialogContent:D}=k.props;I?.(),m(D);}})]}):null]})}),jsx(Ie,{isOpen:!!u,onOpenChange:T=>{T||m(void 0);},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:1e5},children:u?rt.cloneElement(u,{inheritDrawer:!0}):null})})]})});bi.displayName="CollapsibleToolbar";function gm(e,t,o){let a=ie(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:vm(a.marginLeft))+(o?0:vm(a.marginRight))}function vm(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var gP=U({more:{id:"more",defaultMessage:"More"}});var gi=rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=rt.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(mm[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,p),children:i.children})});gi.displayName="WrappedToolbar";var va=rt.forwardRef((e,t)=>{let o=e.isCollapsible?bi:gi;return jsx(o,{...e,ref:t})});va.displayName="Toolbar";var zm=h({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),hm=h({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z610z"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61t3 _1yep5z61t2 _1yep5z61t0 _1yep5z61pj _1yep5z61mr"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6g3"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61t3 _1yep5z61t2 _1yep5z61p9 _1yep5z61t0"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61t1 _1yep5z61t0 _1yep5z61pa _1yep5z61ms"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61t0 _1yep5z61t2 _1yep5z61p9 _1yep5z61t3"]]}),xm=h({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617b _1yep5z617a _1yep5z613h _1yep5z6178"},isSelected:{true:"_1yep5z610y"},isDisabled:{true:"z9nup83 _1yep5z610z"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61mq"]]}),Cm=h({defaultClassName:"_1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617b _1yep5z617a _1yep5z613h _1yep5z6178"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z610z"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61nn"],[{isSelected:!0,isDisabled:!1},"_1yep5z61nn _1yep5z61mu"],[{isSelected:!0,isDisabled:!0},"_1yep5z61nn _1yep5z61mr"]]}),Pm=h({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6le _1yep5z6lf _1yep5z6l9 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z6111"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61mt"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61mr"],[{isSelected:!1,isHovered:!0},"_1yep5z61nn"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61t3 _1yep5z61t2 _1yep5z61p9 _1yep5z61t0"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61t1 _1yep5z61t0 _1yep5z61pa"]]});var NP={xxs:8,xs:12,sm:16,md:20,lg:24},ge=rt.forwardRef((e,t)=>{let o=te(t),{tooltipProps:r}=zr(e,o);return r?jsx(oe,{...r,children:jsx(vi,{...e,ref:t})}):jsx(vi,{...e,ref:t})});ge.displayName="ToggleIconButton";var vi=rt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:u,ref:m,isFocusVisible:d,isFocused:f,isHovered:y,uiStateOptions:b}=xr(s,l),v=useMemo(()=>typeof o=="function"?o:l.isSelected?o.selected:o.unselected,[o,l.isSelected]),_={isSelected:l.isSelected,isHovered:y,isFocusVisible:d,isDisabled:!!s.isDisabled},g=filterTruthyValues({"data-hovered":y,"data-selected":l.isSelected,"data-focus-visible":d,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":f,"data-pressed":u});return jsx("button",{...mergeProps(c,g),className:classNames(a==="toolbar"&&Pm(_),a==="primary"&&hm(_),a==="secondary"&&xm(_),a==="tertiary"&&Cm(_),zm({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof t=="function"?t(b):t,ref:M(m,p),children:jsx(v,{size:NP[r]})})});vi.displayName="ToggleIconButtonCore";var Im="f6jv6bm",wm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jh _1yep5z6ji _1yep5z6jj",to="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Rm=h({defaultClassName:"f6jv6b0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6g1",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6vd _1yep5z6ve _1yep5z6vf _1yep5z6150 _1yep5z6151 _1yep5z6152",false:"_1yep5z614l _1yep5z614m _1yep5z614n"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61i5 _1yep5z61i6 _1yep5z61i7 _1yep5z61it _1yep5z61iu _1yep5z61iv _1yep5z61jh _1yep5z61ji _1yep5z61jj _1yep5z61k5 _1yep5z61k6 _1yep5z61k7 _1yep5z61ta _1yep5z61t8 _1yep5z61oj"]]}),_a=h({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6lf",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),Sm="f6jv6bj _1yep5z6wg _1yep5z6wh _1yep5z6wi _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi",Tm="f6jv6bk";var Nm="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6ln _1yep5z6li _1yep5z6lg _1yep5z6hp _1yep5z6eu",Lm=h({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lf _1yep5z6kz _1yep5z6l2 _1yep5z6le",variantClassNames:{isHovered:{true:"_1yep5z611v"},isDisabled:{true:"_1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),Mm="f6jv6bi _1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1 _1yep5z6lh _1yep5z6lg _1yep5z6hs _1yep5z6lk",Em="_1yep5z6jn _1yep5z6jo _1yep5z6jp",Dm="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu _1yep5z6e3 _1yep5z6lc",Bm=h({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jt _1yep5z6ju _1yep5z6jv",variantClassNames:{isInline:{true:"_1yep5z6pg _1yep5z6ph _1yep5z6pi _1yep5z617i _1yep5z617g _1yep5z612r",false:"_1yep5z6pj _1yep5z6pk _1yep5z6pl _1yep5z6wv _1yep5z6ww _1yep5z6wx _1yep5z6xj _1yep5z6xk _1yep5z6xl _1yep5z6y7 _1yep5z6y8 _1yep5z6y9 _1yep5z6yv _1yep5z6yw _1yep5z6yx"}},defaultVariants:{},compoundVariants:[]}),Fm="f6jv6bl",Hm="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu",za=h({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),ha="f6jv6b9 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Wo="f6jv6bo";var Om=[["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:Xo}}=layoutSprinkleValues,jm=({isOpen:e,onClose:t})=>{let{formatMessage:o}=F(),r=useId();return jsx(Ie,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(me,{"aria-labelledby":r,className:Sm,drawerBackground:"subtle",children:[jsxs(L,{paddingLeft:Xo.padding.horizontal.lg,paddingRight:Xo.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:Tm,children:[jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:o(Yo.help)}),jsx(E,{icon:XIcon,size:"md",variant:"secondary","aria-label":o(Yo.close),onPress:t})]}),jsx(j,{className:Fm}),jsxs(L,{paddingX:Xo.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Xo.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(Yo.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(Yo.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Om.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Xo.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:o(Yo[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==Om.length-1&&jsx(j,{})]},a))})]})]})})})},Yo=U({toolbarFocus:{id:"toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"help",defaultMessage:"Help"},close:{id:"close",defaultMessage:"Close"},action:{id:"action",defaultMessage:"Action"},shortcut:{id:"shortcut",defaultMessage:"Shortcut"},bold:{id:"bold",defaultMessage:"Bold"},italic:{id:"italic",defaultMessage:"Italic"},underline:{id:"underline",defaultMessage:"Underline"},selectAll:{id:"selectAll",defaultMessage:"Select All"},cut:{id:"cut",defaultMessage:"Cut"},copy:{id:"copy",defaultMessage:"Copy"},paste:{id:"paste",defaultMessage:"Paste"},undo:{id:"undo",defaultMessage:"Undo"},redo:{id:"redo",defaultMessage:"Redo"},openHelpDialog:{id:"openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"submit",defaultMessage:"Submit"}});var xa=rt.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:u,saveOnEnter:m,onSave:d},f)=>{let y=rt.useRef(null),[b,v]=useControlledState(e,t||"",o),_=useCallback(w=>{v(w.currentTarget.value||"");},[v]),g=useCallback(w=>{(m&&w.key==="Enter"&&!w.shiftKey||(w.ctrlKey||w.metaKey)&&w.key==="Enter")&&(w.preventDefault(),d());},[m,d]);useImperativeHandle(f,()=>({clear:()=>{v("");}}));let z=useCallback(w=>{w.currentTarget.style.height="16px",w.currentTarget.style.height=w.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let w=y.current;w&&(w.style.height="16px",w.style.height=w.scrollHeight+"px");},[s],[b]),useImperativeHandle(c,()=>({setCaretPosition:w=>{y.current&&(y.current.focus(),y.current.setSelectionRange(w,w));},focus:()=>{y.current&&y.current.focus();}}));let{focusProps:R,isFocused:P,isFocusVisible:C}=useFocusRing(),{hoverProps:x,isHovered:S}=useHover({}),N=filterTruthyValues({"data-focus-visible":C,"data-hovered":S,"data-focused":P});return jsx("textarea",{...mergeProps(R,x,N),ref:M(y,n),className:classNames(s?Dm:[_a(),za({isInline:i}),Hm]),autoFocus:u,onChange:_,disabled:p,onInput:z,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:g})});xa.displayName="PlainEditor";var Jo="mention",Ca="mention_input",Jm=rt.forwardRef(({onCancel:e,editor:t,element:o,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ka),p=useSelected(),[l,c]=useState(""),{contains:u}=useFilter({sensitivity:"base"}),{formatMessage:m}=F(),d=useMemo(()=>{let I=i.filter(D=>l===""||u(D.displayName,l)).map(D=>({id:D.id,label:D.displayName,data:D}));return s?take(I,s):I},[i,s,l,u]),f=useCallback(I=>jsx(Item,{children:I.label},I.id),[]),y=useCallback((I=!1)=>{let D=findNodePath(t,o);D&&(removeNodes(t,{at:D}),I&&focusEditor(t));},[t,o]),b=useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:I=>{y(!0),r?.(I);}}),v=rt.useRef(null),_=rt.useRef(null),g=rt.useRef(null),z=rt.useRef(null),R=useHTMLInputCursorState(_);useInteractOutside({ref:z,onInteractOutside:()=>{b.close();}});let{inputProps:P,listBoxProps:C}=useComboBox({defaultItems:d,inputRef:_,buttonRef:v,listBoxRef:g,popoverRef:z,menuTrigger:"focus","aria-label":m(uk.mention)},b);useEffect(()=>{_.current?.focus();},[]);let x=useCallback((I="manual",D=!1)=>{y(D),e?.(I,b.inputValue);},[e,y,b.inputValue]),S=useRef(p);useEffect(()=>{S.current&&!p&&x("deselect"),S.current=p;},[p,x]);let N=R?.atStart??!1,w=R?.atEnd??!1,T=useCallback(I=>{I.key==="Backspace"&&N?x("backspace",!0):I.key==="Escape"?x("escape",!0):I.key==="ArrowLeft"&&N?x("arrowLeft",!0):I.key==="ArrowRight"&&w&&x("arrowRight",!0);let D=Hotkeys.isUndo(I)&&t.history.undos.length>0,H=Hotkeys.isRedo(I)&&t.history.redos.length>0;(D||H)&&(I.preventDefault(),t[D?"undo":"redo"](),focusEditor(t));},[N,w,x,t]),k=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let I=ie(_.current),D=_.current?I?.getComputedStyle(_.current).font:void 0;return {width:D?getTextDimensions({text:b.inputValue,font:D}).width+10:"4ch"}}},[b.inputValue]);return jsxs(at.Provider,{value:b,children:[jsx("input",{...mergeProps(P,{onKeyDown:T,onBlur:()=>{x("blur",!0);},onChange:I=>{c(I.target.value);}}),style:k,className:Nm,ref:M(a,_)}),jsx(be,{triggerRef:n,className:Mm,isNonModal:!0,ref:z,state:b,children:jsx(pe,{...C,items:void 0,autoFocus:"first",ref:g,className:sprinkles({width:"full"}),renderOption:tf})})]})});Jm.displayName="MentionInputContentElement";var Ci=withRef(({className:e,...t},o)=>{let{children:r,editor:a,element:n}=t,{items:i}=useContext(ka),s=useRef(null),[p,l]=useState(null);useEffect(()=>{let m=findNodePath(a,n);if(!m)return;let d=getPointBefore(a,m);if(!d)return;let f=createPointRef(a,d);return l(f),()=>{f.unref();}},[a,n]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),fo()&&m&&focusEditor(a);},[a]),u=useCallback(m=>{if(!m)return;let d=s.current?.getRootNode()instanceof ShadowRoot,f=i.find(b=>b.id===m);invariant(f,"User not found");let y={type:Jo,value:f.id,displayName:f.displayName,children:[{text:""}]};insertNodes(a,[y,{text:" "}]),d?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(Jm,{onCancel:(m,d)=>{m!=="backspace"&&insertText(a,"@"+d,{at:p?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:u,ref:s,element:n,editor:a}),r]})});Ci.displayName="MentionInputElement";var Pi=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]})});Pi.displayName="MentionElement";var ef=(e,{options:{trigger:t,triggerPreviousCharPattern:o,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===t;return e.insertText=i=>{if(!e.selection||!n(i)||r&&!r(e)){a(i);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(o?.test(s)){Pa(e);return}a(i);},e},uk=U({mention:{defaultMessage:"Mention",id:"mention"}});function rf({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("p",{children:t})})}function Rk(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}function Sk(e){return "text"in e}function Tk(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function er(e){if(!e)return "";function t(o){if(Sk(o)){let a=Tk(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="${Rk(filterTruthyValues({color:o.color||void 0,backgroundColor:o.backgroundColor||void 0}))}">${a}</span>`),a}let r=o.children?.map(er).join("");switch(o.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${o.url}">${r}</a>`;case Jo: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 Nk(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(t=>t.split(":").map(o=>o.trim())).map(([t,o])=>[camelCase(t),o]))):{}}function Si(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let t=new DOMParser().parseFromString(af.default.sanitize(e),"text/html"),o=t.querySelectorAll("[style]");for(let a of o)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=t.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
|
|
53
|
+
`:"<p>";return sf(t.body)}function sf(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=Nk(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=>sf(a,o));switch(r.length===0&&r.push(jsx$1("text",o,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",t,`
|
|
54
|
+
`);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:Jo,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 lf(e){let t=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[o]=t||[{url:""}];return o?.url}function Pa(e){let t={children:[{text:" "}],type:Ca};e.insertNode(t);}var Lk=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:Jo,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:Ca}],withOverrides:ef}),pf=createPlugins([createParagraphPlugin({component:rf}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:cf}),Lk({component:Pi})],{components:{[Ca]:Ci}});var ff=({isDisabled:e})=>{let{formatMessage:t}=F(),o=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:jsx(E,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(ut.addLink),className:to,preventFocusOnPress:!0})}),jsx(we,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(me,{size:"content",style:{minWidth:240},children:jsx(Ok,{close:()=>{r(),setTimeout(()=>{focusEditor(o,o.selection);},0);}})})})]})},Ok=({close:e})=>{let t=useEditorRef(),{formatMessage:o}=F(),r=useEditorSelector(l=>lf(l),[]),[a,n]=rt.useState(r?"show":"add"),[i,s]=rt.useState(r||""),p=jsx(L,{padding:"lg",children:jsx(Ge,{label:o(ut.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(L,{display:"flex",justifyContent:"flex-end",padding:"lg",className:Im,children:jsx(q,{isDisabled:!isUrl(i,!0),label:o(ut.addLink),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(L,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(q,{label:o(ut.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(q,{label:o(ut.removeLink),size:"sm",onPress:()=>{unwrapLink(t),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(q,{label:o(ut.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(q,{label:o(ut.save),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function cf({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("a",{className:jr({size:"sm"}),children:t})})}var ut=U({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 Ak=parseColor("#ffffff00").toString("hexa"),Ti=[{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"}];[...Ti,{label:"Transparent",color:Ak}];var wa=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(ge,{variant:"tertiary",isSelected:a,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},Li=({nodeType:e,"aria-label":t,isDisabled:o})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:p,triggerProps:l})=>jsx(E,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":t,size:"md",variant:"popover",isDisabled:o,className:to,preventFocusOnPress:!0,...l,ref:p}),[e,t,o]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Zt,{presets:Ti,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:o})};var v0=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ka=rt.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Di=rt.forwardRef(({value:e,defaultValue:t,onChange:o,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:u,editorHandle:m,maxMentionableUsersSuggestions:d,autoFocus:f,editorRef:y,saveOnEnter:b,onSave:v},_)=>{let g=useRef(null),z=useId(),{formatMessage:R}=F(),P=useRef(null),C=P.current,x=useRef(null),S=useMemo(()=>C?.getRootNode()instanceof ShadowRoot,[C]),[N,w]=useControlledState(e?Si(e):void 0,Si(t||"<p></p>"),I=>{o&&o(er(I));}),{keyboardProps:T}=useKeyboard({onKeyDown:I=>{(b&&I.key==="Enter"&&!I.shiftKey||(I.ctrlKey||I.metaKey)&&I.key==="Enter")&&(I.preventDefault(),v()),I.altKey&&I.key==="F10"?(I.preventDefault(),g.current&&g.current.querySelector("button")?.focus()):I.continuePropagation(),fo()&&S&&x.current&&focusEditor(x.current);}});useEffect(()=>{s&&x.current&&deselect(x.current);},[s]),useImperativeHandle(_,()=>({startMention:()=>{x.current&&!P.current?.querySelector("input[role='combobox']")&&Pa(x.current);}})),useImperativeHandle(m,()=>({setCaretPosition:I=>{x.current&&(focusEditor(x.current),moveSelection(x.current,{distance:I,unit:"character"}));},focus:()=>{x.current&&focusEditor(x.current);}}));let k=useMemo(()=>({items:u||[],containerRef:l,maxMentionableUsersSuggestions:d}),[u,l,d]);return jsx(ka.Provider,{value:k,children:jsxs(Plate,{initialValue:N||v0,plugins:pf,editorRef:M(x,y||null),onChange:I=>{w(I);},children:[jsxs(va,{className:ha,"aria-controls":z,ref:g,children:[jsxs(L,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(wa,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:R(no.bold),isDisabled:s}),jsx(wa,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:R(no.italic),isDisabled:s}),jsx(wa,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:R(no.underline),isDisabled:s})]}),jsx(j,{orientation:"vertical",className:Wo}),jsx(Li,{nodeType:MARK_COLOR,"aria-label":R(no.fontColor),isDisabled:s}),jsx(j,{orientation:"vertical",className:Wo}),jsx(Li,{nodeType:MARK_BG_COLOR,"aria-label":R(no.backgroundColor),isDisabled:s}),jsx(j,{orientation:"vertical",className:Wo}),jsx(ff,{isDisabled:s}),jsx(j,{orientation:"vertical",className:Wo}),jsx(E,{className:to,icon:QuestionmarkCircleIcon,size:"sm","aria-label":R(no.help),onPress:c})]}),jsx(j,{variant:"secondary"}),jsx("div",{...T,ref:P,children:jsx(PlateContent,{id:z,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:f,spellCheck:a,"aria-label":p,className:classNames(_a({isDisabled:s}),za({isInline:i})),renderPlaceholder:({attributes:I,children:D})=>jsx("span",{...I,className:sprinkles({paddingY:"lg"}),children:D})})})]})})});Di.displayName="RichEditor";var tf=({key:e,value:t},{isDisabled:o,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:o}),{label:p,data:l}=t;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:Lm({isDisabled:o,isHovered:a}),"data-active":a,ref:i,children:[jsx(Wt,{name:p,...l?.avatar}),jsxs(L,{display:"flex",flexDirection:"column",children:[jsx(Q,{type:"subtitle",size:"sm",children:p}),jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(j,{})]})},no=U({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 zf=rt.memo(rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":u,"aria-describedby":m,"aria-labelledby":d,"aria-details":f,editableContentAriaLabel:y="Editing Area",footerButtons:b,clearOnCancel:v,clearOnSave:_,...g},z)=>{let R=useRef(null),{formatMessage:P}=F(),C=useRef(null),x=useRef(null),S=useRef(null),N=!a&&g.variant==="minimal",w=useRef(null),[T,k]=rt.useState(g.value||g.defaultValue),I=g.isDisabled||g.isSaveDisabled||!getPlainText(T||""),{fieldProps:D}=useLabel({"aria-label":u,"aria-labelledby":d,"aria-describedby":m,"aria-details":f,labelElementType:"div"});N&&!g.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let H=useCallback(()=>{k(""),a?R.current?.reset():x.current?.clear();},[a]),B=useCallback(()=>{I||(i?.(a?er(R.current?.children):C.current.value),_&&H());},[H,_,a,i,I]),K=jsx(E,{variant:"ghost","aria-label":l||P(Fi.save),icon:p,isDisabled:I,size:"md",excludeFromTabOrder:N,className:N?Em:void 0,onPress:B,preventFocusOnPress:!0}),[A,G]=rt.useState(!1),{keyboardProps:O}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),G(!0));}}),re=useCallback(V=>{k(V),g.onChange?.(V);},[g]);return jsxs("div",{...mergeProps(D,a?O:{}),role:"application",ref:M(S,z),style:t,"data-block-id":o,"data-block-class":r,className:classNames(Rm({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx(Wt,{className:wm,name:g.avatarName||""}):null,jsxs("div",{className:Bm({isInline:s}),children:[jsx(xa,{isMinimal:N,textBoxRef:C,isInline:s,editableContentAriaLabel:y,...g,onChange:re,onSave:B}),K]})]}):jsxs(Fragment,{children:[a?jsx(Di,{containerRef:S,ref:w,editorRef:R,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{G(!0);},...g,onChange:re,onSave:B}):jsxs(Fragment,{children:[!s&&jsx(j,{variant:"secondary"}),jsx(xa,{onCancel:n,textBoxRef:C,ref:x,isInline:s,editableContentAriaLabel:y,...g,onChange:V=>{k(V),g.onChange?.(V);},onSave:B})]}),jsx(j,{variant:"secondary"}),jsxs("div",{className:classNames(ha,sprinkles({justifyContent:"space-between"})),children:[jsxs(L,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&g.mentionableUsers?jsx(E,{icon:AtIcon,size:"sm","aria-label":P(Fi.mention),onPress:()=>w.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:Z},X)=>V==="action"?jsx(E,{...Z,size:"sm",isDisabled:g.isDisabled||Z.isDisabled},X):jsx(ge,{...Z,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||Z.isDisabled},X))]}),jsxs(L,{children:[!!n&&jsx(E,{variant:"secondary",icon:XCircleFilledIcon$1,isDisabled:g.isDisabled,size:"md",onPress:()=>{n(),v&&H();},"aria-label":c||P(Fi.cancel)}),K]})]})]}),jsx(jm,{isOpen:A,onClose:()=>{G(!1);}})]})}));zf.displayName="Editor";var Fi=U({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var Sa=rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),u=animated[s];return c((m,d)=>d&&jsx(u,{className:e,"data-block-id":o,"data-block-class":r,style:{...t,...m},...p,ref:l,children:n}))});Sa.displayName="Transition";var hf="_8kqf970 _1yep5z6pd _1yep5z6pe _1yep5z6pf _1yep5z6149 _1yep5z614a _1yep5z614b _1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6150 _1yep5z6151 _1yep5z6152 _1yep5z6yy _1yep5z6v7 _1yep5z6v8 _1yep5z6v9 _1yep5z6176";var Cf=2,Pf=rt.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=rt.useRef(null),u=useInteractionModality(),[m,d]=rt.useState(!1),f=useCallback(()=>{let N=r?.current||ue(c.current).body;return ie(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+Cf>=0:N.scrollTop+N.clientHeight+Cf>=N.scrollHeight},[r]),[y,b]=rt.useState(f),v=Tt(),{buttonProps:_,isPressed:g}=useButton({onPress:()=>{let N=r?.current||ue(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:z,isFocused:R,isFocusVisible:P}=useFocusRing(),{hoverProps:C,isHovered:x}=useHover({}),S=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":g,"data-focus-visible":P,"data-hovered":x,"data-focused":R});return useEffect(()=>{b(f());},[f]),useEffect(()=>{let N=r?.current||ue(c.current).body,w="onscrollend"in ie(N),T=()=>{setTimeout(()=>{d(!1),b(f());},n);},k=()=>{d(!0),w||T();};return N.addEventListener("scroll",k),N.addEventListener("scrollend",T),()=>{N.removeEventListener("scroll",k),N.removeEventListener("scrollend",T);}},[r,n,f]),jsxs(Sa,{isMounted:(o?u!=="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:v},...mergeProps(_,z,C,S),className:classNames(hf,Gr({isFocusVisible:P,variant:"high-contrast",isHovered:x}),Wr({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:t,ref:M(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:So({variant:"high-contrast"})}),a]})});Pf.displayName="ScrollControlButton";var Vi="_1yep5z6jt _1yep5z6ju _1yep5z6jv _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",kf=h({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6lv _1yep5z6lw _1yep5z6lx _1yep5z6od _1yep5z6oe _1yep5z6of"},hasNoCloseBtn:{true:"_1yep5z6m1 _1yep5z6m2 _1yep5z6m3 _1yep5z6od _1yep5z6oe _1yep5z6of _1yep5z6pj _1yep5z6pk _1yep5z6pl _1yep5z6n7 _1yep5z6n8 _1yep5z6n9"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61h5 _1yep5z61h6 _1yep5z61h7"]]}),If="_1v0p2z10";var Na=rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:u=!0,onPrimaryAction:m,onCancel:d,autoFocusButton:f,isPrimaryActionDisabled:y},b)=>{let v=useId(),{formatMessage:_}=F(),g=n&&jsx(Q,{id:v,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(me,{className:e,style:t,"data-block-id":o,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":v,children:[jsxs("div",{className:kf({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!u}),children:[jsxs(L,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&g,u?jsx(E,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(K0.close),onPress:d}):null]}),l?g:null]}),a?jsx(L,{elementType:"section",className:If,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(L,{paddingX:"lg",paddingBottom:"lg",children:jsx(Ge,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(j,{}),jsxs(L,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(q,{variant:"secondary",className:Vi,label:s,onPress:d,autoFocus:f==="cancel"}):null,i?jsx(q,{className:Vi,label:i,onPress:m,autoFocus:f==="primary",isDisabled:y}):null]})]}):null]})});Na.displayName="AlertDialog";var K0=U({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var wf="_1t55bp71",Rf="_1yep5z6e3 _1yep5z6eu _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69i _1yep5z69j _1yep5z69k",Sf="_1t55bp70";var Q0=Z0(),Tf=rt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=o;return (!o||Array.isArray(o)&&o.length===0)&&(p=""),Q0.render(p)},[o]);return jsx("div",{className:classNames(Rf,Sf,{[wf]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:t,ref:i,dangerouslySetInnerHTML:{__html:s}})});Tf.displayName="Markdown";function Ef(e){let{formatMessage:t,locale:o}=F(),[r,a]=rt.useState(!1),[n,i]=rt.useState(0),[s,p]=rt.useState(0),[l,c]=rt.useState(!1);useEffect(()=>{if(!e.current)return;let d=e.current,f=()=>{a(!1),i(0);},y=()=>{l||i(d.currentTime*100/d.duration);},b=()=>{p(d.duration);};return d.addEventListener("ended",f),d.addEventListener("timeupdate",y),d.addEventListener("loadedmetadata",b),()=>{d.removeEventListener("ended",f),d.removeEventListener("timeupdate",y),d.removeEventListener("loadedmetadata",b);}},[l,e]);let u=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(t(Lf.playing),"polite")):(e.current.pause(),a(!1),announce(t(Lf.paused),"polite"))))();},[t,e]),m=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(tI(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:u,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?Mf(e.current?.currentTime):"00:00",formattedDuration:s?Mf(s):"00:00",setIsSliderDragging:c}}var Lf=U({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function tI(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 Mf(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 Df="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q",Bf="rta2n91 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6zq _1yep5z6va _1yep5z6vb _1yep5z6vc _1yep5z6174 _1yep5z610n",Ff="rta2n90";var Of=rt.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=rt.useRef(null),{isPlaying:l,progress:c,duration:u,togglePlay:m,seek:d,formattedDuration:f,formattedCurrentTime:y,setProgress:b,setIsSliderDragging:v}=Ef(p),{formatMessage:_}=F(),g=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":u>0});return jsxs("div",{...g,...i,className:classNames(Df,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:z,type:R})=>jsx("source",{src:z,type:R},z))})}),jsx(ge,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:o,"aria-label":_(l?ji.pause:ji.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:Bf,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(Ft,{"aria-label":_(ji.audioTimeline),value:c,minValue:0,maxValue:100,className:Ff,onChange:z=>{b(z),v(!0);},onChangeEnd:z=>{d(z),v(!1);}}),jsx("span",{"aria-hidden":!0,children:f})]})]})});Of.displayName="AudioPlayer";var ji=U({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var jf="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7",Af="_1w920rn1 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k",$f="_1w920rn0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l3",Ma=h({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",variantClassNames:{isFocusVisible:{true:"_1yep5z6li _1yep5z6lg _1yep5z6hp"},isSelected:{true:"_1yep5z6li _1yep5z6lg _1yep5z6hp"},isLoading:{true:"_1yep5z615u _1yep5z615v _1yep5z615w"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn6 _1yep5z6li _1yep5z6lg _1yep5z6hp"]]}),Uf="_1w920rnb _1yep5z6ld",qf=h({defaultClassName:"_1w920rn7 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6g5 _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6li _1yep5z6lg _1yep5z6hp"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rna _1yep5z61t1 _1yep5z61t0 _1yep5z61pa"]]}),Kf="_1w920rnc";var Ea=({items:e,ulRef:t,containerClassName:o,previewClassName:r,itemDataAttribute:a,showCount:n=!1})=>{let{length:i}=e,s=rt.useRef(null);return useLayoutEffect(()=>{if(!s.current)return;let p=s.current.closest(o)?.querySelector(`[${a}='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(p,"Node is not defined."),s.current?.prepend(p);},[e,t,o,a]),jsx("div",{className:r,ref:s,children:n&&i>1?jsx(L,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:Kf,children:i}):null})};function Wf(e,t){return e.find(o=>o.id===t)}function Xf(e,t,o){let r=e.findIndex(i=>i.id===t),a=[...o].map(i=>e.findIndex(s=>s.id===i)),n=[...e];for(let i of a){let[s]=n.splice(i,1);n.splice(r,0,s);}return n}function Yf(e,t,o){let r=e.findIndex(s=>s.id===t),a=[...o].map(s=>e.findIndex(p=>p.id===s)),n=[...e],i=0;for(let s of a){let[p]=n.splice(s-i,1);n.splice(r,0,p),i++;}return n}function Ai(e){return e.map(t=>({id:t.id,label:t.label,data:{src:t.src,alt:t.alt}}))}function Da(e){return e.map(t=>({id:t.id,label:t.label,src:t.data?.src,alt:t.data?.alt}))}var gI=({fit:e,item:t,deleteElement:o})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:n,isLoaded:i}=St({src:t.data?.src,alt:t.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(qt,{"aria-label":r(rr.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Uf,children:o}))},Zf=({item:e,options:{optionProps:t,isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i},liRef:s,fit:p="contain",onDelete:l,className:c,imageClassName:u,imageLabelClassName:m,imageDimensions:d,style:f,renderImage:y=(b,{deleteElement:v})=>jsx(gI,{item:b,deleteElement:v,fit:p})})=>{let b=useId(),{formatMessage:v}=F(),{value:_}=e;invariant(_&&ht(_),"Expected value to be a list option");let g=l?jsx("div",{className:jf,children:jsx(E,{"aria-label":v(rr.delete),size:"xs",icon:XIcon$2,onPress:()=>{l(_.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,z=Da([_])[0],R=useCallback(C=>{let x={},S=typeof C=="function"?C(z,{isSelected:r}):C;return S&&(x.width=typeof S.width=="string"?Ui[S.width]:S.width,x.aspectRatio="height"in S?`${x.width} / ${S.height}`:S?.aspectRatio?.toString()),x},[z,r]),P=useMemo(()=>({isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i}),[o,r,a,n,i]);return jsxs("li",{...t,ref:s,className:classNames(Af,Ct(c,z,P)),"aria-labelledby":b,style:mr(f,z,P),children:[jsx(L,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(Ma({isFocusVisible:o,isSelected:r,isLoading:!0}),Ct(u,z,P)),style:R(d),"data-image-key":_.id,children:y(_,{deleteElement:g??void 0,onDelete:l})})}),jsx("span",{id:b,className:classNames(qf({isFocusVisible:o,isSelected:r}),Ct(m,z,P)),children:_.label})]})};var CI={width:0,display:"block"};var Ui=(o=>(o[o.sm=102]="sm",o[o.md=170]="md",o))(Ui||{}),ey=rt.forwardRef(({className:e,style:t,fit:o="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:u,imageContainerClassName:m,imageClassName:d,labelClassName:f,onListChange:y,renderImage:b,imageDimensions:v={width:s,aspectRatio:p},imageContainerStyle:_,...g},z)=>{let R=rt.useRef(null),[P,C]=useState([]),{formatMessage:x}=F();useEffect(()=>{(p||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,p]);let[S,N]=useControlledState(g.selectedKeys,g.defaultSelectedKeys??[],g.onSelectionChange),[w,T]=useControlledState(l?Ai(l):void 0,Ai(c),y?B=>{y?.(Da(B));}:void 0),k=useCallback(B=>{let K=B.target.key,A=B.keys;if(B.target.dropPosition==="before"){let G=Xf(w,K,A);T(G);}else if(B.target.dropPosition==="after"){let G=Yf(w,K,A);T(G);}r?.(B);},[w,r,T]),I=useCallback(()=>{i&&P.length&&(T(w.filter(B=>!P.includes(B.id))),i(new Set(P)),C([]));},[P,w,i,T]),D=useCallback((B,K,A)=>jsx(Zf,{item:B,options:K,liRef:A,fit:o,onDelete:i?G=>{C([G]);}:void 0,renderImage:b,className:m,imageClassName:d,imageLabelClassName:f,imageDimensions:v,style:_}),[o,i,b,m,d,f,v,_]),{keyboardProps:H}=useKeyboard({onKeyDown(B){if(u?.(B),B.key==="Backspace"||B.key==="Delete"){if(!i)return;if([...S].length)C([...S]);else {let A=B.target.dataset.key;C([A]);}}}});return jsxs("div",{...H,ref:z,style:t,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(pe,{...g,selectedKeys:S,items:w,onReorder:k,layout:"grid",orientation:"vertical",className:$f,ref:R,dropIndicatorStyle:CI,renderOption:D,renderDragPreview:B=>jsx(Ea,{items:B,ulRef:R,containerClassName:".BaselineUI-ImageGallery",previewClassName:Ma(),itemDataAttribute:"data-image-key",showCount:!0}),onSelectionChange:N,getItems:B=>[...B].map(K=>{let A=Wf(w,K);return {src:A?.src||"",alt:A?.alt||"",key:K}})}),jsx(Ie,{isOpen:!![...P].length,onOpenChange:B=>{B||C([]);},children:jsx(Ee,{isDismissable:!0,children:jsx(Na,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:x(rr.delete),cancelLabel:x(rr.cancel),onCancel:()=>{C([]);},onPrimaryAction:I,autoFocusButton:"cancel"})})})]})});ey.displayName="ImageGallery";var rr=U({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var ty="_1sexph00",oy="_1sexph01 _1yep5z617n _1yep5z617o _1yep5z617p _1yep5z619z _1yep5z61a0 _1yep5z61a1 _1yep5z61b5 _1yep5z61b6 _1yep5z61b7 _1yep5z618t _1yep5z618u _1yep5z618v _1yep5z61rj _1yep5z61rk _1yep5z61rl";var ny=rt.forwardRef(({className:e,style:t,items:o,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:u,defaultSelected:m,onButtonSelectionChange:d,moreAriaLabel:f,optionStyle:y,optionClassName:b,triggerClassName:v,triggerStyle:_,tooltipProps:g,...z},R)=>{let{formatMessage:P}=F(),C=ae(),x=useSelectState({items:o,...z,defaultSelectedKey:z.defaultSelectedKey||o?.[0]?.id,children:C,validationState:z.validationState==="error"?"invalid":"valid"}),[S,N]=useControlledState(u,!!m,O=>{d?.({isSelected:O,selectedKey:x.selectedKey});}),{hoverProps:w,isHovered:T}=useHover({isDisabled:s}),k=useMemo(()=>{let O=x.collection.getItem(x.selectedKey),re=O?.textValue||O?.["aria-label"],V=O?.value,Z=V?.icon,X={size:i,isSelected:S,onPress:Ce=>{N(!S),c?.(Ce);},isDisabled:s,excludeFromTabOrder:l,className:typeof b=="function"?b(V,{isButton:!0,isSelected:S}):b,style:typeof y=="function"?y(V,{isButton:!0,isSelected:S}):y};return n&&Z?jsx(oe,{variant:"inverse",size:"sm",includeArrow:!1,text:re,placement:"bottom start",offset:4,...typeof g=="function"?g("button"):g,children:jsx(ge,{icon:Z,"aria-label":re,variant:"toolbar",...X})}):jsx(qr,{iconStart:Z,label:re,variant:"toolbar",...X})},[l,n,S,s,c,b,y,N,i,x.collection,x.selectedKey,g]),I=z["aria-label"],D=useCallback(({buttonProps:O,ref:re})=>{delete O["aria-labelledby"];let V=f||`${P(LI.more)} ${I}`;return jsx(oe,{variant:"inverse",size:"sm",includeArrow:!1,text:V,placement:"bottom start",offset:4,...g,children:jsx(PressResponder,{...O,children:jsx(E,{"aria-label":V,ref:re,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:Z})=>classNames(Ur({isSelected:S,isFocusVisible:Z}),oy,v),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[I,l,P,S,s,f,i,g,v,_]),H=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":T,"data-selected":S,"data-disabled":s,"data-expanded":x.isOpen}),B=te(R),K=useMemo(()=>({state:x,popoverAnchorRef:B}),[x,B]),A=useCallback(O=>typeof b=="function"?b(O,{isButton:!1,isSelected:x.selectionManager.isSelected(O.id)}):b,[b,x.selectionManager]),G=useCallback(O=>typeof y=="function"?y(O,{isButton:!1,isSelected:x.selectionManager.isSelected(O.id)}):y,[y,x.selectionManager]);return jsx(Yr.Provider,{value:K,children:jsxs(L,{...w,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(ty,"BaselineUI-ButtonSelect",e),"aria-label":z["aria-label"],"aria-labelledby":z["aria-labelledby"],"aria-describedby":z["aria-describedby"],"aria-details":z["aria-details"],style:t,ref:B,...H,children:[k,jsx(Ye,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:o,...z,style:{width:20},optionClassName:A,optionStyle:G,variant:"ghost",renderTrigger:D})]})})});ny.displayName="ButtonSelect";var LI=U({more:{id:"more",defaultMessage:"More"}});var iy=h({defaultClassName:"_18v88n10 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6lc",variantClassNames:{labelPosition:{top:"_1yep5z614l _1yep5z614m _1yep5z614n",start:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),sy=h({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6lc _1yep5z6ln _1yep5z6lf _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z610q"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),ly=h({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6l9",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6106",warning:"_1yep5z610e"},isReadOnly:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]}),py=h({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6lq _1yep5z6lo _1yep5z6gz _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z612a",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6wa _1yep5z6wb _1yep5z6wc _1yep5z6wy _1yep5z6wz _1yep5z6x0 _1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z617i _1yep5z617g _1yep5z612o _1yep5z6179 _1yep5z6178 _1yep5z613h _1yep5z617b"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z613h"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61ta _1yep5z61t8 _1yep5z61oj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61ok"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61ok"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),cy=h({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),dy=h({defaultClassName:"_18v88n19 _1yep5z6ik _1yep5z6il _1yep5z6im",variantClassNames:{labelPosition:{top:"_1yep5z6sy _1yep5z6sz _1yep5z6t0",start:"_1yep5z6mv _1yep5z6mw _1yep5z6mx _1yep5z614l _1yep5z614m _1yep5z614n"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61rm _1yep5z61rn _1yep5z61ro"]]}),uy=h({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lf",variantClassNames:{isFocusVisible:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isHovered:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isOpen:{true:"_1yep5z613t _1yep5z6177"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isHovered:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isOpen:!0},"_1yep5z61pl _1yep5z61sz"]]});function my({allowsCustomValue:e,onValueChange:t,inputValue:o},r,a,n,i){let[s,p]=useState(null),l=useRef(!1);useEffect(()=>{if(!t)return;let u=a.current,m=d=>{p(d.target);};return u?.addEventListener("focusin",m),()=>{u?.removeEventListener("focusin",m);}},[t,a,r.selectedKey]),useGranularEffect(()=>{r.selectedKey&&(t?.({value:r.selectedItem?.textValue,key:r.selectedKey}),l.current=!1);},[r.selectedKey],[t,r.selectedItem]),useInteractOutside({ref:n,isDisabled:!t,onInteractOutside:u=>{!i.current?.contains(u.target)&&s===n.current&&e&&l.current&&(t?.({value:n.current?.value,key:null}),l.current=!1);}}),useEffect(()=>{if(!t)return;let u=n.current,m=()=>{l.current=!0;};return u?.addEventListener("input",m),()=>{u?.removeEventListener("input",m);}},[n,t]),useEffect(()=>{l.current=!1;},[o]);let{keyboardProps:c}=useKeyboard({isDisabled:!t,onKeyDown:u=>{e&&u.key==="Enter"&&l.current?(t?.({value:n.current?.value,key:null}),l.current=!1):u.key==="Escape"&&r.close(),u.continuePropagation();}});return {inputProps:c}}var by=rt.forwardRef(({className:e,style:t,inputStyle:o,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:u=!1,labelPosition:m="top",validationState:d="valid",variant:f="primary",toggleLabel:y,renderOption:b,showIcon:v=!0,filter:_,minValue:g,maxValue:z,inputType:R="text",onInputSubmit:P,onValueChange:C,...x},S)=>{let N=useObjectRef(S),{contains:w}=useFilter({sensitivity:"base"}),T=ae(),k=useComboBoxState({...x,defaultFilter:_||w,defaultItems:s,onSelectionChange:l,onInputChange:c,children:T,validationState:u?"invalid":"valid"}),I=rt.useRef(null),D=rt.useRef(null),H=rt.useRef(null),B=rt.useRef(null),K=rt.useRef(null),{inputProps:A}=my({onValueChange:C,allowsCustomValue:x.allowsCustomValue,inputValue:x.inputValue},k,N,D,B),{buttonProps:G,inputProps:O,listBoxProps:re,labelProps:V,errorMessageProps:Z,descriptionProps:X,validationErrors:Ce}=useComboBox({...x,inputRef:D,defaultItems:s,buttonRef:I,listBoxRef:H,popoverRef:B,validationState:d==="error"?"invalid":"valid"},k),Pe=x.errorMessage||Ce.join(" "),ye=ke({...x,errorMessage:Pe,descriptionProps:X,errorMessageProps:Z,labelPosition:m});Pe&&(d="error");let{hoverProps:Se,isHovered:He}=useHover({isDisabled:x.isDisabled}),{isFocused:ee,focusProps:de,isFocusVisible:gt}=useFocusRing(),vt=At({isReadOnly:x.isReadOnly,validationState:d}),uo=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":d,"data-focused":ee,"data-focus-visible":gt}),{labelProps:_t,fieldProps:Y}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]}),{keyboardProps:$}=useKeyboard({onKeyDown:W=>{x.allowsCustomValue&&W.key==="Enter"&&P?.(O.value?.toString()??"");}}),{focusProps:ne}=useFocus({onBlur:()=>{x.allowsCustomValue&&O.value&&P?.(O.value?.toString()??"");}});return jsx(at.Provider,{value:k,children:jsxs("div",{className:classNames(iy({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:t,ref:N,children:[i||m==="start"&&ye?jsxs("div",{className:dy({labelPosition:m,hasMessage:!!ye}),children:[jsx("label",{...mergeProps(V,_t),className:cy({isDisabled:x.isDisabled}),children:i}),m==="start"&&ye]}):null,jsxs("div",{...Se,className:py({validationState:d,isHovered:He,isFocused:ee,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:K,children:[jsx("input",{...mergeProps(O,A,de,uo,Y,ne,$,R==="number"?{type:"number",min:g,max:z,onKeyDown:W=>{(W.key==="ArrowUp"||W.key==="ArrowDown")&&W.preventDefault();}}:null),ref:D,className:classNames(sy({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:o}),vt&&v?jsx(vt,{className:ly({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsx(q,{...G,ref:I,variant:"popover",label:y,className:uy({isFocusVisible:!x.isDisabled&&!x.isReadOnly&>,isHovered:!x.isDisabled&&!x.isReadOnly&&He,isOpen:k.isOpen})})]}),jsx(be,{className:Ke,ref:B,triggerRef:K,state:k,children:jsx(pe,{...re,items:s,ref:H,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:Hr})}),m==="top"&&ye]})})});by.displayName="ComboBox";var gy=h({defaultClassName:"byycd01 _1yep5z6d6 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",variantClassNames:{},defaultVariants:{},compoundVariants:[]});var Yi=rt.forwardRef(({enableReorder:e,...t},o)=>e?jsx(vy,{ref:o,...t}):jsx(Zi,{ref:o,...t}));Yi.displayName="GridListItem";var Zi=rt.forwardRef(({item:e,state:t,dropState:o,renderGridItem:r,dragHandleProps:a},n)=>{let i=te(n),s=useGridListItem({node:e},t,i),p=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:l}=useGridListSelectionCheckbox({key:e.key},t),c={...s,checkBoxProps:p?l:void 0,dragHandleProps:a};return jsxs("div",{"data-grid-list-item-key":e.key,children:[o?jsx(xt,{target:{type:"item",key:e.key,dropPosition:"before"},dropState:o}):null,r?r(e,c,i):null,o&&t.collection.getKeyAfter(e.key)==null?jsx(xt,{target:{type:"item",key:e.key,dropPosition:"after"},dropState:o}):null]},e.key)});Zi.displayName="BaseGridListItem";var vy=rt.forwardRef(({dragState:e,item:t,...o},r)=>{let a=useDraggableItem({key:t.key,hasDragButton:!0},e);return jsx(Zi,{item:t,dragHandleProps:a,ref:r,...o})});vy.displayName="DraggableGridListItem";var nw=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},zy=rt.forwardRef(({className:e,style:t,isEditing:o=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,onReorder:i,enableReorder:s=!1,layout:p="stack",orientation:l="vertical",renderGridItem:c,...u},m)=>{let d=ae(),f=useListState({...u,children:d}),y=rt.useRef(null),b=te(m),{gridProps:v}=useGridList(u,f,b);br({handle:n,type:"gridlist"},f,b);let{collectionProps:_,dragState:g,dropState:z}=ur({...u,onReorder:i,enableReorder:s,layout:p,orientation:l,preview:y,getItems:C=>[...C].map(x=>{let S=f.collection.getItem(x);return invariant(S,"Expected item to be defined."),{key:S.key.toString()}})},f,b),R=o?nw:v.onKeyDownCapture,P={state:f,dragState:g,dropState:z,enableReorder:s,renderGridItem:c};return jsxs("ul",{...mergeProps(v,_),className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:t,ref:b,"aria-rowcount":f.collection.size,onKeyDownCapture:R,children:[[...f.collection].map(C=>jsx(Yi,{item:C,...P},C.key)),s?jsx(DragPreview,{ref:y,children:C=>jsx(Ea,{items:C,ulRef:b,containerClassName:".BaselineUI-GridList",previewClassName:gy(),itemDataAttribute:"data-grid-list-item-key"})}):null]})});zy.displayName="GridList";var hy="_1yep5z6f5",xy="_1dc3b8m0";var Cy=rt.forwardRef(({className:e,selectionMode:t,style:o,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...p},l)=>{let c=te(l),u=ae(),m=useListState({...p,selectionMode:t,suppressTextValueWarning:!0,children:u}),{actionGroupProps:d}=useActionGroup({...p,selectionMode:t,children:u},m,c),f=[...m.collection].map(y=>(invariant(y.value),jsx(fw,{item:y,state:m,isDisabled:p.isDisabled,onAction:p.onAction,tooltipProps:n,renderActionItem:s},y.key)));return i?jsxs(L,{...d,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:[jsx(i,{size:24,className:hy}),jsx(L,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:f})]}):jsx(L,{...d,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:f})});Cy.displayName="ActionGroup";var fw=({item:e,state:t,tooltipProps:o,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},t),s=n||t.selectionManager.isDisabled(e.key),p=t.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof o=="function"?o(e.value):o),[o,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(oe,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(E,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[xy]:p},"BaselineUI-ActionGroup-Item")})})})};var Py="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",ky="_1yep5z61qa _1yep5z61qb _1yep5z61qc _1yep5z61gz _1yep5z61h0 _1yep5z61h1";var wy=rt.forwardRef(({className:e,style:t,items:o,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:u,labelPosition:m="top","data-block-id":d,"data-block-class":f,shouldFocusWrap:y,...b},v)=>{let _=useMemo(()=>o.map(z=>({id:z.color,label:z.label})),[o]),g=useId();return useEffect(()=>{!a&&!b["aria-label"]&&!b["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,b]),jsxs(L,{...$a(b),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":d,"data-block-class":f,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:t,ref:v,children:[n||a?jsxs(L,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Q,{id:g,type:"label",size:"sm",children:a}):null]}):null,jsx(pe,{className:classNames(ky,r),selectionMode:"single",items:_,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?_.map(z=>z.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:z=>{p?.([...z][0]);},optionClassName:c,optionStyle:u,renderOption:({key:z,textValue:R},{isSelected:P,isFocusVisible:C,isDisabled:x,optionProps:S},N)=>jsx("li",{...S,"data-disabled":x,className:classNames(Py,S.className),ref:N,children:jsx(Qe,{isFocusVisible:C,color:z,isSelected:P,"aria-label":R,isInteractive:!0,isDisabled:x,tooltip:!0})}),shouldFocusWrap:y,...b,"aria-labelledby":a?g:b["aria-labelledby"]})]})});wy.displayName="ColorSwatchPicker";var Ry="_10dw1p96",Sy="_10dw1p95",Ty=h({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lf _1yep5z6l2 _1yep5z6kz",variantClassNames:{isSelected:{true:"_1yep5z611v"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z613h _1yep5z617a _1yep5z6178"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isSelected:!1,isRenaming:!1},"_1yep5z61nm _1yep5z61pf _1yep5z61t1 _1yep5z61t0"]]});var My=({context:e,depth:t,children:o,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:p,primaryActionAriaLabel:l,secondaryActionAriaLabel:c,onRename:u,onAction:m,renderItemTitle:d=f=>f.data.label})=>{let{formatMessage:f}=F(),{hoverProps:y,isHovered:b}=useHover({}),v=useRef(null),{onKeyDown:_,...g}=e.interactiveElementProps;delete g.onFocus,delete g.onClick;let z=createFocusManager(v),R=useCallback(k=>{if(k.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))v.current?.setAttribute("tabindex","-1"),k.preventDefault(),k.stopPropagation(),z.focusNext();else switch(k.key){case"ArrowLeft":{z.focusPrevious()?(k.preventDefault(),k.stopPropagation()):(_?.(k),e.focusItem(!0));break}case"Enter":{e.toggleExpandedState();break}default:_?.(k);}},[e,z,_,r,v]),P=useMemo(()=>{let k=s,I=p,D=typeof l=="function"?l(r.index):l,H=typeof c=="function"?c(r.index):c;return k||I?jsxs(L,{display:"flex",flexDirection:"row",children:[k?jsx(ge,{icon:k,"aria-label":D,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,I?jsx(ge,{icon:I,"aria-label":H,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{n?.(r.index);},tooltip:!0}):null]}):null},[s,r.index,p,l,c,a,n]),C=useCallback(k=>{k.key==="Enter"?(u?.({key:r.index,value:k.target.value}),e.stopRenamingItem()):k.key==="Escape"?(e.stopRenamingItem(),v.current?.setAttribute("tabindex","0"),v.current?.focus()):k.key!=="ArrowRight"&&k.key!=="ArrowLeft"&&k.key!=="ArrowUp"&&k.key!=="ArrowDown"&&!k.metaKey&&k.continuePropagation();},[r.index,e,u,v]),x=r.data.icon,S=!!u,{pressProps:N}=usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:w,focusProps:T}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:R,onFocus:()=>{e.focusItem(!1);}},N,T,y,e.itemContainerWithoutChildrenProps,g),className:classNames(Sy,Ty({isHovered:b,isSelected:e.isSelected,isFocusVisible:w,isRenaming:e.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":r.index,"data-expanded":r.isFolder?e.isExpanded:void 0,"aria-expanded":r.isFolder?e.isExpanded:void 0,"aria-selected":e.isSelected,"data-depth":t,"aria-level":t+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:v,children:jsxs(L,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?P:null,jsxs(L,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(L,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${t*2} * ${themeVars.spacing.lg})`},children:[jsx(E,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":f(e.isExpanded?os.collapse:os.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(Ry,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),x?jsx(x,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(L,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:k=>{S&&(k.stopPropagation(),k.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:k=>{k.stopPropagation();},children:jsx(Ge,{defaultValue:r.data.label,autoFocus:!0,onBlur:k=>{u?.({key:r.index,value:k.target.value}),e.stopRenamingItem();},"aria-label":f(os.rename),onKeyDown:C,className:"BaselineUI-TreeView-RenameInput"})}):jsx(Q,{type:"label",size:"sm",className:classNames(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:d(r)}),r.data.description?jsx(Q,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.data.description}):null]})]}),i==="end"?P:null]})}),o]})},os=U({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function Hw(e,{posInset:t,setSize:o}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:t,setSize:o},isFolder:!!e.children?.length}}function Vw(e,t){let o={};function r(a,n,i){if(o[a.id]=t(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),o}var Fy=rt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,actionsPosition:m="start",onRename:d,onAction:f,renderItemTitle:y,...b},v)=>{let _=ae(),g=useRef(null),z=useTreeState({...b,items:a.children,children:_}),R=useMemo(()=>Object.fromEntries(Object.entries(Vw(a,Hw)).map(([w,T])=>[w,{...T,canRename:!!d}])),[a,d]),P=useId(),[C,x]=rt.useState(a.children?.[0]?.id??""),S=useRef(C),N=useMemo(()=>({[`tree-${P}`]:{focusedItem:C,expandedItems:[...z.expandedKeys],selectedItems:[...z.selectionManager.selectedKeys]}}),[C,z.expandedKeys,z.selectionManager.selectedKeys,P]);return useEffect(()=>{if(!g.current)return;let w=Ve(g.current),T=w instanceof ShadowRoot,k=g.current?.contains(w?.activeElement??null);T&&k&&Ve(g.current)?.querySelector(`[data-rct-item-id="${C}"]`)?.focus();},[C]),jsx(ControlledTreeEnvironment,{items:R,getItemTitle:w=>w.data?.label,viewState:N,onExpandItem:w=>{z.setExpandedKeys(new Set([...z.expandedKeys,w.index])),b.onExpand?.(w.index.toString());},onFocusItem:w=>{x(w.index),w.index&&(S.current=w.index);},onCollapseItem:w=>{z.setExpandedKeys(new Set([...z.expandedKeys].filter(T=>T!==w.index))),b.onCollapse?.(w.index.toString());},onSelectItems:w=>{z.selectionManager.setSelectedKeys(new Set(w));},renderItem:w=>jsx(My,{...w,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:m,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,onRename:d,onAction:f,renderItemTitle:y}),renderLiveDescriptorContainer:({children:w})=>jsx($e,{children:jsx(VisuallyHidden,{children:w})}),renderTreeContainer:({containerProps:w,children:T})=>jsx("div",{...zt(w,{onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||k.currentTarget.querySelector(`[data-key="${S.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":o,"data-block-class":r,style:{...t,...w.style},className:classNames(e,"BaselineUI-TreeView"),ref:M(v,w.ref,g),role:"treegrid",children:T}),renderItemsContainer:({children:w})=>w,children:jsx(Tree,{treeId:`tree-${P}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});Fy.displayName="TreeView";var Kw=forwardRef(({className:e,isCollapsible:t=!1,...o},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:t,ref:a,id:n,...o})});Kw.displayName="Panel";var Jw=forwardRef(({className:e,...t},o)=>{let r=useRef(null);return useImperativeHandle(o,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...t})});Jw.displayName="PanelGroup";var Hy="_6abhjk0";var rR=({className:e,isDisabled:t=!1,...o})=>jsx(PanelResizeHandle,{disabled:t,className:classNames(Hy,"BaselineUI-PanelResizeHandle",e),...o});rR.displayName="PanelResizeHandle";
|
|
55
55
|
|
|
56
|
-
export {
|
|
56
|
+
export { Kc as Accordion, ed as AccordionItem, q as ActionButton, Cy as ActionGroup, fw as ActionGroupItem, E as ActionIconButton, Na as AlertDialog, Of as AudioPlayer, Wt as Avatar, L as Box, ny as ButtonSelect, yc as Checkbox, Zt as ColorInput, Qe as ColorSwatch, wy as ColorSwatchPicker, by as ComboBox, Ic as DateFormat, me as Dialog, Wl as DialogTitle, Xs as DomNodeRenderer, Er as Drawer, zf as Editor, Hp as FileUpload, Nr as Focusable, Lu as FreehandCanvas, zy as GridList, lm as Group, bl as I18nProvider, Pu as IconColorInput, da as IconColorInputButton, sd as IconSelect, sp as IconSlider, Ku as ImageDropZone, ey as ImageGallery, Nd as InlineAlert, Sp as Link, pe as ListBox, Tf as Markdown, Or as Menu, sm as MessageFormat, Ie as Modal, kh as ModalClose, Ee as ModalContent, ea as ModalTrigger, $t as NumberFormat, Me as NumberInput, kc as Pagination, Kw as Panel, Jw as PanelGroup, rR as PanelResizeHandle, Ne as Popover, we as PopoverContent, Le as PopoverTrigger, $e as Portal, zl as PortalContainerProvider, Zu as Preview, Gp as ProgressBar, qt as ProgressSpinner, im as RadioGroup, tc as Reaction, Pf as ScrollControlButton, xp as SearchInput, Ye as Select, j as Separator, Ft as Slider, gp as Switch, xd as TabItem, hd as Tabs, Bc as TagGroup, Q as Text, Ge as TextInput, Et as ThemeProvider, qr as ToggleButton, ge as ToggleIconButton, va as Toolbar, oe as Tooltip, Au as Transform, Sa as Transition, Fy as TreeView, U as defineMessages, iN as isInsideOverlayContent, $s as isRect, Nt as useDevice, F as useI18n, St as useImage, cl as useIntersectionObserver, Tt as useIsFirstRender, vl as useLocalStorage, e8 as useMutationObserver, ve as usePortalContainer, dl as useResizeObserver, s8 as useTextSelection, ml as useUndoRedo, ln as useUserPreferences };
|