@baseline-ui/core 0.33.1 → 0.35.0
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 +2 -2
- package/dist/index.css +1 -1
- package/dist/index.d.mts +37 -10
- package/dist/index.d.ts +37 -10
- package/dist/index.js +81 -81
- package/dist/index.mjs +9 -9
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { classNames, invariant, filterTruthyValues, getSvgPathFromStroke, getHTMLElement, getTextDimensions, getPlainText, cleanKeyFromGlobImport, getOsSpecificKeyboardShortcutLabel, isUrl } from '@baseline-ui/utils';
|
|
2
|
-
import
|
|
2
|
+
import nt, { useMemo, useCallback, useContext, useEffect, createContext, useLayoutEffect, useState, useRef, useImperativeHandle, forwardRef, useReducer, Fragment as Fragment$1, createElement, isValidElement } 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
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';
|
|
@@ -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 vg 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 b_, { 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 pf 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 tI 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"?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
|
|
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";
|
|
52
|
+
var xe=typeof document<"u"?nt.useLayoutEffect:()=>{};function Fa(e){let t=useRef(null);return xe(()=>{t.current=e;},[e]),useCallback((...o)=>{let r=t.current;return r?.(...o)},[])}function Ha(e){let[t,o]=useState(e),r=useRef(null),a=Fa(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}t===i.value?a():o(i.value);});xe(()=>{r.current&&a();});let n=Fa(i=>{r.current=i(t),a();});return [t,n]}var sr={prefix:String(Math.round(Math.random()*1e10)),current:0},rs=nt.createContext(sr),Qy=nt.createContext(!1);var Jy=!!(typeof window<"u"&&window.document&&window.document.createElement),Va=new WeakMap;function e1(e=!1){let t=useContext(rs),o=useRef(null);if(o.current===null&&!e){var r,a;let n=(a=nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=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 t1(e){let t=useContext(rs);t===sr&&!Jy&&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=e1(!!e),r=t===sr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${o}`}function o1(e){let t=nt.useId(),[o]=useState(as()),r=o||process.env.NODE_ENV==="test"?"react-aria":`react-aria${sr.prefix}`;return e||`${r}-${t}`}var ja=typeof nt.useId=="function"?o1:t1;function r1(){return !1}function a1(){return !0}function n1(e){return ()=>{}}function as(){return typeof nt.useSyncExternalStore=="function"?nt.useSyncExternalStore(n1,r1,a1):useContext(Qy)}var c1=!!(typeof window<"u"&&window.document&&window.document.createElement),lr=new Map;function pr(e){let[t,o]=useState(e),r=useRef(null),a=ja(t),n=useCallback(i=>{r.current=i;},[]);return c1&&lr.set(a,n),xe(()=>{let i=a;return ()=>{lr.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,o(i));}),a}function Aa(e,t){if(e===t)return e;let o=lr.get(e);if(o)return o(t),t;let r=lr.get(t);return r?(r(e),e):t}function 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},pe=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 d1(){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=d1;function xt(...e){let t={...e[0]};for(let o=1;o<e.length;o++){let r=e[o];for(let a in r){let n=t[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=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 u1=new Set(["id"]),m1=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),f1=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),y1=/^(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)&&(u1.has(i)||o&&m1.has(i)||r&&f1.has(i)||a?.has(i)||y1.test(i))&&(n[i]=e[i]);return n}function cr(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(o=>e.test(o.brand)))||e.test(window.navigator.userAgent)}function Te(e){let t=null;return ()=>(t==null&&(t=e()),t)}var fo=Te(function(){return cr(/Firefox/i)});function oe(e){let t=useRef(null);return useMemo(()=>({get current(){return t.current},set current(o){t.current=o,typeof e=="function"?e(o):e&&(e.current=o);}}),[e])}function x1(){return typeof window.ResizeObserver<"u"}function Ka(e){let{ref:t,box:o,onResize:r}=e;useEffect(()=>{let a=t?.current;if(a)if(x1()){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 Oe(e){return !!e&&"label"in e&&!!e.label}function dr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function k1(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=>k1(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 D1(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 E1(e){var t=D1(e,"string");return typeof t=="symbol"?t:String(t)}function B1(e,t,o){return t=E1(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function bs(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 gs(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?bs(Object(o),!0).forEach(function(r){B1(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):bs(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function vs(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var F1=(e,t,o)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=t[r])!==null&&a!==void 0?a:o[r]))return !1}return !0},z=e=>{var t=o=>{var r=e.defaultClassName,a=gs(gs({},e.defaultVariants),o);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,d]of e.compoundVariants)F1(c,a,e.defaultVariants)&&(r+=" "+d);return r};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return vs(e.variantClassNames,o=>vs(o,r=>r.split(" ")[0]))}},t};var _s=z({defaultClassName:"_6n12k9b _1yep5z6lh _1yep5z6lg _1yep5z6i1 _1yep5z6kz",variantClassNames:{isDropTarget:{true:"_1yep5z613h"},orientation:{vertical:"_1yep5z6174",horizontal:"_1yep5z6175"}},defaultVariants:{},compoundVariants:[]}),zs="_6n12k98 _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij",hs=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),xs=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:[]}),Cs="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Ps="_6n12k90";var ks=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var j=nt.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(ks({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 q1(e){return sprinkles.properties.has(e)}var L=nt.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in o)q1(l)?s[l]=o[l]:p[l]=o[l];return {sprinkleProps:s,domProps:p}},[o]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:t})});L.displayName="Box";var bo=nt.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:d},m)=>{invariant(e.value&&Oe(e.value),"Item cannot be a section");let{icon:u,label:y}=e.value,{hoverProps:f,isHovered:b}=useHover({isDisabled:t}),g=filterTruthyValues({"data-selected":r,"data-disabled":t,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":o,"data-selection-mode":d.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,f,g),className:classNames(xs({isHovered:b,isFocused:o,isFirstChild:d.collection.getFirstKey()===e.key,isLastChild:d.collection.getLastKey()===e.key,isDisabled:t}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(L,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,u?jsx(u,{size:24}):null,jsx("span",{...p,children:y})]}),i?jsx("span",{className:hs({isDisabled:t}),...s,children:i}):null]})});bo.displayName="DefaultRenderOption";var Ct=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(_s({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let i=nt.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:t},i)};function je(e,t,o){return typeof e=="function"?e(t,o):e}function mr(e,t,o){return typeof e=="function"?e(t,o):e}function fr(e,t){return typeof e=="function"?e(t):e}function Xa(e,t){return typeof e=="function"?e(t):e}var Ss=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};Ss.displayName="DraggableListOption";var go=nt.forwardRef(({item:e,renderOption:t=(m,u,y)=>jsx(bo,{item:m,liProps:u.optionProps,...u,ref:y}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},d)=>{let m=nt.useRef(null),u=useOption({key:e.key},r,m),{value:y}=e;invariant(y&&Oe(y),"ListSection should not be passed to ListOption");let f={isFocusVisible:u.isFocusVisible,isSelected:u.isSelected,isFocused:u.isFocused,isDisabled:u.isDisabled,isPressed:u.isPressed},b={style:mr(l,y,f),className:je(c,y,f)};return a&&n?jsx(Ss,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:g=>t(e,{...u,showSelectedIcon:o,_state:r,optionProps:{...mergeProps(u.optionProps,g),...b}},M(m,d))}):t(e,{...u,showSelectedIcon:o,_state:r,optionProps:{...u.optionProps,...b}},M(m,d))});go.displayName="Option";var Ms=({section:e,state:t,sectionClassName:o,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=nt.useRef(null),{itemProps:l,groupProps:c,headingProps:d}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=t.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:u}=e;invariant(u&&dr(u),"section must be a ListSection");let y=typeof r=="function"?r(u):r,f=typeof o=="function"?o(u):o;return jsxs(Fragment,{children:[e.key===t.collection.getFirstKey()?null:jsx(j,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...y},className:classNames(Ps,f,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(L,{...d,className:classNames("BaselineUI-ListBox-SectionHeader",Cs),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 gr({type:e="listbox",handle:t},o,r){let a=useCallback(i=>e==="listbox"?r.current?.querySelector(`[data-key="${i}"][role="option"]`):r.current?.querySelector(`[data-key="${i}"][role="row"]`),[e,r]),n=useCallback((i,s)=>{let p=a(i);p&&p?.scrollIntoView({block:"nearest",inline:"nearest",...s});},[a]);useImperativeHandle(t,()=>({scrollIntoView:n,setFocusedKey:i=>{o.selectionManager.setFocused(!0),o.selectionManager.setFocusedKey(i),n(i),a(i)?.focus();}}),[n,o.selectionManager,a]),useGranularEffect(()=>{let i=Ve(r.current)instanceof ShadowRoot,s=o.selectionManager.focusedKey;i&&s&&n(s);},[o.selectionManager.focusedKey],[n,r]);}var it=nt.createContext(null),Ya=nt.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:d,listBoxHandle:m,...u},y)=>{let f=nt.useRef(null),{direction:b}=useLocale(),g=nt.useRef(null),{listBoxProps:_}=useListBox({...u,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:d.collection,ref:g,layout:t,orientation:o,direction:b,disabledKeys:d.disabledKeys})},d,g);gr({handle:m},d,g);let v=useReducedMotion(),h=useCallback(T=>{let k=ue(g.current);c&&(!v&&"startViewTransition"in k?k.startViewTransition(()=>{c(T);}):c(T));},[c,v]),{collectionProps:I,dragState:P,dropState:C}=ur({...u,onReorder:h,layout:t,orientation:o,enableReorder:i,preview:f},d,g),{isFocusVisible:x,isFocused:S,focusProps:N}=useFocusRing(),R=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":t,"data-empty":d.collection.size===0,"data-focused":S,"data-focus-visible":x,"data-orientation":o});return jsxs("ul",{...mergeProps(_,N,R,I),className:classNames(zs,"BaselineUI-ListBox",e),style:a,ref:M(y,g),children:[[...d.collection].map(T=>{let k={key:T.key,state:d,dragState:P,dropState:C,renderOption:n,renderDropIndicator:u.renderDropIndicator,renderSectionHeader:u.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:u.dropIndicatorStyle,dropIndicatorClassName:u.dropIndicatorClassName,optionStyle:u.optionStyle,optionClassName:u.optionClassName,sectionClassName:u.sectionClassName,sectionStyle:u.sectionStyle,showSectionHeader:u.showSectionHeader,withSectionHeaderPadding:u.withSectionHeaderPadding};return T.type==="section"?jsx(Ms,{...k,section:T}):jsx(go,{...k,item:T})}),l?jsx(DragPreview,{ref:f,children:l}):null]})});Ya.displayName="ListBoxCore";var Es=nt.forwardRef((e,t)=>{let o=ae(),r=useListState({...e,children:o});return jsx(Ya,{...e,ref:t,state:r})});Es.displayName="ListBoxStandalone";var le=nt.forwardRef((e,t)=>{let o=useContext(it);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx(Ya,{...e,ref:t,state:o}):jsx(Es,{...e,ref:t})});le.displayName="ListBox";var vr="uf19bsf _1yep5z6kz",Bs=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 vo=nt.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...t})=>{let o=nt.useRef(null),r=useOverlayTriggerState(t),a=useOverlayTrigger(t,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:o}),[r,a]);return jsx(vo.Provider,{value:n,children:e})};var Hs={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Vs="_1gzftth1 _1yep5z6ih _1yep5z6ii _1yep5z6ij",Os="_1gzftth6",js="_1gzftth8",As="_1gzftth7",$s="var(--_1gzftth0)";function uN(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Us(e){return typeof e=="object"&&typeof e.left=="number"&&typeof e.top=="number"&&(typeof e.width=="number"||e.width===void 0)&&(typeof e.height=="number"||e.height===void 0)}var _r=nt.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:t})=>{let{state:o,overlayTriggerAria:r,triggerRef:a}=useContext(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||Us(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(_r.Provider,{value:i,children:t?jsx("div",{className:classNames(js,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:a,tabIndex:-1},JSON.stringify(t)):e})};var zr=({label:e,tooltip:t})=>({tooltipProps:useMemo(()=>{let r={size:"sm",variant:"inverse",text:e,includeArrow:!1,placement:"bottom start",offset:4};if(typeof t=="object")return {...r,...t};if(t)return r},[e,t])});function hr({tooltip:e,"aria-label":t,"aria-labelledby":o},r){let[a,n]=useState(t||"");useEffect(()=>{if(o){let p=ue(r.current).querySelector(`#${o}`);p&&n(p.textContent||"");}else t&&n(t);},[o,r,t]);let{tooltipProps:i}=zr({label:a,tooltip:e});return {tooltipProps:i}}var xr=e=>{let t=nt.useRef(null),{ref:o,...r}=useContext(_r)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t),{isFocusVisible:i,isFocused:s,focusProps:p}=useFocusRing(),{hoverProps:l,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:xt(a,p,l),isPressed:n,ref:M(t,o||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},Cr=(e,t)=>{let o=nt.useRef(null),{ref:r,...a}=useContext(_r)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},t,o);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=useFocusRing(),{hoverProps:c,isHovered:d}=useHover({isDisabled:e.isDisabled});return {buttonProps:xt(n,l,c),isPressed:i,ref:M(o,r||null),isFocusVisible:s,isFocused:p,isHovered:d,uiStateOptions:{isHovered:d,isFocused:p,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:t.isSelected}}};var Pr=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _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=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 Gb={sm:16,md:20,lg:24},G=nt.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...d},m)=>{let{buttonProps:u,isPressed:y,ref:f,isFocusVisible:b,isFocused:g,isHovered:_,uiStateOptions:v}=xr({...d,elementType:i,isDisabled:s}),h=Gb[p],I=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":s,"data-focused":g,"data-focus-visible":b,"data-hovered":_,"data-pressed":y});return jsxs(i,{...mergeProps(u,I),className:classNames(Pr({isDisabled:!!s,isFocusVisible:b,isHovered:_,variant:n,size:p}),"BaselineUI-ActionButton",typeof o=="function"?o(v):o),style:typeof t=="function"?t(v):t,ref:M(m,f),children:[!!r&&jsx(r,{size:h,className:Qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsx(a,{size:h,className:Qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:vr})]})});G.displayName="ActionButton";var Ys=nt.forwardRef(({className:e,style:t,node:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=nt.useRef(null);nt.useEffect(()=>{let c=s.current;return c?.append(o),()=>{c?.contains(o)&&o.remove();}},[o]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...p,className:e,style:t,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:M(i,s)})});Ys.displayName="DomNodeRenderer";var Zs="_14uvjig0 z9nup81",Qs="_14uvjig7",Js="_14uvjig3",el=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),tl=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:[]}),ol="_14uvjige _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",rl="_14uvjig8",al=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var It=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),kr=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),Rt=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Ae="nrh1eh3",$e=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Ue=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),wt=z({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function ke({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...o,className:It({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...t,className:It({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:It({isDisabled:i,labelPosition:n}),children:r}):null}var nl=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),il="_1lnwne0";var sl=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),ll=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var on=nt.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:t.isOpen},t),d=useMemo(()=>{switch(a){case"top":return {x:0,y:4};case"bottom":return {x:0,y:-4};case"left":return {x:4,y:0};case"right":return {x:-4,y:0};default:return {x:0,y:0}}},[a]),m=useReducedMotion(),[u]=useSpring(()=>({from:{opacity:0,transform:`translate(${d.x}px, ${d.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!m})),y=a==="center"?"bottom":a;return jsxs(animated.span,{...o,style:{...u,...o.style},ref:l,"data-placement":y,children:[p?jsx("div",{className:sl({placement:y,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:ll({variant:n,size:i}),children:e})]})});on.displayName="TooltipContent";function dl({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let i=nt.useRef(null);useEffect(()=>{if(o){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{t(s);},{root:n?.current,rootMargin:a,threshold:r});},[t,o,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function ul({ref:e,onResize:t,isDisabled:o}){let r=nt.useRef(null),[a,n]=nt.useState();return nt.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),t?.(i);});},[t,o,n]),nt.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function 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 ml="SET_STATE",Rr="UNDO",wr="REDO",ug=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case ml:return {past:[...o,r],present:t.data,future:[]};case Rr:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case wr:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},fl=(e={},{isDisabled:t,onAction:o})=>{let r=Tt(),[a,n]=useReducer(ug,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=f=>{n({type:ml,data:f});},c=useRef(),d=()=>{c.current=Rr,n({type:Rr});},m=()=>{c.current=wr,n({type:wr});},u=!!i?.length,y=!!p?.length;return useGranularEffect(()=>{(c.current===Rr||c.current===wr)&&(o?.(s,c.current),c.current=void 0);},[s],[o,r]),{state:s,push:t?()=>{}:l,undo:t?()=>{}:d,redo:t?()=>{}:m,pastStates:i,futureStates:p,canUndo:u,canRedo:y}};var an=nt.createContext({messages:{},shouldLogMissingMessages:!0,hasMissingErrorLoggedFor:{current:new Set},setLang:()=>{}}),gl=({children:e,messages:t={},shouldLogMissingMessages:o=!0,...r})=>{let a=useRef(new Set),[n,i]=useState("");useEffect(()=>{a.current.clear();},[n,r.locale]);let s=nt.useMemo(()=>({messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:a,setLang:i}),[t,o,a,i]);return jsx(I18nProvider,{...r,children:jsx(an.Provider,{value:s,children:e})})};gl.displayName="I18nProvider";function F(e){let{messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:r}=useContext(an);useEffect(()=>{!e&&vg(t)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,t]);let a=useMemo(()=>e?cleanKeyFromGlobImport(e):t,[e,t]),n=useMessageFormatter(a),i=useLocale(),s=useCallback(l=>{o&&!r.current.has(l)&&(console.log(`BUI \u{1F30D}: Translation not found for key: \`${l}\` for locale: \`${i.locale}\`. The default message, i.e. \`${l}\`, will be used instead.`),r.current.add(l));},[r,i.locale,o]),p=useCallback((l,c)=>{if(typeof l=="object")try{return n(l.id,c)}catch{return s(l.id),l.defaultMessage||l.id}else try{return n(l,c)}catch{return s(l),l}},[n,s]);return useMemo(()=>({formatMessage:p,locale:i}),[p,i])}var q=e=>e;function i8(e,t,o){let r=nt.useRef(null);return nt.useEffect(()=>{if(e)return r.current=new MutationObserver(o),r.current.observe(e,t),()=>{r.current&&r.current.disconnect();}},[e,t,o]),r.current}function hl(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 m8({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=nt.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=pe(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&o?.(i);},onPressStart(){let n=pe(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=pe(n).getSelection();l&&e.current?.contains(l.anchorNode)&&t(l);}let s=ue(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,t,r]);}function Nt(e){let t=useCallback(()=>{let a=pe(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[o,r]=nt.useState(t);return xe(()=>{let a=pe(e),n=()=>{r(t());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,t]),o}var nn=nt.createContext(void 0),Cl=({portalContainer:e,children:t})=>jsx(nn.Provider,{value:e,children:t});Cl.displayName="PortalContainerProvider";function ve(e){let t=useContext(nn);return e||t}var Pl=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var kl="z9nup80",Lt="z9nup83",Il="z9nup87";function sn(e=window){let[t,o]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=d=>{o(d.matches?"dark":"light");};return l.matches&&o("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=d=>{a(d.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=d=>{i(d.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=d=>{p(d.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:t,highContrast:r,reducedMotion:n,transparency:s}}var Mt=createContext({theme:lightTheme,setTheme:()=>{}});var Rl="var(--hj25q10)";var Nr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},Dt=nt.forwardRef(({theme:e="system",children:t,setTheme:o,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:d,highContrast:m,transparency:u}=sn(),{name:y,theme:f}=useMemo(()=>{switch(e){case"system":return c==="light"?Nr.LIGHT:Nr.DARK;case"light":return Nr.LIGHT;case"dark":return Nr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=Nt(),g={"data-theme":y,"data-block-id":i,"data-block-class":s,"data-reduced-motion":d,"data-high-contrast":m,"data-transparency":u,"data-device":b},_=useMemo(()=>({theme:f,setTheme:o}),[f,o]);return jsx(Mt.Provider,{value:_,children:jsx("div",{...mergeProps(n,g),className:classNames(kl,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,f),...assignInlineVars({[Rl]:l==="rtl"?"-1":"1"}),...a},ref:p,children:t})})});Dt.displayName="ThemeProvider";var qe=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(Mt);return jsx(Overlay,{...n,children:jsx(Dt,{ref:i,theme:s,style:t,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:o})})});qe.displayName="Portal";var re=nt.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":d,...m},u)=>{let y=nt.useRef(null),f=nt.useRef(null),b=!m.text||m.isDisabled,g=useTooltipTriggerState({...m,delay:o,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:v}=useTooltipTrigger({...m,isDisabled:b,delay:o,closeDelay:r},g,y),h=ve(s),{overlayProps:I,arrowProps:P,placement:C,updatePosition:x}=useOverlayPosition({arrowSize:i?13:0,targetRef:y,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:f,placement:t,isOpen:g.isOpen,...m});return dl({ref:f,threshold:1,onIntersect:x,isDisabled:!g.isOpen}),ul({ref:y,onResize:x,isDisabled:!g.isOpen}),jsxs(FocusableProvider,{..._,ref:y,children:[e,g.isOpen?jsx(qe,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":d,children:jsx(on,{ref:M(u,f),state:g,arrowProps:P,overlayProps:I,placement:C,tooltipProps:v,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});re.displayName="Tooltip";var Lr=nt.forwardRef(({elementType:e,children:t,...o},r)=>{let a=oe(r),{focusableProps:n}=useFocusable(o,a);return jsx(e??"div",{ref:a,...n,children:t})});Lr.displayName="Focusable";var av={xxs:8,xs:12,sm:16,md:20,lg:24},E=nt.forwardRef((e,t)=>{let o=oe(t),{tooltipProps:r}=hr(e,o);return r?jsx(re,{...r,children:jsx(pn,{...e,ref:o})}):jsx(pn,{...e,ref:o})});E.displayName="ActionIconButton";var pn=nt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{let l=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!l&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,c]);let{buttonProps:d,isPressed:m,ref:u,isFocusVisible:y,isFocused:f,isHovered:b,uiStateOptions:g}=xr({...s,elementType:i}),_=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":f,"data-focus-visible":y,"data-disabled":s.isDisabled,"data-hovered":b,"data-pressed":m});return jsxs(i,{...mergeProps(d,_),className:classNames(Bs({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:y,isHovered:b}),"BaselineUI-ActionIconButton",typeof e=="function"?e(g):e),ref:M(p,u),style:typeof t=="function"?t(g):t,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(o,{role:"presentation",size:av[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:vr})]})});pn.displayName="ActionIconButtonCore";var Me=nt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=nt.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:d}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:u,isFocused:y}=useFocusRing(),{labelProps:f,decrementButtonProps:b,inputProps:g,incrementButtonProps:_,groupProps:v,descriptionProps:h,errorMessageProps:I}=useNumberField(n,l,s),P=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorCircleFilledIcon:null,[n.isInvalid,n.isReadOnly]),C=ke({description:n.description,errorMessageProps:I,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),x=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":d,"data-focused":y,"data-focus-visible":u,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:t,className:classNames(Ue({labelPosition:o}),"BaselineUI-NumberInput",e),...x,ref:i,children:[n.label?jsxs("div",{className:$e({labelPosition:o,hasMessage:!!C}),children:[jsx("label",{...f,className:Ae,children:n.label}),o==="start"&&C]}):null,jsxs("div",{className:classNames({[Lt]:n.isDisabled}),children:[jsxs("div",{...mergeProps(v,c),className:classNames(wt({isHovered:d,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:y,variant:r}),{[il]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(g,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",kr({isDisabled:n.isDisabled,labelPosition:o}))}),P?jsx(P,{className:Rt({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:nl({isHoveredOrFocused:d||y,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=nt.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":d,"aria-details":m,"aria-describedby":u,"data-block-id":y,"data-block-class":f,defaultValue:b,isReadOnly:g,label:_,id:v,includeNumberInput:h},I)=>{let P=nt.useRef(null),C={onChange:o===void 0?void 0:w=>{o(w[0]);},isDisabled:n||g,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:w=>{r(w[0]);},value:l===void 0?void 0:[l],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":d,"aria-details":m,"aria-describedby":u,id:v,label:_},x=useNumberFormatter(a),S=useSliderState({...C,numberFormatter:x}),{trackProps:N,groupProps:R,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:w=>{S.setThumbValue(0,w);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...R,style:t,"data-block-id":y,"data-block-class":f,className:classNames(Zs,"BaselineUI-Slider",e),children:[_?jsxs("div",{className:Js,children:[jsx("label",{...T,className:classNames(el({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?k:null]}):null,jsxs("div",{className:Qs,children:[jsx("div",{...N,className:classNames(rl,"BaselineUI-Slider-Track"),ref:M(P,I),"data-testid":"track",children:jsx(kv,{state:S,trackRef:P,isDisabled:n,isReadOnly:g})}),h&&!_?k:null]})]})});Ft.displayName="Slider";function kv({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=nt.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:t,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:d,isHovered:m}=useHover({isDisabled:o}),u=filterTruthyValues({"data-disabled":o,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(al({isDisabled:o,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...mergeProps(n,d,u),className:classNames(ol,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:classNames(tl({isDisabled:o,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb")}),jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})]})]})}var Fl=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=nt.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Fl({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));Q.displayName="Text";var Hl=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:[]}),Vl="siobe25";var Dr=nt.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,contentStyle:l,contentClassName:c,...d},m)=>{let{formatMessage:u}=F(),y=nt.useRef(null),{dialogProps:f,titleProps:b}=useDialog(d,y),{focusProps:g,isFocusVisible:_}=useFocusRing();return jsxs("div",{...mergeProps(f,g),className:classNames(Hl({background:r,isFocusVisible:_}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:t,ref:M(m,y),children:[jsxs(L,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Vl,children:[jsx(Q,{type:"title",size:"sm",...b,className:Il,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(Dv.close)})]})]}),jsx(j,{variant:r==="subtle"?"primary":"secondary"}),jsx(L,{display:"flex",flexDirection:"column",flex:1,style:{overflow:"auto",...l},className:classNames(c,"BaselineUI-Drawer-Content"),children:o})]})});Dr.displayName="Drawer";var Dv=q({close:{id:"close",defaultMessage:"Close"}});function $l(e,t,o){let{isDisabled:r}=e,a=useReducedMotion(),[{y:n},i]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),s=useRef(0),p=useCallback(()=>{i.start({y:s.current,onRest:()=>{t.close();}});},[i,t]),l=useCallback(d=>{d.target.closest("[data-drawer]")||p();},[p]);useGranularLayoutEffect(()=>{s.current=o.current?.offsetHeight||0,i.set({y:s.current}),i.start({y:0,immediate:!!a});},[],[i,a]);let c=n.to({range:[0,s.current/2,s.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:n.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:c},onPointerDown:r||!e.isDismissable?void 0:l},close:p}}var Ul="aml2vl3 _1yep5z6ih _1yep5z6ii _1yep5z6ij",ql=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:[]}),Kl="_1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6gb _1yep5z6i8 _1yep5z6i9 _1yep5z6ia";var Ge=nt.createContext({state:null,triggerProps:{},overlayProps:{}}),Ie=({children:e,...t})=>{let o=useOverlayTriggerState(t),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},o),n=useMemo(()=>({state:o,triggerProps:r,overlayProps:a}),[o,r,a]);return jsx(Ge.Provider,{value:n,children:e})};Ie.displayName="Modal";var fn=nt.createContext({isDrawer:!1,closeDrawer:()=>{}}),yn=nt.createContext({setIsPopoverSafelyClosed:()=>{}}),Zv=animated(Dt),Qv=({children:e,className:t,style:o,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=nt.useContext(Ge),[d,m]=nt.useState(!0),u=Nt(n),y=ve(n),f=typeof s=="boolean"&&s||s==="auto"&&u==="mobile";invariant(c,"ModalContent must be a child of Modal");let b=nt.useRef(null),g=typeof r=="function"?r(f):r,_=typeof a=="function"?a(f):a,{underlayProps:v,overlayProps:h,close:I}=$l({isDisabled:!f,isDismissable:g&&d},c,b),{modalProps:P,underlayProps:C}=useModalOverlay({isDismissable:!f&&d,isKeyboardDismissDisabled:_},c,b),{theme:x}=useContext(Mt),S=useReducedMotion(),N=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!S||i,config:{easing:easings.easeInBounce}}),R=useMemo(()=>({...P.style,...f?{...h.style,width:"100%"}:N}),[h.style,P.style,f,N]),T=useMemo(()=>({isDrawer:f,closeDrawer:I}),[f,I]),k=useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsx(Overlay,{portalContainer:y,children:jsx(fn.Provider,{value:T,children:jsx(yn.Provider,{value:k,children:jsxs(Zv,{className:classNames(ql({enableDrawer:f}),t),theme:x,"data-block-id":p,"data-block-class":l,style:o,children:[jsx(animated.div,{...mergeProps(C,v,{onPointerDown:f?v.onPointerDown:C.onPointerDown}),"data-testid":"underlay",style:v.style,className:classNames(Kl,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(P,h),style:R,ref:b,"data-drawer":f,className:classNames(f?Ul:void 0,"BaselineUI-Modal-Content"),children:typeof e=="function"?e(c):e})]})})})})},Jv=animated(Qv),De=({children:e,style:t,...o})=>{let{state:r}=nt.useContext(Ge);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||o.disableAnimation})((i,s)=>s&&jsx(Jv,{...o,style:{...t,...i},children:typeof e=="function"?e(r):e}))};var Yl=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 gn=nt.createContext({titleProps:{}}),me=nt.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let d=nt.useRef(null),m=nt.useRef(null),{isDrawer:u,closeDrawer:y}=useContext(fn),[f,b]=nt.useState(""),{focusProps:g,isFocusVisible:_}=useFocusRing();useLayoutEffect(()=>{let P=m.current?.getRootNode(),C=l["aria-label"]||"";l["aria-labelledby"]&&(C=P?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(C);},[l]);let{dialogProps:v,titleProps:h}=useDialog(l,d),I=useMemo(()=>({titleProps:h}),[h]);return u&&r?jsx(Dr,{title:f,onCloseRequest:y,className:t,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:M(m,c),background:p,children:e}):jsx(gn.Provider,{value:I,children:jsx("section",{...mergeProps(v,g),"data-block-id":i,"data-block-class":s,ref:M(d,c),style:o,className:classNames(Yl({size:u?"content":a,variant:n,isDrawer:u,isFocusVisible:_}),"BaselineUI-Dialog",t),children:e})})});me.displayName="Dialog";var Zl=nt.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(gn);return nt.isValidElement(e)?nt.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,t),style:{...e.props.style,...o}}):jsx("h3",{...a,ref:r,className:t,style:o,children:e})});Zl.displayName="DialogTitle";function Ql({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 ep=({children:e,isOpen:t,popoverContentRef:o,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,p]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(yn);useEffect(()=>{t?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[t]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let d=o.current;return useEffect(()=>{d&&p(d.getBoundingClientRect());},[d]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?b_.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var{color:_n}=themeVars,be=nt.forwardRef(({portalClassName:e,portalStyle:t,className:o,style:r,state:a,overlayProps:n,underlayClassName:i,children:s,includeArrow:p=!1,offset:l=2,portalContainer:c,contentContainerClassName:d,contentContainerStyle:m,"data-block-id":u,"data-block-class":y,...f},b)=>{let g=nt.useRef(null),_=ve(c),v=p?8:0,{underlayProps:h,popoverProps:I,placement:P,arrowProps:C}=usePopover({...f,offset:l+v,popoverRef:g,containerPadding:f.containerPadding||0},a);delete I.style?.position;let x=Ql({placement:P,isOpen:a.isOpen}),S=P==="center"?"bottom":P,N=useMemo(()=>({isOpen:a.isOpen}),[a.isOpen]),R=useMemo(()=>({...I.style,...assignInlineVars({[$s]:`${f.triggerRef?.current?.offsetWidth}px`}),...Xa(r,N)}),[I.style,f.triggerRef,r,N]);return jsx(ep,{isOpen:a.isOpen,popoverContentRef:g,portalContainer:_,style:I.style,children:x((T,k)=>k&&jsxs(qe,{portalContainer:_,style:t,className:e,ref:b,"data-block-id":u,"data-block-class":y,children:[!f.isNonModal&&jsx("div",{...h,className:classNames(As,fr(i,N),"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...I,style:{...R,...T},ref:M(g,b),className:classNames(Vs,"BaselineUI-Popover-Content",fr(o,N)),"data-placement":["top","bottom","left","right"].filter(w=>P?.includes(w)),children:[p?jsxs("svg",{className:classNames(Hs[S],"BaselineUI-PopoverContent-Arrow"),...C,style:{...C.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:_n.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:_n.background.primary.subtle,stroke:_n.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:a.close}),jsx("div",{...n,style:Xa(m,N),className:classNames(Os,fr(d,N)),children:typeof s=="function"?s(a):s}),jsx(DismissButton,{onDismiss:a.close})]})]}))})});be.displayName="PopoverContentCore";var Re=nt.forwardRef((e,t)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(vo);return invariant(a),o?jsx(be,{ref:t,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:o}):null});Re.displayName="PopoverContent";var ap=z({defaultClassName:"_1mdhlqv8",variantClassNames:{isOpen:{true:"_1mdhlqv9"}},defaultVariants:{},compoundVariants:[]}),We="_1mdhlqvb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",np=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"},isOpen:{true:"_1mdhlqv2"},isDisabled:{true:"z9nup83 _1yep5z6ey"},isHovered:{true:"_1mdhlqv4"},variant:{primary:"_1mdhlqv5",ghost:"_1mdhlqv6"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"_1mdhlqv7"]]}),Hr="_1mdhlqvc _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1",ip="_1yep5z66x _1yep5z66y _1yep5z66z",sp="_1mdhlqva _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k";var dp=nt.forwardRef(({className:e,style:t,onChange:o,"data-block-id":r,icon:a,formatValue:n=d=>d,tooltipProps:i,popoverContentProps:s,isDisabled:p,...l},c)=>{let d=oe(c),[m,u]=useControlledState(l.value,l.defaultValue||0,o),[y,f]=nt.useState(!1),{keyboardProps:b}=useKeyboard({onKeyDown:v=>{(v.key==="Enter"||v.key==="Escape")&&f(!1);}}),g=n(m||0),_=i?.isDisabled||l["aria-label"]?`${l["aria-label"]}, ${g}`:g.toString();return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:t,ref:d,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:y,onOpenChange:f,children:[jsx(Le,{children:jsx(re,{text:l["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:p,...i,children:jsx(G,{label:g,variant:"popover","aria-label":_,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(Re,{placement:"bottom start",...s,className:classNames(We,s?.className),children:jsx(me,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(L,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...b,children:jsx(Ft,{...l,onChange:v=>{u(v),o?.(v);},value:m})})})})})]})]})});dp.displayName="IconSlider";var up=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"]]}),mp=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),fp="bpklwad",yp=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),bp="bpklwa6",gp=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var hp=nt.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=nt.useRef(null),c=useToggleState(s),{inputProps:d,isPressed:m}=useSwitch(s,c,l),{isFocusVisible:u,focusProps:y}=useFocusRing(),{hoverProps:f,isHovered:b}=useHover({isDisabled:s.isDisabled}),g=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":u,"data-disabled":s.isDisabled,"data-focus-visible":u,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":b,"data-pressed":m}),_=jsx("div",{className:classNames(up({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:u,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(mp({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(g,f),className:classNames(yp({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:p,children:[t?jsx("span",{className:classNames(fp,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,y),ref:l})}),r?jsxs("div",{className:gp({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",bp),children:c.isSelected?r.on:r.off}),_]}):_]})});hp.displayName="Switch";var xp="_19n40yy9",Cp=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 G_={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},Ip=nt.forwardRef(({className:e,size:t="md",variant:o="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=nt.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:d}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:u,isFocused:y}=useFocusRing({within:!0,isTextInput:!0}),f=G_[t],b=t==="sm"?XIcon$2:XIcon$3,g=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":y,"data-disabled":i.isDisabled,"data-focus-visible":u});return jsxs("div",{...g,className:classNames(Cp({size:t,isFocused:y,variant:o,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(f,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:xp,ref:p}),l.value!==""&&jsx(E,{icon:b,...d,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});Ip.displayName="SearchInput";var Rp="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",wp="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:wp,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=nt.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=nt.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),i=nt.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(s,p),className:classNames(Rp,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=nt.forwardRef(({defaultOpen:e,onOpenChange:t,isOpen:o,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:d,triggerLabel:m,renderTrigger:u=({buttonProps:g,ref:_})=>jsx(G,{...g,variant:"popover",ref:_}),portalContainer:y,...f},b)=>{let g=nt.useRef(null),_=ve(y),v=useMenuTriggerState({defaultOpen:e,isOpen:o,onOpenChange:t}),{menuTriggerProps:h,menuProps:I}=useMenuTrigger({isDisabled:r,type:"menu"},v,g),P=ae(),C=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:v.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(v.isOpen):m}),[h,r,v.isOpen,m]);return useEffect(()=>{!m&&!u&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[u,m]),jsxs(Fragment,{children:[u({buttonProps:C,ref:g}),jsx(be,{triggerRef:g,state:v,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:d||2,className:classNames(We,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsx(Pn,{className:a,...I,...f,ref:b,autoFocus:v.focusStrategy||"first",children:P})})]})});Or.displayName="Menu";var jr=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 Mp=nt.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,role:c,...d},m)=>{let u=nt.useRef(null),{linkProps:y,isPressed:f}=useLink({...d,elementType:d.onPress?"span":n},u),{isFocusVisible:b,isFocused:g,focusProps:_}=useFocusRing(),{hoverProps:v,isHovered:h}=useHover({isDisabled:d.isDisabled}),I=n,P=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-disabled":d.isDisabled,"data-focused":g,"data-pressed":f,"data-focus-visible":b,"data-hovered":h,role:c,title:l});return jsx(I,{...mergeProps(y,_,v,P),className:classNames(jr({variant:r,isFocusVisible:b,isHovered:h,isDisabled:d.isDisabled,size:a,isActive:f,type:i}),"BaselineUI-Link",e),ref:M(u,m),style:t,children:o})});Mp.displayName="Link";function Dp({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let u=[...m.target.files||[]];t?.(u),o?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function Rn({items:e}){let t=e.filter(o=>o.kind==="file").map(async o=>(invariant(o.kind==="file"),o.getFile()));return await Promise.all(t)}var Ep=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"]]}),Bp=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),Fp=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Hp=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var Ap=nt.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},i)=>{let s=nt.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=Dp(n),{dropProps:d}=useDrop({ref:s,onDrop:async({items:b})=>{let g=b.filter(v=>v.kind==="file").map(async v=>(invariant(v.kind==="file"),v.getFile())),_=await Promise.all(g);n.onValueChange?.(_);}}),{focusProps:m,isFocusVisible:u}=useFocusRing(),{hoverProps:y,isHovered:f}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(d,y,c),className:classNames(Ep({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:f||u}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,p)})}),r?jsx(r,{size:20,className:Fp({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Hp({disabled:n.isDisabled,hovered:f}),children:t}),o?jsx("div",{...l,className:Bp({disabled:n.isDisabled}),children:o}):null]})]})});Ap.displayName="FileUpload";var $p="_12vfhl40 z9nup81",Up="_12vfhl41 z9nup82",qp=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Kp="_12vfhl42",Gp="_12vfhl47",Wp="_12vfhl46 z9nup82",Xp="_12vfhl45",Yp=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Zp=nt.forwardRef(({className:e,style:t,variant:o="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:d,progressBarProps:m}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:u=0,maxValue:y=100,value:f=0,label:b}=p,g=(f-u)/(y-u),_=`${Math.round(g*100)}%`,v=jsx("output",{className:Yp({hasLabel:!!b}),children:m["aria-valuetext"]}),h=o==="error"?n:a;return jsxs("div",{...m,style:t,className:classNames($p,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Up,children:[jsx("label",{...d,className:Kp,children:b}),r?v:null]}):null,jsxs("div",{className:Xp,children:[jsxs("div",{className:Wp,children:[jsx("div",{className:Gp,children:jsx("div",{style:{width:_},className:qp({variant:o})})}),!b&&r?v:null]}),h?jsx("div",{className:It({hasError:o==="error"}),id:c,children:h}):null]})]})});Zp.displayName="ProgressBar";function At({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorCircleFilledIcon:t==="warning"?WarningFilledIcon:null}var Xe=nt.forwardRef(({className:e,validationState:t,variant:o="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let d=nt.useRef(null),{inputProps:m,labelProps:u,descriptionProps:y,errorMessageProps:f,validationErrors:b}=useTextField({...l,validationState:t?t==="error"?"invalid":"valid":void 0},d),g=l.errorMessage||b.join(" "),_=ke({...l,errorMessage:g,descriptionProps:y,errorMessageProps:f,labelPosition:a});g&&(t="error");let{hoverProps:v,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:I,focusProps:P,isFocusVisible:C}=useFocusRing(),x=At({isReadOnly:l.isReadOnly,validationState:t??"valid"}),S=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":t,"data-focused":I,"data-focus-visible":C});return jsxs("div",{className:classNames(Ue({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&_?jsxs("div",{className:$e({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...u,className:Ae,children:l.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[Lt]:l.isDisabled}),children:[jsxs("div",{...v,className:wt({validationState:t??"valid",isHovered:h,isFocused:I,variant:o,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,P,S),className:classNames(kr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:d}),x?jsx(x,{className:Rt({validationState:t??"valid",isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Xe.displayName="TextInput";var $t=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};$t.displayName="NumberFormat";var Jp="_1yep5z6ik _1yep5z6il _1yep5z6im",ec=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"]]}),tc=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"]]}),oc=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var nc=nt.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let d=nt.useRef(null),m=useToggleState({...s,...l}),{inputProps:u,isPressed:y,isDisabled:f,isReadOnly:b,isSelected:g}=useSwitch({...s,...l},m,d),{focusProps:_,isFocused:v,isFocusVisible:h}=useFocusRing(),{hoverProps:I,isHovered:P}=useHover({}),C=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":v,"data-focus-visible":h,"data-disabled":f,"data-hovered":P,"data-pressed":y,"data-selected":g});return jsxs("label",{ref:p,style:o,className:classNames(Jp,"BaselineUI-Reaction",e),...C,children:[jsx(VisuallyHidden,{children:jsx("input",{...u,..._,ref:d})}),jsxs("div",{...I,className:ec({isSelected:g,isFocusVisible:h,isHovered:P,isReadOnly:b,isDisabled:f}),children:[jsx("div",{className:oc({isDisabled:f,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:tc({isSelected:m.isSelected,isDisabled:f,isReadOnly:b,size:r}),children:jsx($t,{value:t})})]})]})});nc.displayName="Reaction";var ic="_1azy5686",sc="_1azy5685",lc="var(--_1azy5680)",pc="_1azy5688",cc="_1azy5689",dc="_1azy5681 z9nup82",uc="_1azy5682";var mc="_1azy5687";var l5={sm:16,md:20},p5={sm:[CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon],md:[CheckCircleFilledIcon,ErrorAltCircleFilledIcon$1]},qt=nt.forwardRef(({className:e,style:t,size:o="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=l5[o],d=c/2-2,m=2*d*Math.PI,u=p5[o][r==="success"?0:1];return jsxs("div",{className:classNames(dc,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[lc]:`${m}px`}),...t},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:uc,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:ic,cx:c/2,cy:c/2,r:d}),r==="active"&&jsx("circle",{role:"presentation",className:sc,cx:c/2,cy:c/2,r:d})]}),r==="success"&&jsx(u,{className:mc,size:c}),r==="error"&&jsx(u,{className:pc,size:c})]}),i.label?jsx("span",{...p,className:cc,children:i.label}):null]})});qt.displayName="ProgressSpinner";var Ur=z({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kpa"],[{isSelected:!0,isDisabled:!0},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),fc=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z610z"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]});var y5={sm:16,md:20,lg:24},qr=nt.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=useToggleState(i),{buttonProps:l,isPressed:c,ref:d,isFocusVisible:m,isFocused:u,isHovered:y,uiStateOptions:f}=Cr(i,p),b=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":u,"data-focus-visible":m,"data-disabled":i.isDisabled,"data-hovered":y,"data-pressed":c,"data-selected":p.isSelected});return jsxs(a,{...mergeProps(l,b),className:classNames(Ur({isHovered:y,isFocusVisible:m,isSelected:p.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(f):e),style:typeof t=="function"?t(f):t,ref:M(d,s),children:[o?jsx(o,{size:y5[r],className:fc({isDisabled:i.isDisabled,isSelected:p.isSelected})}):null,i.label]})});qr.displayName="ToggleButton";var Kr=z({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),yc=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:[]}),bc=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 _c=nt.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=nt.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:d,focusProps:m}=useFocusRing(),{inputProps:u,isPressed:y,isDisabled:f,isSelected:b,isReadOnly:g}=useCheckbox({...i,children:o},l,p),{hoverProps:_,isHovered:v}=useHover({isDisabled:f}),h=filterTruthyValues({"data-disabled":f,"data-readonly":g,"data-hovered":v,"data-selected":b,"data-pressed":y,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":d,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(yc({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,m),ref:p})}),jsxs("div",{..._,className:bc({isSelected:b&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:f,isReadOnly:g,hasError:i.isInvalid,isHovered:v}),children:[b&&!i.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:Kr({isDisabled:f}),children:o}):null]})});_c.displayName="Checkbox";var zc={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 hc=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),xc="_1nsi9h1f _1yep5z6ln _1yep5z6lf _1yep5z6eu",Cc=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:[]}),Pc=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]});var U5={style:"decimal"},q5={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},Sc=nt.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...d},m)=>{let{locale:u}=useLocale(),y=F(zc),f={...d,formatOptions:U5,minValue:o,incrementAriaLabel:a||y.formatMessage("nextPage"),decrementAriaLabel:n||y.formatMessage("prevPage"),defaultValue:r,"aria-label":i||y.formatMessage("goToPage")},b=nt.useRef(null),g=useNumberFieldState({...f,locale:u}),{inputProps:_,decrementButtonProps:v,incrementButtonProps:h,groupProps:I}=useNumberField({...f,onKeyDown:D=>{D.key==="Enter"&&b.current?.blur(),d.onKeyDown?.(D);},isDisabled:c},g,b),{hoverProps:P,isHovered:C}=useHover({}),{focusProps:x,isFocused:S,isFocusVisible:N}=useFocusRing(),R=p==="floating",[T,k]=q5[s],w=filterTruthyValues({"data-focus-visible":N,"data-focused":S,"data-hovered":C,"data-block-id":d["data-block-id"],"data-block-class":d["data-block-class"]}),H=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(I,P,w),className:classNames(Cc({size:s,variant:p}),"BaselineUI-Pagination",e),style:t,ref:m,children:[l?null:jsxs(Fragment,{children:[jsx(E,{icon:T,...v,elementType:"div",size:s,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||v.isDisabled}),p==="floating"&&jsx(j,{orientation:"vertical"})]}),jsxs("div",{className:hc({isFocused:S,variant:p,size:s}),"aria-label":y.formatMessage("pageXofY",{arg0:_.value,arg1:g.maxValue}),children:[jsx("input",{...mergeProps(_,x),ref:b,className:classNames("BaselineUI-Pagination-Input",xc),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:Pc({isDisabled:c}),children:["/ ",jsx($t,{value:g.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(j,{orientation:"vertical"}),jsx(E,{icon:k,...h,elementType:"div",size:s,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||h.isDisabled})]})]})});Sc.displayName="Pagination";var Tc=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};Tc.displayName="DateFormat";var To=z({defaultClassName:"_1f789qjr",variantClassNames:{variant:{neutral:"_1yep5z610x",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z6110"},isDisabled:{true:"_1yep5z61mr"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Gr=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"]]}),Nc="_1f789qjz",Lc="_1f789qj0",Mc=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"]]}),Wr=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 Fc=({item:e,state:t,variant:o="neutral"})=>{let r=nt.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:d,allowsSelection:m}=useTag({item:e},t,r),u=nt.useRef(null),{buttonProps:y}=useButton(p,u),{hoverProps:f,isHovered:b}=useHover({isDisabled:c}),{hoverProps:g,isHovered:_}=useHover({isDisabled:c}),v=e.value?.icon,h=e.value?.data?.variant??o;return jsx("div",{...mergeProps(i,a,g),ref:r,className:classNames(Gr({isFocusVisible:n,variant:h,isDisabled:c,allowsRemoving:l,isSelected:d,allowsSelection:m,isHovered:_}),Wr({variant:h,isDisabled:c,isSelected:d}),"BaselineUI-Tag"),children:jsxs("div",{...s,className:Nc,children:[d?jsx(CheckmarkIcon$3,{size:16,className:To({variant:h,isDisabled:c,isSelected:d})}):null,!d&&v?jsx(v,{size:16,className:To({variant:h,isDisabled:c,isSelected:d})}):null,e.rendered,l?jsx("button",{...mergeProps(y,f),className:Mc({variant:h,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var Oc=nt.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=nt.useRef(null),c=useListState({...n,items:s,children:p}),{gridProps:d}=useTagGroup(n,c,l);return jsx("div",{...d,className:classNames(Lc,"BaselineUI-TagGroup",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(i,l),children:[...c.collection].map(m=>jsx(Fc,{state:c,item:m,variant:n.variant},m.key))})});Oc.displayName="TagGroup";var jc="_1yep5z6lc",Ac=z({defaultClassName:"_1kvz17db _1yep5z6kz _1yep5z6l1",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),$c=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6kz _1yep5z6l0",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Uc="_1yep5z6ev _1yep5z6dy",qc=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:[]}),Kc="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Gc=z({defaultClassName:"_1kvz17d7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Ln=nt.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext(Ye),{disabledKeys:n}=useContext(Ye),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=Ve(s.target),l=[...a?.keys()||[]].findIndex(y=>a?.get(y)?.current===p?.activeElement),c=a?.get(l||0),d=a?.size||0,m=y=>{let f=a.get(y-1<0?d-1:y-1);n?.has(f?.current?.getAttribute("data-key")||"")?m(y-1):f?.current?.focus();},u=y=>{let f=a.get((y+1)%d);n?.has(f?.current?.getAttribute("data-key")||"")?u(y+1):f?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),u(-1);break}case"End":{s.preventDefault(),m(d);break}case"ArrowDown":{s.preventDefault(),u(l);break}case"ArrowUp":{s.preventDefault(),m(l);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:o,className:classNames(jc,t),ref:r,children:nt.Children.map(e,(s,p)=>nt.cloneElement(s,{index:p}))})});Ln.displayName="AccordionBase";var Ye=nt.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Yc=nt.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=nt.useState(o),d=nt.useRef(new Map).current,[m,u]=nt.useState(a);useEffect(()=>{u(m);},[m]),useEffect(()=>{n?.(l);},[l,n]);let y=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:t,headers:d,expansionMode:m}),[r,l,t,d,m]);return jsx(Ye.Provider,{value:y,children:jsx(FocusScope,{children:jsx(Ln,{className:i,style:s,ref:p,children:e})})})});Yc.displayName="Accordion";var Dn=nt.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=nt.useRef(null),{expandedKeys:c,setExpandedKeys:d,expansionMode:m,disabledKeys:u,headers:y}=useContext(Ye),f=u?.has(r),b=useFocusManager();invariant(b);let{focusNext:g,focusPrevious:_}=b,{keyboardProps:v}=useKeyboard({onKeyDown:w=>{w.key==="ArrowRight"?g({wrap:!0}):w.key==="ArrowLeft"?_({wrap:!0}):w.continuePropagation();},isDisabled:f});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),y?.set(n,l);},[n,y]);let h=()=>{d(w=>{let B=new Set(w);return B.has(r)?B.delete(r):(m==="single"&&B.clear(),B.add(r)),B});},{buttonProps:I}=useButton({"aria-expanded":c.has(r),"aria-controls":o,onPress:h,isDisabled:f},l),{pressProps:P}=usePress({onPress:h,isDisabled:f}),{focusProps:C,isFocusVisible:x}=useFocusRing(),{hoverProps:S,isHovered:N}=useHover({isDisabled:f}),{focusProps:R,isFocusVisible:T}=useFocusRing({within:!0}),k=c.has(r);return jsxs("h3",{...mergeProps(v,P,S,R),className:qc({isFocusVisible:x,isHovered:N,isDisabled:f}),ref:p,children:[jsxs("div",{className:Gc({isDisabled:!!f}),children:[jsx(ChevronRightIcon,{className:$c({isExpanded:k}),size:8}),jsx("button",{...mergeProps(I,C),id:a,"data-key":r,className:Kc,ref:l,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:Ac({showActionsOnTriggerOnly:s,isTriggered:T||N}),children:t.map((w,B)=>jsx(E,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:f,...w},B))}):null,i?jsx("div",{className:Uc,children:i}):null]})});Dn.displayName="AccordionHeader";var ad=nt.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),d=useId(),{expandedKeys:m}=useContext(Ye),u=nt.useRef(null),y=m.has(r),f=Tt(),b=useReducedMotion(),g=useTransition(y?[r]:[],{from:!f&&!b&&{height:0,opacity:0},enter:()=>async _=>{await _({height:u.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:_=>_.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(Dn,{value:r,actions:t,id:d,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),g(_=>jsx(animated.div,{role:"region","aria-labelledby":d,id:c,style:{..._,overflow:"hidden"},children:jsx("div",{ref:u,className:s,style:i,children:o})}))]})});ad.displayName="AccordionItem";var Do=nt.forwardRef(({variant:e,isOpen:t,selectedIcon:o,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":p,"data-block-class":l,...c},d)=>{let m=nt.useRef(null),{buttonProps:u,isPressed:y}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:f,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:g,isFocused:_,isFocusVisible:v}=useFocusRing(),h=At({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(u.disabled=!1);let I=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":_,"data-focus-visible":v,"data-hovered":b,"data-pressed":y,"data-open":t,"data-block-id":p,"data-block-class":l});return jsxs("button",{...mergeProps(u,f,g,I),ref:M(d,m),className:classNames(np({isFocused:v,isDisabled:c.isDisabled,isOpen:t,isHovered:b,variant:e}),wt({variant:e,isHovered:b,isFocused:v,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:sp,children:[o?jsx(o,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(Rt({validationState:r,isReadOnly:!!c.isReadOnly}),ip),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:ap({isOpen:t})})})]})});Do.displayName="SelectButton";var Yr=nt.createContext({state:null,popoverAnchorRef:null}),Fn=nt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:d,renderTrigger:m=({buttonProps:f,selectedValue:b,valueProps:g,isOpen:_,ref:v})=>{let h=b&&"icon"in b&&b.icon;return jsx(Do,{...f,className:l,style:c,isOpen:_,isReadOnly:u.isReadOnly,ref:v,variant:r,validationState:u.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:u.placeholder,valueProps:g})},...u},y)=>{let{popoverAnchorRef:f}=useContext(Yr),b=nt.useRef(null),g=ve(u.portalContainer),{labelProps:_,triggerProps:v,valueProps:h,menuProps:I,descriptionProps:P,errorMessageProps:C}=useSelect({...u,validationState:u.validationState==="error"?"invalid":"valid"},d,b),x=ke({...u,descriptionProps:P,errorMessageProps:C,labelPosition:o}),S=d.selectedItem?.value??null;return jsxs(it.Provider,{value:d,children:[jsxs("div",{style:t,className:classNames(Ue({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:y,children:[u.label||x?jsxs("div",{className:$e({labelPosition:o,hasMessage:!!x}),children:[u.label?jsx("div",{..._,className:classNames(Ae,"BaselineUI-Select-Label"),children:u.label}):null,o==="start"&&x]}):null,jsx(HiddenSelect,{state:d,triggerRef:b,isDisabled:u.isDisabled,label:u.label,name:u.name}),m({buttonProps:v,selectedValue:S,valueProps:h,isOpen:d.isOpen,ref:b}),o==="top"&&x]}),d?jsx(be,{placement:p,portalContainer:g,offset:u.offset||2,state:d,triggerRef:f||b,style:t,className:classNames(We,"BaselineUI-Select-Popover"),...u,children:jsx(le,{...I,label:u.label,items:u.items,showSelectedIcon:u.showSelectedIcon,className:Hr,optionStyle:i,optionClassName:s})}):null]})});Fn.displayName="SelectCore";var pd=nt.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})});pd.displayName="SelectStandalone";var Qe=nt.forwardRef((e,t)=>{let{state:o}=useContext(Yr);return useEffect(()=>{invariant(o||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,o]),o?jsx(Fn,{state:o,...e,ref:t}):jsx(pd,{...e,ref:t})});Qe.displayName="Select";var dd=nt.forwardRef(({className:e,style:t,variant:o,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=nt.useRef(null),l=useCallback(({buttonProps:c,selectedValue:d,valueProps:m,isOpen:u,ref:y})=>{let f=d&&"icon"in d&&d.icon;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(Do,{...c,isOpen:u,isReadOnly:i.isReadOnly,ref:y,variant:o,validationState:i.validationState,selectedIcon:f||void 0,label:d?"label"in d&&d?.label:i.placeholder,valueProps:m})})},[i,n,o]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:t,ref:M(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(Qe,{...i,renderTrigger:l})]})});dd.displayName="IconSelect";var ud="_1017q4c5",md=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),fd="_1017q4c4";var qz={sm:AvatarIcon,md:AvatarIcon$1},Wt=nt.forwardRef(({className:e,style:t,size:o="md",icon:r=qz[o],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":d},m)=>{let{imgProps:u}=St({src:n,alt:a}),y=a?.split(" ").map(f=>f[0]).join("");return jsxs("span",{className:classNames(md({size:o,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:t,"aria-disabled":s,"data-block-id":c,"data-block-class":d,children:[n?jsx("img",{...u,loading:l,className:fd}):null,!i&&!n&&jsx(r,{size:o==="sm"?16:24}),i&&!n?o==="sm"?y[0]:y:null,p?jsx("div",{"data-testid":"notification",className:ud}):null]})});Wt.displayName="Avatar";var yd="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",bd=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"]]}),gd=z({defaultClassName:"_1x62fhb3 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),vd="_1x62fhbl",Vn=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"]]}),_d="_1yep5z6lj _1yep5z6lg _1yep5z6hp _1yep5z6li",zd=z({defaultClassName:"_1x62fhb0 _1yep5z6lc _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1yep5z611v",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var hd=({state:e,...t})=>{let o=nt.useRef(null),{tabPanelProps:r}=useTabPanel(t,e,o),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[_d]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var An=nt.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),d=nt.useRef(null),{tabListProps:m}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,d);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:t,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(zd({variant:a}),r),style:o,children:[jsx("div",{...m,className:gd({variant:a}),ref:d,children:[...c.collection].map(u=>(invariant(u.value,"TabItem requires a value prop"),jsx(Cd,{item:u,state:c,onRemove:i,variant:a},u.key)))}),n?.map((u,y)=>jsx("div",{className:yd,children:jsx(E,{...u,variant:"secondary",size:"sm",className:classNames(vd,u.className)})},y))]}),jsx(hd,{state:c},c.selectedItem?.key)]})});An.displayName="TabsBase";var Cd=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,i=nt.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},o,i),{hoverProps:c,isHovered:d}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:u,titleStyle:y,titleClassName:f}=n,{focusProps:b,isFocusVisible:g,isFocused:_}=useFocusRing(),{keyboardProps:v}=useKeyboard({onKeyDown:I=>{I.key==="Backspace"&&t?t(a):I.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":d,"data-focus-visible":g});return jsxs("div",{...mergeProps(v,s,c,b,h),className:classNames(bd({isHovered:d,isSelected:p,isFocusVisible:g,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",f),style:y,ref:i,children:[u?jsx(u,{size:20,className:Vn({isHovered:d,isSelected:p,isDisabled:l,variant:r})}):null,m,t?jsx(E,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:p||_||d?1:0},className:Vn({isHovered:d,isSelected:p,isDisabled:l,variant:r})}):null]})};Cd.displayName="TabButton";var kd=nt.forwardRef(({children:e,...t},o)=>{let r=useMemo(()=>nt.Children.map(e,a=>!a||!nt.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)})});kd.displayName="Tabs";var Id=({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);Id.displayName="TabItem";var Rd={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 wd=z({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),Sd=z({defaultClassName:"kfun6y0 z9nup82",variantClassNames:{variant:{info:"kfun6y1",warning:"kfun6y2",error:"kfun6y3",success:"kfun6y4"},arrangement:{single:"kfun6y5",multi:"kfun6y6",compact:"kfun6y7"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:!1,arrangement:"single"},"kfun6ya"],[{hasButton:!0,arrangement:"compact"},"kfun6yb"],[{hasCloseButton:!0,arrangement:"compact"},"kfun6yc"]]}),Td=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),Nd=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Ld=z({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),Md=z({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),Dd=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var xh={error:{sm:ErrorAltCircleFilledIcon,md:ErrorAltCircleFilledIcon$1},info:{sm:InfoCircleFilledIcon,md:InfoCircleFilledIcon$1},success:{sm:CheckmarkCircleFilledIcon,md:CheckCircleFilledIcon},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Ed=nt.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":d},m)=>{let u=F(Rd),y=o&&jsx(G,{variant:s==="compact"?"tertiary":"ghost",label:o,onPress:r}),f=xh[n][l];return jsxs("div",{className:classNames(Sd({variant:n,arrangement:s,hasButton:!!o||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":d,style:a,role:"alert",ref:m,children:[jsxs("div",{className:Dd({arrangement:s}),children:[jsx(f,{className:Ld({variant:n}),size:16}),jsxs("div",{className:wd({arrangement:s}),children:[jsx("h3",{className:Md({size:l}),children:i}),jsx("section",{className:Td({size:l}),children:t})]}),s==="compact"&&y]}),jsxs("div",{className:Nd({arrangement:s}),children:[s!=="compact"&&y,p?jsx(E,{variant:"secondary",icon:XCircleFilledIcon,size:"sm",onPress:p,"aria-label":u.formatMessage("close")}):null]})]})});Ed.displayName="InlineAlert";var Je={ar:{add:"\u0625\u0636\u0627\u0641\u0629",addColor:"\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",cancel:"\u0625\u0644\u063A\u0627\u0621",colorFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",colorPresets:"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",customColors:"\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",newColor:"\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",noColor:"\u0644\u0627 \u064A\u0648\u062C\u062F",removeColor:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",transparent:"\u0634\u0641\u0627\u0641"},cs:{add:"P\u0159idat",addColor:"P\u0159idat barvu",cancel:"Zru\u0161it",colorFormat:"Form\xE1t barvy",colorPresets:"P\u0159edvolby barev",customColors:"Vlastn\xED barvy",newColor:"Vlastn\xED barva",noColor:"Nen\xED",removeColor:"Odebrat barvu",transparent:"Pr\u016Fhledn\xE1"},cy:{add:"Ychwanegu",addColor:"Ychwanegu Lliw",cancel:"Canslo",colorFormat:"Fformat Lliw",colorPresets:"Rhagosodiadau Lliw",customColors:"Lliwiau Custom",newColor:"Lliw Personol Newydd",noColor:"Dim",removeColor:"Tynnu Lliw",transparent:"Tryloyw"},da:{add:"Tilf\xF8j",addColor:"Tilf\xF8j Farve",cancel:"Annuller",colorFormat:"Farveformat",colorPresets:"Farvevalg",customColors:"Brugerdefinerede farver",newColor:"Ny tilpasset farve",noColor:"Ingen",removeColor:"Fjern Farve",transparent:"Transparent"},de:{add:"Hinzuf\xFCgen",addColor:"Farbe hinzuf\xFCgen",cancel:"Abbrechen",colorFormat:"Farbformat",colorPresets:"Farbvorlagen",customColors:"Benutzerdefinierte Farben",newColor:"Neue benutzerdefinierte Farbe",noColor:"Kein",removeColor:"Farbe entfernen",transparent:"Transparent"},el:{add:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",addColor:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",colorFormat:"\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",colorPresets:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",customColors:"\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",newColor:"\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",noColor:"\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",removeColor:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",transparent:"\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2"},"en-GB":{add:"Add",addColor:"Add Colour",cancel:"Cancel",colorFormat:"Colour Format",colorPresets:"Colour Presets",customColors:"Custom Colours",newColor:"New Custom Colour",noColor:"None",removeColor:"Remove Colour",transparent:"Transparent"},en:{add:"Add",addColor:"Add Color",cancel:"Cancel",colorFormat:"Color Format",colorPresets:"Color Presets",customColors:"Custom Colors",newColor:"New Custom Color",noColor:"None",removeColor:"Remove Color",transparent:"Transparent"},es:{add:"A\xF1adir",addColor:"A\xF1adir color",cancel:"Cancelar",colorFormat:"Formato de color",colorPresets:"Preajustes de color",customColors:"Colores personalizados",newColor:"Nuevo color personalizado",noColor:"Ninguna",removeColor:"Eliminar color",transparent:"Transparente"},fi:{add:"Lis\xE4\xE4",addColor:"Lis\xE4\xE4 v\xE4ri",cancel:"Kumoa",colorFormat:"V\xE4rimuoto",colorPresets:"V\xE4rin esiasetukset",customColors:"Mukautetut v\xE4rit",newColor:"Uusi muokattu v\xE4ri",noColor:"Ei mit\xE4\xE4n",removeColor:"Poista v\xE4ri",transparent:"L\xE4pin\xE4kyv\xE4"},"fr-CA":{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},fr:{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},he:{add:"\u05D4\u05D5\u05E1\u05E4\u05D4",addColor:"\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC",colorFormat:"\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",colorPresets:"\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",customColors:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",newColor:"\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",noColor:"\u05DC\u05DC\u05D0",removeColor:"\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3"},hr:{add:"Dodati",addColor:"Dodaj boju",cancel:"Otka\u017Ei",colorFormat:"Format boje",colorPresets:"Prijedlozi boja",customColors:"Prilago\u0111ene boje",newColor:"Nova prilago\u0111ena boja",noColor:"Prazno",removeColor:"Ukloni boju",transparent:"Prozirna"},id:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batalkan",colorFormat:"Format Warna",colorPresets:"Preset Warna",customColors:"Warna Kustom",newColor:"Warna Khusus Baru",noColor:"Tidak ada",removeColor:"Hapus Warna",transparent:"Transparan"},it:{add:"Aggiungi",addColor:"Aggiungi colore",cancel:"Annulla",colorFormat:"Formato del colore",colorPresets:"Colori predefiniti",customColors:"Colori personalizzati",newColor:"Nuovo colore personalizzato",noColor:"Nessuno",removeColor:"Rimuovi colore",transparent:"Trasparente"},ja:{add:"\u8FFD\u52A0",addColor:"\u8272\u3092\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorFormat:"\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",colorPresets:"\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",customColors:"\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",newColor:"\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",noColor:"\u306A\u3057",removeColor:"\u8272\u3092\u524A\u9664",transparent:"\u900F\u660E"},ko:{add:"\uCD94\uAC00",addColor:"\uC0C9\uC0C1 \uCD94\uAC00",cancel:"\uCDE8\uC18C",colorFormat:"\uC0C9\uC0C1 \uD615\uC2DD",colorPresets:"\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",customColors:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",newColor:"\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",noColor:"\uC5C6\uC74C",removeColor:"\uC0C9\uC0C1 \uC81C\uAC70",transparent:"\uD22C\uBA85"},ms:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batal",colorFormat:"Format Warna",colorPresets:"Praset Warna",customColors:"Warna Kustom",newColor:"Warna Tersuai Baharu",noColor:"Tiada",removeColor:"Buang Warna",transparent:"Lut Sinar"},"nb-NO":{add:"Legg til",addColor:"Legg til farge",cancel:"Avbryt",colorFormat:"Fargeformat",colorPresets:"Fargeinnstillinger",customColors:"Egendefinerte farger",newColor:"Ny tilpasset farge",noColor:"Ingen",removeColor:"Fjern farge",transparent:"Gjennomsiktig"},nl:{add:"Voeg toe",addColor:"Kleur toevoegen",cancel:"Annuleer",colorFormat:"Kleurformaat",colorPresets:"Kleurvoorinstellingen",customColors:"Aangepaste kleuren",newColor:"Nieuwe aangepaste kleur",noColor:"Geen",removeColor:"Kleur verwijderen",transparent:"Doorzichtig"},pl:{add:"Dodaj",addColor:"Dodaj kolor",cancel:"Anuluj",colorFormat:"Format koloru",colorPresets:"Wst\u0119pnie ustawione kolory",customColors:"Niestandardowe kolory",newColor:"Nowy kolor niestandardowy",noColor:"Brak",removeColor:"Usu\u0144 kolor",transparent:"Prze\u015Bwiecaj\u0105ce"},"pt-PT":{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Predefini\xE7\xF5es de cor",customColors:"Cores personalizadas",newColor:"Nova cor personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},pt:{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Pr\xE9-ajustes de Cores",customColors:"Cores personalizadas",newColor:"Nova Cor Personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},ru:{add:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",addColor:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",colorPresets:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",customColors:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",newColor:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",noColor:"\u041D\u0435\u0442",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",transparent:"\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439"},sk:{add:"Prida\u0165",addColor:"Prida\u0165 farbu",cancel:"Zru\u0161i\u0165",colorFormat:"Form\xE1t farby",colorPresets:"Predvo\u013Eby farieb",customColors:"Vlastn\xE9 farby",newColor:"Vlastn\xE1 farba",noColor:"\u017Diadny",removeColor:"Odstr\xE1ni\u0165 farbu",transparent:"Prieh\u013Eadn\xE1"},sl:{add:"Dodaj",addColor:"Dodaj barvo",cancel:"Prekli\u010Di",colorFormat:"Barvni format",colorPresets:"Barvne predloge",customColors:"Prilagojene barve",newColor:"Nova barva po meri",noColor:"Prazna stran",removeColor:"Odstrani barvo",transparent:"Prosojna"},sv:{add:"L\xE4gg till",addColor:"L\xE4gg till f\xE4rg",cancel:"Avbryt",colorFormat:"F\xE4rgformat",colorPresets:"F\xF6rval f\xF6r f\xE4rger",customColors:"Anpassade f\xE4rger",newColor:"Ny anpassad f\xE4rg",noColor:"Ingen",removeColor:"Ta bort f\xE4rg",transparent:"Genomskinligt"},th:{add:"\u0E40\u0E1E\u0E34\u0E48\u0E21",addColor:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",colorFormat:"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",colorPresets:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",customColors:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",newColor:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",noColor:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",removeColor:"\u0E25\u0E1A\u0E2A\u0E35",transparent:"\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A"},tr:{add:"Ekle",addColor:"Renk Ekle",cancel:"Vazge\xE7",colorFormat:"Renk Format\u0131",colorPresets:"Renk \xD6nayarlar\u0131",customColors:"\xD6zel Renkler",newColor:"Yeni \xF6zel renk",noColor:"Hi\xE7biri",removeColor:"Rengi Kald\u0131r",transparent:"\u015Eeffaf"},uk:{add:"\u0414\u043E\u0434\u0430\u0442\u0438",addColor:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",cancel:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",colorPresets:"\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",customColors:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",newColor:"\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",noColor:"\u041D\u0435\u043C\u0430\u0454",removeColor:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",transparent:"\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439"},"zh-Hans":{add:"\u6DFB\u52A0",addColor:"\u6DFB\u52A0\u989C\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u989C\u8272\u683C\u5F0F",colorPresets:"\u989C\u8272\u9884\u8BBE",customColors:"\u81EA\u5B9A\u4E49\u989C\u8272",newColor:"\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",noColor:"\u65E0",removeColor:"\u79FB\u9664\u989C\u8272",transparent:"\u900F\u660E"},"zh-Hant":{add:"\u52A0\u5165",addColor:"\u6DFB\u52A0\u984F\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u984F\u8272\u683C\u5F0F",colorPresets:"\u984F\u8272\u9810\u8A2D\u9805",customColors:"\u81EA\u8A02\u984F\u8272",newColor:"\u65B0\u81EA\u8A02\u984F\u8272",noColor:"\u7121",removeColor:"\u79FB\u9664\u984F\u8272",transparent:"\u900F\u660E"}};var ea=({children:e})=>{let{triggerProps:t}=nt.useContext(Ge);return jsx(PressResponder,{...t,children:e})};ea.displayName="ModalTrigger";var Sh=({children:e})=>{let{state:t}=nt.useContext(Ge);return jsx(PressResponder,{onPress:()=>{t?.close();},children:e})};var Bd="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lc",Fd="_1dbkl5e",Hd=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:[]}),Vd="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka",Od=z({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",jd="_1dbkl5f z9nup87",oa="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",Ad="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lf",$d="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",ra=z({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",Ud=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"]]}),qd=z({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _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:[]}),Fo="_1dbkl5u",aa="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",na="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",Kn="_1dbkl5x",Kd="_1dbkl5w",Gn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69l _1yep5z69m _1yep5z69n",ia=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:[]}),Wn="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7";var Gd=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"]]}),Wd="_1344e9q9 _1yep5z6fl";var et=nt.forwardRef(({color:e,isFocusVisible:t,isSelected:o,isInteractive:r,isDisabled:a,style:n,className:i,id:s,tooltip:p,"data-block-id":l,"data-block-class":c,...d},m)=>{let u=e&&e!==we&&(typeof e=="string"?parseColor(e):e),{formatMessage:y}=F(),f=!u,{colorSwatchProps:b}=useColorSwatch({color:f?"#000000":e}),{hoverProps:g,isHovered:_}=useHover({isDisabled:a||!r}),v=filterTruthyValues({"data-focus-visible":t,"data-selected":o,"data-hovered":_,"data-block-id":l,"data-block-class":c,"data-disabled":a,"data-interactive":r}),h=f?y(Xd.none):b["aria-label"],I=d["aria-label"]??h,{tooltipProps:P}=zr({tooltip:p,label:I}),C=jsx("div",{...mergeProps(g,v,f?{}:b),style:n,"aria-label":f?y(Xd.none):b["aria-label"],role:"img",className:classNames(Gd({removeBlendMode:f,isFocusVisible:t,isDisabled:!!a,isSelected:!!o,isHovered:_}),"BaselineUI-ColorSwatch",i),ref:m,id:s,...d,children:jsx(L,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:u?Yd(u,4):void 0,children:f?jsx("div",{className:Wd}):null})});return P&&!a?jsx(re,{...P,children:jsx(Lr,{children:C})}):C});et.displayName="ColorSwatch";var Xd=q({none:{id:"none",defaultMessage:"None"}});var Qd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Oo=parseColor("#000000").toFormat("hsla"),ie="hsla",Vo="hexa";function pt(e){return typeof e=="string"?parseColor(e).toFormat(ie):e?e.toFormat(ie):null}function Jd(e,t){return e?.getChannelValue("alpha")?t?.toString(Vo)===e.toString(Vo):!t?.getChannelValue("alpha")}function eu(e,t,o){return t?.label?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var we="NONE";function tu(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString(Vo),label:a.label}))||[],r={id:we,label:e};return [...o,r]}var sa=(e,{optionProps:t,isFocusVisible:o,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...t,ref:a,className:Ad,children:jsx(et,{color:e.value.id,isFocusVisible:o,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),Yd=(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 ru=({value:e,...t})=>{let o=nt.useRef(null),r=nt.useRef(null),a=nt.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...t,value:e,inputXRef:o,inputYRef:r,containerRef:a},n);useEffect(()=>{o.current?.focus();},[]);let{focusProps:c,isFocusVisible:d}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(Bd,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(ia({isFocusVisible:d}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:pt(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var iu=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:d=>{t(pt(d)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Oo);}}),n=nt.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(qn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:Ud({isFocused:p,isHovered:c,allowAlpha:o})}),o?jsx(lu,{color:e,setColor:t}):null]})},su=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(qn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(Me,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("red",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("green",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),o?jsx(lu,{color:e,setColor:t}):null]})},Qh={style:"percent",maximumFractionDigits:0},lu=({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:Qh,className:Fo,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=nt.useRef(null),n=nt.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...t,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(oa,{[Pl({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]=nt.useState("hex"),{formatMessage:i}=F(Je);return jsxs(Fragment,{children:[jsx(ru,{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(Qe,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Qd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(iu,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o}),a==="rgb"&&jsx(su,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o})]})]})};var yu=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Je),c=nt.useRef(null),d=Nt(c.current),[m,u]=hl(o,[]),y=nt.useRef(null),[f,b]=nt.useState(e),g=nt.useMemo(()=>m.map(C=>({id:C,label:parseColor(C).getColorName(p),description:C})),[m,p]),_=useCallback(()=>{let C=i==="active"?e:f;if(m.includes(C.toString(ie))){y.current?.querySelector(`[data-key='${C.toString(ie)}']`)?.classList.add(Kn);return}u([...m,C.toString(ie)]);},[m,e,u,f,i]);useEffect(()=>{let C=y.current;function x(S){S.animationName===Kd&&S.target?.classList.remove(Kn);}return C?.addEventListener("animationend",x),()=>{C?.removeEventListener("animationend",x);}},[]);let v=useId(),h=jsx(E,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),I=useCallback(C=>jsxs(me,{size:"content",className:ra({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(la,{color:f,setColor:b,allowAlpha:s}),jsx(j,{}),jsx(L,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(L,{display:"inline-flex",gap:"lg",children:[jsx(G,{label:l("cancel"),size:"sm",variant:"secondary",onPress:C}),jsx(G,{label:l("add"),variant:"primary",onPress:()=>{_(),C();},size:"sm"})]})})]}),[f,_,l,s]),P=useCallback(C=>{invariant(C instanceof Set,"Key must be a set");let x=[...C][0];x&&t(parseColor(x).toFormat(ie));},[t]);return jsxs(Fragment,{children:[jsx(j,{}),jsxs("div",{className:classNames($d,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:v,children:n}),jsxs(L,{display:"flex",children:[!!m.length&&m.includes(e.toString(ie))&&jsx(E,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{u(m.filter(C=>C!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(d==="mobile"?jsxs(Ie,{children:[jsx(ea,{children:h}),jsx(De,{style:{zIndex:1e5},children:({close:C})=>I(C)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:h}),jsx(Re,{placement:"right top",className:aa,offset:6,children:({close:C})=>I(C)})]}))]})]}),!!m.length&&jsx(le,{items:g,layout:"grid","aria-labelledby":v,className:classNames(ta,na,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:sa,ref:y,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:P})]})};var ti=nt.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Je),p=useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],d=a.find(m=>m.id===c);invariant(d,"Preset not found"),e(d.id===we?null:parseColor(d.id).toFormat(ie)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(na,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:i,children:jsx(le,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:ta,renderOption:sa,selectionMode:"single",selectedKeys:[t?.toString(Vo)||we],onSelectionChange:p})})});ti.displayName="ColorPresetList";var Ao=nt.forwardRef(({color:e,colorLabel:t,colorName:o,...r},a)=>{let n=nt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:d}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l}),u=pr(),y=pr();return jsxs("button",{...mergeProps(p,i,d,m),style:r.style,className:classNames(Hd({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:M(a,n),id:u,"aria-labelledby":r["aria-labelledby"]||`${u} ${y}`,children:[jsx(et,{color:e?.toString("hexa")}),t?jsx("div",{className:jd,id:y,"aria-hidden":"true",children:o}):typeof o=="string"&&jsx(VisuallyHidden,{children:o})]})});Ao.displayName="ColorInputButton";var da=nt.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=nt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:d}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,d,m),ref:M(a,n),style:t,className:classNames(qd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(o,{size:16}),jsx("div",{className:Fd,style:{backgroundColor:r.color||void 0}})]})});da.displayName="IconColorInputButton";function Pu({colorLabel:e,color:t,presets:o}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>o.find(p=>p.id===we?!t:t?Jd(t,parseColor(p.id)):!1),[o,t]),i=useMemo(()=>typeof e=="function"?e?.(t):e?eu(t,n,r(Px.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 Px=q({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Zt=nt.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,onChangeEnd:l,defaultValue:c,storePickedColorKey:d="baselinePickedColor",value:m,addColorButtonLabel:u,removeColorButtonLabel:y,customColorsLabel:f,renderTriggerButton:b=({isOpen:x,color:S,ref:N,colorName:R,triggerProps:T,labelId:k})=>jsx(Ao,{...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:R}),pickerMode:g="active",offset:_=2,placement:v=n==="start"?"bottom end":"bottom start","data-block-id":h,"data-block-class":I,...P},C)=>{let x=nt.useRef(null),S=nt.useRef(null),N=useOverlayTriggerState(P),{triggerProps:R,overlayProps:T}=useOverlayTrigger({type:"listbox"},N,x),k=ve(P.portalContainer),[w,B]=useControlledState(m===void 0?void 0:pt(m),pt(c),X=>p?.(X?.toFormat("rgba")||null)),{formatMessage:H}=F(Je),D=useMemo(()=>tu(H(ua.noColor),a),[a,H]),K=useId(),{colorName:A}=Pu({colorLabel:i,color:w,presets:D}),$=useMemo(()=>D.filter(X=>o||X.id!==we),[D,o]),V=u||H(ua.addColor),J=y||H(ua.removeColor),O=f||H(ua.customColors),Z=jsx(yu,{color:w||Oo,setColor:X=>{B(X),l?.(X?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:V,removeColorButtonLabel:J,customColorsLabel:O,pickerMode:g,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Vd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":I,style:t,ref:C,children:[P.label?jsx("label",{id:K,className:Od({labelPosition:n}),children:P.label}):null,b({isOpen:N.isOpen,color:w,ref:x,colorName:A,triggerProps:R,labelId:K})]}),jsx(be,{...P,portalContainer:k,placement:v,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&&g==="active"?jsxs(Fragment,{children:[jsx(la,{color:w||Oo,setColor:B,allowAlpha:r,onChangeEnd:X=>{l?.(X?.toFormat("rgba")||null);}}),Z]}):null,!!$.length&&jsxs(Fragment,{children:[s&&g==="active"?jsx(j,{}):null,jsx(ti,{autoFocus:s&&g==="active"?!1:"first",state:N,triggerRef:x,presets:$,color:w,setColor:X=>{B(X),l?.(X?.toFormat("rgba")||null);}})]}),s&&g==="lazy"?Z:null]})})]})});Zt.displayName="ColorInput";var ua=q({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 wu=nt.forwardRef(({className:e,style:t,icon:o,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=nt.useRef(null),l=useCallback(({isOpen:c,color:d,ref:m,colorName:u,triggerProps:y})=>jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(Ao,{...y,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:d,colorLabel:!1,colorName:u}):jsx(da,{...y,isOpen:c,icon:TextIcon,color:d?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:t,ref:M(s,p),children:[r==="standard"&&o?jsx(o,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Zt,{...i,colorLabel:!1,renderTriggerButton:l})]})});wu.displayName="IconColorInput";var Su={ar:{redo:"\u0625\u0639\u0627\u062F\u0629",undo:"\u062A\u0631\u0627\u062C\u0639"},cs:{redo:"Opakovat",undo:"Zru\u0161it"},cy:{redo:"Ail-wneud",undo:"Dad-wneud"},da:{redo:"Gentag",undo:"Fortryd"},de:{redo:"Wiederholen",undo:"R\xFCckg\xE4ngig machen"},el:{redo:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",undo:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7"},"en-GB":{redo:"Redo",undo:"Undo"},en:{redo:"Redo",undo:"Undo"},es:{redo:"Rehacer",undo:"Deshacer"},fi:{redo:"Tee sittenkin",undo:"Peru"},"fr-CA":{redo:"R\xE9tablir",undo:"Annuler"},fr:{redo:"R\xE9tablir",undo:"Annuler"},he:{redo:"\u05D1\u05D9\u05E6\u05D5\u05E2 \u05DE\u05D7\u05D3\u05E9",undo:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4"},hr:{redo:"Ponovi",undo:"Vrati"},id:{redo:"Ulangi",undo:"Kembalikan"},it:{redo:"Ripristina",undo:"Annulla"},ja:{redo:"\u3084\u308A\u76F4\u3059",undo:"\u53D6\u308A\u6D88\u3059"},ko:{redo:"\uC2E4\uD589\uBCF5\uADC0",undo:"\uC2E4\uD589\uCDE8\uC18C"},ms:{redo:"Buat Semula",undo:"Buat Asal"},"nb-NO":{redo:"Gj\xF8r om igjen",undo:"Angre"},nl:{redo:"Opnieuw",undo:"Herstel"},pl:{redo:"Pon\xF3w",undo:"Cofnij"},"pt-PT":{redo:"Refazer",undo:"Desfazer"},pt:{redo:"Refazer",undo:"Desfazer"},ru:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"},sk:{redo:"Opakova\u0165",undo:"Zru\u0161i\u0165"},sl:{redo:"Uveljavi",undo:"Razveljavi"},sv:{redo:"G\xF6r om",undo:"\xC5ngra"},th:{redo:"\u0E17\u0E33\u0E0B\u0E49\u0E33",undo:"\u0E16\u0E2D\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A"},tr:{redo:"Yinele",undo:"Geri Al"},uk:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",undo:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"zh-Hans":{redo:"\u91CD\u505A",undo:"\u64A4\u9500"},"zh-Hant":{redo:"\u91CD\u4F5C",undo:"\u5FA9\u539F"}};var ma=z({defaultClassName:"mnnh5s1 _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"]]}),Tu="_1yep5z6d8",fa=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Nu=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"]]}),Lu="_1i0ytqa0",ya=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:[]}),Mu=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 Du({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,d,m])=>({x:c,y:d,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 eC={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},Bu=nt.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:d=!0,isDisabled:m,placeholder:u,clearLabel:y,undoLabel:f,redoLabel:b,footerClassName:g,canvasRef:_,value:v,footerStyle:h,"data-block-id":I,"data-block-class":P,"aria-label":C="Drawing canvas",description:x="This is a canvas for drawing using a mouse or touch input.",...S},N)=>{let R=F(Su),T=nt.useRef(null),[k,w]=nt.useState(v||p||[]),B=nt.useMemo(()=>({...eC,...S}),[S]),[H,D]=nt.useState(),K=useId(),{labelProps:A,fieldProps:$}=useLabel({...S,"aria-label":C,labelElementType:"span"}),{isFocusVisible:V,focusProps:J}=useFocusRing({within:!0}),{hoverProps:O,isHovered:Z}=useHover({isDisabled:m}),{undo:X,redo:Ce,canRedo:Pe,canUndo:ye,push:Se}=fl(k,{onAction:Y=>{Y&&(w(Y),l?.(Y));},isDisabled:!c}),{keyboardProps:He}=useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?ht():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Pe&&Ce():ye&&X());}}),[te,de]=useState(!1),_t=useCallback(Y=>{let U=Y.currentTarget.getBoundingClientRect();D(U),Y.target.setPointerCapture(Y.pointerId);let ne=[Y.clientX-U.x,Y.clientY-U.y,Y.pressure];w(W=>[...W,[ne]]),de(!0);},[]),zt=useCallback(Y=>{if(Y.buttons!==1||!H)return;let ne=Vu(Y.nativeEvent).map(W=>[a?clamp(W.clientX-H.left,0,H.width):W.clientX-H.left,a?clamp(W.clientY-H.top,0,H.height):W.clientY-H.top,W.pressure]);w(W=>{let he=[...W];return he[W.length-1]=[...he[W.length-1],...ne],he});},[H,a]),uo=()=>{H&&(l?.(k),Se(k),de(!1));};useEffect(()=>{s?.(k);},[k,s]);let ht=()=>{w([]),s?.([]),Se([]);};return jsxs("div",{ref:M(T,N),className:classNames(Lu,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":m,"data-block-id":I,"data-block-class":P,children:[S.label||c?jsxs("div",{className:Mu({isInline:d}),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":f||R.formatMessage("undo")}),jsx(E,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:RedoIcon,onPress:Ce,"aria-label":b||R.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(J,He,O,$),tabIndex:m?void 0:0,className:classNames(ma({isInline:d,isHovered:Z}),Nu({isFocusVisible:V,isInline:d,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:_t,onPointerMove:zt,onPointerUp:uo,children:(v||k).map((Y,U,ne)=>U<ne.length-1||!te?jsx(Fu,{line:Y,options:B,strokeColor:i,strokeWidth:n},U):jsx(Hu,{line:Y,options:B,strokeColor:i,strokeWidth:n},U))})]}),u||y?jsx("div",{style:h,className:classNames(ya({isInline:d,isDisabled:m}),g),children:(k.length||!u)&&y?jsx(G,{size:"sm",variant:"ghost",label:y,isDisabled:m,onPress:ht}):jsx(G,{size:"sm",variant:"ghost",label:u,isDisabled:!0})}):null]})});Bu.displayName="FreehandCanvas";var Fu=nt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),t)),[e,t]);return jsx("path",{d:a,stroke:o,strokeWidth:r})});Fu.displayName="Stroke";var Hu=nt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=Du({line:e,options:t});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:o,strokeWidth:r},i))})});Hu.displayName="SplitStroke";function Vu(e){if(typeof e.getCoalescedEvents=="function"){let t=e.getCoalescedEvents();return t.length>0?t.flatMap(o=>Vu(o)):[e]}return [e]}var Ou="_1vac7ws0",ju=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function $u(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 Uu(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 gC=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Ku=nt.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:d,onDrag:m,onResizeStart:u,onResizeEnd:y,onResize:f,onRotateStart:b,onRotateEnd:g,onRotate:_,onSnap:v,isSnappable:h,elementGuidelines:I,hideAnchorOnDrag:P=!0,title:C,rotationPosition:x,autoUpdate:S,bound:N,snapRotationDegrees:R,snapRotationThreshold:T,scrollableAncestor:k,renderDirections:w,stopPropagation:B,transformOrigin:H,preventDefault:D},K)=>{let A=useRef(null),$=useRef(null),[V,J]=useState(document),O=useRef(V.createElement("div")),[Z,X]=useState({}),[Ce,Pe]=useState(!1),[ye,Se]=useState(!1),[He,te]=useState(),de=$u(I,V);useLayoutEffect(()=>{let U=O.current;return O.current=V.createElement("div"),()=>{U.remove();}},[V]);let{keyboardProps:_t}=useKeyboard({onKeyDown:U=>{let ne=U.shiftKey?10:1,W=U.metaKey||U.ctrlKey;W&&U.shiftKey&&(ne=45);function he(mo,Uy="x"){W?$.current?.request("rotatable",{deltaRotate:mo*ne},!0):$.current?.request("draggable",Uy==="x"?{deltaX:mo*ne}:{deltaY:mo*ne},!0);}switch(U.key){case"ArrowRight":{he(1);break}case"ArrowLeft":{he(-1);break}case"ArrowUp":{he(-1,"y");break}case"ArrowDown":he(1,"y");}requestAnimationFrame(()=>{$.current?.updateRect();});}});useEffect(()=>{let U=ue(A.current);J(U);let ne=O.current;U.body.append(O.current);function W(mo){Se(mo.shiftKey);}function he(){Se(!1);}return U.addEventListener("keydown",W),U.addEventListener("keyup",he),()=>{U.removeEventListener("keydown",W),U.removeEventListener("keyup",he),ne.remove();}},[]),Uu({scrollable:k,onScroll:()=>{$.current?.updateRect();},ownerDocument:V});let zt=useCallback(U=>{X(ne=>({...ne,...U.style})),i?.(U);},[i]),uo=useCallback(U=>{if(Pe(!0),A.current?.focus(),N){let W=getHTMLElement(N,V)?.getBoundingClientRect();te({position:"client",left:W?.left??0,top:W?.top??0,right:W?.right??0,bottom:W?.bottom??0});}c?.(U);},[N,V,c]),ht=useCallback(U=>{Pe(!1),d?.(U);},[d]),Y=t({style:{...Z.width&&{width:Z.width},...Z.height&&{height:Z.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",..._t,ref:M(A,K),style:{display:"inline-block",...n,...Z},className:classNames(Ou,e),onDoubleClick:l,tabIndex:0,title:C,children:Y}),createPortal(jsx(gC,{ref:$,target:A,draggable:a,resizable:r,rotatable:o,keepRatio:ye,throttleDrag:1,snappable:h||!!N,elementGuidelines:de,snapRenderThreshold:.9,className:ju({isDragging:Ce&&P}),onRender:zt,onDragStart:uo,onDragEnd:ht,useResizeObserver:S,useMutationObserver:S,onRenderEnd:p,onDrag:m,onResizeStart:u,onResizeEnd:y,onResize:f,onRotateStart:b,onRotateEnd:g,onRotate:_,onRenderStart:s,onSnap:v,rotationPosition:x,bounds:He,snapRotationDegrees:R,snapRotationThreshold:T,renderDirections:w,stopPropagation:B,preventDefault:D,transformOrigin:H}),O.current)]})});Ku.displayName="Transform";var Gu={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 Yu=nt.forwardRef(({className:e,style:t,isInline:o=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:d=!0,"data-block-id":m,"data-block-class":u,pickerButtonStyle:y,pickerButtonClassName:f,footerClassName:b,footerStyle:g,clearLabel:_,placeholder:v,labelStyle:h,labelClassName:I,...P},C)=>{let x=nt.useRef(null),S=nt.useRef(null),{formatMessage:N}=F(Gu),[R,T]=useControlledState(n,a||null,te=>{invariant(typeof te!="string"),P.onValueChange?.(te?[te]:[]);}),k=useMemo(()=>NC(R||void 0),[R]),{fieldProps:w,labelProps:B}=useField(P),{dropProps:H,isDropTarget:D}=useDrop({ref:x,onDrop:async te=>{if(p)return;let de=await Rn({items:te.items});de.length&&T(de[0]),l?.(te);},...P}),{clipboardProps:K}=useClipboard({onPaste:async te=>{if(p)return;let de=await Rn({items:te});de.length&&T(de[0]),c?.(te);},...P}),A=()=>{T(null),S.current&&(S.current.value="");},$={type:"file",onChange:te=>{let de=[...te.target.files];T(de[0]),P.onChange?.(te);},accept:r,disabled:p},{focusProps:V,isFocused:J,isFocusVisible:O}=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(Pr({isFocusVisible:O}),{[Tu]:D&&!p},f),style:y},He=filterTruthyValues({"data-loaded":ye,"data-block-id":m,"data-block-class":u,"data-hovered":X,"data-focused":J,"data-drop-target":D,"data-disabled":p,"data-focus-visible":O});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,V,B),className:classNames(ma({isInline:o,isHovered:X,isDisabled:p,hasLoadedImage:!!k&&ye,showFocusRing:D||!!k&&O}),I),style:h,ref:x,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(w,K,$),ref:S})}),!k&&jsx(G,{...Se}),!!k&&(Pe?jsx(qt,{}):jsx("img",{className:fa({isInline:o,isDisabled:p,hasLoadedImage:!!k&&ye&&d}),...Ce}))]}),v||_?jsx("div",{style:g,className:classNames(ya({isInline:o,isDisabled:p}),b),children:(k||!v)&&_?jsx(G,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:A}):jsx(G,{size:"sm",variant:"ghost",label:v,isDisabled:!0})}):null]})});Yu.displayName="ImageDropZone";function NC(e){return e instanceof File?URL.createObjectURL(e):e}var Zu="_1vm2oh49 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6g4",pi="_1vm2oh48 _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6jt _1yep5z6ju _1yep5z6jv",Qu=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 tm=nt.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:d,addAriaLabel:m,accent:u="positive","data-block-id":y,"data-block-class":f,...b},g)=>{let{focusProps:_,isFocused:v,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:I,hoverProps:P}=useHover({isDisabled:o}),{pressProps:C}=usePress({isDisabled:o,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let x=filterTruthyValues({"data-hovered":I,"data-focus-visible":h,"data-focused":v,"data-disabled":o});return jsxs("div",{...b,className:classNames(Qu({isInline:r,isFocusVisible:h,isDisabled:o,isHovered:I,accent:u}),"BaselineUI-Preview",e),"data-block-id":y,"data-block-class":f,"aria-label":b["aria-label"]||a||s,style:t,ref:g,children:[typeof i=="string"?jsx("button",{disabled:o,...mergeProps(P,_,C,x),className: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:Zu,"aria-label":d,size:"xs",icon:TrashIcon,onPress:c}):null]})});tm.displayName="Preview";var om="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e",rm=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),am="cw3m0n7",nm=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:[]}),im="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6l9",sm=z({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var WC=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:nm({labelPosition:n}),children:[jsx("div",{className:sm({isSelected:o,isFocusVisible:r,isDisabled:a}),children:o?jsx("div",{className:am}):null}),e?jsxs("div",{className:om,children:[jsx("span",{className:Kr({isDisabled:a}),children:e}),t?jsx("span",{className:rm({isDisabled:a}),children:t}):null]}):null]}),lm=({state:e,renderOption:t=WC,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(o.id),l=nt.useRef(null),{inputProps:c,isPressed:d,isSelected:m}=useRadio({...s,isDisabled:p,children:o.label,value:o.id},e,l),{focusProps:u,isFocusVisible:y,isFocused:f}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),g=filterTruthyValues({"data-selected":m,"data-focused":f,"data-focus-visible":y,"data-hovered":b,"data-disabled":p,"data-pressed":d,"data-read-only":i});return jsxs("label",{...g,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,u),ref:l})}),t(o,{isFocusVisible:y,isSelected:m,isFocused:f,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var cm=nt.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":d,"data-block-class":m,...u},y)=>{let f=useRadioGroupState(u),{radioGroupProps:b,labelProps:g,descriptionProps:_,errorMessageProps:v}=useRadioGroup({...u,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},f),h=ke({...u,descriptionProps:_,errorMessageProps:v,labelPosition:n}),I=filterTruthyValues({"data-orientation":u.orientation,"data-block-id":d,"data-block-class":m,"data-disabled":u.isDisabled,"data-readonly":u.isReadOnly});return jsxs("div",{...mergeProps(b,I),className:classNames(Ue({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:y,children:[u.label||h?jsxs("div",{className:$e({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...g,className:classNames(Ae,"BaselineUI-RadioGroup-Label"),children:u.label}),n==="start"&&h]}):null,jsx("div",{className:classNames(im,{[Lt]:u.isDisabled},o),style:r,children:a.map(P=>jsx(lm,{state:f,renderOption:i,item:P,...u,value:P.id},P.id))}),n==="top"&&h]})});cm.displayName="RadioGroup";var dm=({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})};dm.displayName="MessageFormat";var um=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:t,...s,ref:p,children:o})});um.displayName="Group";var fi="UNSUPPORTED_IN_MENU";function ym(e){return useMemo(()=>nt.Children.toArray(e).map(t=>{let o=t,r=uniqueId("item"),a=Go(o,Ne),n=fm(o),i,s;if(a){let g=Go(a,Le);invariant(g),i=fm(g),s=Go(a,Re).props.children;}else n?i=n:i=o;let{onPress:p,label:l,"aria-label":c,iconStart:d,isDisabled:m,icon:u}=i.props,y=l||c||fi;invariant(typeof y=="string","ActionGroup children must have a string label");let f=`${r}-${y}`;return createElement(Item,{...{key:f,onPress:p,textValue:y,"aria-label":c,icon:d||u,dialogContent:s,isDisabled:m},key:f},o)}),[e])}function Go(e,t){return t?flatMapDeep(nt.Children.toArray(e),r=>nt.isValidElement(r)&&r.props.children?[r,...nt.Children.toArray(r.props.children)]:[r]).find(r=>nt.isValidElement(r)&&r.type===t):void 0}function fm(e){return Go(e,G)||Go(e,E)}var bm="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l4",gm={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var bi=nt.forwardRef(({className:e,style:t,children:o,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=F(),[d,m]=useState(),u=ym(o),y=useListState({...p,children:u}),f=oe(l),b=useRef(null),[{visibleItems:g,isMeasuring:_},v]=Ha({visibleItems:y.collection.size,isMeasuring:!1}),h=useCallback(()=>{let T=k=>{if(b.current&&f.current){let w=[...b.current.children],B=f.current.getBoundingClientRect().width,H=k<y.collection.size,D=0,K=0;if(H){let A=w.pop();A&&(D+=hm(A,!1,!0));}for(let[A,$]of w.entries())if(D+=hm($,A===0,A===w.length-1),Math.round(D)<=Math.round(B))K++;else break;return K}return k};v(function*(){yield {visibleItems:y.collection.size,isMeasuring:!0};let k=T(y.collection.size),w=k<y.collection.size&&k>0;yield {visibleItems:k,isMeasuring:w},w&&(yield {visibleItems:T(k),isMeasuring:!1});});},[v,f,y.collection.size]),I=useMemo(()=>({get current(){return f.current?.parentElement}}),[f]);Ka({ref:I,onResize:h}),xe(h,[y.collection,h]);let{toolbarProps:P}=useToolbar(p,f),C=[...y.collection],x=C.slice(0,g),S=C.slice(g).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:R}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(P,R),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...t,flexBasis:_?"100%":void 0},ref:f,children:jsxs("div",{ref:b,className:bm,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(hP.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=y.collection.getItem(T);invariant(k,"Item not found");let{onPress:w,dialogContent:B}=k.props;w?.(),m(B);}})]}):null]})}),jsx(Ie,{isOpen:!!d,onOpenChange:T=>{T||m(void 0);},children:jsx(De,{enableDrawer:"auto",style:{zIndex:1e5},children:d?nt.cloneElement(d,{inheritDrawer:!0}):null})})]})});bi.displayName="CollapsibleToolbar";function hm(e,t,o){let a=pe(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:xm(a.marginLeft))+(o?0:xm(a.marginRight))}function xm(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var hP=q({more:{id:"more",defaultMessage:"More"}});var gi=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=nt.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(gm[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=nt.forwardRef((e,t)=>{let o=e.isCollapsible?bi:gi;return jsx(o,{...e,ref:t})});va.displayName="Toolbar";var Pm=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),km=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"]]}),Im=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"]]}),Rm=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"]]}),wm=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 EP={xxs:8,xs:12,sm:16,md:20,lg:24},ge=nt.forwardRef((e,t)=>{let o=oe(t),{tooltipProps:r}=hr(e,o);return r?jsx(re,{...r,children:jsx(vi,{...e,ref:t})}):jsx(vi,{...e,ref:t})});ge.displayName="ToggleIconButton";var vi=nt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:d,ref:m,isFocusVisible:u,isFocused:y,isHovered:f,uiStateOptions:b}=Cr(s,l),g=useMemo(()=>typeof o=="function"?o:l.isSelected?o.selected:o.unselected,[o,l.isSelected]),_={isSelected:l.isSelected,isHovered:f,isFocusVisible:u,isDisabled:!!s.isDisabled},v=filterTruthyValues({"data-hovered":f,"data-selected":l.isSelected,"data-focus-visible":u,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":y,"data-pressed":d});return jsx("button",{...mergeProps(c,v),className:classNames(a==="toolbar"&&wm(_),a==="primary"&&km(_),a==="secondary"&&Im(_),a==="tertiary"&&Rm(_),Pm({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof t=="function"?t(b):t,ref:M(m,p),children:jsx(g,{size:EP[r]})})});vi.displayName="ToggleIconButtonCore";var Tm="f6jv6bm",Nm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jh _1yep5z6ji _1yep5z6jj",to="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Lm=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"]]}),_a=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:[]}),Mm="f6jv6bj _1yep5z6wg _1yep5z6wh _1yep5z6wi _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi",Dm="f6jv6bk";var Em="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",Bm=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:[]}),Fm="f6jv6bi _1mdhlqvb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1 _1yep5z6lh _1yep5z6lg _1yep5z6hs _1yep5z6lk",Hm="_1yep5z6jn _1yep5z6jo _1yep5z6jp",Vm="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu _1yep5z6e3 _1yep5z6lc",Om=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:[]}),jm="f6jv6bl",Am="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu",za=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),ha="f6jv6b9 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Xo="f6jv6bo";var Um=[["Toolbar Focus","Alt+F10"],["Bold","Ctrl+B"],["Italic","Ctrl+I"],["Underline","Ctrl+U"],["Select All","Ctrl+A"],["Cut","Ctrl+X"],["Copy","Ctrl+C"],["Paste","Ctrl+V"],["Undo","Ctrl+Z"],["Redo","Ctrl+Shift+Z"],["Submit","Ctrl+Enter"],["Open Help Dialog","Ctrl+Shift+H"]],{dialog:{row:Yo}}=layoutSprinkleValues,qm=({isOpen:e,onClose:t})=>{let{formatMessage:o}=F(),r=useId();return jsx(Ie,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(De,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(me,{"aria-labelledby":r,className:Mm,drawerBackground:"subtle",children:[jsxs(L,{paddingLeft:Yo.padding.horizontal.lg,paddingRight:Yo.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:Dm,children:[jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:o(Zo.help)}),jsx(E,{icon:XIcon,size:"md",variant:"secondary","aria-label":o(Zo.close),onPress:t})]}),jsx(j,{className:jm}),jsxs(L,{paddingX:Yo.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Yo.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(Zo.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(Zo.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Um.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Yo.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:o(Zo[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==Um.length-1&&jsx(j,{})]},a))})]})]})})})},Zo=q({toolbarFocus:{id:"toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"help",defaultMessage:"Help"},close:{id:"close",defaultMessage:"Close"},action:{id:"action",defaultMessage:"Action"},shortcut:{id:"shortcut",defaultMessage:"Shortcut"},bold:{id:"bold",defaultMessage:"Bold"},italic:{id:"italic",defaultMessage:"Italic"},underline:{id:"underline",defaultMessage:"Underline"},selectAll:{id:"selectAll",defaultMessage:"Select All"},cut:{id:"cut",defaultMessage:"Cut"},copy:{id:"copy",defaultMessage:"Copy"},paste:{id:"paste",defaultMessage:"Paste"},undo:{id:"undo",defaultMessage:"Undo"},redo:{id:"redo",defaultMessage:"Redo"},openHelpDialog:{id:"openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"submit",defaultMessage:"Submit"}});var xa=nt.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:d,saveOnEnter:m,onSave:u},y)=>{let f=nt.useRef(null),[b,g]=useControlledState(e,t||"",o),_=useCallback(R=>{g(R.currentTarget.value||"");},[g]),v=useCallback(R=>{(m&&R.key==="Enter"&&!R.shiftKey||(R.ctrlKey||R.metaKey)&&R.key==="Enter")&&(R.preventDefault(),u());},[m,u]);useImperativeHandle(y,()=>({clear:()=>{g("");}}));let h=useCallback(R=>{R.currentTarget.style.height="16px",R.currentTarget.style.height=R.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let R=f.current;R&&(R.style.height="16px",R.style.height=R.scrollHeight+"px");},[s],[b]),useImperativeHandle(c,()=>({setCaretPosition:R=>{f.current&&(f.current.focus(),f.current.setSelectionRange(R,R));},focus:()=>{f.current&&f.current.focus();}}));let{focusProps:I,isFocused:P,isFocusVisible:C}=useFocusRing(),{hoverProps:x,isHovered:S}=useHover({}),N=filterTruthyValues({"data-focus-visible":C,"data-hovered":S,"data-focused":P});return jsx("textarea",{...mergeProps(I,x,N),ref:M(f,n),className:classNames(s?Vm:[_a(),za({isInline:i}),Am]),autoFocus:d,onChange:_,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:v})});xa.displayName="PlainEditor";var er="mention",Ca="mention_input",rf=nt.forwardRef(({onCancel:e,editor:t,element:o,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ka),p=useSelected(),[l,c]=useState(""),{contains:d}=useFilter({sensitivity:"base"}),{formatMessage:m}=F(),u=useMemo(()=>{let w=i.filter(B=>l===""||d(B.displayName,l)).map(B=>({id:B.id,label:B.displayName,data:B}));return s?take(w,s):w},[i,s,l,d]),y=useCallback(w=>jsx(Item,{children:w.label},w.id),[]),f=useCallback((w=!1)=>{let B=findNodePath(t,o);B&&(removeNodes(t,{at:B}),w&&focusEditor(t));},[t,o]),b=useComboBoxState({items:u,children:y,menuTrigger:"focus",onSelectionChange:w=>{f(!0),r?.(w);}}),g=nt.useRef(null),_=nt.useRef(null),v=nt.useRef(null),h=nt.useRef(null),I=useHTMLInputCursorState(_);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:P,listBoxProps:C}=useComboBox({defaultItems:u,inputRef:_,buttonRef:g,listBoxRef:v,popoverRef:h,menuTrigger:"focus","aria-label":m(bk.mention)},b);useEffect(()=>{_.current?.focus();},[]);let x=useCallback((w="manual",B=!1)=>{f(B),e?.(w,b.inputValue);},[e,f,b.inputValue]),S=useRef(p);useEffect(()=>{S.current&&!p&&x("deselect"),S.current=p;},[p,x]);let N=I?.atStart??!1,R=I?.atEnd??!1,T=useCallback(w=>{w.key==="Backspace"&&N?x("backspace",!0):w.key==="Escape"?x("escape",!0):w.key==="ArrowLeft"&&N?x("arrowLeft",!0):w.key==="ArrowRight"&&R&&x("arrowRight",!0);let B=Hotkeys.isUndo(w)&&t.history.undos.length>0,H=Hotkeys.isRedo(w)&&t.history.redos.length>0;(B||H)&&(w.preventDefault(),t[B?"undo":"redo"](),focusEditor(t));},[N,R,x,t]),k=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let w=pe(_.current),B=_.current?w?.getComputedStyle(_.current).font:void 0;return {width:B?getTextDimensions({text:b.inputValue,font:B}).width+10:"4ch"}}},[b.inputValue]);return jsxs(it.Provider,{value:b,children:[jsx("input",{...mergeProps(P,{onKeyDown:T,onBlur:()=>{x("blur",!0);},onChange:w=>{c(w.target.value);}}),style:k,className:Em,ref:M(a,_)}),jsx(be,{triggerRef:n,className:Fm,isNonModal:!0,ref:h,state:b,children:jsx(le,{...C,items:void 0,autoFocus:"first",ref:v,className:sprinkles({width:"full"}),renderOption:nf})})]})});rf.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 u=getPointBefore(a,m);if(!u)return;let y=createPointRef(a,u);return l(y),()=>{y.unref();}},[a,n]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),fo()&&m&&focusEditor(a);},[a]),d=useCallback(m=>{if(!m)return;let u=s.current?.getRootNode()instanceof ShadowRoot,y=i.find(b=>b.id===m);invariant(y,"User not found");let f={type:er,value:y.id,displayName:y.displayName,children:[{text:""}]};insertNodes(a,[f,{text:" "}]),u?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:o,...t,children:[jsx(rf,{onCancel:(m,u)=>{m!=="backspace"&&insertText(a,"@"+u,{at:p?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:d,ref:s,element:n,editor:a}),r]})});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 af=(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},bk=q({mention:{defaultMessage:"Mention",id:"mention"}});function lf({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("p",{children:t})})}function Lk(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}function Mk(e){return "text"in e}function Dk(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function tr(e){if(!e)return "";function t(o){if(Mk(o)){let a=Dk(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="${Lk(filterTruthyValues({color:o.color||void 0,backgroundColor:o.backgroundColor||void 0}))}">${a}</span>`),a}let r=o.children?.map(tr).join("");switch(o.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${o.url}">${r}</a>`;case er:return `<span data-user-id="${o.value}">${o.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(o=>t(o)).join(""):t(e)}function Ek(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(pf.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 df(t.body)}function df(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=Ek(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=>df(a,o));switch(r.length===0&&r.push(jsx$1("text",o,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",t,`
|
|
54
|
+
`);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:er,value:a,displayName:e.textContent},{text:""}):r}case"P":return jsx$1("element",{type:ELEMENT_PARAGRAPH},r);case"A":return jsx$1("element",{type:ELEMENT_LINK,url:e.getAttribute("href")},r);default:return r}}function uf(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 Bk=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:er,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:Ca}],withOverrides:af}),mf=createPlugins([createParagraphPlugin({component:lf}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:ff}),Bk({component:Pi})],{components:{[Ca]:Ci}});var vf=({isDisabled:e})=>{let{formatMessage:t}=F(),o=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:jsx(E,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(ft.addLink),className:to,preventFocusOnPress:!0})}),jsx(Re,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(me,{size:"content",style:{minWidth:240},children:jsx(Uk,{close:()=>{r(),setTimeout(()=>{focusEditor(o,o.selection);},0);}})})})]})},Uk=({close:e})=>{let t=useEditorRef(),{formatMessage:o}=F(),r=useEditorSelector(l=>uf(l),[]),[a,n]=nt.useState(r?"show":"add"),[i,s]=nt.useState(r||""),p=jsx(L,{padding:"lg",children:jsx(Xe,{label:o(ft.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(L,{display:"flex",justifyContent:"flex-end",padding:"lg",className:Tm,children:jsx(G,{isDisabled:!isUrl(i,!0),label:o(ft.addLink),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(L,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(G,{label:o(ft.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(G,{label:o(ft.removeLink),size:"sm",onPress:()=>{unwrapLink(t),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(G,{label:o(ft.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(G,{label:o(ft.save),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function ff({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("a",{className:jr({size:"sm"}),children:t})})}var ft=q({addLink:{id:"addLink",defaultMessage:"Add Link",description:"Add Link"},editLink:{id:"editLink",defaultMessage:"Edit Link",description:"Edit Link"},removeLink:{id:"removeLink",defaultMessage:"Remove Link",description:"Remove Link"},cancel:{id:"cancel",defaultMessage:"Cancel",description:"Cancel"},save:{id:"save",defaultMessage:"Save",description:"Save"},link:{id:"linkAnnotation",defaultMessage:"Link",description:"Link"}});var Kk=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:Kk}];var Ra=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(ge,{variant:"tertiary",isSelected:a,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},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 x0=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ka=nt.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Ei=nt.forwardRef(({value:e,defaultValue:t,onChange:o,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:d,editorHandle:m,maxMentionableUsersSuggestions:u,autoFocus:y,editorRef:f,saveOnEnter:b,onSave:g},_)=>{let v=useRef(null),h=useId(),{formatMessage:I}=F(),P=useRef(null),C=P.current,x=useRef(null),S=useMemo(()=>C?.getRootNode()instanceof ShadowRoot,[C]),[N,R]=useControlledState(e?Si(e):void 0,Si(t||"<p></p>"),w=>{o&&o(tr(w));}),{keyboardProps:T}=useKeyboard({onKeyDown:w=>{(b&&w.key==="Enter"&&!w.shiftKey||(w.ctrlKey||w.metaKey)&&w.key==="Enter")&&(w.preventDefault(),g()),w.altKey&&w.key==="F10"?(w.preventDefault(),v.current&&v.current.querySelector("button")?.focus()):w.continuePropagation(),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:w=>{x.current&&(focusEditor(x.current),moveSelection(x.current,{distance:w,unit:"character"}));},focus:()=>{x.current&&focusEditor(x.current);}}));let k=useMemo(()=>({items:d||[],containerRef:l,maxMentionableUsersSuggestions:u}),[d,l,u]);return jsx(ka.Provider,{value:k,children:jsxs(Plate,{initialValue:N||x0,plugins:mf,editorRef:M(x,f||null),onChange:w=>{R(w);},children:[jsxs(va,{className:ha,"aria-controls":h,ref:v,children:[jsxs(L,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(Ra,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:I(no.bold),isDisabled:s}),jsx(Ra,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:I(no.italic),isDisabled:s}),jsx(Ra,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:I(no.underline),isDisabled:s})]}),jsx(j,{orientation:"vertical",className:Xo}),jsx(Li,{nodeType:MARK_COLOR,"aria-label":I(no.fontColor),isDisabled:s}),jsx(j,{orientation:"vertical",className:Xo}),jsx(Li,{nodeType:MARK_BG_COLOR,"aria-label":I(no.backgroundColor),isDisabled:s}),jsx(j,{orientation:"vertical",className:Xo}),jsx(vf,{isDisabled:s}),jsx(j,{orientation:"vertical",className:Xo}),jsx(E,{className:to,icon:QuestionmarkCircleIcon,size:"sm","aria-label":I(no.help),onPress:c})]}),jsx(j,{variant:"secondary"}),jsx("div",{...T,ref:P,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:y,spellCheck:a,"aria-label":p,className:classNames(_a({isDisabled:s}),za({isInline:i})),renderPlaceholder:({attributes:w,children:B})=>jsx("span",{...w,className:sprinkles({paddingY:"lg"}),children:B})})})]})})});Ei.displayName="RichEditor";var nf=({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:Bm({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=q({bold:{defaultMessage:"Bold",id:"bold"},italic:{defaultMessage:"Italic",id:"italic"},underline:{defaultMessage:"Underline",id:"underline"},backgroundColor:{defaultMessage:"Background color",id:"backgroundColor"},fontColor:{defaultMessage:"Font color",id:"fontColor"},help:{defaultMessage:"Help",id:"help"}});var Pf=nt.memo(nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":d,"aria-describedby":m,"aria-labelledby":u,"aria-details":y,editableContentAriaLabel:f="Editing Area",footerButtons:b,clearOnCancel:g,clearOnSave:_,...v},h)=>{let I=useRef(null),{formatMessage:P}=F(),C=useRef(null),x=useRef(null),S=useRef(null),N=!a&&v.variant==="minimal",R=useRef(null),[T,k]=nt.useState(v.value||v.defaultValue),w=v.isDisabled||v.isSaveDisabled||!getPlainText(T||""),{fieldProps:B}=useLabel({"aria-label":d,"aria-labelledby":u,"aria-describedby":m,"aria-details":y,labelElementType:"div"});N&&!v.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let H=useCallback(()=>{k(""),a?I.current?.reset():x.current?.clear();},[a]),D=useCallback(()=>{w||(i?.(a?tr(I.current?.children):C.current.value),_&&H());},[H,_,a,i,w]),K=jsx(E,{variant:"ghost","aria-label":l||P(Fi.save),icon:p,isDisabled:w,size:"md",excludeFromTabOrder:N,className:N?Hm:void 0,onPress:D,preventFocusOnPress:!0}),[A,$]=nt.useState(!1),{keyboardProps:V}=useKeyboard({onKeyDown:O=>{(O.metaKey||O.ctrlKey)&&O.shiftKey&&O.key==="h"&&(O.preventDefault(),$(!0));}}),J=useCallback(O=>{k(O),v.onChange?.(O);},[v]);return jsxs("div",{...mergeProps(B,a?V:{}),role:"application",ref:M(S,h),style:t,"data-block-id":o,"data-block-class":r,className:classNames(Lm({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":v.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx(Wt,{className:Nm,name:v.avatarName||""}):null,jsxs("div",{className:Om({isInline:s}),children:[jsx(xa,{isMinimal:N,textBoxRef:C,isInline:s,editableContentAriaLabel:f,...v,onChange:J,onSave:D}),K]})]}):jsxs(Fragment,{children:[a?jsx(Ei,{containerRef:S,ref:R,editorRef:I,isInline:s,editableContentAriaLabel:f,onHelpDialogOpenRequest:()=>{$(!0);},...v,onChange:J,onSave:D}):jsxs(Fragment,{children:[!s&&jsx(j,{variant:"secondary"}),jsx(xa,{onCancel:n,textBoxRef:C,ref:x,isInline:s,editableContentAriaLabel:f,...v,onChange:O=>{k(O),v.onChange?.(O);},onSave:D})]}),jsx(j,{variant:"secondary"}),jsxs("div",{className:classNames(ha,sprinkles({justifyContent:"space-between"})),children:[jsxs(L,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&v.mentionableUsers?jsx(E,{icon:AtIcon,size:"sm","aria-label":P(Fi.mention),onPress:()=>R.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:O,props:Z},X)=>O==="action"?jsx(E,{...Z,size:"sm",isDisabled:v.isDisabled||Z.isDisabled},X):jsx(ge,{...Z,size:"sm",variant:"tertiary",isDisabled:v.isDisabled||Z.isDisabled},X))]}),jsxs(L,{children:[!!n&&jsx(E,{variant:"secondary",icon:XCircleFilledIcon$1,isDisabled:v.isDisabled,size:"md",onPress:()=>{n(),g&&H();},"aria-label":c||P(Fi.cancel)}),K]})]})]}),jsx(qm,{isOpen:A,onClose:()=>{$(!1);}})]})}));Pf.displayName="Editor";var Fi=q({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var Sa=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),d=animated[s];return c((m,u)=>u&&jsx(d,{className:e,"data-block-id":o,"data-block-class":r,style:{...t,...m},...p,ref:l,children:n}))});Sa.displayName="Transition";var kf="_8kqf970 _1yep5z6pd _1yep5z6pe _1yep5z6pf _1yep5z6149 _1yep5z614a _1yep5z614b _1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6150 _1yep5z6151 _1yep5z6152 _1yep5z6yy _1yep5z6v7 _1yep5z6v8 _1yep5z6v9 _1yep5z6176";var Rf=2,wf=nt.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=nt.useRef(null),d=useInteractionModality(),[m,u]=nt.useState(!1),y=useCallback(()=>{let N=r?.current||ue(c.current).body;return pe(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+Rf>=0:N.scrollTop+N.clientHeight+Rf>=N.scrollHeight},[r]),[f,b]=nt.useState(y),g=Tt(),{buttonProps:_,isPressed:v}=useButton({onPress:()=>{let N=r?.current||ue(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:h,isFocused:I,isFocusVisible:P}=useFocusRing(),{hoverProps:C,isHovered:x}=useHover({}),S=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":v,"data-focus-visible":P,"data-hovered":x,"data-focused":I});return useEffect(()=>{b(y());},[y]),useEffect(()=>{let N=r?.current||ue(c.current).body,R="onscrollend"in pe(N),T=()=>{setTimeout(()=>{u(!1),b(y());},n);},k=()=>{u(!0),R||T();};return N.addEventListener("scroll",k),N.addEventListener("scrollend",T),()=>{N.removeEventListener("scroll",k),N.removeEventListener("scrollend",T);}},[r,n,y]),jsxs(Sa,{isMounted:(o?d!=="keyboard":!0)&&!m&&!f,elementType:"button",transitions:{from:{opacity:0,transform:"translateX(-50%) translateY(10px)"},enter:{opacity:1,transform:"translateX(-50%) translateY(0)"},leave:{opacity:0,transform:"translateX(-50%) translateY(10px)"},immediate:g},...mergeProps(_,h,C,S),className:classNames(kf,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:To({variant:"high-contrast"})}),a]})});wf.displayName="ScrollControlButton";var Vi="_1yep5z6jt _1yep5z6ju _1yep5z6jv _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",Sf=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"]]}),Tf="_1v0p2z10";var Na=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:d=!0,onPrimaryAction:m,onCancel:u,autoFocusButton:y,isPrimaryActionDisabled:f},b)=>{let g=useId(),{formatMessage:_}=F(),v=n&&jsx(Q,{id:g,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(me,{className:e,style:t,"data-block-id":o,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":g,children:[jsxs("div",{className:Sf({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!d}),children:[jsxs(L,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&v,d?jsx(E,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(Y0.close),onPress:u}):null]}),l?v:null]}),a?jsx(L,{elementType:"section",className:Tf,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(L,{paddingX:"lg",paddingBottom:"lg",children:jsx(Xe,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(j,{}),jsxs(L,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(G,{variant:"secondary",className:Vi,label:s,onPress:u,autoFocus:y==="cancel"}):null,i?jsx(G,{className:Vi,label:i,onPress:m,autoFocus:y==="primary",isDisabled:f}):null]})]}):null]})});Na.displayName="AlertDialog";var Y0=q({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var Nf="_1t55bp71",Lf="_1yep5z6e3 _1yep5z6eu _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69i _1yep5z69j _1yep5z69k",Mf="_1t55bp70";var oI=tI(),Df=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=o;return (!o||Array.isArray(o)&&o.length===0)&&(p=""),oI.render(p)},[o]);return jsx("div",{className:classNames(Lf,Mf,{[Nf]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:t,ref:i,dangerouslySetInnerHTML:{__html:s}})});Df.displayName="Markdown";function Hf(e){let{formatMessage:t,locale:o}=F(),[r,a]=nt.useState(!1),[n,i]=nt.useState(0),[s,p]=nt.useState(0),[l,c]=nt.useState(!1);useEffect(()=>{if(!e.current)return;let u=e.current,y=()=>{a(!1),i(0);},f=()=>{l||i(u.currentTime*100/u.duration);},b=()=>{p(u.duration);};return u.addEventListener("ended",y),u.addEventListener("timeupdate",f),u.addEventListener("loadedmetadata",b),()=>{u.removeEventListener("ended",y),u.removeEventListener("timeupdate",f),u.removeEventListener("loadedmetadata",b);}},[l,e]);let d=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(t(Bf.playing),"polite")):(e.current.pause(),a(!1),announce(t(Bf.paused),"polite"))))();},[t,e]),m=useCallback(u=>{e.current&&(e.current.currentTime=u*e.current.duration/100,announce(nI(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:d,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?Ff(e.current?.currentTime):"00:00",formattedDuration:s?Ff(s):"00:00",setIsSliderDragging:c}}var Bf=q({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function nI(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 Ff(e){let t=Math.floor(e%3600/60),o=Math.floor(e%60);return [t,o].map(r=>r.toString().padStart(2,"0")).join(":")}var Vf="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q",Of="rta2n91 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6zq _1yep5z6va _1yep5z6vb _1yep5z6vc _1yep5z6174 _1yep5z610n",jf="rta2n90";var Uf=nt.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=nt.useRef(null),{isPlaying:l,progress:c,duration:d,togglePlay:m,seek:u,formattedDuration:y,formattedCurrentTime:f,setProgress:b,setIsSliderDragging:g}=Hf(p),{formatMessage:_}=F(),v=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":d>0});return jsxs("div",{...v,...i,className:classNames(Vf,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:I})=>jsx("source",{src:h,type:I},h))})}),jsx(ge,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:o,"aria-label":_(l?ji.pause:ji.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:Of,children:[jsx("span",{"aria-hidden":!0,children:f}),jsx(Ft,{"aria-label":_(ji.audioTimeline),value:c,minValue:0,maxValue:100,className:jf,onChange:h=>{b(h),g(!0);},onChangeEnd:h=>{u(h),g(!1);}}),jsx("span",{"aria-hidden":!0,children:y})]})]})});Uf.displayName="AudioPlayer";var ji=q({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var qf="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7",Kf="_1w920rn1 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k",Gf="_1w920rn0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l3",Ma=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"]]}),Wf="_1w920rnb _1yep5z6ld",Xf=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"]]}),Yf="_1w920rnc";var Da=({items:e,ulRef:t,containerClassName:o,previewClassName:r,itemDataAttribute:a,showCount:n=!1})=>{let{length:i}=e,s=nt.useRef(null);return useLayoutEffect(()=>{if(!s.current)return;let p=s.current.closest(o)?.querySelector(`[${a}='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(p,"Node is not defined."),s.current?.prepend(p);},[e,t,o,a]),jsx("div",{className:r,ref:s,children:n&&i>1?jsx(L,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:Yf,children:i}):null})};function Qf(e,t){return e.find(o=>o.id===t)}function Jf(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 ey(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 Ea(e){return e.map(t=>({id:t.id,label:t.label,src:t.data?.src,alt:t.data?.alt}))}var hI=({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(ar.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Wf,children:o}))},ty=({item:e,options:{optionProps:t,isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i},liRef:s,fit:p="contain",onDelete:l,className:c,imageClassName:d,imageLabelClassName:m,imageDimensions:u,style:y,renderImage:f=(b,{deleteElement:g})=>jsx(hI,{item:b,deleteElement:g,fit:p})})=>{let b=useId(),{formatMessage:g}=F(),{value:_}=e;invariant(_&&Oe(_),"Expected value to be a list option");let v=l?jsx("div",{className:qf,children:jsx(E,{"aria-label":g(ar.delete),size:"xs",icon:XIcon$2,onPress:()=>{l(_.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,h=Ea([_])[0],I=useCallback(C=>{let x={},S=typeof C=="function"?C(h,{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},[h,r]),P=useMemo(()=>({isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i}),[o,r,a,n,i]);return jsxs("li",{...t,ref:s,className:classNames(Kf,je(c,h,P)),"aria-labelledby":b,style:mr(y,h,P),children:[jsx(L,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(Ma({isFocusVisible:o,isSelected:r,isLoading:!0}),je(d,h,P)),style:I(u),"data-image-key":_.id,children:f(_,{deleteElement:v??void 0,onDelete:l})})}),jsx("span",{id:b,className:classNames(Xf({isFocusVisible:o,isSelected:r}),je(m,h,P)),children:_.label})]})};var wI={width:0,display:"block"};var Ui=(o=>(o[o.sm=102]="sm",o[o.md=170]="md",o))(Ui||{}),ay=nt.forwardRef(({className:e,style:t,fit:o="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:d,imageContainerClassName:m,imageClassName:u,labelClassName:y,onListChange:f,renderImage:b,imageDimensions:g={width:s,aspectRatio:p},imageContainerStyle:_,...v},h)=>{let I=nt.useRef(null),[P,C]=useState([]),{formatMessage:x}=F();useEffect(()=>{(p||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,p]);let[S,N]=useControlledState(v.selectedKeys,v.defaultSelectedKeys??[],v.onSelectionChange),[R,T]=useControlledState(l?Ai(l):void 0,Ai(c),f?D=>{f?.(Ea(D));}:void 0),k=useCallback(D=>{let K=D.target.key,A=D.keys;if(D.target.dropPosition==="before"){let $=Jf(R,K,A);T($);}else if(D.target.dropPosition==="after"){let $=ey(R,K,A);T($);}r?.(D);},[R,r,T]),w=useCallback(()=>{i&&P.length&&(T(R.filter(D=>!P.includes(D.id))),i(new Set(P)),C([]));},[P,R,i,T]),B=useCallback((D,K,A)=>{let{value:$}=D;invariant(Oe($));let V={id:$.id,label:$.label,src:$.data?.src,alt:$.data?.alt};return jsx(ty,{item:D,options:K,liRef:A,fit:o,onDelete:i?J=>{C([J]);}:void 0,renderImage:b,className:je(m,V,K),imageClassName:u,imageLabelClassName:y,imageDimensions:g,style:_})},[o,i,b,m,u,y,g,_]),{keyboardProps:H}=useKeyboard({onKeyDown(D){if(d?.(D),D.key==="Backspace"||D.key==="Delete"){if(!i)return;if([...S].length)C([...S]);else {let A=D.target.dataset.key;C([A]);}}}});return jsxs("div",{...H,ref:h,style:t,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(le,{...v,selectedKeys:S,items:R,onReorder:k,layout:"grid",orientation:"vertical",className:Gf,ref:I,dropIndicatorStyle:wI,renderOption:B,renderDragPreview:D=>jsx(Da,{items:D,ulRef:I,containerClassName:".BaselineUI-ImageGallery",previewClassName:Ma(),itemDataAttribute:"data-image-key",showCount:!0}),onSelectionChange:N,getItems:D=>[...D].map(K=>{let A=Qf(R,K);return {src:A?.src||"",alt:A?.alt||"",key:K}})}),jsx(Ie,{isOpen:!![...P].length,onOpenChange:D=>{D||C([]);},children:jsx(De,{isDismissable:!0,children:jsx(Na,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:x(ar.delete),cancelLabel:x(ar.cancel),onCancel:()=>{C([]);},onPrimaryAction:w,autoFocusButton:"cancel"})})})]})});ay.displayName="ImageGallery";var ar=q({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var ny="_1sexph00",iy="_1sexph01 _1yep5z617n _1yep5z617o _1yep5z617p _1yep5z619z _1yep5z61a0 _1yep5z61a1 _1yep5z61b5 _1yep5z61b6 _1yep5z61b7 _1yep5z618t _1yep5z618u _1yep5z618v _1yep5z61rj _1yep5z61rk _1yep5z61rl";var py=nt.forwardRef(({className:e,style:t,items:o,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:d,defaultSelected:m,onButtonSelectionChange:u,moreAriaLabel:y,optionStyle:f,optionClassName:b,triggerClassName:g,triggerStyle:_,tooltipProps:v,...h},I)=>{let{formatMessage:P}=F(),C=ae(),x=useSelectState({items:o,...h,defaultSelectedKey:h.defaultSelectedKey||o?.[0]?.id,children:C,validationState:h.validationState==="error"?"invalid":"valid"}),[S,N]=useControlledState(d,!!m,V=>{u?.({isSelected:V,selectedKey:x.selectedKey});}),{hoverProps:R,isHovered:T}=useHover({isDisabled:s}),k=useMemo(()=>{let V=x.collection.getItem(x.selectedKey),J=V?.textValue||V?.["aria-label"],O=V?.value,Z=O?.icon,X={size:i,isSelected:S,onPress:Ce=>{N(!S),c?.(Ce);},isDisabled:s,excludeFromTabOrder:l,className:typeof b=="function"?b(O,{isButton:!0,isSelected:S}):b,style:typeof f=="function"?f(O,{isButton:!0,isSelected:S}):f};return n&&Z?jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:J,placement:"bottom start",offset:4,...typeof v=="function"?v("button"):v,children:jsx(ge,{icon:Z,"aria-label":J,variant:"toolbar",...X})}):jsx(qr,{iconStart:Z,label:J,variant:"toolbar",...X})},[l,n,S,s,c,b,f,N,i,x.collection,x.selectedKey,v]),w=h["aria-label"],B=useCallback(({buttonProps:V,ref:J})=>{delete V["aria-labelledby"];let O=y||`${P(FI.more)} ${w}`;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:O,placement:"bottom start",offset:4,...v,children:jsx(PressResponder,{...V,children:jsx(E,{"aria-label":O,ref:J,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:Z})=>classNames(Ur({isSelected:S,isFocusVisible:Z}),iy,g),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[w,l,P,S,s,y,i,v,g,_]),H=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":T,"data-selected":S,"data-disabled":s,"data-expanded":x.isOpen}),D=oe(I),K=useMemo(()=>({state:x,popoverAnchorRef:D}),[x,D]),A=useCallback(V=>typeof b=="function"?b(V,{isButton:!1,isSelected:x.selectionManager.isSelected(V.id)}):b,[b,x.selectionManager]),$=useCallback(V=>typeof f=="function"?f(V,{isButton:!1,isSelected:x.selectionManager.isSelected(V.id)}):f,[f,x.selectionManager]);return jsx(Yr.Provider,{value:K,children:jsxs(L,{...R,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(ny,"BaselineUI-ButtonSelect",e),"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],"aria-describedby":h["aria-describedby"],"aria-details":h["aria-details"],style:t,ref:D,...H,children:[k,jsx(Qe,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:o,...h,style:{width:20},optionClassName:A,optionStyle:$,variant:"ghost",renderTrigger:B})]})})});py.displayName="ButtonSelect";var FI=q({more:{id:"more",defaultMessage:"More"}});var cy=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:[]}),dy=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:[]}),uy=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6l9",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6106",warning:"_1yep5z610e"},isReadOnly:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]}),my=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"]]}),fy=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),yy=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"]]}),by=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"]]});function gy({allowsCustomValue:e,onValueChange:t,inputValue:o},r,a,n,i){let[s,p]=useState(null),l=useRef(!1);useEffect(()=>{if(!t)return;let d=a.current,m=u=>{p(u.target);};return d?.addEventListener("focusin",m),()=>{d?.removeEventListener("focusin",m);}},[t,a,r.selectedKey]),useGranularEffect(()=>{r.selectedKey&&(t?.({value:r.selectedItem?.textValue,key:r.selectedKey}),l.current=!1);},[r.selectedKey],[t,r.selectedItem]),useInteractOutside({ref:n,isDisabled:!t,onInteractOutside:d=>{!i.current?.contains(d.target)&&s===n.current&&e&&l.current&&(t?.({value:n.current?.value,key:null}),l.current=!1);}}),useEffect(()=>{if(!t)return;let d=n.current,m=()=>{l.current=!0;};return d?.addEventListener("input",m),()=>{d?.removeEventListener("input",m);}},[n,t]),useEffect(()=>{l.current=!1;},[o]);let{keyboardProps:c}=useKeyboard({isDisabled:!t,onKeyDown:d=>{e&&d.key==="Enter"&&l.current?(t?.({value:n.current?.value,key:null}),l.current=!1):d.key==="Escape"&&r.close(),d.continuePropagation();}});return {inputProps:c}}var zy=nt.forwardRef(({className:e,style:t,inputStyle:o,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:d=!1,labelPosition:m="top",validationState:u="valid",variant:y="primary",toggleLabel:f,renderOption:b,showIcon:g=!0,filter:_,minValue:v,maxValue:h,inputType:I="text",onInputSubmit:P,onValueChange:C,...x},S)=>{let N=useObjectRef(S),{contains:R}=useFilter({sensitivity:"base"}),T=ae(),k=useComboBoxState({...x,defaultFilter:_||R,defaultItems:s,onSelectionChange:l,onInputChange:c,children:T,validationState:d?"invalid":"valid"}),w=nt.useRef(null),B=nt.useRef(null),H=nt.useRef(null),D=nt.useRef(null),K=nt.useRef(null),{inputProps:A}=gy({onValueChange:C,allowsCustomValue:x.allowsCustomValue,inputValue:x.inputValue},k,N,B,D),{buttonProps:$,inputProps:V,listBoxProps:J,labelProps:O,errorMessageProps:Z,descriptionProps:X,validationErrors:Ce}=useComboBox({...x,inputRef:B,defaultItems:s,buttonRef:w,listBoxRef:H,popoverRef:D,validationState:u==="error"?"invalid":"valid"},k),Pe=x.errorMessage||Ce.join(" "),ye=ke({...x,errorMessage:Pe,descriptionProps:X,errorMessageProps:Z,labelPosition:m});Pe&&(u="error");let{hoverProps:Se,isHovered:He}=useHover({isDisabled:x.isDisabled}),{isFocused:te,focusProps:de,isFocusVisible:_t}=useFocusRing(),zt=At({isReadOnly:x.isReadOnly,validationState:u}),uo=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":u,"data-focused":te,"data-focus-visible":_t}),{labelProps:ht,fieldProps:Y}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]}),{keyboardProps:U}=useKeyboard({onKeyDown:W=>{x.allowsCustomValue&&W.key==="Enter"&&P?.(V.value?.toString()??"");}}),{focusProps:ne}=useFocus({onBlur:()=>{x.allowsCustomValue&&V.value&&P?.(V.value?.toString()??"");}});return jsx(it.Provider,{value:k,children:jsxs("div",{className:classNames(cy({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:yy({labelPosition:m,hasMessage:!!ye}),children:[jsx("label",{...mergeProps(O,ht),className:fy({isDisabled:x.isDisabled}),children:i}),m==="start"&&ye]}):null,jsxs("div",{...Se,className:my({validationState:u,isHovered:He,isFocused:te,variant:y,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:K,children:[jsx("input",{...mergeProps(V,A,de,uo,Y,ne,U,I==="number"?{type:"number",min:v,max:h,onKeyDown:W=>{(W.key==="ArrowUp"||W.key==="ArrowDown")&&W.preventDefault();}}:null),ref:B,className:classNames(dy({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:o}),zt&&g?jsx(zt,{className:uy({validationState:u,isReadOnly:x.isReadOnly}),size:16}):null,jsx(G,{...$,ref:w,variant:"popover",label:f,className:by({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&_t,isHovered:!x.isDisabled&&!x.isReadOnly&&He,isOpen:k.isOpen})})]}),jsx(be,{className:We,ref:D,triggerRef:K,state:k,children:jsx(le,{...J,items:s,ref:H,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:Hr})}),m==="top"&&ye]})})});zy.displayName="ComboBox";var hy=z({defaultClassName:"byycd01 _1yep5z6d6 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",variantClassNames:{},defaultVariants:{},compoundVariants:[]});var Yi=nt.forwardRef(({enableReorder:e,...t},o)=>e?jsx(xy,{ref:o,...t}):jsx(Zi,{ref:o,...t}));Yi.displayName="GridListItem";var Zi=nt.forwardRef(({item:e,state:t,dropState:o,renderGridItem:r,dragHandleProps:a},n)=>{let i=oe(n),s=useGridListItem({node:e},t,i),p=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:l}=useGridListSelectionCheckbox({key:e.key},t),c={...s,checkBoxProps:p?l:void 0,dragHandleProps:a};return jsxs("div",{"data-grid-list-item-key":e.key,children:[o?jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"before"},dropState:o}):null,r?r(e,c,i):null,o&&t.collection.getKeyAfter(e.key)==null?jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"after"},dropState:o}):null]},e.key)});Zi.displayName="BaseGridListItem";var xy=nt.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})});xy.displayName="DraggableGridListItem";var cR=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},Py=nt.forwardRef(({className:e,style:t,isEditing:o=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,onReorder:i,enableReorder:s=!1,layout:p="stack",orientation:l="vertical",renderGridItem:c,...d},m)=>{let u=ae(),y=useListState({...d,children:u}),f=nt.useRef(null),b=oe(m),{gridProps:g}=useGridList(d,y,b);gr({handle:n,type:"gridlist"},y,b);let{collectionProps:_,dragState:v,dropState:h}=ur({...d,onReorder:i,enableReorder:s,layout:p,orientation:l,preview:f,getItems:C=>[...C].map(x=>{let S=y.collection.getItem(x);return invariant(S,"Expected item to be defined."),{key:S.key.toString()}})},y,b),I=o?cR:g.onKeyDownCapture,P={state:y,dragState:v,dropState:h,enableReorder:s,renderGridItem:c};return jsxs("ul",{...mergeProps(g,_),className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:t,ref:b,"aria-rowcount":y.collection.size,onKeyDownCapture:I,children:[[...y.collection].map(C=>jsx(Yi,{item:C,...P},C.key)),s?jsx(DragPreview,{ref:f,children:C=>jsx(Da,{items:C,ulRef:b,containerClassName:".BaselineUI-GridList",previewClassName:hy(),itemDataAttribute:"data-grid-list-item-key"})}):null]})});Py.displayName="GridList";var ky="_1yep5z6f5",Iy="_1dc3b8m0";var Ry=nt.forwardRef(({className:e,selectionMode:t,style:o,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...p},l)=>{let c=oe(l),d=ae(),m=useListState({...p,selectionMode:t,suppressTextValueWarning:!0,children:d}),{actionGroupProps:u}=useActionGroup({...p,selectionMode:t,children:d},m,c),y=[...m.collection].map(f=>(invariant(f.value),jsx(_R,{item:f,state:m,isDisabled:p.isDisabled,onAction:p.onAction,tooltipProps:n,renderActionItem:s},f.key)));return i?jsxs(L,{...u,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:[jsx(i,{size:24,className:ky}),jsx(L,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:y})]}):jsx(L,{...u,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:y})});Ry.displayName="ActionGroup";var _R=({item:e,state:t,tooltipProps:o,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},t),s=n||t.selectionManager.isDisabled(e.key),p=t.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof o=="function"?o(e.value):o),[o,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(re,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(E,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[Iy]:p},"BaselineUI-ActionGroup-Item")})})})};var wy="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",Sy="_1yep5z61qa _1yep5z61qb _1yep5z61qc _1yep5z61gz _1yep5z61h0 _1yep5z61h1";var Ny=nt.forwardRef(({className:e,style:t,items:o,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:d,labelPosition:m="top","data-block-id":u,"data-block-class":y,shouldFocusWrap:f,tooltip:b=!0,...g},_)=>{let v=useMemo(()=>o.map(I=>({id:I.color,label:I.label})),[o]),h=useId();return useEffect(()=>{!a&&!g["aria-label"]&&!g["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,g]),jsxs(L,{...$a(g),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":u,"data-block-class":y,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:t,ref:_,children:[n||a?jsxs(L,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Q,{id:h,type:"label",size:"sm",children:a}):null]}):null,jsx(le,{className:classNames(Sy,r),selectionMode:"single",items:v,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?v.map(I=>I.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:I=>{p?.([...I][0]);},optionClassName:c,optionStyle:d,renderOption:({key:I,textValue:P},{isSelected:C,isFocusVisible:x,isDisabled:S,optionProps:N},R)=>jsx("li",{...N,"data-disabled":S,className:classNames(wy,N.className),ref:R,children:jsx(et,{isFocusVisible:x,color:I,isSelected:C,"aria-label":P,isInteractive:!0,isDisabled:S,tooltip:b})}),shouldFocusWrap:f,...g,"aria-labelledby":a?h:g["aria-labelledby"]})]})});Ny.displayName="ColorSwatchPicker";var Ly="_10dw1p96",My="_10dw1p95",Dy=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"]]});function Fy(e,t){if(typeof e=="function"&&!e.prototype?.isReactComponent){let o=e(t);return isValidElement(o)?e:o}return e}var Hy=({context:e,depth:t,children:o,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:p,primaryActionAriaLabel:l,secondaryActionAriaLabel:c,onRename:d,onAction:m,renderItemTitle:u=y=>y.data.label})=>{let{formatMessage:y}=F(),{hoverProps:f,isHovered:b}=useHover({}),g=useRef(null),{onKeyDown:_,...v}=e.interactiveElementProps;delete v.onFocus,delete v.onClick;let h=createFocusManager(g),I=useCallback(k=>{if(k.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))g.current?.setAttribute("tabindex","-1"),k.preventDefault(),k.stopPropagation(),h.focusNext();else switch(k.key){case"ArrowLeft":{h.focusPrevious()?(k.preventDefault(),k.stopPropagation()):(_?.(k),e.focusItem(!0));break}case"Enter":{e.toggleExpandedState();break}default:_?.(k);}},[e,h,_,r,g]),P=useMemo(()=>{let k=Fy(s,r.index),w=Fy(p,r.index),B=typeof l=="function"?l(r.index):l,H=typeof c=="function"?c(r.index):c;return k||w?jsxs(L,{display:"flex",flexDirection:"row",children:[k?jsx(ge,{icon:k,"aria-label":B,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,w?jsx(ge,{icon:w,"aria-label":H,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{n?.(r.index);},tooltip:!0}):null]}):null},[s,r.index,p,l,c,a,n]),C=useCallback(k=>{k.key==="Enter"?(d?.({key:r.index,value:k.target.value}),e.stopRenamingItem()):k.key==="Escape"?(e.stopRenamingItem(),g.current?.setAttribute("tabindex","0"),g.current?.focus()):k.key!=="ArrowRight"&&k.key!=="ArrowLeft"&&k.key!=="ArrowUp"&&k.key!=="ArrowDown"&&!k.metaKey&&k.continuePropagation();},[r.index,e,d,g]),x=r.data.icon,S=!!d,{pressProps:N}=usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:R,focusProps:T}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:I,onFocus:()=>{e.focusItem(!1);}},N,T,f,e.itemContainerWithoutChildrenProps,v),className:classNames(My,Dy({isHovered:b,isSelected:e.isSelected,isFocusVisible:R,isRenaming:e.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":r.index,"data-expanded":r.isFolder?e.isExpanded:void 0,"aria-expanded":r.isFolder?e.isExpanded:void 0,"aria-selected":e.isSelected,"data-depth":t,"aria-level":t+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:g,children:jsxs(L,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?P:null,jsxs(L,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(L,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${t*2} * ${themeVars.spacing.lg})`},children:[jsx(E,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":y(e.isExpanded?os.collapse:os.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(Ly,"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(Xe,{defaultValue:r.data.label,autoFocus:!0,onBlur:k=>{d?.({key:r.index,value:k.target.value}),e.stopRenamingItem();},"aria-label":y(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:u(r)}),r.data.description?jsx(Q,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.data.description}):null]})]}),i==="end"?P:null]})}),o]})},os=q({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function UR(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 qR(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 Ay=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,actionsPosition:m="start",onRename:u,onAction:y,renderItemTitle:f,...b},g)=>{let _=ae(),v=useRef(null),h=useTreeState({...b,items:a.children,children:_}),I=useMemo(()=>Object.fromEntries(Object.entries(qR(a,UR)).map(([R,T])=>[R,{...T,canRename:!!u}])),[a,u]),P=useId(),[C,x]=nt.useState(a.children?.[0]?.id??""),S=useRef(C),N=useMemo(()=>({[`tree-${P}`]:{focusedItem:C,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[C,h.expandedKeys,h.selectionManager.selectedKeys,P]);return useEffect(()=>{if(!v.current)return;let R=Ve(v.current),T=R instanceof ShadowRoot,k=v.current?.contains(R?.activeElement??null);T&&k&&Ve(v.current)?.querySelector(`[data-rct-item-id="${C}"]`)?.focus();},[C]),jsx(ControlledTreeEnvironment,{items:I,getItemTitle:R=>R.data?.label,viewState:N,onExpandItem:R=>{h.setExpandedKeys(new Set([...h.expandedKeys,R.index])),b.onExpand?.(R.index.toString());},onFocusItem:R=>{x(R.index),R.index&&(S.current=R.index);},onCollapseItem:R=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(T=>T!==R.index))),b.onCollapse?.(R.index.toString());},onSelectItems:R=>{h.selectionManager.setSelectedKeys(new Set(R));},renderItem:R=>jsx(Hy,{...R,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:m,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,onRename:u,onAction:y,renderItemTitle:f}),renderLiveDescriptorContainer:({children:R})=>jsx(qe,{children:jsx(VisuallyHidden,{children:R})}),renderTreeContainer:({containerProps:R,children:T})=>jsx("div",{...xt(R,{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,...R.style},className:classNames(e,"BaselineUI-TreeView"),ref:M(g,R.ref,v),role:"treegrid",children:T}),renderItemsContainer:({children:R})=>R,children:jsx(Tree,{treeId:`tree-${P}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});Ay.displayName="TreeView";var QR=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})});QR.displayName="Panel";var nw=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})});nw.displayName="PanelGroup";var $y="_6abhjk0";var pw=({className:e,isDisabled:t=!1,...o})=>jsx(PanelResizeHandle,{disabled:t,className:classNames($y,"BaselineUI-PanelResizeHandle",e),...o});pw.displayName="PanelResizeHandle";
|
|
55
55
|
|
|
56
|
-
export {
|
|
56
|
+
export { Yc as Accordion, ad as AccordionItem, G as ActionButton, Ry as ActionGroup, _R as ActionGroupItem, E as ActionIconButton, Na as AlertDialog, Uf as AudioPlayer, Wt as Avatar, L as Box, py as ButtonSelect, _c as Checkbox, Zt as ColorInput, et as ColorSwatch, Ny as ColorSwatchPicker, zy as ComboBox, Tc as DateFormat, me as Dialog, Zl as DialogTitle, Ys as DomNodeRenderer, Dr as Drawer, Pf as Editor, Ap as FileUpload, Lr as Focusable, Bu as FreehandCanvas, Py as GridList, um as Group, gl as I18nProvider, wu as IconColorInput, da as IconColorInputButton, dd as IconSelect, dp as IconSlider, Yu as ImageDropZone, ay as ImageGallery, Ed as InlineAlert, Mp as Link, le as ListBox, Df as Markdown, Or as Menu, dm as MessageFormat, Ie as Modal, Sh as ModalClose, De as ModalContent, ea as ModalTrigger, $t as NumberFormat, Me as NumberInput, Sc as Pagination, QR as Panel, nw as PanelGroup, pw as PanelResizeHandle, Ne as Popover, Re as PopoverContent, Le as PopoverTrigger, qe as Portal, Cl as PortalContainerProvider, tm as Preview, Zp as ProgressBar, qt as ProgressSpinner, cm as RadioGroup, nc as Reaction, wf as ScrollControlButton, Ip as SearchInput, Qe as Select, j as Separator, Ft as Slider, hp as Switch, Id as TabItem, kd as Tabs, Oc as TagGroup, Q as Text, Xe as TextInput, Dt as ThemeProvider, qr as ToggleButton, ge as ToggleIconButton, va as Toolbar, re as Tooltip, Ku as Transform, Sa as Transition, Ay as TreeView, q as defineMessages, uN as isInsideOverlayContent, Us as isRect, Nt as useDevice, F as useI18n, St as useImage, dl as useIntersectionObserver, Tt as useIsFirstRender, hl as useLocalStorage, i8 as useMutationObserver, ve as usePortalContainer, ul as useResizeObserver, m8 as useTextSelection, fl as useUndoRedo, sn as useUserPreferences };
|