@baseline-ui/core 0.31.0 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +74 -74
- package/dist/index.mjs +8 -8
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -13,9 +13,9 @@ import { CaretDownIcon, MinusIcon, PlusIcon, ChevronRightIcon, XIcon as XIcon$1
|
|
|
13
13
|
import { ReadOnlyIcon, ErrorFilledIcon, CloseIcon, NoneIcon, UndoIcon, RedoIcon, TrashIcon, ArrowDownCircleFilledIcon, XIcon as XIcon$3, WarningFilledIcon, CheckmarkIcon as CheckmarkIcon$3, CheckFilledIcon, ErrorAltFilledIcon, AvatarIcon, InfoFilledIcon, CaretLeftIcon as CaretLeftIcon$1, CaretRightIcon as CaretRightIcon$1 } from '@baseline-ui/icons/16';
|
|
14
14
|
import { FocusableProvider, createFocusManager, useFocusRing as useFocusRing$1 } from '@react-aria/focus';
|
|
15
15
|
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
|
16
|
-
import
|
|
16
|
+
import Hb from 'lodash/isEmpty';
|
|
17
17
|
import { XIcon, TextIcon, BoldIcon, ItalicIcon, UnderlineIcon, AtIcon, CrossCircleFilledIcon, ArrowUpCircleFilledIcon, CheckmarkIcon as CheckmarkIcon$2, CheckFilledIcon as CheckFilledIcon$1, ErrorAltFilledIcon as ErrorAltFilledIcon$1, InfoFilledIcon as InfoFilledIcon$1, WarningFilledIcon as WarningFilledIcon$1, PlusIcon as PlusIcon$1, MinusIcon as MinusIcon$2, LinkIcon, SearchIcon, CaretLeftIcon as CaretLeftIcon$2, CaretRightIcon as CaretRightIcon$2 } from '@baseline-ui/icons/20';
|
|
18
|
-
import
|
|
18
|
+
import Fv, { 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 Hm 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 P0 from 'markdown-it';
|
|
38
38
|
import { announce } from '@react-aria/live-announcer';
|
|
39
39
|
import { useActionGroup, useActionGroupItem } from '@react-aria/actiongroup';
|
|
40
40
|
import { ControlledTreeEnvironment, Tree } from 'react-complex-tree';
|
|
@@ -49,8 +49,8 @@ import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
|
|
|
49
49
|
* This notice may not be removed from this file.
|
|
50
50
|
*
|
|
51
51
|
*/
|
|
52
|
-
var xe=typeof document<"u"?ro.useLayoutEffect:()=>{};function ka(e){let o=useRef(null);return xe(()=>{o.current=e;},[e]),useCallback((...t)=>{let r=o.current;return r?.(...t)},[])}function Ia(e){let[o,t]=useState(e),r=useRef(null),a=ka(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}o===i.value?a():t(i.value);});xe(()=>{r.current&&a();});let n=ka(i=>{r.current=i(o),a();});return [o,n]}var Jt={prefix:String(Math.round(Math.random()*1e10)),current:0},ji=ro.createContext(Jt),Py=ro.createContext(!1);var ky=!!(typeof window<"u"&&window.document&&window.document.createElement),wa=new WeakMap;function Iy(e=!1){let o=useContext(ji),t=useRef(null);if(t.current===null&&!e){var r,a;let n=(a=ro.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=wa.get(n);i==null?wa.set(n,{id:o.current,state:n.memoizedState}):n.memoizedState!==i.state&&(o.current=i.id,wa.delete(n));}t.current=++o.current;}return t.current}function wy(e){let o=useContext(ji);o===Jt&&!ky&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let t=Iy(!!e),r=o===Jt&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${o.prefix}`;return e||`${r}-${t}`}function Ry(e){let o=ro.useId(),[t]=useState(Ai()),r=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Jt.prefix}`;return e||`${r}-${o}`}var Sa=typeof ro.useId=="function"?Ry:wy;function Sy(){return !1}function Ty(){return !0}function Ny(e){return ()=>{}}function Ai(){return typeof ro.useSyncExternalStore=="function"?ro.useSyncExternalStore(Ny,Sy,Ty):useContext(Py)}var Dy=!!(typeof window<"u"&&window.document&&window.document.createElement),er=new Map;function or(e){let[o,t]=useState(e),r=useRef(null),a=Sa(o),n=useCallback(i=>{r.current=i;},[]);return Dy&&er.set(a,n),xe(()=>{let i=a;return ()=>{er.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,t(i));}),a}function Ta(e,o){if(e===o)return e;let t=er.get(e);if(t)return t(o),o;let r=er.get(o);return r?(r(e),e):o}function $i(...e){return (...o)=>{for(let t of e)typeof t=="function"&&t(...o);}}var fe=e=>{var o;return (o=e?.ownerDocument)!==null&&o!==void 0?o:document},re=e=>{if(e&&"window"in e&&e.window===e)return e;let o=Te(e);return o instanceof ShadowRoot?o.ownerDocument.defaultView||window:o?.defaultView||window},Te=e=>{if(!e)return document;let o=e.getRootNode?e.getRootNode():document;return e.isConnected?(o):null};function Ui(e){var o,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(o=0;o<a;o++)e[o]&&(t=Ui(e[o]))&&(r&&(r+=" "),r+=t);}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Fy(){for(var e,o,t=0,r="",a=arguments.length;t<a;t++)(e=arguments[t])&&(o=Ui(e))&&(r&&(r+=" "),r+=o);return r}var qi=Fy;function go(...e){let o={...e[0]};for(let t=1;t<e.length;t++){let r=e[t];for(let a in r){let n=o[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?o[a]=$i(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?o[a]=qi(n,i):a==="id"&&n&&i?o.id=Ta(n,i):o[a]=i!==void 0?i:n;}}return o}function L(...e){return e.length===1?e[0]:o=>{for(let t of e)typeof t=="function"?t(o):t!=null&&(t.current=o);}}var Hy=new Set(["id"]),Vy=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Oy=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),jy=/^(data-.*)$/;function Na(e,o={}){let{labelable:t,isLink:r,propNames:a}=o,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Hy.has(i)||t&&Vy.has(i)||r&&Oy.has(i)||a?.has(i)||jy.test(i))&&(n[i]=e[i]);return n}function Ki(e){var o;return typeof window>"u"||window.navigator==null?!1:((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent)}function La(e){var o;return typeof window<"u"&&window.navigator!=null?e.test(((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.platform)||window.navigator.platform):!1}function Gi(){return La(/^Mac/i)}function Wi(){return La(/^iPhone/i)}function Xi(){return La(/^iPad/i)||Gi()&&navigator.maxTouchPoints>1}function Ma(){return Wi()||Xi()}function Ea(){return Ki(/Android/i)}function st(){return Ki(/Firefox/i)}function ae(e){let o=useRef(null);return useMemo(()=>({get current(){return o.current},set current(t){o.current=t,typeof e=="function"?e(t):e&&(e.current=t);}}),[e])}function qy(){return typeof window.ResizeObserver<"u"}function Ba(e){let{ref:o,onResize:t}=e;useEffect(()=>{let r=o?.current;if(r)if(qy()){let a=new window.ResizeObserver(n=>{n.length&&t();});return a.observe(r),()=>{r&&a.unobserve(r);}}else return window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1);}},[t,o]);}function vo(e){return !!e&&"label"in e&&!!e.label}function tr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function Wy(e){return tr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:o=>jsx(Item,{textValue:o.label,children:o.label},o.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function te(){return useCallback(e=>Wy(e),[])}function Zi(e,o,t){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=o.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,t);let n=useDroppableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:o.collection,disabledKeys:o.disabledKeys,ref:t,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(o.collection,t)},n,t);return {collectionProps:i,dragState:a,dropState:n}}function r1(e,o){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,o||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (o==="string"?String:Number)(e)}function a1(e){var o=r1(e,"string");return typeof o=="symbol"?o:String(o)}function n1(e,o,t){return o=a1(o),o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function Qi(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,r);}return t}function Ji(e){for(var o=1;o<arguments.length;o++){var t=arguments[o]!=null?arguments[o]:{};o%2?Qi(Object(t),!0).forEach(function(r){n1(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qi(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e}function es(e,o){var t={};for(var r in e)t[r]=o(e[r],r);return t}var i1=(e,o,t)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=o[r])!==null&&a!==void 0?a:t[r]))return !1}return !0},z=e=>{var o=t=>{var r=e.defaultClassName,a=Ji(Ji({},e.defaultVariants),t);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,u]of e.compoundVariants)i1(c,a,e.defaultVariants)&&(r+=" "+u);return r};return o.variants=()=>Object.keys(e.variantClassNames),o.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return es(e.variantClassNames,t=>es(t,r=>r.split(" ")[0]))}},o};var os=z({defaultClassName:"_6n12k9b _1yep5z6lh _1yep5z6lg _1yep5z6i1 _1yep5z6kz",variantClassNames:{isDropTarget:{true:"_1yep5z613h"},orientation:{vertical:"_1yep5z6174",horizontal:"_1yep5z6175"}},defaultVariants:{},compoundVariants:[]}),ts="_6n12k98 _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij",rs=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),as=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:[]}),ns="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",is="_6n12k90";var ss=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var O=ro.forwardRef(({className:e,style:o,variant:t="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(ss({isVertical:r==="vertical",isSecondary:t==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:o,role:a?void 0:c.role,ref:l})});O.displayName="Separator";function f1(e){return sprinkles.properties.has(e)}var M=ro.forwardRef(({elementType:e="div",children:o,...t},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in t)f1(l)?s[l]=t[l]:p[l]=t[l];return {sprinkleProps:s,domProps:p}},[t]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:o})});M.displayName="Box";var pt=ro.forwardRef(({item:e,isDisabled:o,isFocusVisible:t,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:u},m)=>{invariant(e.value&&vo(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=useHover({isDisabled:o}),v=filterTruthyValues({"data-selected":r,"data-disabled":o,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":t,"data-selection-mode":u.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,v),className:classNames(as({isHovered:b,isFocused:t,isFirstChild:u.collection.getFirstKey()===e.key,isLastChild:u.collection.getLastKey()===e.key,isDisabled:o}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(M,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,d?jsx(d,{size:24}):null,jsx("span",{...p,children:f})]}),i?jsx("span",{className:rs({isDisabled:o}),...s,children:i}):null]})});pt.displayName="DefaultRenderOption";var Ha=({dropState:e,orientation:o="vertical",dropIndicatorStyle:t,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(os({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:t}),...n})=>{let i=ro.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:o},i)};var ds=({item:e,children:o,state:t,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ha,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),o(n),t.collection.getKeyAfter(e.key)==null&&jsx(Ha,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};ds.displayName="DraggableListOption";var ct=ro.forwardRef(({item:e,renderOption:o=(m,d,f)=>jsx(pt,{item:m,liProps:d.optionProps,...d,ref:f}),showSelectedIcon:t,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},u)=>{let m=ro.useRef(null),d=useOption({key:e.key},r,m),{value:f}=e;invariant(f&&vo(f),"ListSection should not be passed to ListOption");let y={style:typeof l=="function"?l(f):l,className:typeof c=="function"?c(f):c};return a&&n?jsx(ds,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:b=>o(e,{...d,showSelectedIcon:t,_state:r,optionProps:{...mergeProps(d.optionProps,b),...y}},L(m,u))}):o(e,{...d,showSelectedIcon:t,_state:r,optionProps:{...d.optionProps,...y}},L(m,u))});ct.displayName="Option";var ys=({section:e,state:o,sectionClassName:t,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=ro.useRef(null),{itemProps:l,groupProps:c,headingProps:u}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=o.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:d}=e;invariant(d&&tr(d),"section must be a ListSection");let f=typeof r=="function"?r(d):r,y=typeof t=="function"?t(d):t;return jsxs(Fragment,{children:[e.key===o.collection.getFirstKey()?null:jsx(O,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...f},className:classNames(is,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(M,{...u,className:classNames("BaselineUI-ListBox-SectionHeader",ns),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(ct,{item:b,state:o,...s},b.key))})]})]})};var ao=ro.createContext(null),Va=ro.forwardRef(({className:e,layout:o="stack",orientation:t="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:u,listBoxHandle:m,...d},f)=>{let y=ro.useRef(null),{direction:b}=useLocale(),v=ro.useRef(null),{listBoxProps:_}=useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:u.collection,ref:v,layout:o,orientation:t,direction:b,disabledKeys:u.disabledKeys})},u,v),g=useCallback((P,C)=>{let E=v.current?.querySelector(`[data-key="${P}"][role="option"]`);E&&E?.scrollIntoView({block:"nearest",inline:"nearest",...C});},[]);useImperativeHandle(m,()=>({scrollIntoView:g}),[g]),useGranularEffect(()=>{let P=Te(v.current)instanceof ShadowRoot,C=u.selectionManager.focusedKey;P&&C&&g(C);},[u.selectionManager.focusedKey],[g]);let h=useReducedMotion(),R=useCallback(P=>{let C=fe(v.current);c&&(!h&&"startViewTransition"in C?C.startViewTransition(()=>{c(P);}):c(P));},[c,h]),{collectionProps:x,dragState:I,dropState:k}=Zi({...d,onReorder:R,layout:o,orientation:t,enableReorder:i,preview:y},u,v),{isFocusVisible:S,isFocused:N,focusProps:w}=useFocusRing(),T=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":o,"data-empty":u.collection.size===0,"data-focused":N,"data-focus-visible":S,"data-orientation":t});return jsxs("ul",{...mergeProps(_,w,T,x),className:classNames(ts,"BaselineUI-ListBox",e),style:a,ref:L(f,v),children:[[...u.collection].map(P=>{let C={key:P.key,state:u,dragState:I,dropState:k,renderOption:n,renderDropIndicator:d.renderDropIndicator,renderSectionHeader:d.renderSectionHeader,showSelectedIcon:r,orientation:t,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName,sectionClassName:d.sectionClassName,sectionStyle:d.sectionStyle,showSectionHeader:d.showSectionHeader,withSectionHeaderPadding:d.withSectionHeaderPadding};return P.type==="section"?jsx(ys,{...C,section:P}):jsx(ct,{...C,item:P})}),l?jsx(DragPreview,{ref:y,children:l}):null]})});Va.displayName="ListBoxCore";var gs=ro.forwardRef((e,o)=>{let t=te(),r=useListState({...e,children:t});return jsx(Va,{...e,ref:o,state:r})});gs.displayName="ListBoxStandalone";var le=ro.forwardRef((e,o)=>{let t=useContext(ao);return useEffect(()=>{if(!e.items&&!t)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,t]),t?jsx(Va,{...e,ref:o,state:t}):jsx(gs,{...e,ref:o})});le.displayName="ListBox";var nr="uf19bsf _1yep5z6kz",vs=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 dt=ro.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...o})=>{let t=ro.useRef(null),r=useOverlayTriggerState(o),a=useOverlayTrigger(o,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:t}),[r,a]);return jsx(dt.Provider,{value:n,children:e})};var zs={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},hs="_1gzftth1 _1yep5z6ih _1yep5z6ii _1yep5z6ij",xs="_1gzftth6",Cs="_1gzftth8",Ps="_1gzftth7",ks="var(--_1gzftth0)";function bT(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Is(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 ir=ro.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:o})=>{let{state:t,overlayTriggerAria:r,triggerRef:a}=useContext(dt);invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:t.isOpen,ref:a}),[n,t.isOpen,a]);return invariant(!o&&e||o&&!e,"Either one of anchorRect or children has to be provided."),invariant(!o||Is(o),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(ir.Provider,{value:i,children:o?jsx("button",{className:classNames(Cs,"BaselineUI-PopoverTrigger-Hidden"),style:o,ref:a,tabIndex:-1},JSON.stringify(o)):e})};function sr({tooltip:e,...o},t){let[r,a]=useState(o["aria-label"]||""),n=o["aria-labelledby"];return useEffect(()=>{if(n){let p=fe(t.current).querySelector(`#${n}`);p&&a(p.textContent||"");}},[n,t]),{tooltipProps:useMemo(()=>{let s={size:"sm",variant:"inverse",text:r,includeArrow:!1,placement:"bottom start",offset:4};if(typeof e=="object")return {...s,...e};if(e)return s},[r,e])}}var lr=e=>{let o=ro.useRef(null),{ref:t,...r}=useContext(ir)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},o),{isFocusVisible:i,isFocused:s,focusProps:p}=useFocusRing(),{hoverProps:l,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:go(a,p,l),isPressed:n,ref:L(o,t||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},pr=(e,o)=>{let t=ro.useRef(null),{ref:r,...a}=useContext(ir)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},o,t);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=useFocusRing(),{hoverProps:c,isHovered:u}=useHover({isDisabled:e.isDisabled});return {buttonProps:go(n,l,c),isPressed:i,ref:L(t,r||null),isFocusVisible:s,isFocused:p,isHovered:u,uiStateOptions:{isHovered:u,isFocused:p,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:o.isSelected}}};var cr=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"]]}),ja=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 yb={sm:16,md:20,lg:24},U=ro.forwardRef(({label:e,style:o,className:t,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...u},m)=>{let{buttonProps:d,isPressed:f,ref:y,isFocusVisible:b,isFocused:v,isHovered:_,uiStateOptions:g}=lr({...u,elementType:i,isDisabled:s}),h=yb[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 t=="function"?t(g):t),style:typeof o=="function"?o(g):o,ref:L(m,y),children:[!!r&&jsx(r,{size:h,className:ja({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsx(a,{size:h,className:ja({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:nr})]})});U.displayName="ActionButton";var Ls=ro.forwardRef(({className:e,style:o,node:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=ro.useRef(null);ro.useEffect(()=>{let c=s.current;return c?.append(t),()=>{c?.contains(t)&&t.remove();}},[t]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...p,className:e,style:o,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:L(i,s)})});Ls.displayName="DomNodeRenderer";var Ms="_14uvjig0 z9nup81",Es="_14uvjig7",Bs="_14uvjig3",Ds=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),Fs=z({defaultClassName:"_14uvjige _14uvjig1",variantClassNames:{active:{true:"_14uvjigf _14uvjig2"},isDisabled:{true:"_14uvjigg"},isReadOnly:{true:"_14uvjigh"},isFocusVisible:{true:"_14uvjigi _14uvjig2"},isHovered:{true:"_14uvjigj _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),Hs="_14uvjig8",Vs=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var ho=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),dr=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),xo=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Ve="nrh1eh3",Oe=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),je=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),Co=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 Ie({description:e,errorMessageProps:o,descriptionProps:t,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...t,className:ho({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...o,className:ho({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:ho({isDisabled:i,labelPosition:n}),children:r}):null}var Os=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),js="_1lnwne0";var As=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),$s=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var qa=ro.forwardRef(({children:e,state:o,overlayProps:t,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:o.isOpen},o),u=useMemo(()=>{switch(a){case"top":return {x:0,y:4};case"bottom":return {x:0,y:-4};case"left":return {x:4,y:0};case"right":return {x:-4,y:0};default:return {x:0,y:0}}},[a]),m=useReducedMotion(),[d]=useSpring(()=>({from:{opacity:0,transform:`translate(${u.x}px, ${u.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!m})),f=a==="center"?"bottom":a;return jsxs(animated.span,{...t,style:{...d,...t.style},ref:l,"data-placement":f,children:[p?jsx("div",{className:As({placement:f,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:$s({variant:n,size:i}),children:e})]})});qa.displayName="TooltipContent";function Ks({ref:e,onIntersect:o,isDisabled:t,threshold:r,rootMargin:a,root:n}){let i=ro.useRef(null);useEffect(()=>{if(t){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{o(s);},{root:n?.current,rootMargin:a,threshold:r});},[o,t,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function Gs({ref:e,onResize:o,isDisabled:t}){let r=ro.useRef(null),[a,n]=ro.useState();return ro.useEffect(()=>{if(t){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),o?.(i);});},[o,t,n]),ro.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function Po({src:e,alt:o}){let[t,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:t,hasError:a,isLoading:i,imgProps:{src:t?e:void 0,alt:o}}}function ko(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var Ws="SET_STATE",mr="UNDO",fr="REDO",Eb=(e,o)=>{let{past:t,present:r,future:a}=e;switch(o.type){case Ws:return {past:[...t,r],present:o.data,future:[]};case mr:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[r,...a]};case fr:return {past:[...t,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},Xs=(e={},{isDisabled:o,onAction:t})=>{let r=ko(),[a,n]=useReducer(Eb,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=y=>{n({type:Ws,data:y});},c=useRef(),u=()=>{c.current=mr,n({type:mr});},m=()=>{c.current=fr,n({type:fr});},d=!!i?.length,f=!!p?.length;return useGranularEffect(()=>{(c.current===mr||c.current===fr)&&(t?.(s,c.current),c.current=void 0);},[s],[t,r]),{state:s,push:o?()=>{}:l,undo:o?()=>{}:u,redo:o?()=>{}:m,pastStates:i,futureStates:p,canUndo:d,canRedo:f}};var Ga=ro.createContext({messages:{},shouldLogMissingMessages:!0}),Qs=({children:e,messages:o={},shouldLogMissingMessages:t=!0,...r})=>{let a=ro.useMemo(()=>({messages:o,shouldLogMissingMessages:t}),[o,t]);return jsx(I18nProvider,{...r,children:jsx(Ga.Provider,{value:a,children:e})})};Qs.displayName="I18nProvider";function F(e){let{messages:o,shouldLogMissingMessages:t}=useContext(Ga);useEffect(()=>{!e&&Fb(o)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,o]);let r=useMessageFormatter(e?cleanKeyFromGlobImport(e):o),a=useLocale();return {formatMessage:(n,i)=>{if(typeof n=="object")try{return r(n.id,i)}catch{return t&&console.log(`BUI \u{1F30D}: Translation not found for key: \`${n.id.toString()}\`. The default message, i.e. \`${n.defaultMessage}\`, will be used instead.`),n.defaultMessage||n.id}else try{return r(n,i)}catch{return t&&console.log(`BUI \u{1F30D}: Translation not found for key: \`${n.toString()}\`. The default message, i.e. \`${n.toString()}\`, will be used instead.`),n}},locale:a}}var $=e=>e;function sL(e,o,t){let r=ro.useRef(null);return ro.useEffect(()=>{if(e)return r.current=new MutationObserver(t),r.current.observe(e,o),()=>{r.current&&r.current.disconnect();}},[e,o,t]),r.current}function el(e,o){let[t,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):o}catch(n){return console.log(n),o}});return [t,n=>{try{let i=n instanceof Function?n(t):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function fL({ref:e,onSelectionChange:o,onSelectionEnd:t,isDisabled:r}){let a=ro.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=re(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&t?.(i);},onPressStart(){let n=re(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=re(n).getSelection();l&&e.current?.contains(l.anchorNode)&&o(l);}let s=fe(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,o,r]);}function Io(e){let o=useCallback(()=>{let a=re(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[t,r]=ro.useState(o);return xe(()=>{let a=re(e),n=()=>{r(o());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,o]),t}var Wa=ro.createContext(void 0),tl=({portalContainer:e,children:o})=>jsx(Wa.Provider,{value:e,children:o});tl.displayName="PortalContainerProvider";function ge(e){let o=useContext(Wa);return e||o}var rl=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var al="z9nup80",wo="z9nup83",nl="z9nup87";function Xa(e=window){let[o,t]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=u=>{t(u.matches?"dark":"light");};return l.matches&&t("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=u=>{a(u.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=u=>{i(u.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=u=>{p(u.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:o,highContrast:r,reducedMotion:n,transparency:s}}var Ro=createContext({theme:lightTheme,setTheme:()=>{}});var il="var(--hj25q10)";var gr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},So=ro.forwardRef(({theme:e="system",children:o,setTheme:t,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:u,highContrast:m,transparency:d}=Xa(),{name:f,theme:y}=useMemo(()=>{switch(e){case"system":return c==="light"?gr.LIGHT:gr.DARK;case"light":return gr.LIGHT;case"dark":return gr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=Io(),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:t}),[y,t]);return jsx(Ro.Provider,{value:_,children:jsx("div",{...mergeProps(n,v),className:classNames(al,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[il]:l==="rtl"?"-1":"1"}),...a},ref:p,children:o})})});So.displayName="ThemeProvider";var Ae=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(Ro);return jsx(Overlay,{...n,children:jsx(So,{ref:i,theme:s,style:o,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:t})})});Ae.displayName="Portal";var ne=ro.forwardRef(({children:e,placement:o="bottom",delay:t=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":u,...m},d)=>{let f=ro.useRef(null),y=ro.useRef(null),b=!m.text||m.isDisabled,v=useTooltipTriggerState({...m,delay:t,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:g}=useTooltipTrigger({...m,isDisabled:b,delay:t,closeDelay:r},v,f),h=ge(s),{overlayProps:R,arrowProps:x,placement:I,updatePosition:k}=useOverlayPosition({arrowSize:i?13:0,targetRef:f,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:y,placement:o,isOpen:v.isOpen,...m});return Ks({ref:y,threshold:1,onIntersect:k,isDisabled:!v.isOpen}),Gs({ref:f,onResize:k,isDisabled:!v.isOpen}),jsxs(FocusableProvider,{..._,ref:f,children:[e,v.isOpen?jsx(Ae,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":u,children:jsx(qa,{ref:L(d,y),state:v,arrowProps:x,overlayProps:R,placement:I,tooltipProps:g,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});ne.displayName="Tooltip";var zg={xxs:8,xs:12,sm:16,md:20,lg:24},B=ro.forwardRef((e,o)=>{let t=ae(o),{tooltipProps:r}=sr(e,t);return r?jsx(ne,{...r,children:jsx(Za,{...e,ref:t})}):jsx(Za,{...e,ref:t})});B.displayName="ActionIconButton";var Za=ro.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{let l=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!l&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,c]);let{buttonProps:u,isPressed:m,ref:d,isFocusVisible:f,isFocused:y,isHovered:b,uiStateOptions:v}=lr({...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(vs({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:f,isHovered:b}),"BaselineUI-ActionIconButton",typeof e=="function"?e(v):e),ref:L(p,d),style:typeof o=="function"?o(v):o,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(t,{role:"presentation",size:zg[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:nr})]})});Za.displayName="ActionIconButtonCore";var Me=ro.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=ro.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:u}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing(),{labelProps:y,decrementButtonProps:b,inputProps:v,incrementButtonProps:_,groupProps:g,descriptionProps:h,errorMessageProps:R}=useNumberField(n,l,s),x=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),I=Ie({description:n.description,errorMessageProps:R,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:t,isDisabled:n.isDisabled}),k=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:o,className:classNames(je({labelPosition:t}),"BaselineUI-NumberInput",e),...k,ref:i,children:[n.label?jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!I}),children:[jsx("label",{...y,className:Ve,children:n.label}),t==="start"&&I]}):null,jsxs("div",{className:classNames({[wo]:n.isDisabled}),children:[jsxs("div",{...mergeProps(g,c),className:classNames(Co({isHovered:u,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:f,variant:r}),{[js]:t==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(v,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",dr({isDisabled:n.isDisabled,labelPosition:t}))}),x?jsx(x,{className:xo({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:Os({isHoveredOrFocused:u||f,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(B,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(O,{style:{height:16},orientation:"vertical"}),jsx(B,{variant:"secondary",size:"xxs",icon:PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),t==="top"&&I]})]})});Me.displayName="NumberInput";var No=ro.forwardRef(({className:e,style:o,onChange:t,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,"data-block-id":f,"data-block-class":y,defaultValue:b,isReadOnly:v,label:_,id:g,includeNumberInput:h},R)=>{let x=ro.useRef(null),I={onChange:t===void 0?void 0:C=>{t(C[0]);},isDisabled:n||v,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:C=>{r(C[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:_},k=useNumberFormatter(a),S=useSliderState({...I,numberFormatter:k}),{trackProps:N,groupProps:w,labelProps:T}=useSlider(I,S,x),P=jsx(Me,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":T.id,value:S.getThumbValue(0),formatOptions:a,onChange:C=>{S.setThumbValue(0,C);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...w,style:o,"data-block-id":f,"data-block-class":y,className:classNames(Ms,"BaselineUI-Slider",e),children:[_?jsxs("div",{className:Bs,children:[jsx("label",{...T,className:classNames(Ds({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?P:null]}):null,jsxs("div",{className:Es,children:[jsx("div",{...N,className:classNames(Hs,"BaselineUI-Slider-Track"),ref:L(x,R),"data-testid":"track",children:jsx(jg,{state:S,trackRef:x,isDisabled:n,isReadOnly:v})}),h&&!_?P:null]})]})});No.displayName="Slider";function jg({state:e,trackRef:o,isDisabled:t,isReadOnly:r}){let a=ro.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:o,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:u,isHovered:m}=useHover({isDisabled:t}),d=filterTruthyValues({"data-disabled":t,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(Vs({isDisabled:t,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsx("div",{...mergeProps(n,u,d),className:classNames(Fs({isDisabled:t,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})})]})}var bl=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610m",title:"_1yep5z610m",label:"_1yep5z610n",value:"_1yep5z610n",helper:"_1yep5z610o",body:"_1yep5z610m"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61kx"],[{type:"title",size:"md"},"_1yep5z61l0"],[{type:"title",size:"lg"},"_1yep5z61l3"],[{type:"body",size:"sm"},"_1yep5z61ln"],[{type:"body",size:"md"},"_1yep5z61lq"],[{type:"body",size:"lg"},"_1yep5z61lq"],[{type:"subtitle",size:"sm"},"_1yep5z61lj"],[{type:"subtitle",size:"md"},"_1yep5z61lm"],[{type:"subtitle",size:"lg"},"_1yep5z61lm"],[{type:"label",size:"md"},"_1yep5z61ll"],[{type:"label",size:"lg"},"_1yep5z61ll"],[{type:"value",size:"md"},"_1yep5z61ll"],[{type:"value",size:"lg"},"_1yep5z61ll"],[{type:"helper",size:"sm"},"_1yep5z61lf"]]});var Q=ro.forwardRef(({elementType:e="span",type:o="title",children:t,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(bl({size:r,type:o}),"BaselineUI-Text",a.className),ref:n,children:t}));Q.displayName="Text";var gl=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",_l="var(--siobe20)";var hr=ro.forwardRef(({className:e,style:o,children:t,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,...l},c)=>{let{formatMessage:u}=F(),m=ro.useRef(null),{dialogProps:d,titleProps:f}=useDialog(l,m),{focusProps:y,isFocusVisible:b}=useFocusRing();return jsxs("div",{...mergeProps(d,y),className:classNames(gl({background:r,isFocusVisible:b}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:o,ref:L(c,m),children:[jsxs(M,{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",...f,className:nl,children:a}),jsxs(M,{children:[n?jsx(B,{...n,variant:"secondary"}):null,jsx(B,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":u(Zg.close)})]})]}),jsx(O,{variant:r==="subtle"?"primary":"secondary"}),t]})});hr.displayName="Drawer";var Zg=$({close:{id:"close",defaultMessage:"Close"}});function xl(e,o,t){let{isDisabled:r}=e,a=useReducedMotion(),[n,i]=ro.useState("100vh");useEffect(()=>{if(!Ma()&&!Ea())return;let d=re(t.current);function f(){i(`${d?.visualViewport.height}px`);}return f(),d?.visualViewport.addEventListener("resize",f),()=>{d?.visualViewport.removeEventListener("resize",f);}},[t]);let[{y:s},p]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),l=useRef(0),c=useCallback(()=>{p.start({y:l.current,onRest:()=>{o.close();}});},[p,o]),u=useCallback(d=>{d.target.closest("[data-drawer]")||c();},[c]);useGranularLayoutEffect(()=>{l.current=t.current?.offsetHeight||0,p.set({y:l.current}),p.start({y:0,immediate:!!a});},[],[p,a]);let m=s.to({range:[0,l.current/2,l.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:s.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:m},onPointerDown:r?void 0:u},close:c,containerHeight:r?void 0:n}}var Cl=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:[]}),Pl="_1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6gb _1yep5z6i8 _1yep5z6i9 _1yep5z6ia";var Ue=ro.createContext({state:null,triggerProps:{},overlayProps:{}}),we=({children:e,...o})=>{let t=useOverlayTriggerState(o),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},t),n=useMemo(()=>({state:t,triggerProps:r,overlayProps:a}),[t,r,a]);return jsx(Ue.Provider,{value:n,children:e})};we.displayName="Modal";var on=ro.createContext({isDrawer:!1,closeDrawer:()=>{}}),tn=ro.createContext({setIsPopoverSafelyClosed:()=>{}}),gv=animated(So),vv=({children:e,className:o,style:t,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=ro.useContext(Ue),[u,m]=ro.useState(!0),d=Io(n),f=ge(n),y=typeof s=="boolean"&&s||s==="auto"&&d==="mobile";invariant(c,"ModalContent must be a child of Modal");let b=ro.useRef(null),v=typeof r=="function"?r(y):r,_=typeof a=="function"?a(y):a,{underlayProps:g,overlayProps:h,close:R,containerHeight:x}=xl({isDisabled:!y,isDismissable:v&&u},c,b),{modalProps:I,underlayProps:k}=useModalOverlay({isDismissable:!y&&u,isKeyboardDismissDisabled:_},c,b),{theme:S}=useContext(Ro),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(()=>({...I.style,...y?{...h.style,width:"100%"}:w}),[h.style,I.style,y,w]),P=useMemo(()=>({isDrawer:y,closeDrawer:R}),[y,R]),C=useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsx(Overlay,{portalContainer:f,children:jsx(on.Provider,{value:P,children:jsx(tn.Provider,{value:C,children:jsxs(gv,{className:classNames(Cl({enableDrawer:y}),o),theme:S,"data-block-id":p,"data-block-class":l,style:{...t,height:y?x:"auto",...assignInlineVars({[_l]:x})},children:[jsx(animated.div,{...mergeProps(k,g,{onPointerDown:y?g.onPointerDown:k.onPointerDown}),"data-testid":"underlay",style:g.style,className:classNames(Pl,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(I,h),style:T,ref:b,"data-drawer":y,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})})},_v=animated(vv),Ee=({children:e,style:o,...t})=>{let{state:r}=ro.useContext(Ue);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||t.disableAnimation})((i,s)=>s&&jsx(_v,{...t,style:{...o,...i},children:typeof e=="function"?e(r):e}))};var Sl=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 an=ro.createContext({titleProps:{}}),ue=ro.forwardRef(({children:e,className:o,style:t,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let u=ro.useRef(null),m=ro.useRef(null),{isDrawer:d,closeDrawer:f}=useContext(on),[y,b]=ro.useState(""),{focusProps:v,isFocusVisible:_}=useFocusRing();useLayoutEffect(()=>{let x=m.current?.getRootNode(),I=l["aria-label"]||"";l["aria-labelledby"]&&(I=x?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(I);},[l]);let{dialogProps:g,titleProps:h}=useDialog(l,u),R=useMemo(()=>({titleProps:h}),[h]);return d&&r?jsx(hr,{title:y,onCloseRequest:f,className:o,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:L(m,c),background:p,children:e}):jsx(an.Provider,{value:R,children:jsx("section",{...mergeProps(g,v),"data-block-id":i,"data-block-class":s,ref:L(u,c),style:t,className:classNames(Sl({size:d?"content":a,variant:n,isDrawer:d,isFocusVisible:_}),"BaselineUI-Dialog",o),children:e})})});ue.displayName="Dialog";var Tl=ro.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:a}=useContext(an);return ro.isValidElement(e)?ro.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,o),style:{...e.props.style,...t}}):jsx("h3",{...a,ref:r,className:o,style:t,children:e})});Tl.displayName="DialogTitle";function Nl({placement:e,isOpen:o}){let t=useReducedMotion();return useTransition(o,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!t,config:config.stiff})}var Ml=({children:e,isOpen:o,popoverContentRef:t,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,p]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(tn);useEffect(()=>{o?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[o]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let u=t.current;return useEffect(()=>{u&&p(u.getBoundingClientRect());},[u]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?Dv.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:sn}=themeVars,ye=ro.forwardRef(({className:e,style:o,state:t,overlayProps:r,underlayClassName:a,children:n,includeArrow:i=!1,offset:s=2,portalContainer:p,contentContainerClassName:l,contentContainerStyle:c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=ro.useRef(null),b=ge(p),v=i?8:0,{underlayProps:_,popoverProps:g,placement:h,arrowProps:R}=usePopover({...d,offset:s+v,popoverRef:y,containerPadding:d.containerPadding||0},t);delete g.style?.position;let x=Nl({placement:h,isOpen:t.isOpen}),I=h==="center"?"bottom":h;return jsx(Ml,{isOpen:t.isOpen,popoverContentRef:y,portalContainer:b,style:g.style,children:x((k,S)=>S&&jsxs(Ae,{portalContainer:b,style:o,ref:f,"data-block-id":u,"data-block-class":m,children:[!d.isNonModal&&jsx("div",{..._,className:classNames(Ps,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...g,style:{...g.style,...k,...assignInlineVars({[ks]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:L(y,f),className:classNames(hs,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(N=>h?.includes(N)),children:[i?jsxs("svg",{className:classNames(zs[I],"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:sn.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:sn.background.primary.subtle,stroke:sn.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:t.close}),jsx("div",{...r,style:c,className:classNames(xs,l),children:typeof n=="function"?n(t):n}),jsx(DismissButton,{onDismiss:t.close})]})]}))})});ye.displayName="PopoverContentCore";var Re=ro.forwardRef((e,o)=>{let{state:t,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(dt);return invariant(a),t?jsx(ye,{ref:o,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:t}):null});Re.displayName="PopoverContent";var Dl=z({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),qe="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Fl=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),kr="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1",Hl="_1yep5z66x _1yep5z66y _1yep5z66z",Vl="_1mdhlqv5 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k";var $l=ro.forwardRef(({className:e,style:o,onChange:t,"data-block-id":r,icon:a,formatValue:n=c=>c,tooltipProps:i,popoverContentProps:s,...p},l)=>{let c=ae(l),[u,m]=useControlledState(p.value,p.defaultValue||0,t),[d,f]=ro.useState(!1),{keyboardProps:y}=useKeyboard({onKeyDown:_=>{(_.key==="Enter"||_.key==="Escape")&&f(!1);}}),b=n(u||0),v=i?.isDisabled||p["aria-label"]?`${p["aria-label"]}, ${b}`:b.toString();return jsxs(M,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:o,ref:c,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:d,onOpenChange:f,children:[jsx(Le,{children:jsx(ne,{text:p["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,...i,children:jsx(U,{label:b,variant:"popover","aria-label":v,style:{fontVariantNumeric:"tabular-nums"}})})}),jsx(Re,{placement:"bottom start",...s,className:classNames(qe,s?.className),children:jsx(ue,{size:"content","aria-label":v,children:jsx(FocusScope,{autoFocus:!0,children:jsx(M,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...y,children:jsx(No,{...p,onChange:_=>{m(_),t?.(_);},value:u})})})})})]})]})});$l.displayName="IconSlider";var Ul=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"]]}),ql=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),Kl="bpklwad",Gl=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),Wl="bpklwa6",Xl=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var Jl=ro.forwardRef(({className:e,label:o,labelPosition:t="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=ro.useRef(null),c=useToggleState(s),{inputProps:u,isPressed:m}=useSwitch(s,c,l),{isFocusVisible:d,focusProps: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(Ul({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(ql({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(v,y),className:classNames(Gl({labelPosition:t}),"BaselineUI-Switch",e),style:a,ref:p,children:[o?jsx("span",{className:classNames(Kl,"BaselineUI-Switch-Label"),children:o}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,f),ref:l})}),r?jsxs("div",{className:Xl({labelPosition:t}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",Wl),children:c.isSelected?r.on:r.off}),_]}):_]})});Jl.displayName="Switch";var ep="_19n40yy9",op=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 m_={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},ap=ro.forwardRef(({className:e,size:o="md",variant:t="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=ro.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:u}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing({within:!0,isTextInput:!0}),y=m_[o],b=o==="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(op({size:o,isFocused:f,variant:t,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(y,{size:o==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:ep,ref:p}),l.value!==""&&jsx(B,{icon:b,...u,size:o==="sm"?"xs":"sm",variant:"secondary"})]})});ap.displayName="SearchInput";var np="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",ip="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var cn=({section:e,showSelectedIcon:o,state:t})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==t.collection.getFirstKey()&&jsx(O,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:ip,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(Ir,{item:i,state:t,showSelectedIcon:o},i.key)))})]})]})};cn.displayName="MenuSection";var Ir=({item:e,state:o,className:t,showSelectedIcon:r})=>{let a=ro.useRef(null),n=useMenuItem({key:e.key},o,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(pt,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:t}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:o,showSelectedIcon:r})};Ir.displayName="MenuItem";var un=ro.forwardRef(({className:e,itemClassName:o,onContentKeyDown:t,...r},a)=>{let n=useTreeState(r),i=ro.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:t});return jsx("ul",{...mergeProps(s,p),className:classNames(np,e),ref:L(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(cn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(Ir,{item:l,state:n,className:o,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});un.displayName="MenuContent";var wr=ro.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:t,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u,triggerLabel:m,renderTrigger:d=({buttonProps:v,ref:_})=>jsx(U,{...v,variant:"popover",ref:_}),portalContainer:f,...y},b)=>{let v=ro.useRef(null),_=ge(f),g=useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o}),{menuTriggerProps:h,menuProps:R}=useMenuTrigger({isDisabled:r,type:"menu"},g,v),x=te(),I=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:g.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(g.isOpen):m}),[h,r,g.isOpen,m]);return useEffect(()=>{!m&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,m]),jsxs(Fragment,{children:[d({buttonProps:I,ref:v}),jsx(ye,{triggerRef:v,state:g,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u||2,className:classNames(qe,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsx(un,{className:a,...R,...y,ref:b,autoFocus:g.focusStrategy||"first",children:x})})]})});wr.displayName="Menu";var Rr=z({defaultClassName:"_13f0naj0",variantClassNames:{variant:{default:"_13f0naj1",inline:"_13f0naj2"},isHovered:{true:"_13f0naj3"},isFocusVisible:{true:"_13f0naj4"},isDisabled:{true:"_13f0naj5"},size:{sm:"_13f0naj6",md:"_13f0naj7",lg:"_13f0naj8"},type:{body:"_13f0naj9",label:"_13f0naja"},isActive:{true:"_13f0najb"}},defaultVariants:{},compoundVariants:[[{isActive:!0,isDisabled:!1},"_13f0najc"],[{type:"body",size:"sm"},"_13f0najd"],[{type:"body",size:"md"},"_13f0naje"],[{type:"body",size:"lg"},"_13f0najf"],[{type:"label",size:"sm"},"_13f0najg"],[{type:"label",size:"md"},"_13f0najh"],[{type:"label",size:"lg"},"_13f0naji"]]});var dp=ro.forwardRef(({className:e,style:o,children:t,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,role:c,...u},m)=>{let d=ro.useRef(null),{linkProps:f,isPressed:y}=useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:b,isFocused:v,focusProps:_}=useFocusRing(),{hoverProps:g,isHovered:h}=useHover({isDisabled:u.isDisabled}),R=n,x=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":h,role:c,title:l});return jsx(R,{...mergeProps(f,_,g,x),className:classNames(Rr({variant:r,isFocusVisible:b,isHovered:h,isDisabled:u.isDisabled,size:a,isActive:y,type:i}),"BaselineUI-Link",e),ref:L(d,m),style:o,children:t})});dp.displayName="Link";function up({isDisabled:e,onValueChange:o,onChange:t,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let d=[...m.target.files||[]];o?.(d),t?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function yn({items:e}){let o=e.filter(t=>t.kind==="file").map(async t=>(invariant(t.kind==="file"),t.getFile()));return await Promise.all(o)}var mp=z({defaultClassName:"_180w5ed0",variantClassNames:{variant:{default:"_180w5ed1",inline:"_180w5ed2"},hoveredOrFocusedOrActive:{true:"_180w5ed3"},disabled:{true:"_180w5ed4"}},defaultVariants:{},compoundVariants:[[{variant:"inline",hoveredOrFocusedOrActive:!0},"_180w5ed5"],[{variant:"default",hoveredOrFocusedOrActive:!0},"_180w5ed6"],[{variant:"default",disabled:!0},"_180w5ed7"],[{variant:"inline",disabled:!0},"_180w5ed8"]]}),fp=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),yp=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),bp=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var zp=ro.forwardRef(({className:e,label:o,description:t,icon:r,variant:a="default",...n},i)=>{let s=ro.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=up(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(mp({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:L(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,p)})}),r?jsx(r,{size:20,className:yp({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:bp({disabled:n.isDisabled,hovered:y}),children:o}),t?jsx("div",{...l,className:fp({disabled:n.isDisabled}),children:t}):null]})]})});zp.displayName="FileUpload";var hp="_12vfhl40 z9nup81",xp="_12vfhl41 z9nup82",Cp=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Pp="_12vfhl42",kp="_12vfhl47",Ip="_12vfhl46 z9nup82",wp="_12vfhl45",Rp=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Sp=ro.forwardRef(({className:e,style:o,variant:t="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:u,progressBarProps:m}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:d=0,maxValue:f=100,value:y=0,label:b}=p,v=(y-d)/(f-d),_=`${Math.round(v*100)}%`,g=jsx("output",{className:Rp({hasLabel:!!b}),children:m["aria-valuetext"]}),h=t==="error"?n:a;return jsxs("div",{...m,style:o,className:classNames(hp,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:xp,children:[jsx("label",{...u,className:Pp,children:b}),r?g:null]}):null,jsxs("div",{className:wp,children:[jsxs("div",{className:Ip,children:[jsx("div",{className:kp,children:jsx("div",{style:{width:_},className:Cp({variant:t})})}),!b&&r?g:null]}),h?jsx("div",{className:ho({hasError:t==="error"}),id:c,children:h}):null]})]})});Sp.displayName="ProgressBar";function Do({isReadOnly:e,validationState:o}){return e?ReadOnlyIcon:o==="error"?ErrorFilledIcon:o==="warning"?WarningFilledIcon:null}var Ke=ro.forwardRef(({className:e,validationState:o,variant:t="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let u=ro.useRef(null),{inputProps:m,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=useTextField({...l,validationState:o?o==="error"?"invalid":"valid":void 0},u),v=l.errorMessage||b.join(" "),_=Ie({...l,errorMessage:v,descriptionProps:f,errorMessageProps:y,labelPosition:a});v&&(o="error");let{hoverProps:g,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:R,focusProps:x,isFocusVisible:I}=useFocusRing(),k=Do({isReadOnly:l.isReadOnly,validationState:o}),S=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":o,"data-focused":R,"data-focus-visible":I});return jsxs("div",{className:classNames(je({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:Oe({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...d,className:Ve,children:l.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[wo]:l.isDisabled}),children:[jsxs("div",{...g,className:Co({validationState:o,isHovered:h,isFocused:R,variant:t,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,x,S),className:classNames(dr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:u}),k?jsx(k,{className:xo({validationState:o,isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Ke.displayName="TextInput";var Fo=({value:e,...o})=>{let t=useNumberFormatter(o);return jsx(Fragment,{children:t.format(e)})};Fo.displayName="NumberFormat";var Np="_1yep5z6ik _1yep5z6il _1yep5z6im",Lp=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"]]}),Mp=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"]]}),Ep=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var Fp=ro.forwardRef(({className:e,count:o,style:t,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let u=ro.useRef(null),m=useToggleState({...s,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:v}=useSwitch({...s,...l},m,u),{focusProps:_,isFocused:g,isFocusVisible:h}=useFocusRing(),{hoverProps:R,isHovered:x}=useHover({}),I=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":g,"data-focus-visible":h,"data-disabled":y,"data-hovered":x,"data-pressed":f,"data-selected":v});return jsxs("label",{ref:p,style:t,className:classNames(Np,"BaselineUI-Reaction",e),...I,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,..._,ref:u})}),jsxs("div",{...R,className:Lp({isSelected:v,isFocusVisible:h,isHovered:x,isReadOnly:b,isDisabled:y}),children:[jsx("div",{className:Ep({isDisabled:y,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:Mp({isSelected:m.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsx(Fo,{value:o})})]})]})});Fp.displayName="Reaction";var Hp="_1azy5686",Vp="_1azy5685",Op="var(--_1azy5680)",jp="_1azy5688",Ap="_1azy5689",$p="_1azy5681 z9nup82",Up="_1azy5682";var qp="_1azy5687";var R6={sm:16,md:20},S6={sm:[CheckFilledIcon,ErrorAltFilledIcon],md:[CheckFilledIcon$1,ErrorAltFilledIcon$1]},Vo=ro.forwardRef(({className:e,style:o,size:t="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=R6[t],u=c/2-2,m=2*u*Math.PI,d=S6[t][r==="success"?0:1];return jsxs("div",{className:classNames($p,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[Op]:`${m}px`}),...o},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:Up,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:Hp,cx:c/2,cy:c/2,r:u}),r==="active"&&jsx("circle",{role:"presentation",className:Vp,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsx(d,{className:qp,size:c}),r==="error"&&jsx(d,{className:jp,size:c})]}),i.label?jsx("span",{...p,className:Ap,children:i.label}):null]})});Vo.displayName="ProgressSpinner";var Nr=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"]]}),Kp=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z610z"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]});var B6={sm:16,md:20,lg:24},Lr=ro.forwardRef(({className:e,style:o,iconStart:t,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=useToggleState(i),{buttonProps:l,isPressed:c,ref:u,isFocusVisible:m,isFocused:d,isHovered:f,uiStateOptions:y}=pr(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(Nr({isHovered:f,isFocusVisible:m,isSelected:p.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(y):e),style:typeof o=="function"?o(y):o,ref:L(u,s),children:[t?jsx(t,{size:B6[r],className:Kp({isDisabled:i.isDisabled,isSelected:p.isSelected})}):null,i.label]})});Lr.displayName="ToggleButton";var Mr=z({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),Gp=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:[]}),Wp=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 Zp=ro.forwardRef(({className:e,style:o,label:t,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:u,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:v}=useCheckbox({...i,children:t},l,p),{hoverProps:_,isHovered:g}=useHover({isDisabled:y}),h=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",{...h,className:classNames(Gp({labelPosition:r}),"BaselineUI-Checkbox",e),style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:p})}),jsxs("div",{..._,className:Wp({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]}),t?jsx("span",{className:Mr({isDisabled:y}),children:t}):null]})});Zp.displayName="Checkbox";var Qp={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 Jp=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),ec="_1nsi9h1f _1yep5z6ln _1yep5z6lf _1yep5z6eu",oc=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:[]}),tc=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]});var c5={style:"decimal"},d5={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},sc=ro.forwardRef(({className:e,style:o,minValue:t=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...u},m)=>{let{locale:d}=useLocale(),f=F(Qp),y={...u,formatOptions:c5,minValue:t,incrementAriaLabel:a||f.formatMessage("nextPage"),decrementAriaLabel:n||f.formatMessage("prevPage"),defaultValue:r,"aria-label":i||f.formatMessage("goToPage")},b=ro.useRef(null),v=useNumberFieldState({...y,locale:d}),{inputProps:_,decrementButtonProps:g,incrementButtonProps:h,groupProps:R}=useNumberField({...y,onKeyDown:D=>{D.key==="Enter"&&b.current?.blur(),u.onKeyDown?.(D);},isDisabled:c},v,b),{hoverProps:x,isHovered:I}=useHover({}),{focusProps:k,isFocused:S,isFocusVisible:N}=useFocusRing(),w=p==="floating",[T,P]=d5[s],C=filterTruthyValues({"data-focus-visible":N,"data-focused":S,"data-hovered":I,"data-block-id":u["data-block-id"],"data-block-class":u["data-block-class"]}),H=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(R,x,C),className:classNames(oc({size:s,variant:p}),"BaselineUI-Pagination",e),style:o,ref:m,children:[l?null:jsxs(Fragment,{children:[jsx(B,{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(O,{orientation:"vertical"})]}),jsxs("div",{className:Jp({isFocused:S,variant:p,size:s}),"aria-label":f.formatMessage("pageXofY",{arg0:_.value,arg1:v.maxValue}),children:[jsx("input",{...mergeProps(_,k),ref:b,className:classNames("BaselineUI-Pagination-Input",ec),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:tc({isDisabled:c}),children:["/ ",jsx(Fo,{value:v.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(O,{orientation:"vertical"}),jsx(B,{icon:P,...h,elementType:"div",size:s,style:{height:"100%",...w&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||h.isDisabled})]})]})});sc.displayName="Pagination";var lc=({date:e,...o})=>{let t=useDateFormatter(o);return jsx(Fragment,{children:t.format(e)})};lc.displayName="DateFormat";var xt=z({defaultClassName:"_1f789qjr",variantClassNames:{variant:{neutral:"_1yep5z610x",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z6110"},isDisabled:{true:"_1yep5z61mr"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Er=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"]]}),pc="_1f789qjz",cc="_1f789qj0",dc=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"]]}),Br=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 yc=({item:e,state:o,variant:t="neutral"})=>{let r=ro.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:u,allowsSelection:m}=useTag({item:e},o,r),d=ro.useRef(null),{buttonProps:f}=useButton(p,d),{hoverProps:y,isHovered:b}=useHover({isDisabled:c}),{hoverProps:v,isHovered:_}=useHover({isDisabled:c}),g=e.value?.icon,h=e.value?.data?.variant??t;return jsx("div",{...mergeProps(i,a,v),ref:r,className:classNames(Er({isFocusVisible:n,variant:h,isDisabled:c,allowsRemoving:l,isSelected:u,allowsSelection:m,isHovered:_}),Br({variant:h,isDisabled:c,isSelected:u}),"BaselineUI-Tag"),children:jsxs("div",{...s,className:pc,children:[u?jsx(CheckmarkIcon$3,{size:16,className:xt({variant:h,isDisabled:c,isSelected:u})}):null,!u&&g?jsx(g,{size:16,className:xt({variant:h,isDisabled:c,isSelected:u})}):null,e.rendered,l?jsx("button",{...mergeProps(f,y),className:dc({variant:h,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var vc=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,...n},i)=>{let s=useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),p=te(),l=ro.useRef(null),c=useListState({...n,items:s,children:p}),{gridProps:u}=useTagGroup(n,c,l);return jsx("div",{...u,className:classNames(cc,"BaselineUI-TagGroup",e),style:o,"data-block-id":t,"data-block-class":r,ref:L(i,l),children:[...c.collection].map(m=>jsx(yc,{state:c,item:m,variant:n.variant},m.key))})});vc.displayName="TagGroup";var _c="_1yep5z6lc",zc=z({defaultClassName:"_1kvz17db _1yep5z6kz _1yep5z6l1",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),hc=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6kz _1yep5z6l0",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),xc="_1yep5z6ev _1yep5z6dy",Cc=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:[]}),Pc="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",kc=z({defaultClassName:"_1kvz17d7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var zn=ro.forwardRef(({children:e,className:o,style:t},r)=>{let{headers:a}=useContext(Ge),{disabledKeys:n}=useContext(Ge),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=Te(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:t,className:classNames(_c,o),ref:r,children:ro.Children.map(e,(s,p)=>ro.cloneElement(s,{index:p}))})});zn.displayName="AccordionBase";var Ge=ro.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Rc=ro.forwardRef(({children:e,disabledKeys:o,defaultExpandedKeys:t=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=ro.useState(t),u=ro.useRef(new Map).current,[m,d]=ro.useState(a);useEffect(()=>{d(m);},[m]),useEffect(()=>{n?.(l);},[l,n]);let f=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:o,headers:u,expansionMode:m}),[r,l,o,u,m]);return jsx(Ge.Provider,{value:f,children:jsx(FocusScope,{children:jsx(zn,{className:i,style:s,ref:p,children:e})})})});Rc.displayName="Accordion";var xn=ro.forwardRef(({title:e,actions:o,controlId:t,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=ro.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:f}=useContext(Ge),y=d?.has(r),b=useFocusManager();invariant(b);let{focusNext:v,focusPrevious:_}=b,{keyboardProps:g}=useKeyboard({onKeyDown:C=>{C.key==="ArrowRight"?v({wrap:!0}):C.key==="ArrowLeft"?_({wrap:!0}):C.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),f?.set(n,l);},[n,f]);let h=()=>{u(C=>{let E=new Set(C);return E.has(r)?E.delete(r):(m==="single"&&E.clear(),E.add(r)),E});},{buttonProps:R}=useButton({"aria-expanded":c.has(r),"aria-controls":t,onPress:h,isDisabled:y},l),{pressProps:x}=usePress({onPress:h,isDisabled:y}),{focusProps:I,isFocusVisible:k}=useFocusRing(),{hoverProps:S,isHovered:N}=useHover({isDisabled:y}),{focusProps:w,isFocusVisible:T}=useFocusRing({within:!0}),P=c.has(r);return jsxs("h3",{...mergeProps(g,x,S,w),className:Cc({isFocusVisible:k,isHovered:N,isDisabled:y}),ref:p,children:[jsxs("div",{className:kc({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:hc({isExpanded:P}),size:8}),jsx("button",{...mergeProps(R,I),id:a,"data-key":r,className:Pc,ref:l,children:e})]}),o?.length?jsx("div",{"data-testid":"action-buttons",className:zc({showActionsOnTriggerOnly:s,isTriggered:T||N}),children:o.map((C,E)=>jsx(B,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...C},E))}):null,i?jsx("div",{className:xc,children:i}):null]})});xn.displayName="AccordionHeader";var Dc=ro.forwardRef(({title:e,actions:o,children:t,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),u=useId(),{expandedKeys:m}=useContext(Ge),d=ro.useRef(null),f=m.has(r),y=ko(),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(xn,{value:r,actions:o,id:u,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),v(_=>jsx(animated.div,{role:"region","aria-labelledby":u,id:c,style:{..._,overflow:"hidden"},children:jsx("div",{ref:d,className:s,style:i,children:t})}))]})});Dc.displayName="AccordionItem";var It=ro.forwardRef(({variant:e,isOpen:o,selectedIcon:t,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=ro.useRef(null),{buttonProps:d,isPressed:f}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:v,isFocused:_,isFocusVisible:g}=useFocusRing(),h=Do({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":o,"data-block-id":p,"data-block-class":l});return jsxs("button",{...mergeProps(d,y,v,R),ref:L(u,m),className:classNames(Fl({isFocused:g,isDisabled:c.isDisabled}),Co({variant:e,isHovered:b,isFocused:g,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:Vl,children:[t?jsx(t,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(xo({validationState:r,isReadOnly:!!c.isReadOnly}),Hl),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:Dl({isOpen:o})})})]})});It.displayName="SelectButton";var Fr=ro.createContext({state:null,popoverAnchorRef:null}),kn=ro.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:u,renderTrigger:m=({buttonProps:y,selectedValue:b,valueProps:v,isOpen:_,ref:g})=>{let h=b&&"icon"in b&&b.icon;return jsx(It,{...y,className:l,style:c,isOpen:_,isReadOnly:d.isReadOnly,ref:g,variant:r,validationState:d.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:d.placeholder,valueProps:v})},...d},f)=>{let{popoverAnchorRef:y}=useContext(Fr),b=ro.useRef(null),v=ge(d.portalContainer),{labelProps:_,triggerProps:g,valueProps:h,menuProps:R,descriptionProps:x,errorMessageProps:I}=useSelect({...d,validationState:d.validationState==="error"?"invalid":"valid"},u,b),k=Ie({...d,descriptionProps:x,errorMessageProps:I,labelPosition:t}),S=u.selectedItem?.value??null;return jsxs(ao.Provider,{value:u,children:[jsxs("div",{style:o,className:classNames(je({labelPosition:t}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:f,children:[d.label||k?jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!k}),children:[d.label?jsx("div",{..._,className:classNames(Ve,"BaselineUI-Select-Label"),children:d.label}):null,t==="start"&&k]}):null,jsx(HiddenSelect,{state:u,triggerRef:b,isDisabled:d.isDisabled,label:d.label,name:d.name}),m({buttonProps:g,selectedValue:S,valueProps:h,isOpen:u.isOpen,ref:b}),t==="top"&&k]}),u?jsx(ye,{placement:p,portalContainer:v,offset:d.offset||2,state:u,triggerRef:y||b,style:o,className:classNames(qe,"BaselineUI-Select-Popover"),...d,children:jsx(le,{...R,label:d.label,items:d.items,showSelectedIcon:d.showSelectedIcon,className:kr,optionStyle:i,optionClassName:s})}):null]})});kn.displayName="SelectCore";var jc=ro.forwardRef((e,o)=>{let t=te(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:t});return jsx(kn,{...e,ref:o,state:r})});jc.displayName="SelectStandalone";var Xe=ro.forwardRef((e,o)=>{let{state:t}=useContext(Fr);return useEffect(()=>{invariant(t||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,t]),t?jsx(kn,{state:t,...e,ref:o}):jsx(jc,{...e,ref:o})});Xe.displayName="Select";var $c=ro.forwardRef(({className:e,style:o,variant:t,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=ro.useRef(null),l=useCallback(({buttonProps:c,selectedValue:u,valueProps:m,isOpen:d,ref:f})=>{let y=u&&"icon"in u&&u.icon;return jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(It,{...c,isOpen:d,isReadOnly:i.isReadOnly,ref:f,variant:t,validationState:i.validationState,selectedIcon:y||void 0,label:u?"label"in u&&u?.label:i.placeholder,valueProps:m})})},[i,n,t]);return jsxs(M,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:o,ref:L(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(Xe,{...i,renderTrigger:l})]})});$c.displayName="IconSelect";var Uc="_1017q4c5",qc=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),Kc="_1017q4c4";var dz={sm:AvatarIcon,md:AvatarIcon$1},Ao=ro.forwardRef(({className:e,style:o,size:t="md",icon:r=dz[t],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":u},m)=>{let{imgProps:d}=Po({src:n,alt:a}),f=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(qc({size:t,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:o,"aria-disabled":s,"data-block-id":c,"data-block-class":u,children:[n?jsx("img",{...d,loading:l,className:Kc}):null,!i&&!n&&jsx(r,{size:t==="sm"?16:24}),i&&!n?t==="sm"?f[0]:f:null,p?jsx("div",{"data-testid":"notification",className:Uc}):null]})});Ao.displayName="Avatar";var Gc="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Wc=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"]]}),Xc=z({defaultClassName:"_1x62fhb3 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),Yc="_1x62fhbl",wn=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"]]}),Zc="_1yep5z6lj _1yep5z6lg _1yep5z6hp _1yep5z6li",Qc=z({defaultClassName:"_1x62fhb0 _1yep5z6lc _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1yep5z611v",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var Jc=({state:e,...o})=>{let t=ro.useRef(null),{tabPanelProps:r}=useTabPanel(o,e,t),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:t,className:classNames({[Zc]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var Tn=ro.forwardRef(({className:e,style:o,tabHeaderStyle:t,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),u=ro.useRef(null),{tabListProps:m}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,u);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:o,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(Qc({variant:a}),r),style:t,children:[jsx("div",{...m,className:Xc({variant:a}),ref:u,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(od,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,f)=>jsx("div",{className:Gc,children:jsx(B,{...d,variant:"secondary",size:"sm",className:classNames(Yc,d.className)})},f))]}),jsx(Jc,{state:c},c.selectedItem?.key)]})});Tn.displayName="TabsBase";var od=({item:e,onRemove:o,state:t,variant:r})=>{let{key:a,value:n}=e,i=ro.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},t,i),{hoverProps:c,isHovered:u}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:f,titleClassName:y}=n,{focusProps:b,isFocusVisible:v,isFocused:_}=useFocusRing(),{keyboardProps:g}=useKeyboard({onKeyDown:R=>{R.key==="Backspace"&&o?o(a):R.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":u,"data-focus-visible":v});return jsxs("div",{...mergeProps(g,s,c,b,h),className:classNames(Wc({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:wn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null,m,o?jsx(B,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{o(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:p||_||u?1:0},className:wn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null]})};od.displayName="TabButton";var rd=ro.forwardRef(({children:e,...o},t)=>{let r=useMemo(()=>ro.Children.map(e,a=>!a||!ro.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(Tn,{...o,ref:t,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});rd.displayName="Tabs";var ad=({children:e,title:o,value:t})=>(invariant(t,"TabItem requires a value prop"),invariant(o,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);ad.displayName="TabItem";var nd={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 id=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"]]}),ld=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),pd=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),cd=z({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),dd=z({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),ud=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var Az={error:{sm:ErrorAltFilledIcon,md:ErrorAltFilledIcon$1},info:{sm:InfoFilledIcon,md:InfoFilledIcon$1},success:{sm:CheckFilledIcon,md:CheckFilledIcon$1},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},md=ro.forwardRef(({className:e,description:o,actionLabel:t,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":u},m)=>{let d=F(nd),f=t&&jsx(U,{variant:s==="compact"?"tertiary":"ghost",label:t,onPress:r}),y=Az[n][l];return jsxs("div",{className:classNames(sd({variant:n,arrangement:s,hasButton:!!t||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":u,style:a,role:"alert",ref:m,children:[jsxs("div",{className:ud({arrangement:s}),children:[jsx(y,{className:cd({variant:n}),size:16}),jsxs("div",{className:id({arrangement:s}),children:[jsx("h3",{className:dd({size:l}),children:i}),jsx("section",{className:ld({size:l}),children:o})]}),s==="compact"&&f]}),jsxs("div",{className:pd({arrangement:s}),children:[s!=="compact"&&f,p?jsx(B,{variant:"secondary",icon:CloseIcon,size:"sm",onPress:p,"aria-label":d.formatMessage("close")}):null]})]})});md.displayName="InlineAlert";var Ye={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 jr=({children:e})=>{let{triggerProps:o}=ro.useContext(Ue);return jsx(PressResponder,{...o,children:e})};jr.displayName="ModalTrigger";var Xz=({children:e})=>{let{state:o}=ro.useContext(Ue);return jsx(PressResponder,{onPress:()=>{o?.close();},children:e})};var fd="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lc",yd="_1dbkl5e",bd=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:[]}),gd="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k8 _1yep5z6k9 _1yep5z6ka",vd=z({defaultClassName:"_1dbkl50 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6o7 _1yep5z6o8 _1yep5z6o9",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Ar="_1dbkl5l _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69f _1yep5z69g _1yep5z69h",_d="_1dbkl5f z9nup87",$r="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i2 _1yep5z6i3 _1yep5z6i4",zd="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lf",hd="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Ur=z({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6mv _1yep5z6mw _1yep5z6mx"}},defaultVariants:{},compoundVariants:[]}),Mn="_1dbkl5v _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",xd=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"]]}),Cd=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:[]}),St="_1dbkl5u",qr="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Kr="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",En="_1dbkl5x",Pd="_1dbkl5w",Bn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69l _1yep5z69m _1yep5z69n",Gr=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:[]}),Dn="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7";var kd=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"]]});var Ze=ro.forwardRef(({color:e,isFocusVisible:o,isSelected:t,isInteractive:r,isDisabled:a,style:n,className:i,id:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=e&&e!==Se&&(typeof e=="string"?parseColor(e):e),{formatMessage:d}=F(),f=!m,{colorSwatchProps:y}=useColorSwatch({color:f?"#000000":e}),{hoverProps:b,isHovered:v}=useHover({isDisabled:a||!r}),_=filterTruthyValues({"data-focus-visible":o,"data-selected":t,"data-hovered":v,"data-block-id":p,"data-block-class":l,"data-disabled":a,"data-interactive":r});return jsx("div",{...mergeProps(b,_,f?{}:y),style:n,"aria-label":f?d(nh.none):y["aria-label"],role:"img",className:classNames(kd({removeBlendMode:f,isFocusVisible:o,isDisabled:!!a,isSelected:!!t,isHovered:v}),"BaselineUI-ColorSwatch",i),ref:u,id:s,...c,children:jsx(M,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:m?Id(m,4):void 0,children:f?jsx(NoneIcon,{size:14}):null})})});Ze.displayName="ColorSwatch";var nh=$({none:{id:"none",defaultMessage:"None"}});var Rd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Nt=parseColor("#000000").toFormat("hsla"),ie="hsla",Tt="hexa";function so(e){return typeof e=="string"?parseColor(e).toFormat(ie):e?e.toFormat(ie):null}function Sd(e,o){return e?.getChannelValue("alpha")?o?.toString(Tt)===e.toString(Tt):!o?.getChannelValue("alpha")}function Td(e,o,t){return o?.label?o.label:e?.getChannelValue("alpha")===0?t:e?.toString("rgba")}var Se="NONE";function Nd(e,o){let t=o?.map(a=>({id:parseColor(a.color).toString(Tt),label:a.label}))||[],r={id:Se,label:e};return [...t,r]}var Wr=(e,{optionProps:o,isFocusVisible:t,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...o,ref:a,className:zd,children:jsx(Ze,{color:e.value.id,isFocusVisible:t,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),Id=(e,o=4)=>{let t=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:t?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${o}px ${o}px`}};var Md=({value:e,...o})=>{let t=ro.useRef(null),r=ro.useRef(null),a=ro.useRef(null),n=useColorAreaState({...o,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...o,value:e,inputXRef:t,inputYRef:r,containerRef:a},n);useEffect(()=>{t.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(fd,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(Gr({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:so(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:t,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var Dd=({color:e,setColor:o,allowAlpha:t,...r})=>{let a=useColorFieldState({value:e,onChange:u=>{o(so(u)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Nt);}}),n=ro.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(Mn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:xd({isFocused:p,isHovered:c,allowAlpha:t})}),t?jsx(Hd,{color:e,setColor:o}):null]})},Fd=({color:e,setColor:o,allowAlpha:t})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(Mn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"rgba":"rgb",children:[jsx(Me,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:St,onChange:n=>{o(r.withChannelValue("red",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:St,onChange:n=>{o(r.withChannelValue("green",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:St,onChange:n=>{o(r.withChannelValue("blue",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),t?jsx(Hd,{color:e,setColor:o}):null]})},zh={style:"percent",maximumFractionDigits:0},Hd=({color:e,setColor:o})=>{let{locale:t}=useLocale(),r=useCallback(a=>{o(e.withChannelValue("alpha",a));},[e,o]);return jsx(Me,{"aria-label":e.getChannelName("alpha",t),value:e.getChannelValue("alpha"),formatOptions:zh,className:St,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var jn=({channel:e,...o})=>{let{locale:t}=useLocale(),r=useColorSliderState({...o,channel:e,locale:t}),a=ro.useRef(null),n=ro.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...o,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,t)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames($r,{[rl({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:Dn}),jsx("div",{className:$r,style:i.style}),jsxs("div",{className:classNames(Gr({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:Dn,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:$r}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var Xr=({color:e,setColor:o,allowAlpha:t,onChangeEnd:r})=>{let[a,n]=ro.useState("hex"),{formatMessage:i}=F(Ye);return jsxs(Fragment,{children:[jsx(Md,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:o,onChangeEnd:r}),jsxs("div",{className:Bn,children:[jsx(jn,{channel:"hue",value:e,onChange:o,onChangeEnd:r}),t?jsx(jn,{channel:"alpha",value:e,onChange:o,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(Bn,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Xe,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Rd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(Dd,{color:e,setColor:s=>{o(s),r?.(s);},allowAlpha:t}),a==="rgb"&&jsx(Fd,{color:e,setColor:s=>{o(s),r?.(s);},allowAlpha:t})]})]})};var qd=({color:e,setColor:o,storePickedColorKey:t,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Ye),c=ro.useRef(null),u=Io(c.current),[m,d]=el(t,[]),f=ro.useRef(null),[y,b]=ro.useState(e),v=ro.useMemo(()=>m.map(I=>({id:I,label:parseColor(I).getColorName(p),description:I})),[m,p]),_=useCallback(()=>{let I=i==="active"?e:y;if(m.includes(I.toString(ie))){f.current?.querySelector(`[data-key='${I.toString(ie)}']`)?.classList.add(En);return}d([...m,I.toString(ie)]);},[m,e,d,y,i]);useEffect(()=>{let I=f.current;function k(S){S.animationName===Pd&&S.target?.classList.remove(En);}return I?.addEventListener("animationend",k),()=>{I?.removeEventListener("animationend",k);}},[]);let g=useId(),h=jsx(B,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),R=useCallback(I=>jsxs(ue,{size:"content",className:Ur({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(Xr,{color:y,setColor:b,allowAlpha:s}),jsx(O,{}),jsx(M,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(M,{display:"inline-flex",gap:"lg",children:[jsx(U,{label:l("cancel"),size:"sm",variant:"secondary",onPress:I}),jsx(U,{label:l("add"),variant:"primary",onPress:()=>{_(),I();},size:"sm"})]})})]}),[y,_,l,s]),x=useCallback(I=>{invariant(I instanceof Set,"Key must be a set");let k=[...I][0];k&&o(parseColor(k).toFormat(ie));},[o]);return jsxs(Fragment,{children:[jsx(O,{}),jsxs("div",{className:classNames(hd,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:g,children:n}),jsxs(M,{display:"flex",children:[!!m.length&&m.includes(e.toString(ie))&&jsx(B,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(I=>I!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(u==="mobile"?jsxs(we,{children:[jsx(jr,{children:h}),jsx(Ee,{style:{zIndex:1e5},children:({close:I})=>R(I)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:h}),jsx(Re,{placement:"right top",className:qr,offset:6,children:({close:I})=>R(I)})]}))]})]}),!!m.length&&jsx(le,{items:v,layout:"grid","aria-labelledby":g,className:classNames(Ar,Kr,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Wr,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:x})]})};var Un=ro.forwardRef(({setColor:e,color:o,triggerRef:t,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Ye),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===Se?null:parseColor(u.id).toFormat(ie)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(Kr,"BaselineUI-ColorInput-Presets"),style:{minWidth:t.current?.offsetWidth},ref:i,children:jsx(le,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:Ar,renderOption:Wr,selectionMode:"single",selectedKeys:[o?.toString(Tt)||Se],onSelectionChange:p})})});Un.displayName="ColorPresetList";var Mt=ro.forwardRef(({color:e,colorLabel:o,colorName:t,...r},a)=>{let n=ro.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l}),d=or(),f=or();return jsxs("button",{...mergeProps(p,i,u,m),style:r.style,className:classNames(bd({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:L(a,n),id:d,"aria-labelledby":r["aria-labelledby"]||`${d} ${f}`,children:[jsx(Ze,{color:e?.toString("hexa")}),o?jsx("div",{className:_d,id:f,"aria-hidden":"true",children:t}):typeof t=="string"&&jsx(VisuallyHidden,{children:t})]})});Mt.displayName="ColorInputButton";var Qr=ro.forwardRef(({className:e,style:o,icon:t,...r},a)=>{let n=ro.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,u,m),ref:L(a,n),style:o,className:classNames(Cd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(t,{size:16}),jsx("div",{className:yd,style:{backgroundColor:r.color||void 0}})]})});Qr.displayName="IconColorInputButton";function eu({colorLabel:e,color:o,presets:t}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>t.find(p=>p.id===Se?!o:o?Sd(o,parseColor(p.id)):!1),[t,o]),i=useMemo(()=>typeof e=="function"?e?.(o):e?Td(o,n,r(Kh.transparent)):!1,[o,e,r,n]),s=useMemo(()=>{if(n?.label)return n.label;o?.getColorName(a);},[o,a,n?.label]);return {colorName:i,humanReadableName:s}}var Kh=$({transparent:{defaultMessage:"Transparent",id:"transparent"}});var qo=ro.forwardRef(({className:e,style:o,allowRemoval:t,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,onChangeEnd:l,defaultValue:c,storePickedColorKey:u="baselinePickedColor",value:m,addColorButtonLabel:d,removeColorButtonLabel:f,customColorsLabel:y,renderTriggerButton:b=({isOpen:k,color:S,ref:N,colorName:w,triggerProps:T,labelId:P})=>jsx(Mt,{...mergeProps(T,{...x.label?{"aria-labelledby":P}:{"aria-label":x["aria-label"]}}),ref:N,isOpen:k,isDisabled:x.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":h,"data-block-class":R,...x},I)=>{let k=ro.useRef(null),S=ro.useRef(null),N=useOverlayTriggerState(x),{triggerProps:w,overlayProps:T}=useOverlayTrigger({type:"listbox"},N,k),P=ge(x.portalContainer),[C,E]=useControlledState(m===void 0?void 0:so(m),so(c),X=>p?.(X?.toFormat("rgba")||null)),{formatMessage:H}=F(Ye),D=useMemo(()=>Nd(H(Jr.noColor),a),[a,H]),K=useId(),{colorName:j}=eu({colorLabel:i,color:C,presets:D}),G=useMemo(()=>D.filter(X=>t||X.id!==Se),[D,t]),A=d||H(Jr.addColor),ee=f||H(Jr.removeColor),V=y||H(Jr.customColors),W=jsx(qd,{color:C||Nt,setColor:X=>{E(X),l?.(X?.toFormat("rgba")||null);},storePickedColorKey:u,addColorButtonLabel:A,removeColorButtonLabel:ee,customColorsLabel:V,pickerMode:v,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[gd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":R,style:o,ref:I,children:[x.label?jsx("label",{id:K,className:vd({labelPosition:n}),children:x.label}):null,b({isOpen:N.isOpen,color:C,ref:k,colorName:j,triggerProps:w,labelId:K})]}),jsx(ye,{...x,portalContainer:P,placement:g,state:N,offset:_,className:classNames(qr,"BaselineUI-ColorInput-Popover"),triggerRef:k,overlayProps:T,children:jsxs(ue,{size:"content",className:Ur({includesCustomColorPicker:s}),ref:S,"aria-labelledby":K,"aria-label":x["aria-label"],children:[s&&v==="active"?jsxs(Fragment,{children:[jsx(Xr,{color:C||Nt,setColor:E,allowAlpha:r,onChangeEnd:X=>{l?.(X?.toFormat("rgba")||null);}}),W]}):null,!!G.length&&jsxs(Fragment,{children:[s&&v==="active"?jsx(O,{}):null,jsx(Un,{autoFocus:s&&v==="active"?!1:"first",state:N,triggerRef:k,presets:G,color:C,setColor:X=>{E(X),l?.(X?.toFormat("rgba")||null);}})]}),s&&v==="lazy"?W:null]})})]})});qo.displayName="ColorInput";var Jr=$({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 au=ro.forwardRef(({className:e,style:o,icon:t,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=ro.useRef(null),l=useCallback(({isOpen:c,color:u,ref:m,colorName:d,triggerProps:f})=>jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(Mt,{...f,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:u,colorLabel:!1,colorName:d}):jsx(Qr,{...f,isOpen:c,icon:TextIcon,color:u?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(M,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:o,ref:L(s,p),children:[r==="standard"&&t?jsx(t,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(qo,{...i,colorLabel:!1,renderTriggerButton:l})]})});au.displayName="IconColorInput";var nu={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 ea=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"]]}),iu="_1yep5z6d8",oa=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var su=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",ta=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:[]}),pu=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 cu({line:e,options:o}){let t=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/Ko),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!t.current[i])){let l=e.slice(i*Ko-(i>0?1:0),i*Ko+Ko);n=getSvgPathFromStroke(getStroke(l.map(([c,u,m])=>({x:c,y:u,pressure:m})),o)),l.length>=(i>0?Ko+1:Ko)&&(t.current[i]=n);}return n},[e,o]);return [...t.current,r]}var Ko=60*3;var xx={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},uu=ro.forwardRef(({className:e,style:o,canvasClassName:t,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:u=!0,isDisabled:m,placeholder:d,clearLabel:f,undoLabel:y,redoLabel:b,footerClassName:v,canvasRef:_,value:g,footerStyle:h,"data-block-id":R,"data-block-class":x,"aria-label":I="Drawing canvas",description:k="This is a canvas for drawing using a mouse or touch input.",...S},N)=>{let w=F(nu),T=ro.useRef(null),[P,C]=ro.useState(g||p||[]),E=ro.useMemo(()=>({...xx,...S}),[S]),[H,D]=ro.useState(),K=useId(),{labelProps:j,fieldProps:G}=useLabel({...S,"aria-label":I,labelElementType:"span"}),{isFocusVisible:A,focusProps:ee}=useFocusRing({within:!0}),{hoverProps:V,isHovered:W}=useHover({isDisabled:m}),{undo:X,redo:ze,canRedo:Ce,canUndo:Pe,push:ke}=Xs(P,{onAction:Y=>{Y&&(C(Y),l?.(Y));},isDisabled:!c}),{keyboardProps:He}=useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?Qt():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Ce&&ze():Pe&&X());}}),[oe,de]=useState(!1),nt=useCallback(Y=>{let q=Y.currentTarget.getBoundingClientRect();D(q),Y.target.setPointerCapture(Y.pointerId);let pe=[Y.clientX-q.x,Y.clientY-q.y,Y.pressure];C(Z=>[...Z,[pe]]),de(!0);},[]),to=useCallback(Y=>{if(Y.buttons!==1||!H)return;let pe=yu(Y.nativeEvent).map(Z=>[a?clamp(Z.clientX-H.left,0,H.width):Z.clientX-H.left,a?clamp(Z.clientY-H.top,0,H.height):Z.clientY-H.top,Z.pressure]);C(Z=>{let he=[...Z];return he[Z.length-1]=[...he[Z.length-1],...pe],he});},[H,a]),Pa=()=>{H&&(l?.(P),ke(P),de(!1));};useEffect(()=>{s?.(P);},[P,s]);let Qt=()=>{C([]),s?.([]),ke([]);};return jsxs("div",{ref:L(T,N),className:classNames(lu,"BaselineUI-FreehandCanvas",e),style:o,"aria-disabled":m,"data-block-id":R,"data-block-class":x,children:[S.label||c?jsxs("div",{className:pu({isInline:u}),children:[S.label?jsx(Q,{type:"label",size:"sm",...j,children:S.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(B,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:UndoIcon,onPress:X,"aria-label":y||w.formatMessage("undo")}),jsx(B,{variant:"secondary",size:"sm",isDisabled:!Ce||m,icon:RedoIcon,onPress:ze,"aria-label":b||w.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(ee,He,V,G),tabIndex:m?void 0:0,className:classNames(ea({isInline:u,isHovered:W}),su({isFocusVisible:A,isInline:u,isDisabled:!!m}),t),"aria-describedby":S["aria-describedby"]||K,style:r,ref:_,children:[jsx(VisuallyHidden,{children:jsx("div",{id:K,children:k})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:nt,onPointerMove:to,onPointerUp:Pa,children:(g||P).map((Y,q,pe)=>q<pe.length-1||!oe?jsx(mu,{line:Y,options:E,strokeColor:i,strokeWidth:n},q):jsx(fu,{line:Y,options:E,strokeColor:i,strokeWidth:n},q))})]}),d||f?jsx("div",{style:h,className:classNames(ta({isInline:u,isDisabled:m}),v),children:(P.length||!d)&&f?jsx(U,{size:"sm",variant:"ghost",label:f,isDisabled:m,onPress:Qt}):jsx(U,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});uu.displayName="FreehandCanvas";var mu=ro.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),o)),[e,o]);return jsx("path",{d:a,stroke:t,strokeWidth:r})});mu.displayName="Stroke";var fu=ro.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=cu({line:e,options:o});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:t,strokeWidth:r},i))})});fu.displayName="SplitStroke";function yu(e){if(typeof e.getCoalescedEvents=="function"){let o=e.getCoalescedEvents();return o.length>0?o.flatMap(t=>yu(t)):[e]}return [e]}var bu="_1vac7ws0",gu=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function _u(e,o){let[t,r]=useState([]),a=()=>e?.flatMap(n=>[...o.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),t}function zu(e){let{scrollable:o,ownerDocument:t,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(o,t);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",r),()=>{a.removeEventListener("scroll",r);}},[o,r,t]);}var Vx=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),xu=ro.forwardRef(({className:e,children:o,isRotatable:t,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:u,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:v,onRotate:_,onSnap:g,isSnappable:h,elementGuidelines:R,hideAnchorOnDrag:x=!0,title:I,rotationPosition:k,autoUpdate:S,bound:N,snapRotationDegrees:w,snapRotationThreshold:T,scrollableAncestor:P,renderDirections:C,stopPropagation:E,transformOrigin:H,preventDefault:D},K)=>{let j=useRef(null),G=useRef(null),[A,ee]=useState(document),V=useRef(A.createElement("div")),[W,X]=useState({}),[ze,Ce]=useState(!1),[Pe,ke]=useState(!1),[He,oe]=useState(),de=_u(R,A);useLayoutEffect(()=>{let q=V.current;return V.current=A.createElement("div"),()=>{q.remove();}},[A]);let{keyboardProps:nt}=useKeyboard({onKeyDown:q=>{let pe=q.shiftKey?10:1,Z=q.metaKey||q.ctrlKey;Z&&q.shiftKey&&(pe=45);function he(it,by="x"){Z?G.current?.request("rotatable",{deltaRotate:it*pe},!0):G.current?.request("draggable",by==="x"?{deltaX:it*pe}:{deltaY:it*pe},!0);}switch(q.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 q=fe(j.current);ee(q);let pe=V.current;q.body.append(V.current);function Z(it){ke(it.shiftKey);}function he(){ke(!1);}return q.addEventListener("keydown",Z),q.addEventListener("keyup",he),()=>{q.removeEventListener("keydown",Z),q.removeEventListener("keyup",he),pe.remove();}},[]),zu({scrollable:P,onScroll:()=>{G.current?.updateRect();},ownerDocument:A});let to=useCallback(q=>{X(pe=>({...pe,...q.style})),i?.(q);},[i]),Pa=useCallback(q=>{if(Ce(!0),j.current?.focus(),N){let Z=getHTMLElement(N,A)?.getBoundingClientRect();oe({position:"client",left:Z?.left??0,top:Z?.top??0,right:Z?.right??0,bottom:Z?.bottom??0});}c?.(q);},[N,A,c]),Qt=useCallback(q=>{Ce(!1),u?.(q);},[u]),Y=o({style:{...W.width&&{width:W.width},...W.height&&{height:W.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...nt,ref:L(j,K),style:{display:"inline-block",...n,...W},className:classNames(bu,e),onDoubleClick:l,tabIndex:0,title:I,children:Y}),createPortal(jsx(Vx,{ref:G,target:j,draggable:a,resizable:r,rotatable:t,keepRatio:Pe,throttleDrag:1,snappable:h||!!N,elementGuidelines:de,snapRenderThreshold:.9,className:gu({isDragging:ze&&x}),onRender:to,onDragStart:Pa,onDragEnd:Qt,useResizeObserver:S,useMutationObserver:S,onRenderEnd:p,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:v,onRotate:_,onRenderStart:s,onSnap:g,rotationPosition:k,bounds:He,snapRotationDegrees:w,snapRotationThreshold:T,renderDirections:C,stopPropagation:E,preventDefault:D,transformOrigin:H}),V.current)]})});xu.displayName="Transform";var Cu={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 Iu=ro.forwardRef(({className:e,style:o,isInline:t=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:u=!0,"data-block-id":m,"data-block-class":d,pickerButtonStyle:f,pickerButtonClassName:y,footerClassName:b,footerStyle:v,clearLabel:_,placeholder:g,labelStyle:h,labelClassName:R,...x},I)=>{let k=ro.useRef(null),S=ro.useRef(null),{formatMessage:N}=F(Cu),[w,T]=useControlledState(n,a||null,oe=>{invariant(typeof oe!="string"),x.onValueChange?.(oe?[oe]:[]);}),P=useMemo(()=>Jx(w||void 0),[w]),{fieldProps:C,labelProps:E}=useField(x),{dropProps:H,isDropTarget:D}=useDrop({ref:k,onDrop:async oe=>{if(p)return;let de=await yn({items:oe.items});de.length&&T(de[0]),l?.(oe);},...x}),{clipboardProps:K}=useClipboard({onPaste:async oe=>{if(p)return;let de=await yn({items:oe});de.length&&T(de[0]),c?.(oe);},...x}),j=()=>{T(null),S.current&&(S.current.value="");},G={type:"file",onChange:oe=>{let de=[...oe.target.files];T(de[0]),x.onChange?.(oe);},accept:r,disabled:p},{focusProps:A,isFocused:ee,isFocusVisible:V}=useFocusRing({within:!0}),{hoverProps:W,isHovered:X}=useHover({isDisabled:p}),{imgProps:ze,isLoading:Ce,isLoaded:Pe}=Po({src:P,alt:i||""}),ke={label:s||N("selectImage"),onPress:()=>k.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(cr({isFocusVisible:V}),{[iu]:D&&!p},y),style:f},He=filterTruthyValues({"data-loaded":Pe,"data-block-id":m,"data-block-class":d,"data-hovered":X,"data-focused":ee,"data-drop-target":D,"data-disabled":p,"data-focus-visible":V});return jsxs(M,{...He,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:o,ref:I,children:[jsxs("label",{...mergeProps(H,W,A,E),className:classNames(ea({isInline:t,isHovered:X,isDisabled:p,hasLoadedImage:!!P&&Pe,showFocusRing:D||!!P&&V}),R),style:h,ref:k,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(C,K,G),ref:S})}),!P&&jsx(U,{...ke}),!!P&&(Ce?jsx(Vo,{}):jsx("img",{className:oa({isInline:t,isDisabled:p,hasLoadedImage:!!P&&Pe&&u}),...ze}))]}),g||_?jsx("div",{style:v,className:classNames(ta({isInline:t,isDisabled:p}),b),children:(P||!g)&&_?jsx(U,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:j}):jsx(U,{size:"sm",variant:"ghost",label:g,isDisabled:!0})}):null]})});Iu.displayName="ImageDropZone";function Jx(e){return e instanceof File?URL.createObjectURL(e):e}var wu="_1vm2oh49 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6g4",Qn="_1vm2oh48 _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6jt _1yep5z6ju _1yep5z6jv",Ru=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 Nu=ro.forwardRef(({className:e,style:o,isDisabled:t,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:u,addAriaLabel:m,accent:d="positive","data-block-id":f,"data-block-class":y,...b},v)=>{let{focusProps:_,isFocused:g,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:R,hoverProps:x}=useHover({isDisabled:t}),{pressProps:I}=usePress({isDisabled:t,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let k=filterTruthyValues({"data-hovered":R,"data-focus-visible":h,"data-focused":g,"data-disabled":t});return jsxs("div",{...b,className:classNames(Ru({isInline:r,isFocusVisible:h,isDisabled:t,isHovered:R,accent:d}),"BaselineUI-Preview",e),"data-block-id":f,"data-block-class":y,"aria-label":b["aria-label"]||a||s,style:o,ref:v,children:[typeof i=="string"?jsx("button",{disabled:t,...mergeProps(x,_,I,k),className:Qn,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(x,_,I,k),disabled:t,style:p,"aria-label":m,className:Qn,children:[n?jsx("img",{src:n,alt:a,className:oa({isInline:r,isDisabled:t})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(B,{isDisabled:t,className:wu,"aria-label":u,size:"xs",icon:TrashIcon,onPress:c}):null]})});Nu.displayName="Preview";var Lu="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e",Mu=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),Eu="cw3m0n7",Bu=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:[]}),Du="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6l9",Fu=z({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var bC=({label:e,description:o},{isSelected:t,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:Bu({labelPosition:n}),children:[jsx("div",{className:Fu({isSelected:t,isFocusVisible:r,isDisabled:a}),children:t?jsx("div",{className:Eu}):null}),e?jsxs("div",{className:Lu,children:[jsx("span",{className:Mr({isDisabled:a}),children:e}),o?jsx("span",{className:Mu({isDisabled:a}),children:o}):null]}):null]}),Hu=({state:e,renderOption:o=bC,item:t,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(t.id),l=ro.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=useRadio({...s,isDisabled:p,children:t.label,value:t.id},e,l),{focusProps:d,isFocusVisible: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})}),o(t,{isFocusVisible:f,isSelected:m,isFocused:y,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var Vu=ro.forwardRef(({className:e,style:o,optionsContainerClassName:t,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":u,"data-block-class":m,...d},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),h=Ie({...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(je({labelPosition:n}),"BaselineUI-RadioGroup",e),style:o,ref:f,children:[d.label||h?jsxs("div",{className:Oe({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...v,className:classNames(Ve,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsxs("div",{className:classNames({[wo]:d.isDisabled}),children:[jsx("div",{className:classNames(Du,t),style:r,children:a.map(x=>jsx(Hu,{state:y,renderOption:i,item:x,...d,value:x.id},x.id))}),n==="top"&&h]})]})});Vu.displayName="RadioGroup";var Ou=({id:e,defaultMessage:o,elementType:t=Fragment$1})=>{invariant(e||o,"`id` or `defaultMessage` is required.");let r=F();return jsx(t,{children:r.formatMessage(e)||o})};Ou.displayName="MessageFormat";var ju=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:o,...s,ref:p,children:t})});ju.displayName="Group";var ri="UNSUPPORTED_IN_MENU";function Uu(e){return useMemo(()=>ro.Children.toArray(e).map(o=>{let t=o,r=uniqueId("item"),a=Ht(t,Ne),n=$u(t),i,s;if(a){let v=Ht(a,Le);invariant(v),i=$u(v),s=Ht(a,Re).props.children;}else n?i=n:i=t;let{onPress:p,label:l,"aria-label":c,iconStart:u,isDisabled:m,icon:d}=i.props,f=l||c||ri;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},t)}),[e])}function Ht(e,o){return o?flatMapDeep(ro.Children.toArray(e),r=>ro.isValidElement(r)&&r.props.children?[r,...ro.Children.toArray(r.props.children)]:[r]).find(r=>ro.isValidElement(r)&&r.type===o):void 0}function $u(e){return Ht(e,U)||Ht(e,B)}var qu="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l4",Ku={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var ni=ro.forwardRef(({className:e,style:o,children:t,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=F(),[u,m]=useState(),d=Uu(t),f=useListState({...p,children:d}),y=ae(l),b=useRef(null),[{visibleItems:v,isMeasuring:_},g]=Ia({visibleItems:f.collection.size,isMeasuring:!1}),h=useCallback(()=>{let T=P=>{if(b.current&&y.current){let C=[...b.current.children],E=y.current.getBoundingClientRect().width,H=P<f.collection.size,D=0,K=0;if(H){let j=C.pop();j&&(D+=Yu(j,!1,!0));}for(let[j,G]of C.entries())if(D+=Yu(G,j===0,j===C.length-1),Math.round(D)<=Math.round(E))K++;else break;return K}return P};g(function*(){yield {visibleItems:f.collection.size,isMeasuring:!0};let P=T(f.collection.size),C=P<f.collection.size&&P>0;yield {visibleItems:P,isMeasuring:C},C&&(yield {visibleItems:T(P),isMeasuring:!1});});},[g,y,f.collection.size]),R=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);Ba({ref:R,onResize:h}),xe(h,[f.collection,h]);let{toolbarProps:x}=useToolbar(p,y),I=[...f.collection],k=I.slice(0,v),S=I.slice(v).filter(T=>T.textValue!==ri),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(x,w),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...o,flexBasis:_?"100%":void 0},ref:y,children:jsxs("div",{ref:b,className:qu,children:[k.map(T=>T.rendered),N?jsxs(Fragment,{children:[!_&&i?jsx(M,{flexGrow:1}):null,jsx(wr,{placement:"bottom end",renderTrigger:({buttonProps:T,ref:P})=>jsx(B,{...T,size:"md",icon:MoreIcon,"aria-label":c($C.more),variant:"toolbar",ref:P}),...r,disabledKeys:S.filter(T=>T.props?.isDisabled).map(T=>T.key),items:S.map(T=>{let P=T.textValue||T["aria-label"];return invariant(P,"ActionItem must have a label"),{id:T.key,label:P,icon:T.props.icon}}),onAction:T=>{let P=f.collection.getItem(T);invariant(P,"Item not found");let{onPress:C,dialogContent:E}=P.props;C?.(),m(E);}})]}):null]})}),jsx(we,{isOpen:!!u,onOpenChange:T=>{T||m(void 0);},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:1e5},children:u?ro.cloneElement(u,{inheritDrawer:!0}):null})})]})});ni.displayName="CollapsibleToolbar";function Yu(e,o,t){let a=re(e).getComputedStyle(e);return e.getBoundingClientRect().width+(o?0:Zu(a.marginLeft))+(t?0:Zu(a.marginRight))}function Zu(e){let o=Number.parseInt(e,10);return Number.isNaN(o)?0:o}var $C=$({more:{id:"more",defaultMessage:"More"}});var ii=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=ro.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(Ku[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:o,"data-block-id":t,"data-block-class":r,ref:L(s,p),children:i.children})});ii.displayName="WrappedToolbar";var ia=ro.forwardRef((e,o)=>{let t=e.isCollapsible?ni:ii;return jsx(t,{...e,ref:o})});ia.displayName="Toolbar";var Ju=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),em=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"]]}),om=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"]]}),tm=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"]]}),rm=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 rP={xxs:8,xs:12,sm:16,md:20,lg:24},be=ro.forwardRef((e,o)=>{let t=ae(o),{tooltipProps:r}=sr(e,t);return r?jsx(ne,{...r,children:jsx(si,{...e,ref:o})}):jsx(si,{...e,ref:o})});be.displayName="ToggleIconButton";var si=ro.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:u,ref:m,isFocusVisible:d,isFocused:f,isHovered:y,uiStateOptions:b}=pr(s,l),v=useMemo(()=>typeof t=="function"?t:l.isSelected?t.selected:t.unselected,[t,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"&&rm(_),a==="primary"&&em(_),a==="secondary"&&om(_),a==="tertiary"&&tm(_),Ju({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof o=="function"?o(b):o,ref:L(m,p),children:jsx(v,{size:rP[r]})})});si.displayName="ToggleIconButtonCore";var nm="f6jv6bm",im="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jh _1yep5z6ji _1yep5z6jj",Xo="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",sm=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"]]}),sa=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:[]}),lm="f6jv6bj _1yep5z6wg _1yep5z6wh _1yep5z6wi _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi",pm="f6jv6bk";var cm="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",dm=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:[]}),um="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",mm="_1yep5z6jn _1yep5z6jo _1yep5z6jp",fm="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu _1yep5z6e3 _1yep5z6lc",ym=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:[]}),bm="f6jv6bl",gm="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu",la=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),pa="f6jv6b9 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Ot="f6jv6bo";var _m=[["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:jt}}=layoutSprinkleValues,zm=({isOpen:e,onClose:o})=>{let{formatMessage:t}=F(),r=useId();return jsx(we,{isOpen:e,onOpenChange:a=>{a||o();},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(ue,{"aria-labelledby":r,className:lm,drawerBackground:"subtle",children:[jsxs(M,{paddingLeft:jt.padding.horizontal.lg,paddingRight:jt.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:pm,children:[jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:t(At.help)}),jsx(B,{icon:XIcon,size:"md",variant:"secondary","aria-label":t(At.close),onPress:o})]}),jsx(O,{className:bm}),jsxs(M,{paddingX:jt.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(M,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:jt.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:t(At.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:t(At.shortcut)})]})}),jsx("div",{role:"rowgroup",children:_m.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(M,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:jt.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:t(At[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==_m.length-1&&jsx(O,{})]},a))})]})]})})})},At=$({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 ca=ro.forwardRef(({value:e,defaultValue:o,onChange:t,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:u,saveOnEnter:m,onSave:d},f)=>{let y=ro.useRef(null),[b,v]=useControlledState(e,o||"",t),_=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 h=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:x,isFocusVisible:I}=useFocusRing(),{hoverProps:k,isHovered:S}=useHover({}),N=filterTruthyValues({"data-focus-visible":I,"data-hovered":S,"data-focused":x});return jsx("textarea",{...mergeProps(R,k,N),ref:L(y,n),className:classNames(s?fm:[sa(),la({isInline:i}),gm]),autoFocus:u,onChange:_,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:g})});ca.displayName="PlainEditor";var qt="mention",da="mention_input",Lm=ro.forwardRef(({onCancel:e,editor:o,element:t,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ma),p=useSelected(),[l,c]=useState(""),{contains:u}=useFilter({sensitivity:"base"}),{formatMessage:m}=F(),d=useMemo(()=>{let C=i.filter(E=>l===""||u(E.displayName,l)).map(E=>({id:E.id,label:E.displayName,data:E}));return s?take(C,s):C},[i,s,l,u]),f=useCallback(C=>jsx(Item,{children:C.label},C.id),[]),y=useCallback((C=!1)=>{let E=findNodePath(o,t);E&&(removeNodes(o,{at:E}),C&&focusEditor(o));},[o,t]),b=useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:C=>{y(!0),r?.(C);}}),v=ro.useRef(null),_=ro.useRef(null),g=ro.useRef(null),h=ro.useRef(null),R=useHTMLInputCursorState(_);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:x,listBoxProps:I}=useComboBox({defaultItems:d,inputRef:_,buttonRef:v,listBoxRef:g,popoverRef:h,menuTrigger:"focus","aria-label":m(HP.mention)},b);useEffect(()=>{_.current?.focus();},[]);let k=useCallback((C="manual",E=!1)=>{y(E),e?.(C,b.inputValue);},[e,y,b.inputValue]),S=useRef(p);useEffect(()=>{S.current&&!p&&k("deselect"),S.current=p;},[p,k]);let N=R?.atStart??!1,w=R?.atEnd??!1,T=useCallback(C=>{C.key==="Backspace"&&N?k("backspace",!0):C.key==="Escape"?k("escape",!0):C.key==="ArrowLeft"&&N?k("arrowLeft",!0):C.key==="ArrowRight"&&w&&k("arrowRight",!0);let E=Hotkeys.isUndo(C)&&o.history.undos.length>0,H=Hotkeys.isRedo(C)&&o.history.redos.length>0;(E||H)&&(C.preventDefault(),o[E?"undo":"redo"](),focusEditor(o));},[N,w,k,o]),P=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let C=re(_.current),E=_.current?C?.getComputedStyle(_.current).font:void 0;return {width:E?getTextDimensions({text:b.inputValue,font:E}).width+10:"4ch"}}},[b.inputValue]);return jsxs(ao.Provider,{value:b,children:[jsx("input",{...mergeProps(x,{onKeyDown:T,onBlur:()=>{k("blur",!0);},onChange:C=>{c(C.target.value);}}),style:P,className:cm,ref:L(a,_)}),jsx(ye,{triggerRef:n,className:um,isNonModal:!0,ref:h,state:b,children:jsx(le,{...I,items:void 0,autoFocus:"first",ref:g,className:sprinkles({width:"full"}),renderOption:Em})})]})});Lm.displayName="MentionInputContentElement";var ui=withRef(({className:e,...o},t)=>{let{children:r,editor:a,element:n}=o,{items:i}=useContext(ma),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}),st()&&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:qt,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:t,...o,children:[jsx(Lm,{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]})});ui.displayName="MentionInputElement";var mi=withRef(({className:e,onClick:o,children:t,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:getHandler(o,n),ref:a,...r,children:["@",n.displayName,t]})});mi.displayName="MentionElement";var Mm=(e,{options:{trigger:o,triggerPreviousCharPattern:t,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===o;return e.insertText=i=>{if(!e.selection||!n(i)||r&&!r(e)){a(i);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(t?.test(s)){ua(e);return}a(i);},e},HP=$({mention:{defaultMessage:"Mention",id:"mention"}});function Dm({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("p",{children:o})})}function ek(e){return Object.entries(e).map(([o,t])=>`${kebabCase(o)}:${t}`).filter(([,o])=>!!o).join(";")}function ok(e){return "text"in e}function tk(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Kt(e){if(!e)return "";function o(t){if(ok(t)){let a=tk(t.text);return t.bold&&(a=`<b>${a}</b>`),t.italic&&(a=`<i>${a}</i>`),t.underline&&(a=`<u>${a}</u>`),(t.color||t.backgroundColor)&&(a=`<span style="${ek(filterTruthyValues({color:t.color||void 0,backgroundColor:t.backgroundColor||void 0}))}">${a}</span>`),a}let r=t.children?.map(Kt).join("");switch(t.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${t.url}">${r}</a>`;case qt:return `<span data-user-id="${t.value}">${t.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(t=>o(t)).join(""):o(e)}function rk(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(o=>o.split(":").map(t=>t.trim())).map(([o,t])=>[camelCase(o),t]))):{}}function vi(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let o=new DOMParser().parseFromString(Fm.default.sanitize(e),"text/html"),t=o.querySelectorAll("[style]");for(let a of t)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=o.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
|
|
53
|
-
`:"<p>";return
|
|
54
|
-
`);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:qt,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 Om(e){let o=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[t]=o||[{url:""}];return t?.url}function ua(e){let o={children:[{text:" "}],type:da};e.insertNode(o);}var ak=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:qt,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:da}],withOverrides:Mm}),jm=createPlugins([createParagraphPlugin({component:Dm}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:Am}),ak({component:mi})],{components:{[da]:ui}});var Km=({isDisabled:e})=>{let{formatMessage:o}=F(),t=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:jsx(B,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":o(mo.addLink),className:Xo,preventFocusOnPress:!0})}),jsx(Re,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(ue,{size:"content",style:{minWidth:240},children:jsx(uk,{close:()=>{r(),setTimeout(()=>{focusEditor(t,t.selection);},0);}})})})]})},uk=({close:e})=>{let o=useEditorRef(),{formatMessage:t}=F(),r=useEditorSelector(l=>Om(l),[]),[a,n]=ro.useState(r?"show":"add"),[i,s]=ro.useState(r||""),p=jsx(M,{padding:"lg",children:jsx(Ke,{label:t(mo.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(M,{display:"flex",justifyContent:"flex-end",padding:"lg",className:nm,children:jsx(U,{isDisabled:!isUrl(i,!0),label:t(mo.addLink),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(M,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxs(M,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(U,{label:t(mo.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(U,{label:t(mo.removeLink),size:"sm",onPress:()=>{unwrapLink(o),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(M,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(U,{label:t(mo.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(U,{label:t(mo.save),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function Am({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("a",{className:Rr({size:"sm"}),children:o})})}var mo=$({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 fk=parseColor("#ffffff00").toString("hexa"),_i=[{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"}];[..._i,{label:"Transparent",color:fk}];var ya=({nodeType:e,icon:o,ariaLabel:t,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(be,{variant:"tertiary",isSelected:a,size:"sm",icon:o,"aria-label":t,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},hi=({nodeType:e,"aria-label":o,isDisabled:t})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:p,triggerProps:l})=>jsx(B,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":o,size:"md",variant:"popover",isDisabled:t,className:Xo,preventFocusOnPress:!0,...l,ref:p}),[e,o,t]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(qo,{presets:_i,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:t})};var Uk=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ma=ro.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Pi=ro.forwardRef(({value:e,defaultValue:o,onChange:t,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:u,editorHandle:m,maxMentionableUsersSuggestions:d,autoFocus:f,editorRef:y,saveOnEnter:b,onSave:v},_)=>{let g=useRef(null),h=useId(),{formatMessage:R}=F(),x=useRef(null),I=x.current,k=useRef(null),S=useMemo(()=>I?.getRootNode()instanceof ShadowRoot,[I]),[N,w]=useControlledState(e?vi(e):void 0,vi(o||"<p></p>"),C=>{t&&t(Kt(C));}),{keyboardProps:T}=useKeyboard({onKeyDown:C=>{(b&&C.key==="Enter"&&!C.shiftKey||(C.ctrlKey||C.metaKey)&&C.key==="Enter")&&(C.preventDefault(),v()),C.altKey&&C.key==="F10"?(C.preventDefault(),g.current&&g.current.querySelector("button")?.focus()):C.continuePropagation(),st()&&S&&k.current&&focusEditor(k.current);}});useEffect(()=>{s&&k.current&&deselect(k.current);},[s]),useImperativeHandle(_,()=>({startMention:()=>{k.current&&!x.current?.querySelector("input[role='combobox']")&&ua(k.current);}})),useImperativeHandle(m,()=>({setCaretPosition:C=>{k.current&&(focusEditor(k.current),moveSelection(k.current,{distance:C,unit:"character"}));},focus:()=>{k.current&&focusEditor(k.current);}}));let P=useMemo(()=>({items:u||[],containerRef:l,maxMentionableUsersSuggestions:d}),[u,l,d]);return jsx(ma.Provider,{value:P,children:jsxs(Plate,{initialValue:N||Uk,plugins:jm,editorRef:L(k,y||null),onChange:C=>{w(C);},children:[jsxs(ia,{className:pa,"aria-controls":h,ref:g,children:[jsxs(M,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(ya,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:R(Jo.bold),isDisabled:s}),jsx(ya,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:R(Jo.italic),isDisabled:s}),jsx(ya,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:R(Jo.underline),isDisabled:s})]}),jsx(O,{orientation:"vertical",className:Ot}),jsx(hi,{nodeType:MARK_COLOR,"aria-label":R(Jo.fontColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:Ot}),jsx(hi,{nodeType:MARK_BG_COLOR,"aria-label":R(Jo.backgroundColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:Ot}),jsx(Km,{isDisabled:s}),jsx(O,{orientation:"vertical",className:Ot}),jsx(B,{className:Xo,icon:QuestionmarkCircleIcon,size:"sm","aria-label":R(Jo.help),onPress:c})]}),jsx(O,{variant:"secondary"}),jsx("div",{...T,ref:x,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:f,spellCheck:a,"aria-label":p,className:classNames(sa({isDisabled:s}),la({isInline:i})),renderPlaceholder:({attributes:C,children:E})=>jsx("span",{...C,className:sprinkles({paddingY:"lg"}),children:E})})})]})})});Pi.displayName="RichEditor";var Em=({key:e,value:o},{isDisabled:t,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:t}),{label:p,data:l}=o;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:dm({isDisabled:t,isHovered:a}),"data-active":a,ref:i,children:[jsx(Ao,{name:p,...l?.avatar}),jsxs(M,{display:"flex",flexDirection:"column",children:[jsx(Q,{type:"subtitle",size:"sm",children:p}),jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(O,{})]})},Jo=$({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 Qm=ro.memo(ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":u,"aria-describedby":m,"aria-labelledby":d,"aria-details":f,editableContentAriaLabel:y="Editing Area",footerButtons:b,clearOnCancel:v,clearOnSave:_,...g},h)=>{let R=useRef(null),{formatMessage:x}=F(),I=useRef(null),k=useRef(null),S=useRef(null),N=!a&&g.variant==="minimal",w=useRef(null),[T,P]=ro.useState(g.value||g.defaultValue),C=g.isDisabled||g.isSaveDisabled||!getPlainText(T||""),{fieldProps:E}=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(()=>{P(""),a?R.current?.reset():k.current?.clear();},[a]),D=useCallback(()=>{C||(i?.(a?Kt(R.current?.children):I.current.value),_&&H());},[H,_,a,i,C]),K=jsx(B,{variant:"ghost","aria-label":l||x(Ii.save),icon:p,isDisabled:C,size:"md",excludeFromTabOrder:N,className:N?mm:void 0,onPress:D,preventFocusOnPress:!0}),[j,G]=ro.useState(!1),{keyboardProps:A}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),G(!0));}}),ee=useCallback(V=>{P(V),g.onChange?.(V);},[g]);return jsxs("div",{...mergeProps(E,a?A:{}),role:"application",ref:L(S,h),style:o,"data-block-id":t,"data-block-class":r,className:classNames(sm({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx(Ao,{className:im,name:g.avatarName||""}):null,jsxs("div",{className:ym({isInline:s}),children:[jsx(ca,{isMinimal:N,textBoxRef:I,isInline:s,editableContentAriaLabel:y,...g,onChange:ee,onSave:D}),K]})]}):jsxs(Fragment,{children:[a?jsx(Pi,{containerRef:S,ref:w,editorRef:R,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{G(!0);},...g,onChange:ee,onSave:D}):jsxs(Fragment,{children:[!s&&jsx(O,{variant:"secondary"}),jsx(ca,{onCancel:n,textBoxRef:I,ref:k,isInline:s,editableContentAriaLabel:y,...g,onChange:V=>{P(V),g.onChange?.(V);},onSave:D})]}),jsx(O,{variant:"secondary"}),jsxs("div",{className:classNames(pa,sprinkles({justifyContent:"space-between"})),children:[jsxs(M,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&g.mentionableUsers?jsx(B,{icon:AtIcon,size:"sm","aria-label":x(Ii.mention),onPress:()=>w.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:W},X)=>V==="action"?jsx(B,{...W,size:"sm",isDisabled:g.isDisabled||W.isDisabled},X):jsx(be,{...W,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||W.isDisabled},X))]}),jsxs(M,{children:[!!n&&jsx(B,{variant:"secondary",icon:CrossCircleFilledIcon,isDisabled:g.isDisabled,size:"md",onPress:()=>{n(),v&&H();},"aria-label":c||x(Ii.cancel)}),K]})]})]}),jsx(zm,{isOpen:j,onClose:()=>{G(!1);}})]})}));Qm.displayName="Editor";var Ii=$({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var ga=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),u=animated[s];return c((m,d)=>d&&jsx(u,{className:e,"data-block-id":t,"data-block-class":r,style:{...o,...m},...p,ref:l,children:n}))});ga.displayName="Transition";var Jm="_8kqf970 _1yep5z6pd _1yep5z6pe _1yep5z6pf _1yep5z6149 _1yep5z614a _1yep5z614b _1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6150 _1yep5z6151 _1yep5z6152 _1yep5z6yy _1yep5z6v7 _1yep5z6v8 _1yep5z6v9 _1yep5z6176";var of=2,tf=ro.forwardRef(({className:e,style:o,hideForKeyboard:t,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=ro.useRef(null),u=useInteractionModality(),[m,d]=ro.useState(!1),f=useCallback(()=>{let N=r?.current||fe(c.current).body;return re(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+of>=0:N.scrollTop+N.clientHeight+of>=N.scrollHeight},[r]),[y,b]=ro.useState(f),v=ko(),{buttonProps:_,isPressed:g}=useButton({onPress:()=>{let N=r?.current||fe(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:h,isFocused:R,isFocusVisible:x}=useFocusRing(),{hoverProps:I,isHovered:k}=useHover({}),S=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":g,"data-focus-visible":x,"data-hovered":k,"data-focused":R});return useEffect(()=>{b(f());},[f]),useEffect(()=>{let N=r?.current||fe(c.current).body,w="onscrollend"in re(N),T=()=>{setTimeout(()=>{d(!1),b(f());},n);},P=()=>{d(!0),w||T();};return N.addEventListener("scroll",P),N.addEventListener("scrollend",T),()=>{N.removeEventListener("scroll",P),N.removeEventListener("scrollend",T);}},[r,n,f]),jsxs(ga,{isMounted:(t?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(_,h,I,S),className:classNames(Jm,Er({isFocusVisible:x,variant:"high-contrast",isHovered:k}),Br({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:o,ref:L(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:xt({variant:"high-contrast"})}),a]})});tf.displayName="ScrollControlButton";var Ri="_1yep5z6jt _1yep5z6ju _1yep5z6jv _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",rf=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"]]}),af="_1v0p2z10";var _a=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:u=!0,onPrimaryAction:m,onCancel:d,autoFocusButton: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(ue,{className:e,style:o,"data-block-id":t,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":v,children:[jsxs("div",{className:rf({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!u}),children:[jsxs(M,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&g,u?jsx(B,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(v0.close),onPress:d}):null]}),l?g:null]}),a?jsx(M,{elementType:"section",className:af,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(M,{paddingX:"lg",paddingBottom:"lg",children:jsx(Ke,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(O,{}),jsxs(M,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(U,{variant:"secondary",className:Ri,label:s,onPress:d,autoFocus:f==="cancel"}):null,i?jsx(U,{className:Ri,label:i,onPress:m,autoFocus:f==="primary",isDisabled:y}):null]})]}):null]})});_a.displayName="AlertDialog";var v0=$({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var nf="_1t55bp71",sf="_1yep5z6e3 _1yep5z6eu _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69i _1yep5z69j _1yep5z69k",lf="_1t55bp70";var P0=C0(),pf=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=t;return (!t||Array.isArray(t)&&t.length===0)&&(p=""),P0.render(p)},[t]);return jsx("div",{className:classNames(sf,lf,{[nf]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:o,ref:i,dangerouslySetInnerHTML:{__html:s}})});pf.displayName="Markdown";function mf(e){let{formatMessage:o,locale:t}=F(),[r,a]=ro.useState(!1),[n,i]=ro.useState(0),[s,p]=ro.useState(0),[l,c]=ro.useState(!1);useEffect(()=>{if(!e.current)return;let d=e.current,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(o(df.playing),"polite")):(e.current.pause(),a(!1),announce(o(df.paused),"polite"))))();},[o,e]),m=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(w0(e.current.currentTime,t.locale),"assertive"));},[t.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:u,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?uf(e.current?.currentTime):"00:00",formattedDuration:s?uf(s):"00:00",setIsSliderDragging:c}}var df=$({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function w0(e,o){let t=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...t&&{hours:t},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(o,{style:"long"}).format(n)}function uf(e){let o=Math.floor(e%3600/60),t=Math.floor(e%60);return [o,t].map(r=>r.toString().padStart(2,"0")).join(":")}var ff="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q",yf="rta2n91 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6zq _1yep5z6va _1yep5z6vb _1yep5z6vc _1yep5z6174 _1yep5z610n",bf="rta2n90";var _f=ro.forwardRef(({className:e,style:o,size:t="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro.useRef(null),{isPlaying:l,progress:c,duration:u,togglePlay:m,seek:d,formattedDuration:f,formattedCurrentTime:y,setProgress:b,setIsSliderDragging:v}=mf(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(ff,"BaselineUI-AudioPlayer",e),role:"group",style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:R})=>jsx("source",{src:h,type:R},h))})}),jsx(be,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:t,"aria-label":_(l?Ti.pause:Ti.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:yf,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(No,{"aria-label":_(Ti.audioTimeline),value:c,minValue:0,maxValue:100,className:bf,onChange:h=>{b(h),v(!0);},onChangeEnd:h=>{d(h),v(!1);}}),jsx("span",{"aria-hidden":!0,children:f})]})]})});_f.displayName="AudioPlayer";var Ti=$({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var zf="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7",hf="_1w920rn1 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k",xf="_1w920rn0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l3",ha=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"]]}),Cf="_1w920rnb _1yep5z6ld",Pf=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"]]}),kf="_1w920rnc";var wf=({items:e,ulRef:o})=>{let{length:t}=e,r=ro.useRef(null);return useLayoutEffect(()=>{if(!r.current)return;let a=r.current.closest(".BaselineUI-ImageGallery")?.querySelector(`[data-image-key='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(a,"Node is not defined."),r.current?.prepend(a);},[e,o]),jsx("div",{className:ha(),ref:r,children:jsx(M,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:kf,children:t})})};function Rf(e,o){return e.find(t=>t.id===o)}function Sf(e,o,t){let r=e.findIndex(i=>i.id===o),a=[...t].map(i=>e.findIndex(s=>s.id===i)),n=[...e];for(let i of a){let[s]=n.splice(i,1);n.splice(r,0,s);}return n}function Tf(e,o,t){let r=e.findIndex(s=>s.id===o),a=[...t].map(s=>e.findIndex(p=>p.id===s)),n=[...e],i=0;for(let s of a){let[p]=n.splice(s-i,1);n.splice(r,0,p),i++;}return n}function Ni(e){return e.map(o=>({id:o.id,label:o.label,data:{src:o.src,alt:o.alt}}))}function xa(e){return e.map(o=>({id:o.id,label:o.label,src:o.data?.src,alt:o.data?.alt}))}var A0=({fit:e,item:o,deleteElement:t})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:n,isLoaded:i}=Po({src:o.data?.src,alt:o.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(Vo,{"aria-label":r(Xt.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Cf,children:t}))},Nf=({item:{value:e},options:{optionProps:o,isFocusVisible:t,isSelected:r},liRef:a,fit:n="contain",onDelete:i,className:s,imageClassName:p,imageLabelClassName:l,imageDimensions:c,style:u,renderImage:m=(d,{deleteElement:f})=>jsx(A0,{item:d,deleteElement:f,fit:n})})=>{let d=useId(),{formatMessage:f}=F();invariant(e&&vo(e),"Expected value to be a list option");let y=i?jsx("div",{className:zf,children:jsx(B,{"aria-label":f(Xt.delete),size:"xs",icon:XIcon$2,onPress:()=>{i(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,b=useCallback(v=>{let _={},g=typeof v=="function"?v(xa([e])[0],{isSelected:r}):v;return g&&(_.width=typeof g.width=="string"?Mi[g.width]:g.width,_.aspectRatio="height"in g?`${_.width} / ${g.height}`:g?.aspectRatio?.toString()),_},[r,e]);return jsxs("li",{...o,ref:a,className:classNames(hf,s),"aria-labelledby":d,style:u,children:[jsx(M,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(ha({isFocusVisible:t,isSelected:r,isLoading:!0}),p),style:b(c),"data-image-key":e.id,children:m(e,{deleteElement:y??void 0,onDelete:i})})}),jsx("span",{id:d,className:classNames(Pf({isFocusVisible:t,isSelected:r}),l),children:e.label})]})};var W0={width:0,display:"block"};var Mi=(t=>(t[t.sm=102]="sm",t[t.md=170]="md",t))(Mi||{}),Ef=ro.forwardRef(({className:e,style:o,fit:t="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:u,imageContainerClassName:m,imageClassName:d,labelClassName:f,onListChange:y,renderImage:b,imageDimensions:v={width:s,aspectRatio:p},imageContainerStyle:_,...g},h)=>{let R=ro.useRef(null),[x,I]=useState([]),{formatMessage:k}=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?Ni(l):void 0,Ni(c),y?D=>{y?.(xa(D));}:void 0),P=useCallback(D=>{let K=D.target.key,j=D.keys;if(D.target.dropPosition==="before"){let G=Sf(w,K,j);T(G);}else if(D.target.dropPosition==="after"){let G=Tf(w,K,j);T(G);}r?.(D);},[w,r,T]),C=useCallback(()=>{i&&x.length&&(T(w.filter(D=>!x.includes(D.id))),i(new Set(x)),I([]));},[x,w,i,T]),E=useCallback((D,K,j)=>jsx(Nf,{item:D,options:K,liRef:j,fit:t,onDelete:i?G=>{I([G]);}:void 0,renderImage:b,className:m,imageClassName:d,imageLabelClassName:f,imageDimensions:v,style:_}),[t,i,b,m,d,f,v,_]),{keyboardProps:H}=useKeyboard({onKeyDown(D){if(u?.(D),D.key==="Backspace"||D.key==="Delete"){if(!i)return;if([...S].length)I([...S]);else {let j=D.target.dataset.key;I([j]);}}}});return jsxs("div",{...H,ref:h,style:o,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(le,{...g,selectedKeys:S,items:w,onReorder:P,layout:"grid",orientation:"vertical",className:xf,ref:R,dropIndicatorStyle:W0,renderOption:E,renderDragPreview:D=>jsx(wf,{items:D,ulRef:R}),onSelectionChange:N,getItems:D=>[...D].map(K=>{let j=Rf(w,K);return {src:j?.src||"",alt:j?.alt||"",key:K}})}),jsx(we,{isOpen:!![...x].length,onOpenChange:D=>{D||I([]);},children:jsx(Ee,{isDismissable:!0,children:jsx(_a,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:k(Xt.delete),cancelLabel:k(Xt.cancel),onCancel:()=>{I([]);},onPrimaryAction:C,autoFocusButton:"cancel"})})})]})});Ef.displayName="ImageGallery";var Xt=$({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var Bf="_1sexph00",Df="_1sexph01 _1yep5z617n _1yep5z617o _1yep5z617p _1yep5z619z _1yep5z61a0 _1yep5z61a1 _1yep5z61b5 _1yep5z61b6 _1yep5z61b7 _1yep5z618t _1yep5z618u _1yep5z618v _1yep5z61rj _1yep5z61rk _1yep5z61rl";var Vf=ro.forwardRef(({className:e,style:o,items:t,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:u,defaultSelected:m,onButtonSelectionChange:d,moreAriaLabel:f,optionStyle:y,optionClassName:b,triggerClassName:v,triggerStyle:_,tooltipProps:g,...h},R)=>{let{formatMessage:x}=F(),I=te(),k=useSelectState({items:t,...h,defaultSelectedKey:h.defaultSelectedKey||t?.[0]?.id,children:I,validationState:h.validationState==="error"?"invalid":"valid"}),[S,N]=useControlledState(u,!!m,A=>{d?.({isSelected:A,selectedKey:k.selectedKey});}),{hoverProps:w,isHovered:T}=useHover({isDisabled:s}),P=useMemo(()=>{let A=k.collection.getItem(k.selectedKey),ee=A?.textValue||A?.["aria-label"],V=A?.value,W=V?.icon,X={size:i,isSelected:S,onPress:ze=>{N(!S),c?.(ze);},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&&W?jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:ee,placement:"bottom start",offset:4,...typeof g=="function"?g("button"):g,children:jsx(be,{icon:W,"aria-label":ee,variant:"toolbar",...X})}):jsx(Lr,{iconStart:W,label:ee,variant:"toolbar",...X})},[l,n,S,s,c,b,y,N,i,k.collection,k.selectedKey,g]),C=h["aria-label"],E=useCallback(({buttonProps:A,ref:ee})=>{delete A["aria-labelledby"];let V=f||`${x(rI.more)} ${C}`;return jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:V,placement:"bottom start",offset:4,...g,children:jsx(PressResponder,{...A,children:jsx(B,{"aria-label":V,ref:ee,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:W})=>classNames(Nr({isSelected:S,isFocusVisible:W}),Df,v),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[C,l,x,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":k.isOpen}),D=ae(R),K=useMemo(()=>({state:k,popoverAnchorRef:D}),[k,D]),j=useCallback(A=>typeof b=="function"?b(A,{isButton:!1,isSelected:k.selectionManager.isSelected(A.id)}):b,[b,k.selectionManager]),G=useCallback(A=>typeof y=="function"?y(A,{isButton:!1,isSelected:k.selectionManager.isSelected(A.id)}):y,[y,k.selectionManager]);return jsx(Fr.Provider,{value:K,children:jsxs(M,{...w,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(Bf,"BaselineUI-ButtonSelect",e),"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],"aria-describedby":h["aria-describedby"],"aria-details":h["aria-details"],style:o,ref:D,...H,children:[P,jsx(Xe,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:t,...h,style:{width:20},optionClassName:j,optionStyle:G,variant:"ghost",renderTrigger:E})]})})});Vf.displayName="ButtonSelect";var rI=$({more:{id:"more",defaultMessage:"More"}});var Of=z({defaultClassName:"_18v88n10 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6lc",variantClassNames:{labelPosition:{top:"_1yep5z614l _1yep5z614m _1yep5z614n",start:"_1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),jf=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6lc _1yep5z6ln _1yep5z6lf _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z610q"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),Af=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6l9",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6106",warning:"_1yep5z610e"},isReadOnly:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]}),$f=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"]]}),Uf=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),qf=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"]]}),Kf=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lf",variantClassNames:{isFocusVisible:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isHovered:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isOpen:{true:"_1yep5z613t _1yep5z6177"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isHovered:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isOpen:!0},"_1yep5z61pl _1yep5z61sz"]]});var Xf=ro.forwardRef(({className:e,style:o,inputStyle:t,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:u=!1,labelPosition:m="top",validationState:d="valid",variant:f="primary",toggleLabel:y,renderOption:b,showIcon:v=!0,filter:_,minValue:g,maxValue:h,inputType:R="text",...x},I)=>{let{contains:k}=useFilter({sensitivity:"base"}),S=te(),N=useComboBoxState({...x,defaultFilter:_||k,defaultItems:s,onSelectionChange:l,onInputChange:c,children:S,validationState:u?"invalid":"valid"}),w=ro.useRef(null),T=ro.useRef(null),P=ro.useRef(null),C=ro.useRef(null),E=ro.useRef(null),{buttonProps:H,inputProps:D,listBoxProps:K,labelProps:j,errorMessageProps:G,descriptionProps:A,validationErrors:ee}=useComboBox({...x,inputRef:T,defaultItems:s,buttonRef:w,listBoxRef:P,popoverRef:C,validationState:d==="error"?"invalid":"valid"},N),V=x.errorMessage||ee.join(" "),W=Ie({...x,errorMessage:V,descriptionProps:A,errorMessageProps:G,labelPosition:m});V&&(d="error");let{hoverProps:X,isHovered:ze}=useHover({isDisabled:x.isDisabled}),{isFocused:Ce,focusProps:Pe,isFocusVisible:ke}=useFocusRing(),He=Do({isReadOnly:x.isReadOnly,validationState:d}),oe=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":d,"data-focused":Ce,"data-focus-visible":ke}),{labelProps:de,fieldProps:nt}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]});return jsx(ao.Provider,{value:N,children:jsxs("div",{className:classNames(Of({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:o,ref:I,children:[i||m==="start"&&W?jsxs("div",{className:qf({labelPosition:m,hasMessage:!!W}),children:[jsx("label",{...mergeProps(j,de),className:Uf({isDisabled:x.isDisabled}),children:i}),m==="start"&&W]}):null,jsxs("div",{...X,className:$f({validationState:d,isHovered:ze,isFocused:Ce,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:E,children:[jsx("input",{...mergeProps(D,Pe,oe,nt,R==="number"?{type:"number",min:g,max:h,onKeyDown:to=>{(to.key==="ArrowUp"||to.key==="ArrowDown")&&to.preventDefault();}}:null),ref:T,className:classNames(jf({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:t}),He&&v?jsx(He,{className:Af({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsx(U,{...H,ref:w,variant:"popover",label:y,className:Kf({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&ke,isHovered:!x.isDisabled&&!x.isReadOnly&&ze,isOpen:N.isOpen})})]}),jsx(ye,{className:qe,ref:C,triggerRef:E,state:N,children:jsx(le,{...K,items:s,ref:P,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:kr})}),m==="top"&&W]})})});Xf.displayName="ComboBox";var Fi=ro.forwardRef(({item:e,renderGridItem:o,state:t},r)=>{let a=ae(r),n=useGridListItem({node:e},t,a),i=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:s}=useGridListSelectionCheckbox({key:e.key},t);return o(e,{...n,checkBoxProps:i?s:void 0},a)});Fi.displayName="GridListItem";var zI=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},Zf=ro.forwardRef(({className:e,style:o,isEditing:t=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,...i},s)=>{let p=te(),l=useListState({...i,children:p}),c=ae(s),{gridProps:u}=useGridList(i,l,c);useImperativeHandle(n,()=>({setFocused:d=>{l.selectionManager.setFocused(d);},setFocusedKey:d=>{l.selectionManager.setFocusedKey(d);}}),[l]);let m=t?zI:u.onKeyDownCapture;return jsx("ul",{...u,className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,onKeyDownCapture:m,children:[...l.collection].map(d=>jsx(Fi,{item:d,state:l,renderGridItem:i.renderGridItem},d.key))})});Zf.displayName="GridList";var Qf="_1dc3b8m0";var ey=ro.forwardRef(({className:e,selectionMode:o,style:t,"data-block-id":r,"data-block-class":a,tooltipProps:n,renderActionItem:i,...s},p)=>{let l=ae(p),c=te(),u=useListState({...s,selectionMode:o,suppressTextValueWarning:!0,children:c}),{actionGroupProps:m}=useActionGroup({...s,selectionMode:o,children:c},u,l);return jsx(M,{...m,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:t,ref:l,children:[...u.collection].map(d=>(invariant(d.value),jsx(RI,{item:d,state:u,isDisabled:s.isDisabled,onAction:s.onAction,tooltipProps:n,renderActionItem:i},d.key)))})});ey.displayName="ActionGroup";var RI=({item:e,state:o,tooltipProps:t,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},o),s=n||o.selectionManager.isDisabled(e.key),p=o.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof t=="function"?t(e.value):t),[t,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(ne,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(B,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[Qf]:p},"BaselineUI-ActionGroup-Item")})})})};var oy="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",ty="_1yep5z61qa _1yep5z61qb _1yep5z61qc _1yep5z61gz _1yep5z61h0 _1yep5z61h1";var ay=ro.forwardRef(({className:e,style:o,items:t,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:u,labelPosition:m="top","data-block-id":d,"data-block-class":f,...y},b)=>{let v=useMemo(()=>t.map(g=>({id:g.color,label:g.label})),[t]),_=useId();return useEffect(()=>{!a&&!y["aria-label"]&&!y["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,y]),jsxs(M,{...Na(y),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:o,ref:b,children:[n||a?jsxs(M,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Q,{id:_,type:"label",size:"sm",children:a}):null]}):null,jsx(le,{className:classNames(ty,r),selectionMode:"single",items:v,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?v.map(g=>g.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:g=>{p?.([...g][0]);},optionClassName:c,optionStyle:u,renderOption:({key:g,textValue:h},{isSelected:R,isFocusVisible:x,isDisabled:I,optionProps:k},S)=>jsx("li",{...k,"data-disabled":I,className:classNames(oy,k.className),ref:S,children:jsx(Ze,{isFocusVisible:x,color:g,isSelected:R,"aria-label":h,isInteractive:!0,isDisabled:I})}),...y,"aria-labelledby":a?_:y["aria-labelledby"]})]})});ay.displayName="ColorSwatchPicker";var ny="_10dw1p96",iy="_10dw1p95",sy=z({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lf _1yep5z6l2 _1yep5z6kz",variantClassNames:{isSelected:{true:"_1yep5z611v"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z613h _1yep5z617a _1yep5z6178"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isSelected:!1,isRenaming:!1},"_1yep5z61nm _1yep5z61pf _1yep5z61t1 _1yep5z61t0"]]});var cy=({context:e,depth:o,children:t,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:p,primaryActionAriaLabel:l,secondaryActionAriaLabel:c,onRename:u,onAction:m,renderItemTitle:d=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 h=createFocusManager(v),R=useCallback(P=>{if(P.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))v.current?.setAttribute("tabindex","-1"),P.preventDefault(),P.stopPropagation(),h.focusNext();else switch(P.key){case"ArrowLeft":{h.focusPrevious()?(P.preventDefault(),P.stopPropagation()):(_?.(P),e.focusItem(!0));break}case"Enter":{e.toggleExpandedState();break}default:_?.(P);}},[e,h,_,r,v]),x=useMemo(()=>{let P=s,C=p,E=typeof l=="function"?l(r.index):l,H=typeof c=="function"?c(r.index):c;return P||C?jsxs(M,{display:"flex",flexDirection:"row",children:[P?jsx(be,{icon:P,"aria-label":E,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,C?jsx(be,{icon:C,"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]),I=useCallback(P=>{P.key==="Enter"?(u?.({key:r.index,value:P.target.value}),e.stopRenamingItem()):P.key==="Escape"?(e.stopRenamingItem(),v.current?.setAttribute("tabindex","0"),v.current?.focus()):P.key!=="ArrowRight"&&P.key!=="ArrowLeft"&&P.key!=="ArrowUp"&&P.key!=="ArrowDown"&&!P.metaKey&&P.continuePropagation();},[r.index,e,u,v]),k=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(iy,sy({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":o,"aria-level":o+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:v,children:jsxs(M,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?x:null,jsxs(M,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(M,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${o*2} * ${themeVars.spacing.lg})`},children:[jsx(B,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":f(e.isExpanded?Oi.collapse:Oi.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(ny,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),k?jsx(k,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(M,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:P=>{S&&(P.stopPropagation(),P.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:P=>{P.stopPropagation();},children:jsx(Ke,{defaultValue:r.data.label,autoFocus:!0,onBlur:P=>{u?.({key:r.index,value:P.target.value}),e.stopRenamingItem();},"aria-label":f(Oi.rename),onKeyDown:I,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"?x:null]})}),t]})},Oi=$({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function ZI(e,{posInset:o,setSize:t}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:o,setSize:t},isFolder:!!e.children?.length}}function QI(e,o){let t={};function r(a,n,i){if(t[a.id]=o(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),t}var fy=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,actionsPosition:m="start",onRename:d,onAction:f,renderItemTitle:y,...b},v)=>{let _=te(),g=useRef(null),h=useTreeState({...b,items:a.children,children:_}),R=useMemo(()=>Object.fromEntries(Object.entries(QI(a,ZI)).map(([w,T])=>[w,{...T,canRename:!!d}])),[a,d]),x=useId(),[I,k]=ro.useState(a.children?.[0]?.id??""),S=useRef(I),N=useMemo(()=>({[`tree-${x}`]:{focusedItem:I,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[I,h.expandedKeys,h.selectionManager.selectedKeys,x]);return useEffect(()=>{if(!g.current)return;let w=Te(g.current),T=w instanceof ShadowRoot,P=g.current?.contains(w?.activeElement??null);T&&P&&Te(g.current)?.querySelector(`[data-rct-item-id="${I}"]`)?.focus();},[I]),jsx(ControlledTreeEnvironment,{items:R,getItemTitle:w=>w.data?.label,viewState:N,onExpandItem:w=>{h.setExpandedKeys(new Set([...h.expandedKeys,w.index])),b.onExpand?.(w.index.toString());},onFocusItem:w=>{k(w.index),w.index&&(S.current=w.index);},onCollapseItem:w=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(T=>T!==w.index))),b.onCollapse?.(w.index.toString());},onSelectItems:w=>{h.selectionManager.setSelectedKeys(new Set(w));},renderItem:w=>jsx(cy,{...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(Ae,{children:jsx(VisuallyHidden,{children:w})}),renderTreeContainer:({containerProps:w,children:T})=>jsx("div",{...go(w,{onBlur:P=>{P.currentTarget.contains(P.relatedTarget)||P.currentTarget.querySelector(`[data-key="${S.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":t,"data-block-class":r,style:{...o,...w.style},className:classNames(e,"BaselineUI-TreeView"),ref:L(v,w.ref,g),role:"treegrid",children:T}),renderItemsContainer:({children:w})=>w,children:jsx(Tree,{treeId:`tree-${x}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});fy.displayName="TreeView";var nw=forwardRef(({className:e,isCollapsible:o=!1,...t},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:o,ref:a,id:n,...t})});nw.displayName="Panel";var uw=forwardRef(({className:e,...o},t)=>{let r=useRef(null);return useImperativeHandle(t,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...o})});uw.displayName="PanelGroup";var yy="_6abhjk0";var bw=({className:e,isDisabled:o=!1,...t})=>jsx(PanelResizeHandle,{disabled:o,className:classNames(yy,"BaselineUI-PanelResizeHandle",e),...t});bw.displayName="PanelResizeHandle";
|
|
52
|
+
var xe=typeof document<"u"?ro.useLayoutEffect:()=>{};function ka(e){let o=useRef(null);return xe(()=>{o.current=e;},[e]),useCallback((...t)=>{let r=o.current;return r?.(...t)},[])}function Ia(e){let[o,t]=useState(e),r=useRef(null),a=ka(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}o===i.value?a():t(i.value);});xe(()=>{r.current&&a();});let n=ka(i=>{r.current=i(o),a();});return [o,n]}var Jt={prefix:String(Math.round(Math.random()*1e10)),current:0},Ai=ro.createContext(Jt),ky=ro.createContext(!1);var Iy=!!(typeof window<"u"&&window.document&&window.document.createElement),wa=new WeakMap;function wy(e=!1){let o=useContext(Ai),t=useRef(null);if(t.current===null&&!e){var r,a;let n=(a=ro.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=wa.get(n);i==null?wa.set(n,{id:o.current,state:n.memoizedState}):n.memoizedState!==i.state&&(o.current=i.id,wa.delete(n));}t.current=++o.current;}return t.current}function Ry(e){let o=useContext(Ai);o===Jt&&!Iy&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let t=wy(!!e),r=o===Jt&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${o.prefix}`;return e||`${r}-${t}`}function Sy(e){let o=ro.useId(),[t]=useState($i()),r=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Jt.prefix}`;return e||`${r}-${o}`}var Sa=typeof ro.useId=="function"?Sy:Ry;function Ty(){return !1}function Ny(){return !0}function Ly(e){return ()=>{}}function $i(){return typeof ro.useSyncExternalStore=="function"?ro.useSyncExternalStore(Ly,Ty,Ny):useContext(ky)}var Fy=!!(typeof window<"u"&&window.document&&window.document.createElement),er=new Map;function or(e){let[o,t]=useState(e),r=useRef(null),a=Sa(o),n=useCallback(i=>{r.current=i;},[]);return Fy&&er.set(a,n),xe(()=>{let i=a;return ()=>{er.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,t(i));}),a}function Ta(e,o){if(e===o)return e;let t=er.get(e);if(t)return t(o),o;let r=er.get(o);return r?(r(e),e):o}function Ui(...e){return (...o)=>{for(let t of e)typeof t=="function"&&t(...o);}}var fe=e=>{var o;return (o=e?.ownerDocument)!==null&&o!==void 0?o:document},re=e=>{if(e&&"window"in e&&e.window===e)return e;let o=Te(e);return o instanceof ShadowRoot?o.ownerDocument.defaultView||window:o?.defaultView||window},Te=e=>{if(!e)return document;let o=e.getRootNode?e.getRootNode():document;return e.isConnected?(o):null};function qi(e){var o,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(o=0;o<a;o++)e[o]&&(t=qi(e[o]))&&(r&&(r+=" "),r+=t);}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Hy(){for(var e,o,t=0,r="",a=arguments.length;t<a;t++)(e=arguments[t])&&(o=qi(e))&&(r&&(r+=" "),r+=o);return r}var Ki=Hy;function vo(...e){let o={...e[0]};for(let t=1;t<e.length;t++){let r=e[t];for(let a in r){let n=o[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?o[a]=Ui(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?o[a]=Ki(n,i):a==="id"&&n&&i?o.id=Ta(n,i):o[a]=i!==void 0?i:n;}}return o}function M(...e){return e.length===1?e[0]:o=>{for(let t of e)typeof t=="function"?t(o):t!=null&&(t.current=o);}}var Vy=new Set(["id"]),Oy=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),jy=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Ay=/^(data-.*)$/;function Na(e,o={}){let{labelable:t,isLink:r,propNames:a}=o,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Vy.has(i)||t&&Oy.has(i)||r&&jy.has(i)||a?.has(i)||Ay.test(i))&&(n[i]=e[i]);return n}function Gi(e){var o;return typeof window>"u"||window.navigator==null?!1:((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent)}function La(e){var o;return typeof window<"u"&&window.navigator!=null?e.test(((o=window.navigator.userAgentData)===null||o===void 0?void 0:o.platform)||window.navigator.platform):!1}function Wi(){return La(/^Mac/i)}function Xi(){return La(/^iPhone/i)}function Yi(){return La(/^iPad/i)||Wi()&&navigator.maxTouchPoints>1}function Ma(){return Xi()||Yi()}function Ea(){return Gi(/Android/i)}function lt(){return Gi(/Firefox/i)}function ae(e){let o=useRef(null);return useMemo(()=>({get current(){return o.current},set current(t){o.current=t,typeof e=="function"?e(t):e&&(e.current=t);}}),[e])}function Ky(){return typeof window.ResizeObserver<"u"}function Ba(e){let{ref:o,onResize:t}=e;useEffect(()=>{let r=o?.current;if(r)if(Ky()){let a=new window.ResizeObserver(n=>{n.length&&t();});return a.observe(r),()=>{r&&a.unobserve(r);}}else return window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1);}},[t,o]);}function _o(e){return !!e&&"label"in e&&!!e.label}function tr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function Xy(e){return tr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:o=>jsx(Item,{textValue:o.label,children:o.label},o.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function te(){return useCallback(e=>Xy(e),[])}function Qi(e,o,t){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=o.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,t);let n=useDroppableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:o.collection,disabledKeys:o.disabledKeys,ref:t,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(o.collection,t)},n,t);return {collectionProps:i,dragState:a,dropState:n}}function a1(e,o){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,o||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (o==="string"?String:Number)(e)}function n1(e){var o=a1(e,"string");return typeof o=="symbol"?o:String(o)}function i1(e,o,t){return o=n1(o),o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}function Ji(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,r);}return t}function es(e){for(var o=1;o<arguments.length;o++){var t=arguments[o]!=null?arguments[o]:{};o%2?Ji(Object(t),!0).forEach(function(r){i1(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ji(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e}function os(e,o){var t={};for(var r in e)t[r]=o(e[r],r);return t}var s1=(e,o,t)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=o[r])!==null&&a!==void 0?a:t[r]))return !1}return !0},z=e=>{var o=t=>{var r=e.defaultClassName,a=es(es({},e.defaultVariants),t);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,u]of e.compoundVariants)s1(c,a,e.defaultVariants)&&(r+=" "+u);return r};return o.variants=()=>Object.keys(e.variantClassNames),o.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return os(e.variantClassNames,t=>os(t,r=>r.split(" ")[0]))}},o};var ts=z({defaultClassName:"_6n12k9b _1yep5z6lh _1yep5z6lg _1yep5z6i1 _1yep5z6kz",variantClassNames:{isDropTarget:{true:"_1yep5z613h"},orientation:{vertical:"_1yep5z6174",horizontal:"_1yep5z6175"}},defaultVariants:{},compoundVariants:[]}),rs="_6n12k98 _1yep5z6lf _1yep5z6ih _1yep5z6ii _1yep5z6ij",as=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),ns=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:[]}),is="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",ss="_6n12k90";var ls=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var O=ro.forwardRef(({className:e,style:o,variant:t="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(ls({isVertical:r==="vertical",isSecondary:t==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:o,role:a?void 0:c.role,ref:l})});O.displayName="Separator";function y1(e){return sprinkles.properties.has(e)}var L=ro.forwardRef(({elementType:e="div",children:o,...t},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in t)y1(l)?s[l]=t[l]:p[l]=t[l];return {sprinkleProps:s,domProps:p}},[t]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:o})});L.displayName="Box";var ct=ro.forwardRef(({item:e,isDisabled:o,isFocusVisible:t,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:u},m)=>{invariant(e.value&&_o(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=useHover({isDisabled:o}),v=filterTruthyValues({"data-selected":r,"data-disabled":o,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":t,"data-selection-mode":u.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,y,v),className:classNames(ns({isHovered:b,isFocused:t,isFirstChild:u.collection.getFirstKey()===e.key,isLastChild:u.collection.getLastKey()===e.key,isDisabled:o}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(L,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,d?jsx(d,{size:24}):null,jsx("span",{...p,children:f})]}),i?jsx("span",{className:as({isDisabled:o}),...s,children:i}):null]})});ct.displayName="DefaultRenderOption";var Ha=({dropState:e,orientation:o="vertical",dropIndicatorStyle:t,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(ts({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:t}),...n})=>{let i=ro.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:o},i)};var us=({item:e,children:o,state:t,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ha,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),o(n),t.collection.getKeyAfter(e.key)==null&&jsx(Ha,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};us.displayName="DraggableListOption";var dt=ro.forwardRef(({item:e,renderOption:o=(m,d,f)=>jsx(ct,{item:m,liProps:d.optionProps,...d,ref:f}),showSelectedIcon:t,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},u)=>{let m=ro.useRef(null),d=useOption({key:e.key},r,m),{value:f}=e;invariant(f&&_o(f),"ListSection should not be passed to ListOption");let y={style:typeof l=="function"?l(f):l,className:typeof c=="function"?c(f):c};return a&&n?jsx(us,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:b=>o(e,{...d,showSelectedIcon:t,_state:r,optionProps:{...mergeProps(d.optionProps,b),...y}},M(m,u))}):o(e,{...d,showSelectedIcon:t,_state:r,optionProps:{...d.optionProps,...y}},M(m,u))});dt.displayName="Option";var bs=({section:e,state:o,sectionClassName:t,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=ro.useRef(null),{itemProps:l,groupProps:c,headingProps:u}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=o.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:d}=e;invariant(d&&tr(d),"section must be a ListSection");let f=typeof r=="function"?r(d):r,y=typeof t=="function"?t(d):t;return jsxs(Fragment,{children:[e.key===o.collection.getFirstKey()?null:jsx(O,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...f},className:classNames(ss,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(L,{...u,className:classNames("BaselineUI-ListBox-SectionHeader",is),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(dt,{item:b,state:o,...s},b.key))})]})]})};var ao=ro.createContext(null),Va=ro.forwardRef(({className:e,layout:o="stack",orientation:t="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:u,listBoxHandle:m,...d},f)=>{let y=ro.useRef(null),{direction:b}=useLocale(),v=ro.useRef(null),{listBoxProps:_}=useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:u.collection,ref:v,layout:o,orientation:t,direction:b,disabledKeys:u.disabledKeys})},u,v),g=useCallback((P,C)=>{let E=v.current?.querySelector(`[data-key="${P}"][role="option"]`);E&&E?.scrollIntoView({block:"nearest",inline:"nearest",...C});},[]);useImperativeHandle(m,()=>({scrollIntoView:g}),[g]),useGranularEffect(()=>{let P=Te(v.current)instanceof ShadowRoot,C=u.selectionManager.focusedKey;P&&C&&g(C);},[u.selectionManager.focusedKey],[g]);let h=useReducedMotion(),R=useCallback(P=>{let C=fe(v.current);c&&(!h&&"startViewTransition"in C?C.startViewTransition(()=>{c(P);}):c(P));},[c,h]),{collectionProps:x,dragState:I,dropState:k}=Qi({...d,onReorder:R,layout:o,orientation:t,enableReorder:i,preview:y},u,v),{isFocusVisible:S,isFocused:N,focusProps:w}=useFocusRing(),T=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":o,"data-empty":u.collection.size===0,"data-focused":N,"data-focus-visible":S,"data-orientation":t});return jsxs("ul",{...mergeProps(_,w,T,x),className:classNames(rs,"BaselineUI-ListBox",e),style:a,ref:M(f,v),children:[[...u.collection].map(P=>{let C={key:P.key,state:u,dragState:I,dropState:k,renderOption:n,renderDropIndicator:d.renderDropIndicator,renderSectionHeader:d.renderSectionHeader,showSelectedIcon:r,orientation:t,dropIndicatorStyle:d.dropIndicatorStyle,dropIndicatorClassName:d.dropIndicatorClassName,optionStyle:d.optionStyle,optionClassName:d.optionClassName,sectionClassName:d.sectionClassName,sectionStyle:d.sectionStyle,showSectionHeader:d.showSectionHeader,withSectionHeaderPadding:d.withSectionHeaderPadding};return P.type==="section"?jsx(bs,{...C,section:P}):jsx(dt,{...C,item:P})}),l?jsx(DragPreview,{ref:y,children:l}):null]})});Va.displayName="ListBoxCore";var vs=ro.forwardRef((e,o)=>{let t=te(),r=useListState({...e,children:t});return jsx(Va,{...e,ref:o,state:r})});vs.displayName="ListBoxStandalone";var le=ro.forwardRef((e,o)=>{let t=useContext(ao);return useEffect(()=>{if(!e.items&&!t)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,t]),t?jsx(Va,{...e,ref:o,state:t}):jsx(vs,{...e,ref:o})});le.displayName="ListBox";var nr="uf19bsf _1yep5z6kz",_s=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 ut=ro.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...o})=>{let t=ro.useRef(null),r=useOverlayTriggerState(o),a=useOverlayTrigger(o,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:t}),[r,a]);return jsx(ut.Provider,{value:n,children:e})};var hs={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},xs="_1gzftth1 _1yep5z6ih _1yep5z6ii _1yep5z6ij",Cs="_1gzftth6",Ps="_1gzftth8",ks="_1gzftth7",Is="var(--_1gzftth0)";function vT(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function ws(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 ir=ro.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:o})=>{let{state:t,overlayTriggerAria:r,triggerRef:a}=useContext(ut);invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:t.isOpen,ref:a}),[n,t.isOpen,a]);return invariant(!o&&e||o&&!e,"Either one of anchorRect or children has to be provided."),invariant(!o||ws(o),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(ir.Provider,{value:i,children:o?jsx("button",{className:classNames(Ps,"BaselineUI-PopoverTrigger-Hidden"),style:o,ref:a,tabIndex:-1},JSON.stringify(o)):e})};function sr({tooltip:e,...o},t){let[r,a]=useState(o["aria-label"]||""),n=o["aria-labelledby"];return useEffect(()=>{if(n){let p=fe(t.current).querySelector(`#${n}`);p&&a(p.textContent||"");}},[n,t]),{tooltipProps:useMemo(()=>{let s={size:"sm",variant:"inverse",text:r,includeArrow:!1,placement:"bottom start",offset:4};if(typeof e=="object")return {...s,...e};if(e)return s},[r,e])}}var lr=e=>{let o=ro.useRef(null),{ref:t,...r}=useContext(ir)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},o),{isFocusVisible:i,isFocused:s,focusProps:p}=useFocusRing(),{hoverProps:l,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:vo(a,p,l),isPressed:n,ref:M(o,t||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},pr=(e,o)=>{let t=ro.useRef(null),{ref:r,...a}=useContext(ir)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},o,t);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=useFocusRing(),{hoverProps:c,isHovered:u}=useHover({isDisabled:e.isDisabled});return {buttonProps:vo(n,l,c),isPressed:i,ref:M(t,r||null),isFocusVisible:s,isFocused:p,isHovered:u,uiStateOptions:{isHovered:u,isFocused:p,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:o.isSelected}}};var cr=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"]]}),ja=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 bb={sm:16,md:20,lg:24},U=ro.forwardRef(({label:e,style:o,className:t,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...u},m)=>{let{buttonProps:d,isPressed:f,ref:y,isFocusVisible:b,isFocused:v,isHovered:_,uiStateOptions:g}=lr({...u,elementType:i,isDisabled:s}),h=bb[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 t=="function"?t(g):t),style:typeof o=="function"?o(g):o,ref:M(m,y),children:[!!r&&jsx(r,{size:h,className:ja({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsx(a,{size:h,className:ja({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:nr})]})});U.displayName="ActionButton";var Ms=ro.forwardRef(({className:e,style:o,node:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=ro.useRef(null);ro.useEffect(()=>{let c=s.current;return c?.append(t),()=>{c?.contains(t)&&t.remove();}},[t]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...p,className:e,style:o,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:M(i,s)})});Ms.displayName="DomNodeRenderer";var Es="_14uvjig0 z9nup81",Bs="_14uvjig7",Ds="_14uvjig3",Fs=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),Hs=z({defaultClassName:"_14uvjige _14uvjig1",variantClassNames:{active:{true:"_14uvjigf _14uvjig2"},isDisabled:{true:"_14uvjigg"},isReadOnly:{true:"_14uvjigh"},isFocusVisible:{true:"_14uvjigi _14uvjig2"},isHovered:{true:"_14uvjigj _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),Vs="_14uvjig8",Os=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjigb _14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var xo=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),dr=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),Co=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),Ve="nrh1eh3",Oe=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),je=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),Po=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 Ie({description:e,errorMessageProps:o,descriptionProps:t,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...t,className:xo({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...o,className:xo({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:xo({isDisabled:i,labelPosition:n}),children:r}):null}var js=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),As="_1lnwne0";var $s=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),Us=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var qa=ro.forwardRef(({children:e,state:o,overlayProps:t,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:o.isOpen},o),u=useMemo(()=>{switch(a){case"top":return {x:0,y:4};case"bottom":return {x:0,y:-4};case"left":return {x:4,y:0};case"right":return {x:-4,y:0};default:return {x:0,y:0}}},[a]),m=useReducedMotion(),[d]=useSpring(()=>({from:{opacity:0,transform:`translate(${u.x}px, ${u.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!m})),f=a==="center"?"bottom":a;return jsxs(animated.span,{...t,style:{...d,...t.style},ref:l,"data-placement":f,children:[p?jsx("div",{className:$s({placement:f,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:Us({variant:n,size:i}),children:e})]})});qa.displayName="TooltipContent";function Gs({ref:e,onIntersect:o,isDisabled:t,threshold:r,rootMargin:a,root:n}){let i=ro.useRef(null);useEffect(()=>{if(t){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{o(s);},{root:n?.current,rootMargin:a,threshold:r});},[o,t,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function Ws({ref:e,onResize:o,isDisabled:t}){let r=ro.useRef(null),[a,n]=ro.useState();return ro.useEffect(()=>{if(t){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),o?.(i);});},[o,t,n]),ro.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function ko({src:e,alt:o}){let[t,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:t,hasError:a,isLoading:i,imgProps:{src:t?e:void 0,alt:o}}}function Io(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var Xs="SET_STATE",mr="UNDO",fr="REDO",Bb=(e,o)=>{let{past:t,present:r,future:a}=e;switch(o.type){case Xs:return {past:[...t,r],present:o.data,future:[]};case mr:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[r,...a]};case fr:return {past:[...t,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},Ys=(e={},{isDisabled:o,onAction:t})=>{let r=Io(),[a,n]=useReducer(Bb,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=y=>{n({type:Xs,data:y});},c=useRef(),u=()=>{c.current=mr,n({type:mr});},m=()=>{c.current=fr,n({type:fr});},d=!!i?.length,f=!!p?.length;return useGranularEffect(()=>{(c.current===mr||c.current===fr)&&(t?.(s,c.current),c.current=void 0);},[s],[t,r]),{state:s,push:o?()=>{}:l,undo:o?()=>{}:u,redo:o?()=>{}:m,pastStates:i,futureStates:p,canUndo:d,canRedo:f}};var Ga=ro.createContext({messages:{},shouldLogMissingMessages:!0}),Js=({children:e,messages:o={},shouldLogMissingMessages:t=!0,...r})=>{let a=ro.useMemo(()=>({messages:o,shouldLogMissingMessages:t}),[o,t]);return jsx(I18nProvider,{...r,children:jsx(Ga.Provider,{value:a,children:e})})};Js.displayName="I18nProvider";function F(e){let{messages:o,shouldLogMissingMessages:t}=useContext(Ga);useEffect(()=>{!e&&Hb(o)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,o]);let r=useMessageFormatter(e?cleanKeyFromGlobImport(e):o),a=useLocale();return {formatMessage:(n,i)=>{if(typeof n=="object")try{return r(n.id,i)}catch{return t&&console.log(`BUI \u{1F30D}: Translation not found for key: \`${n.id.toString()}\`. The default message, i.e. \`${n.defaultMessage}\`, will be used instead.`),n.defaultMessage||n.id}else try{return r(n,i)}catch{return t&&console.log(`BUI \u{1F30D}: Translation not found for key: \`${n.toString()}\`. The default message, i.e. \`${n.toString()}\`, will be used instead.`),n}},locale:a}}var $=e=>e;function pL(e,o,t){let r=ro.useRef(null);return ro.useEffect(()=>{if(e)return r.current=new MutationObserver(t),r.current.observe(e,o),()=>{r.current&&r.current.disconnect();}},[e,o,t]),r.current}function ol(e,o){let[t,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):o}catch(n){return console.log(n),o}});return [t,n=>{try{let i=n instanceof Function?n(t):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function bL({ref:e,onSelectionChange:o,onSelectionEnd:t,isDisabled:r}){let a=ro.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=re(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&t?.(i);},onPressStart(){let n=re(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=re(n).getSelection();l&&e.current?.contains(l.anchorNode)&&o(l);}let s=fe(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,o,r]);}function wo(e){let o=useCallback(()=>{let a=re(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[t,r]=ro.useState(o);return xe(()=>{let a=re(e),n=()=>{r(o());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,o]),t}var Wa=ro.createContext(void 0),rl=({portalContainer:e,children:o})=>jsx(Wa.Provider,{value:e,children:o});rl.displayName="PortalContainerProvider";function ge(e){let o=useContext(Wa);return e||o}var al=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var nl="z9nup80",Ro="z9nup83",il="z9nup87";function Xa(e=window){let[o,t]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=u=>{t(u.matches?"dark":"light");};return l.matches&&t("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=u=>{a(u.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=u=>{i(u.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=u=>{p(u.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:o,highContrast:r,reducedMotion:n,transparency:s}}var So=createContext({theme:lightTheme,setTheme:()=>{}});var sl="var(--hj25q10)";var gr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},To=ro.forwardRef(({theme:e="system",children:o,setTheme:t,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:u,highContrast:m,transparency:d}=Xa(),{name:f,theme:y}=useMemo(()=>{switch(e){case"system":return c==="light"?gr.LIGHT:gr.DARK;case"light":return gr.LIGHT;case"dark":return gr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=wo(),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:t}),[y,t]);return jsx(So.Provider,{value:_,children:jsx("div",{...mergeProps(n,v),className:classNames(nl,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,y),...assignInlineVars({[sl]:l==="rtl"?"-1":"1"}),...a},ref:p,children:o})})});To.displayName="ThemeProvider";var Ae=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(So);return jsx(Overlay,{...n,children:jsx(To,{ref:i,theme:s,style:o,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:t})})});Ae.displayName="Portal";var ne=ro.forwardRef(({children:e,placement:o="bottom",delay:t=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":u,...m},d)=>{let f=ro.useRef(null),y=ro.useRef(null),b=!m.text||m.isDisabled,v=useTooltipTriggerState({...m,delay:t,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:g}=useTooltipTrigger({...m,isDisabled:b,delay:t,closeDelay:r},v,f),h=ge(s),{overlayProps:R,arrowProps:x,placement:I,updatePosition:k}=useOverlayPosition({arrowSize:i?13:0,targetRef:f,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:y,placement:o,isOpen:v.isOpen,...m});return Gs({ref:y,threshold:1,onIntersect:k,isDisabled:!v.isOpen}),Ws({ref:f,onResize:k,isDisabled:!v.isOpen}),jsxs(FocusableProvider,{..._,ref:f,children:[e,v.isOpen?jsx(Ae,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":u,children:jsx(qa,{ref:M(d,y),state:v,arrowProps:x,overlayProps:R,placement:I,tooltipProps:g,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});ne.displayName="Tooltip";var hg={xxs:8,xs:12,sm:16,md:20,lg:24},B=ro.forwardRef((e,o)=>{let t=ae(o),{tooltipProps:r}=sr(e,t);return r?jsx(ne,{...r,children:jsx(Za,{...e,ref:t})}):jsx(Za,{...e,ref:t})});B.displayName="ActionIconButton";var Za=ro.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{let l=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!l&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,c]);let{buttonProps:u,isPressed:m,ref:d,isFocusVisible:f,isFocused:y,isHovered:b,uiStateOptions:v}=lr({...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(_s({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 o=="function"?o(v):o,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(t,{role:"presentation",size:hg[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:nr})]})});Za.displayName="ActionIconButtonCore";var Me=ro.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=ro.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:u}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing(),{labelProps:y,decrementButtonProps:b,inputProps:v,incrementButtonProps:_,groupProps:g,descriptionProps:h,errorMessageProps:R}=useNumberField(n,l,s),x=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),I=Ie({description:n.description,errorMessageProps:R,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:t,isDisabled:n.isDisabled}),k=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:o,className:classNames(je({labelPosition:t}),"BaselineUI-NumberInput",e),...k,ref:i,children:[n.label?jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!I}),children:[jsx("label",{...y,className:Ve,children:n.label}),t==="start"&&I]}):null,jsxs("div",{className:classNames({[Ro]:n.isDisabled}),children:[jsxs("div",{...mergeProps(g,c),className:classNames(Po({isHovered:u,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:f,variant:r}),{[As]:t==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(v,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",dr({isDisabled:n.isDisabled,labelPosition:t}))}),x?jsx(x,{className:Co({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:js({isHoveredOrFocused:u||f,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(B,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(O,{style:{height:16},orientation:"vertical"}),jsx(B,{variant:"secondary",size:"xxs",icon:PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),t==="top"&&I]})]})});Me.displayName="NumberInput";var Lo=ro.forwardRef(({className:e,style:o,onChange:t,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":u,"aria-details":m,"aria-describedby":d,"data-block-id":f,"data-block-class":y,defaultValue:b,isReadOnly:v,label:_,id:g,includeNumberInput:h},R)=>{let x=ro.useRef(null),I={onChange:t===void 0?void 0:C=>{t(C[0]);},isDisabled:n||v,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:C=>{r(C[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:_},k=useNumberFormatter(a),S=useSliderState({...I,numberFormatter:k}),{trackProps:N,groupProps:w,labelProps:T}=useSlider(I,S,x),P=jsx(Me,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":T.id,value:S.getThumbValue(0),formatOptions:a,onChange:C=>{S.setThumbValue(0,C);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...w,style:o,"data-block-id":f,"data-block-class":y,className:classNames(Es,"BaselineUI-Slider",e),children:[_?jsxs("div",{className:Ds,children:[jsx("label",{...T,className:classNames(Fs({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?P:null]}):null,jsxs("div",{className:Bs,children:[jsx("div",{...N,className:classNames(Vs,"BaselineUI-Slider-Track"),ref:M(x,R),"data-testid":"track",children:jsx(Ag,{state:S,trackRef:x,isDisabled:n,isReadOnly:v})}),h&&!_?P:null]})]})});Lo.displayName="Slider";function Ag({state:e,trackRef:o,isDisabled:t,isReadOnly:r}){let a=ro.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:o,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:u,isHovered:m}=useHover({isDisabled:t}),d=filterTruthyValues({"data-disabled":t,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(Os({isDisabled:t,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsx("div",{...mergeProps(n,u,d),className:classNames(Hs({isDisabled:t,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})})]})}var gl=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610m",title:"_1yep5z610m",label:"_1yep5z610n",value:"_1yep5z610n",helper:"_1yep5z610o",body:"_1yep5z610m"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61kx"],[{type:"title",size:"md"},"_1yep5z61l0"],[{type:"title",size:"lg"},"_1yep5z61l3"],[{type:"body",size:"sm"},"_1yep5z61ln"],[{type:"body",size:"md"},"_1yep5z61lq"],[{type:"body",size:"lg"},"_1yep5z61lq"],[{type:"subtitle",size:"sm"},"_1yep5z61lj"],[{type:"subtitle",size:"md"},"_1yep5z61lm"],[{type:"subtitle",size:"lg"},"_1yep5z61lm"],[{type:"label",size:"md"},"_1yep5z61ll"],[{type:"label",size:"lg"},"_1yep5z61ll"],[{type:"value",size:"md"},"_1yep5z61ll"],[{type:"value",size:"lg"},"_1yep5z61ll"],[{type:"helper",size:"sm"},"_1yep5z61lf"]]});var Q=ro.forwardRef(({elementType:e="span",type:o="title",children:t,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(gl({size:r,type:o}),"BaselineUI-Text",a.className),ref:n,children:t}));Q.displayName="Text";var vl=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:[]}),_l="siobe25",zl="var(--siobe20)";var hr=ro.forwardRef(({className:e,style:o,children:t,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,...l},c)=>{let{formatMessage:u}=F(),m=ro.useRef(null),{dialogProps:d,titleProps:f}=useDialog(l,m),{focusProps:y,isFocusVisible:b}=useFocusRing();return jsxs("div",{...mergeProps(d,y),className:classNames(vl({background:r,isFocusVisible:b}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:o,ref:M(c,m),children:[jsxs(L,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:_l,children:[jsx(Q,{type:"title",size:"sm",...f,className:il,children:a}),jsxs(L,{children:[n?jsx(B,{...n,variant:"secondary"}):null,jsx(B,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":u(Qg.close)})]})]}),jsx(O,{variant:r==="subtle"?"primary":"secondary"}),t]})});hr.displayName="Drawer";var Qg=$({close:{id:"close",defaultMessage:"Close"}});function Cl(e,o,t){let{isDisabled:r}=e,a=useReducedMotion(),[n,i]=ro.useState("100vh");useEffect(()=>{if(!Ma()&&!Ea())return;let d=re(t.current);function f(){i(`${d?.visualViewport.height}px`);}return f(),d?.visualViewport.addEventListener("resize",f),()=>{d?.visualViewport.removeEventListener("resize",f);}},[t]);let[{y:s},p]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),l=useRef(0),c=useCallback(()=>{p.start({y:l.current,onRest:()=>{o.close();}});},[p,o]),u=useCallback(d=>{d.target.closest("[data-drawer]")||c();},[c]);useGranularLayoutEffect(()=>{l.current=t.current?.offsetHeight||0,p.set({y:l.current}),p.start({y:0,immediate:!!a});},[],[p,a]);let m=s.to({range:[0,l.current/2,l.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:s.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:m},onPointerDown:r?void 0:u},close:c,containerHeight:r?void 0:n}}var Pl=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 Ue=ro.createContext({state:null,triggerProps:{},overlayProps:{}}),we=({children:e,...o})=>{let t=useOverlayTriggerState(o),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},t),n=useMemo(()=>({state:t,triggerProps:r,overlayProps:a}),[t,r,a]);return jsx(Ue.Provider,{value:n,children:e})};we.displayName="Modal";var on=ro.createContext({isDrawer:!1,closeDrawer:()=>{}}),tn=ro.createContext({setIsPopoverSafelyClosed:()=>{}}),vv=animated(To),_v=({children:e,className:o,style:t,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=ro.useContext(Ue),[u,m]=ro.useState(!0),d=wo(n),f=ge(n),y=typeof s=="boolean"&&s||s==="auto"&&d==="mobile";invariant(c,"ModalContent must be a child of Modal");let b=ro.useRef(null),v=typeof r=="function"?r(y):r,_=typeof a=="function"?a(y):a,{underlayProps:g,overlayProps:h,close:R,containerHeight:x}=Cl({isDisabled:!y,isDismissable:v&&u},c,b),{modalProps:I,underlayProps:k}=useModalOverlay({isDismissable:!y&&u,isKeyboardDismissDisabled:_},c,b),{theme:S}=useContext(So),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(()=>({...I.style,...y?{...h.style,width:"100%"}:w}),[h.style,I.style,y,w]),P=useMemo(()=>({isDrawer:y,closeDrawer:R}),[y,R]),C=useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsx(Overlay,{portalContainer:f,children:jsx(on.Provider,{value:P,children:jsx(tn.Provider,{value:C,children:jsxs(vv,{className:classNames(Pl({enableDrawer:y}),o),theme:S,"data-block-id":p,"data-block-class":l,style:{...t,height:y?x:"auto",...assignInlineVars({[zl]:x})},children:[jsx(animated.div,{...mergeProps(k,g,{onPointerDown:y?g.onPointerDown:k.onPointerDown}),"data-testid":"underlay",style:g.style,className:classNames(kl,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(I,h),style:T,ref:b,"data-drawer":y,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})})},zv=animated(_v),Ee=({children:e,style:o,...t})=>{let{state:r}=ro.useContext(Ue);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||t.disableAnimation})((i,s)=>s&&jsx(zv,{...t,style:{...o,...i},children:typeof e=="function"?e(r):e}))};var Tl=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 an=ro.createContext({titleProps:{}}),ue=ro.forwardRef(({children:e,className:o,style:t,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let u=ro.useRef(null),m=ro.useRef(null),{isDrawer:d,closeDrawer:f}=useContext(on),[y,b]=ro.useState(""),{focusProps:v,isFocusVisible:_}=useFocusRing();useLayoutEffect(()=>{let x=m.current?.getRootNode(),I=l["aria-label"]||"";l["aria-labelledby"]&&(I=x?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(I);},[l]);let{dialogProps:g,titleProps:h}=useDialog(l,u),R=useMemo(()=>({titleProps:h}),[h]);return d&&r?jsx(hr,{title:y,onCloseRequest:f,className:o,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:M(m,c),background:p,children:e}):jsx(an.Provider,{value:R,children:jsx("section",{...mergeProps(g,v),"data-block-id":i,"data-block-class":s,ref:M(u,c),style:t,className:classNames(Tl({size:d?"content":a,variant:n,isDrawer:d,isFocusVisible:_}),"BaselineUI-Dialog",o),children:e})})});ue.displayName="Dialog";var Nl=ro.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:a}=useContext(an);return ro.isValidElement(e)?ro.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,o),style:{...e.props.style,...t}}):jsx("h3",{...a,ref:r,className:o,style:t,children:e})});Nl.displayName="DialogTitle";function Ll({placement:e,isOpen:o}){let t=useReducedMotion();return useTransition(o,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!t,config:config.stiff})}var El=({children:e,isOpen:o,popoverContentRef:t,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,p]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(tn);useEffect(()=>{o?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[o]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let u=t.current;return useEffect(()=>{u&&p(u.getBoundingClientRect());},[u]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?Fv.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:sn}=themeVars,ye=ro.forwardRef(({className:e,style:o,state:t,overlayProps:r,underlayClassName:a,children:n,includeArrow:i=!1,offset:s=2,portalContainer:p,contentContainerClassName:l,contentContainerStyle:c,"data-block-id":u,"data-block-class":m,...d},f)=>{let y=ro.useRef(null),b=ge(p),v=i?8:0,{underlayProps:_,popoverProps:g,placement:h,arrowProps:R}=usePopover({...d,offset:s+v,popoverRef:y,containerPadding:d.containerPadding||0},t);delete g.style?.position;let x=Ll({placement:h,isOpen:t.isOpen}),I=h==="center"?"bottom":h;return jsx(El,{isOpen:t.isOpen,popoverContentRef:y,portalContainer:b,style:g.style,children:x((k,S)=>S&&jsxs(Ae,{portalContainer:b,style:o,ref:f,"data-block-id":u,"data-block-class":m,children:[!d.isNonModal&&jsx("div",{..._,className:classNames(ks,a,"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...g,style:{...g.style,...k,...assignInlineVars({[Is]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:M(y,f),className:classNames(xs,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(N=>h?.includes(N)),children:[i?jsxs("svg",{className:classNames(hs[I],"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:sn.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:sn.background.primary.subtle,stroke:sn.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:t.close}),jsx("div",{...r,style:c,className:classNames(Cs,l),children:typeof n=="function"?n(t):n}),jsx(DismissButton,{onDismiss:t.close})]})]}))})});ye.displayName="PopoverContentCore";var Re=ro.forwardRef((e,o)=>{let{state:t,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(ut);return invariant(a),t?jsx(ye,{ref:o,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:t}):null});Re.displayName="PopoverContent";var Fl=z({defaultClassName:"_1mdhlqv3",variantClassNames:{isOpen:{true:"_1mdhlqv4"}},defaultVariants:{},compoundVariants:[]}),qe="_1mdhlqv6 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Hl=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isDisabled:{true:"z9nup83 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),kr="_1mdhlqv7 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1",Vl="_1yep5z66x _1yep5z66y _1yep5z66z",Ol="_1mdhlqv5 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k";var Ul=ro.forwardRef(({className:e,style:o,onChange:t,"data-block-id":r,icon:a,formatValue:n=u=>u,tooltipProps:i,popoverContentProps:s,isDisabled:p,...l},c)=>{let u=ae(c),[m,d]=useControlledState(l.value,l.defaultValue||0,t),[f,y]=ro.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:o,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(ne,{text:l["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:p,...i,children:jsx(U,{label:v,variant:"popover","aria-label":_,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(Re,{placement:"bottom start",...s,className:classNames(qe,s?.className),children:jsx(ue,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(L,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...b,children:jsx(Lo,{...l,onChange:g=>{d(g),t?.(g);},value:m})})})})})]})]})});Ul.displayName="IconSlider";var ql=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"]]}),Kl=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),Gl="bpklwad",Wl=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),Xl="bpklwa6",Yl=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var ep=ro.forwardRef(({className:e,label:o,labelPosition:t="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=ro.useRef(null),c=useToggleState(s),{inputProps:u,isPressed:m}=useSwitch(s,c,l),{isFocusVisible:d,focusProps: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(ql({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(Kl({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(v,y),className:classNames(Wl({labelPosition:t}),"BaselineUI-Switch",e),style:a,ref:p,children:[o?jsx("span",{className:classNames(Gl,"BaselineUI-Switch-Label"),children:o}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,f),ref:l})}),r?jsxs("div",{className:Yl({labelPosition:t}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",Xl),children:c.isSelected?r.on:r.off}),_]}):_]})});ep.displayName="Switch";var op="_19n40yy9",tp=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 f_={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},np=ro.forwardRef(({className:e,size:o="md",variant:t="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=ro.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:u}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:d,isFocused:f}=useFocusRing({within:!0,isTextInput:!0}),y=f_[o],b=o==="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(tp({size:o,isFocused:f,variant:t,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(y,{size:o==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:op,ref:p}),l.value!==""&&jsx(B,{icon:b,...u,size:o==="sm"?"xs":"sm",variant:"secondary"})]})});np.displayName="SearchInput";var ip="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",sp="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var cn=({section:e,showSelectedIcon:o,state:t})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==t.collection.getFirstKey()&&jsx(O,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:sp,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(Ir,{item:i,state:t,showSelectedIcon:o},i.key)))})]})]})};cn.displayName="MenuSection";var Ir=({item:e,state:o,className:t,showSelectedIcon:r})=>{let a=ro.useRef(null),n=useMenuItem({key:e.key},o,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(ct,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:t}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:o,showSelectedIcon:r})};Ir.displayName="MenuItem";var un=ro.forwardRef(({className:e,itemClassName:o,onContentKeyDown:t,...r},a)=>{let n=useTreeState(r),i=ro.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:t});return jsx("ul",{...mergeProps(s,p),className:classNames(ip,e),ref:M(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(cn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(Ir,{item:l,state:n,className:o,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});un.displayName="MenuContent";var wr=ro.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:t,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u,triggerLabel:m,renderTrigger:d=({buttonProps:v,ref:_})=>jsx(U,{...v,variant:"popover",ref:_}),portalContainer:f,...y},b)=>{let v=ro.useRef(null),_=ge(f),g=useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o}),{menuTriggerProps:h,menuProps:R}=useMenuTrigger({isDisabled:r,type:"menu"},g,v),x=te(),I=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:g.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(g.isOpen):m}),[h,r,g.isOpen,m]);return useEffect(()=>{!m&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,m]),jsxs(Fragment,{children:[d({buttonProps:I,ref:v}),jsx(ye,{triggerRef:v,state:g,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u||2,className:classNames(qe,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsx(un,{className:a,...R,...y,ref:b,autoFocus:g.focusStrategy||"first",children:x})})]})});wr.displayName="Menu";var Rr=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 up=ro.forwardRef(({className:e,style:o,children:t,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,role:c,...u},m)=>{let d=ro.useRef(null),{linkProps:f,isPressed:y}=useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:b,isFocused:v,focusProps:_}=useFocusRing(),{hoverProps:g,isHovered:h}=useHover({isDisabled:u.isDisabled}),R=n,x=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":h,role:c,title:l});return jsx(R,{...mergeProps(f,_,g,x),className:classNames(Rr({variant:r,isFocusVisible:b,isHovered:h,isDisabled:u.isDisabled,size:a,isActive:y,type:i}),"BaselineUI-Link",e),ref:M(d,m),style:o,children:t})});up.displayName="Link";function mp({isDisabled:e,onValueChange:o,onChange:t,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let d=[...m.target.files||[]];o?.(d),t?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function yn({items:e}){let o=e.filter(t=>t.kind==="file").map(async t=>(invariant(t.kind==="file"),t.getFile()));return await Promise.all(o)}var fp=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"]]}),yp=z({defaultClassName:"_180w5ede",variantClassNames:{disabled:{true:"_180w5edf"}},defaultVariants:{},compoundVariants:[]}),bp=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),gp=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var hp=ro.forwardRef(({className:e,label:o,description:t,icon:r,variant:a="default",...n},i)=>{let s=ro.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=mp(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(fp({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:bp({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:gp({disabled:n.isDisabled,hovered:y}),children:o}),t?jsx("div",{...l,className:yp({disabled:n.isDisabled}),children:t}):null]})]})});hp.displayName="FileUpload";var xp="_12vfhl40 z9nup81",Cp="_12vfhl41 z9nup82",Pp=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),kp="_12vfhl42",Ip="_12vfhl47",wp="_12vfhl46 z9nup82",Rp="_12vfhl45",Sp=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Tp=ro.forwardRef(({className:e,style:o,variant:t="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:u,progressBarProps:m}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:d=0,maxValue:f=100,value:y=0,label:b}=p,v=(y-d)/(f-d),_=`${Math.round(v*100)}%`,g=jsx("output",{className:Sp({hasLabel:!!b}),children:m["aria-valuetext"]}),h=t==="error"?n:a;return jsxs("div",{...m,style:o,className:classNames(xp,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Cp,children:[jsx("label",{...u,className:kp,children:b}),r?g:null]}):null,jsxs("div",{className:Rp,children:[jsxs("div",{className:wp,children:[jsx("div",{className:Ip,children:jsx("div",{style:{width:_},className:Pp({variant:t})})}),!b&&r?g:null]}),h?jsx("div",{className:xo({hasError:t==="error"}),id:c,children:h}):null]})]})});Tp.displayName="ProgressBar";function Fo({isReadOnly:e,validationState:o}){return e?ReadOnlyIcon:o==="error"?ErrorFilledIcon:o==="warning"?WarningFilledIcon:null}var Ke=ro.forwardRef(({className:e,validationState:o,variant:t="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let u=ro.useRef(null),{inputProps:m,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=useTextField({...l,validationState:o?o==="error"?"invalid":"valid":void 0},u),v=l.errorMessage||b.join(" "),_=Ie({...l,errorMessage:v,descriptionProps:f,errorMessageProps:y,labelPosition:a});v&&(o="error");let{hoverProps:g,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:R,focusProps:x,isFocusVisible:I}=useFocusRing(),k=Fo({isReadOnly:l.isReadOnly,validationState:o}),S=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":o,"data-focused":R,"data-focus-visible":I});return jsxs("div",{className:classNames(je({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:Oe({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...d,className:Ve,children:l.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[Ro]:l.isDisabled}),children:[jsxs("div",{...g,className:Po({validationState:o,isHovered:h,isFocused:R,variant:t,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,x,S),className:classNames(dr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:u}),k?jsx(k,{className:Co({validationState:o,isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Ke.displayName="TextInput";var Ho=({value:e,...o})=>{let t=useNumberFormatter(o);return jsx(Fragment,{children:t.format(e)})};Ho.displayName="NumberFormat";var Lp="_1yep5z6ik _1yep5z6il _1yep5z6im",Mp=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"]]}),Ep=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"]]}),Bp=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var Hp=ro.forwardRef(({className:e,count:o,style:t,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let u=ro.useRef(null),m=useToggleState({...s,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:v}=useSwitch({...s,...l},m,u),{focusProps:_,isFocused:g,isFocusVisible:h}=useFocusRing(),{hoverProps:R,isHovered:x}=useHover({}),I=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":g,"data-focus-visible":h,"data-disabled":y,"data-hovered":x,"data-pressed":f,"data-selected":v});return jsxs("label",{ref:p,style:t,className:classNames(Lp,"BaselineUI-Reaction",e),...I,children:[jsx(VisuallyHidden,{children:jsx("input",{...d,..._,ref:u})}),jsxs("div",{...R,className:Mp({isSelected:v,isFocusVisible:h,isHovered:x,isReadOnly:b,isDisabled:y}),children:[jsx("div",{className:Bp({isDisabled:y,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:Ep({isSelected:m.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsx(Ho,{value:o})})]})]})});Hp.displayName="Reaction";var Vp="_1azy5686",Op="_1azy5685",jp="var(--_1azy5680)",Ap="_1azy5688",$p="_1azy5689",Up="_1azy5681 z9nup82",qp="_1azy5682";var Kp="_1azy5687";var S6={sm:16,md:20},T6={sm:[CheckFilledIcon,ErrorAltFilledIcon],md:[CheckFilledIcon$1,ErrorAltFilledIcon$1]},Oo=ro.forwardRef(({className:e,style:o,size:t="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=S6[t],u=c/2-2,m=2*u*Math.PI,d=T6[t][r==="success"?0:1];return jsxs("div",{className:classNames(Up,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[jp]:`${m}px`}),...o},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:qp,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:Vp,cx:c/2,cy:c/2,r:u}),r==="active"&&jsx("circle",{role:"presentation",className:Op,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsx(d,{className:Kp,size:c}),r==="error"&&jsx(d,{className:Ap,size:c})]}),i.label?jsx("span",{...p,className:$p,children:i.label}):null]})});Oo.displayName="ProgressSpinner";var Nr=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"]]}),Gp=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z610z"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]});var D6={sm:16,md:20,lg:24},Lr=ro.forwardRef(({className:e,style:o,iconStart:t,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=useToggleState(i),{buttonProps:l,isPressed:c,ref:u,isFocusVisible:m,isFocused:d,isHovered:f,uiStateOptions:y}=pr(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(Nr({isHovered:f,isFocusVisible:m,isSelected:p.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(y):e),style:typeof o=="function"?o(y):o,ref:M(u,s),children:[t?jsx(t,{size:D6[r],className:Gp({isDisabled:i.isDisabled,isSelected:p.isSelected})}):null,i.label]})});Lr.displayName="ToggleButton";var Mr=z({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),Wp=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:[]}),Xp=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 Qp=ro.forwardRef(({className:e,style:o,label:t,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:u,focusProps:m}=useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:v}=useCheckbox({...i,children:t},l,p),{hoverProps:_,isHovered:g}=useHover({isDisabled:y}),h=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",{...h,className:classNames(Wp({labelPosition:r}),"BaselineUI-Checkbox",e),style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,m),ref:p})}),jsxs("div",{..._,className:Xp({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]}),t?jsx("span",{className:Mr({isDisabled:y}),children:t}):null]})});Qp.displayName="Checkbox";var Jp={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 ec=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),oc="_1nsi9h1f _1yep5z6ln _1yep5z6lf _1yep5z6eu",tc=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:[]}),rc=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]});var d5={style:"decimal"},u5={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},lc=ro.forwardRef(({className:e,style:o,minValue:t=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...u},m)=>{let{locale:d}=useLocale(),f=F(Jp),y={...u,formatOptions:d5,minValue:t,incrementAriaLabel:a||f.formatMessage("nextPage"),decrementAriaLabel:n||f.formatMessage("prevPage"),defaultValue:r,"aria-label":i||f.formatMessage("goToPage")},b=ro.useRef(null),v=useNumberFieldState({...y,locale:d}),{inputProps:_,decrementButtonProps:g,incrementButtonProps:h,groupProps:R}=useNumberField({...y,onKeyDown:D=>{D.key==="Enter"&&b.current?.blur(),u.onKeyDown?.(D);},isDisabled:c},v,b),{hoverProps:x,isHovered:I}=useHover({}),{focusProps:k,isFocused:S,isFocusVisible:N}=useFocusRing(),w=p==="floating",[T,P]=u5[s],C=filterTruthyValues({"data-focus-visible":N,"data-focused":S,"data-hovered":I,"data-block-id":u["data-block-id"],"data-block-class":u["data-block-class"]}),H=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(R,x,C),className:classNames(tc({size:s,variant:p}),"BaselineUI-Pagination",e),style:o,ref:m,children:[l?null:jsxs(Fragment,{children:[jsx(B,{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(O,{orientation:"vertical"})]}),jsxs("div",{className:ec({isFocused:S,variant:p,size:s}),"aria-label":f.formatMessage("pageXofY",{arg0:_.value,arg1:v.maxValue}),children:[jsx("input",{...mergeProps(_,k),ref:b,className:classNames("BaselineUI-Pagination-Input",oc),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:rc({isDisabled:c}),children:["/ ",jsx(Ho,{value:v.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(O,{orientation:"vertical"}),jsx(B,{icon:P,...h,elementType:"div",size:s,style:{height:"100%",...w&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||h.isDisabled})]})]})});lc.displayName="Pagination";var pc=({date:e,...o})=>{let t=useDateFormatter(o);return jsx(Fragment,{children:t.format(e)})};pc.displayName="DateFormat";var Ct=z({defaultClassName:"_1f789qjr",variantClassNames:{variant:{neutral:"_1yep5z610x",red:"_1yep5z6107",green:"_1yep5z610b",blue:"_1yep5z610j","high-contrast":"_1yep5z6110"},isDisabled:{true:"_1yep5z61mr"},isSelected:{true:"_1yep5z6111"}},defaultVariants:{},compoundVariants:[]}),Er=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"]]}),cc="_1f789qjz",dc="_1f789qj0",uc=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"]]}),Br=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 bc=({item:e,state:o,variant:t="neutral"})=>{let r=ro.useRef(null),{focusProps:a,isFocusVisible:n}=useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:u,allowsSelection:m}=useTag({item:e},o,r),d=ro.useRef(null),{buttonProps:f}=useButton(p,d),{hoverProps:y,isHovered:b}=useHover({isDisabled:c}),{hoverProps:v,isHovered:_}=useHover({isDisabled:c}),g=e.value?.icon,h=e.value?.data?.variant??t;return jsx("div",{...mergeProps(i,a,v),ref:r,className:classNames(Er({isFocusVisible:n,variant:h,isDisabled:c,allowsRemoving:l,isSelected:u,allowsSelection:m,isHovered:_}),Br({variant:h,isDisabled:c,isSelected:u}),"BaselineUI-Tag"),children:jsxs("div",{...s,className:cc,children:[u?jsx(CheckmarkIcon$3,{size:16,className:Ct({variant:h,isDisabled:c,isSelected:u})}):null,!u&&g?jsx(g,{size:16,className:Ct({variant:h,isDisabled:c,isSelected:u})}):null,e.rendered,l?jsx("button",{...mergeProps(f,y),className:uc({variant:h,isHovered:b}),children:jsx(XIcon$2,{})}):null]})})};var _c=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,...n},i)=>{let s=useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),p=te(),l=ro.useRef(null),c=useListState({...n,items:s,children:p}),{gridProps:u}=useTagGroup(n,c,l);return jsx("div",{...u,className:classNames(dc,"BaselineUI-TagGroup",e),style:o,"data-block-id":t,"data-block-class":r,ref:M(i,l),children:[...c.collection].map(m=>jsx(bc,{state:c,item:m,variant:n.variant},m.key))})});_c.displayName="TagGroup";var zc="_1yep5z6lc",hc=z({defaultClassName:"_1kvz17db _1yep5z6kz _1yep5z6l1",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),xc=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6kz _1yep5z6l0",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Cc="_1yep5z6ev _1yep5z6dy",Pc=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",Ic=z({defaultClassName:"_1kvz17d7 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var zn=ro.forwardRef(({children:e,className:o,style:t},r)=>{let{headers:a}=useContext(Ge),{disabledKeys:n}=useContext(Ge),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=Te(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:t,className:classNames(zc,o),ref:r,children:ro.Children.map(e,(s,p)=>ro.cloneElement(s,{index:p}))})});zn.displayName="AccordionBase";var Ge=ro.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Sc=ro.forwardRef(({children:e,disabledKeys:o,defaultExpandedKeys:t=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=ro.useState(t),u=ro.useRef(new Map).current,[m,d]=ro.useState(a);useEffect(()=>{d(m);},[m]),useEffect(()=>{n?.(l);},[l,n]);let f=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:o,headers:u,expansionMode:m}),[r,l,o,u,m]);return jsx(Ge.Provider,{value:f,children:jsx(FocusScope,{children:jsx(zn,{className:i,style:s,ref:p,children:e})})})});Sc.displayName="Accordion";var xn=ro.forwardRef(({title:e,actions:o,controlId:t,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=ro.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:f}=useContext(Ge),y=d?.has(r),b=useFocusManager();invariant(b);let{focusNext:v,focusPrevious:_}=b,{keyboardProps:g}=useKeyboard({onKeyDown:C=>{C.key==="ArrowRight"?v({wrap:!0}):C.key==="ArrowLeft"?_({wrap:!0}):C.continuePropagation();},isDisabled:y});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),f?.set(n,l);},[n,f]);let h=()=>{u(C=>{let E=new Set(C);return E.has(r)?E.delete(r):(m==="single"&&E.clear(),E.add(r)),E});},{buttonProps:R}=useButton({"aria-expanded":c.has(r),"aria-controls":t,onPress:h,isDisabled:y},l),{pressProps:x}=usePress({onPress:h,isDisabled:y}),{focusProps:I,isFocusVisible:k}=useFocusRing(),{hoverProps:S,isHovered:N}=useHover({isDisabled:y}),{focusProps:w,isFocusVisible:T}=useFocusRing({within:!0}),P=c.has(r);return jsxs("h3",{...mergeProps(g,x,S,w),className:Pc({isFocusVisible:k,isHovered:N,isDisabled:y}),ref:p,children:[jsxs("div",{className:Ic({isDisabled:!!y}),children:[jsx(ChevronRightIcon,{className:xc({isExpanded:P}),size:8}),jsx("button",{...mergeProps(R,I),id:a,"data-key":r,className:kc,ref:l,children:e})]}),o?.length?jsx("div",{"data-testid":"action-buttons",className:hc({showActionsOnTriggerOnly:s,isTriggered:T||N}),children:o.map((C,E)=>jsx(B,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...C},E))}):null,i?jsx("div",{className:Cc,children:i}):null]})});xn.displayName="AccordionHeader";var Fc=ro.forwardRef(({title:e,actions:o,children:t,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),u=useId(),{expandedKeys:m}=useContext(Ge),d=ro.useRef(null),f=m.has(r),y=Io(),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(xn,{value:r,actions:o,id:u,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),v(_=>jsx(animated.div,{role:"region","aria-labelledby":u,id:c,style:{..._,overflow:"hidden"},children:jsx("div",{ref:d,className:s,style:i,children:t})}))]})});Fc.displayName="AccordionItem";var wt=ro.forwardRef(({variant:e,isOpen:o,selectedIcon:t,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=ro.useRef(null),{buttonProps:d,isPressed:f}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:v,isFocused:_,isFocusVisible:g}=useFocusRing(),h=Fo({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":o,"data-block-id":p,"data-block-class":l});return jsxs("button",{...mergeProps(d,y,v,R),ref:M(u,m),className:classNames(Hl({isFocused:g,isDisabled:c.isDisabled}),Po({variant:e,isHovered:b,isFocused:g,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:Ol,children:[t?jsx(t,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(Co({validationState:r,isReadOnly:!!c.isReadOnly}),Vl),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:Fl({isOpen:o})})})]})});wt.displayName="SelectButton";var Fr=ro.createContext({state:null,popoverAnchorRef:null}),kn=ro.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:u,renderTrigger:m=({buttonProps:y,selectedValue:b,valueProps:v,isOpen:_,ref:g})=>{let h=b&&"icon"in b&&b.icon;return jsx(wt,{...y,className:l,style:c,isOpen:_,isReadOnly:d.isReadOnly,ref:g,variant:r,validationState:d.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:d.placeholder,valueProps:v})},...d},f)=>{let{popoverAnchorRef:y}=useContext(Fr),b=ro.useRef(null),v=ge(d.portalContainer),{labelProps:_,triggerProps:g,valueProps:h,menuProps:R,descriptionProps:x,errorMessageProps:I}=useSelect({...d,validationState:d.validationState==="error"?"invalid":"valid"},u,b),k=Ie({...d,descriptionProps:x,errorMessageProps:I,labelPosition:t}),S=u.selectedItem?.value??null;return jsxs(ao.Provider,{value:u,children:[jsxs("div",{style:o,className:classNames(je({labelPosition:t}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:f,children:[d.label||k?jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!k}),children:[d.label?jsx("div",{..._,className:classNames(Ve,"BaselineUI-Select-Label"),children:d.label}):null,t==="start"&&k]}):null,jsx(HiddenSelect,{state:u,triggerRef:b,isDisabled:d.isDisabled,label:d.label,name:d.name}),m({buttonProps:g,selectedValue:S,valueProps:h,isOpen:u.isOpen,ref:b}),t==="top"&&k]}),u?jsx(ye,{placement:p,portalContainer:v,offset:d.offset||2,state:u,triggerRef:y||b,style:o,className:classNames(qe,"BaselineUI-Select-Popover"),...d,children:jsx(le,{...R,label:d.label,items:d.items,showSelectedIcon:d.showSelectedIcon,className:kr,optionStyle:i,optionClassName:s})}):null]})});kn.displayName="SelectCore";var Ac=ro.forwardRef((e,o)=>{let t=te(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:t});return jsx(kn,{...e,ref:o,state:r})});Ac.displayName="SelectStandalone";var Xe=ro.forwardRef((e,o)=>{let{state:t}=useContext(Fr);return useEffect(()=>{invariant(t||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,t]),t?jsx(kn,{state:t,...e,ref:o}):jsx(Ac,{...e,ref:o})});Xe.displayName="Select";var Uc=ro.forwardRef(({className:e,style:o,variant:t,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=ro.useRef(null),l=useCallback(({buttonProps:c,selectedValue:u,valueProps:m,isOpen:d,ref:f})=>{let y=u&&"icon"in u&&u.icon;return jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(wt,{...c,isOpen:d,isReadOnly:i.isReadOnly,ref:f,variant:t,validationState:i.validationState,selectedIcon:y||void 0,label:u?"label"in u&&u?.label:i.placeholder,valueProps:m})})},[i,n,t]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:o,ref:M(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(Xe,{...i,renderTrigger:l})]})});Uc.displayName="IconSelect";var qc="_1017q4c5",Kc=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),Gc="_1017q4c4";var uz={sm:AvatarIcon,md:AvatarIcon$1},$o=ro.forwardRef(({className:e,style:o,size:t="md",icon:r=uz[t],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":u},m)=>{let{imgProps:d}=ko({src:n,alt:a}),f=a?.split(" ").map(y=>y[0]).join("");return jsxs("span",{className:classNames(Kc({size:t,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:o,"aria-disabled":s,"data-block-id":c,"data-block-class":u,children:[n?jsx("img",{...d,loading:l,className:Gc}):null,!i&&!n&&jsx(r,{size:t==="sm"?16:24}),i&&!n?t==="sm"?f[0]:f:null,p?jsx("div",{"data-testid":"notification",className:qc}):null]})});$o.displayName="Avatar";var Wc="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Xc=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"]]}),Yc=z({defaultClassName:"_1x62fhb3 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6va _1yep5z6vb _1yep5z6vc"}},defaultVariants:{},compoundVariants:[]}),Zc="_1x62fhbl",wn=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"]]}),Qc="_1yep5z6lj _1yep5z6lg _1yep5z6hp _1yep5z6li",Jc=z({defaultClassName:"_1x62fhb0 _1yep5z6lc _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",variantClassNames:{variant:{primary:"_1yep5z611v",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var ed=({state:e,...o})=>{let t=ro.useRef(null),{tabPanelProps:r}=useTabPanel(o,e,t),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:t,className:classNames({[Qc]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var Tn=ro.forwardRef(({className:e,style:o,tabHeaderStyle:t,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),u=ro.useRef(null),{tabListProps:m}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,u);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:o,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(Jc({variant:a}),r),style:t,children:[jsx("div",{...m,className:Yc({variant:a}),ref:u,children:[...c.collection].map(d=>(invariant(d.value,"TabItem requires a value prop"),jsx(td,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,f)=>jsx("div",{className:Wc,children:jsx(B,{...d,variant:"secondary",size:"sm",className:classNames(Zc,d.className)})},f))]}),jsx(ed,{state:c},c.selectedItem?.key)]})});Tn.displayName="TabsBase";var td=({item:e,onRemove:o,state:t,variant:r})=>{let{key:a,value:n}=e,i=ro.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},t,i),{hoverProps:c,isHovered:u}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:f,titleClassName:y}=n,{focusProps:b,isFocusVisible:v,isFocused:_}=useFocusRing(),{keyboardProps:g}=useKeyboard({onKeyDown:R=>{R.key==="Backspace"&&o?o(a):R.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":u,"data-focus-visible":v});return jsxs("div",{...mergeProps(g,s,c,b,h),className:classNames(Xc({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:wn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null,m,o?jsx(B,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{o(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:p||_||u?1:0},className:wn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null]})};td.displayName="TabButton";var ad=ro.forwardRef(({children:e,...o},t)=>{let r=useMemo(()=>ro.Children.map(e,a=>!a||!ro.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsx(Tn,{...o,ref:t,items:r,children:a=>jsx(Item,{title:a.title,children:a.children},a.key)})});ad.displayName="Tabs";var nd=({children:e,title:o,value:t})=>(invariant(t,"TabItem requires a value prop"),invariant(o,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);nd.displayName="TabItem";var id={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 sd=z({defaultClassName:"kfun6yw",variantClassNames:{arrangement:{single:"kfun6yx",multi:"kfun6yy",compact:"kfun6yz"}},defaultVariants:{},compoundVariants:[]}),ld=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"]]}),pd=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),cd=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),dd=z({defaultClassName:"kfun6yk",variantClassNames:{variant:{info:"kfun6yl",warning:"kfun6ym",error:"kfun6yn",success:"kfun6yo"}},defaultVariants:{},compoundVariants:[]}),ud=z({defaultClassName:"kfun6yh",variantClassNames:{size:{sm:"kfun6yi",md:"kfun6yj"}},defaultVariants:{},compoundVariants:[]}),md=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var $z={error:{sm:ErrorAltFilledIcon,md:ErrorAltFilledIcon$1},info:{sm:InfoFilledIcon,md:InfoFilledIcon$1},success:{sm:CheckFilledIcon,md:CheckFilledIcon$1},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},fd=ro.forwardRef(({className:e,description:o,actionLabel:t,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":u},m)=>{let d=F(id),f=t&&jsx(U,{variant:s==="compact"?"tertiary":"ghost",label:t,onPress:r}),y=$z[n][l];return jsxs("div",{className:classNames(ld({variant:n,arrangement:s,hasButton:!!t||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":u,style:a,role:"alert",ref:m,children:[jsxs("div",{className:md({arrangement:s}),children:[jsx(y,{className:dd({variant:n}),size:16}),jsxs("div",{className:sd({arrangement:s}),children:[jsx("h3",{className:ud({size:l}),children:i}),jsx("section",{className:pd({size:l}),children:o})]}),s==="compact"&&f]}),jsxs("div",{className:cd({arrangement:s}),children:[s!=="compact"&&f,p?jsx(B,{variant:"secondary",icon:CloseIcon,size:"sm",onPress:p,"aria-label":d.formatMessage("close")}):null]})]})});fd.displayName="InlineAlert";var Ye={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 jr=({children:e})=>{let{triggerProps:o}=ro.useContext(Ue);return jsx(PressResponder,{...o,children:e})};jr.displayName="ModalTrigger";var Yz=({children:e})=>{let{state:o}=ro.useContext(Ue);return jsx(PressResponder,{onPress:()=>{o?.close();},children:e})};var yd="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lc",bd="_1dbkl5e",gd=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",_d=z({defaultClassName:"_1dbkl50 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6o7 _1yep5z6o8 _1yep5z6o9",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),Ar="_1dbkl5l _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69f _1yep5z69g _1yep5z69h",zd="_1dbkl5f z9nup87",$r="_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",xd="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6k8 _1yep5z6k9 _1yep5z6ka _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Ur=z({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6mv _1yep5z6mw _1yep5z6mx"}},defaultVariants:{},compoundVariants:[]}),Mn="_1dbkl5v _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is",Cd=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"]]}),Pd=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:[]}),Tt="_1dbkl5u",qr="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",Kr="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69f _1yep5z69g _1yep5z69h",En="_1dbkl5x",kd="_1dbkl5w",Bn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69l _1yep5z69m _1yep5z69n",Gr=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:[]}),Dn="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6l5 _1yep5z6l6 _1yep5z6l8 _1yep5z6l7 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7";var Id=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"]]});var Ze=ro.forwardRef(({color:e,isFocusVisible:o,isSelected:t,isInteractive:r,isDisabled:a,style:n,className:i,id:s,"data-block-id":p,"data-block-class":l,...c},u)=>{let m=e&&e!==Se&&(typeof e=="string"?parseColor(e):e),{formatMessage:d}=F(),f=!m,{colorSwatchProps:y}=useColorSwatch({color:f?"#000000":e}),{hoverProps:b,isHovered:v}=useHover({isDisabled:a||!r}),_=filterTruthyValues({"data-focus-visible":o,"data-selected":t,"data-hovered":v,"data-block-id":p,"data-block-class":l,"data-disabled":a,"data-interactive":r});return jsx("div",{...mergeProps(b,_,f?{}:y),style:n,"aria-label":f?d(ih.none):y["aria-label"],role:"img",className:classNames(Id({removeBlendMode:f,isFocusVisible:o,isDisabled:!!a,isSelected:!!t,isHovered:v}),"BaselineUI-ColorSwatch",i),ref:u,id:s,...c,children:jsx(L,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:m?wd(m,4):void 0,children:f?jsx(NoneIcon,{size:14}):null})})});Ze.displayName="ColorSwatch";var ih=$({none:{id:"none",defaultMessage:"None"}});var Sd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Lt=parseColor("#000000").toFormat("hsla"),ie="hsla",Nt="hexa";function so(e){return typeof e=="string"?parseColor(e).toFormat(ie):e?e.toFormat(ie):null}function Td(e,o){return e?.getChannelValue("alpha")?o?.toString(Nt)===e.toString(Nt):!o?.getChannelValue("alpha")}function Nd(e,o,t){return o?.label?o.label:e?.getChannelValue("alpha")===0?t:e?.toString("rgba")}var Se="NONE";function Ld(e,o){let t=o?.map(a=>({id:parseColor(a.color).toString(Nt),label:a.label}))||[],r={id:Se,label:e};return [...t,r]}var Wr=(e,{optionProps:o,isFocusVisible:t,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...o,ref:a,className:hd,children:jsx(Ze,{color:e.value.id,isFocusVisible:t,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),wd=(e,o=4)=>{let t=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:t?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${o}px ${o}px`}};var Ed=({value:e,...o})=>{let t=ro.useRef(null),r=ro.useRef(null),a=ro.useRef(null),n=useColorAreaState({...o,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...o,value:e,inputXRef:t,inputYRef:r,containerRef:a},n);useEffect(()=>{t.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(yd,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(Gr({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:so(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:t,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var Fd=({color:e,setColor:o,allowAlpha:t,...r})=>{let a=useColorFieldState({value:e,onChange:u=>{o(so(u)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Lt);}}),n=ro.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(Mn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:Cd({isFocused:p,isHovered:c,allowAlpha:t})}),t?jsx(Vd,{color:e,setColor:o}):null]})},Hd=({color:e,setColor:o,allowAlpha:t})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(Mn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"rgba":"rgb",children:[jsx(Me,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Tt,onChange:n=>{o(r.withChannelValue("red",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Tt,onChange:n=>{o(r.withChannelValue("green",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Tt,onChange:n=>{o(r.withChannelValue("blue",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),t?jsx(Vd,{color:e,setColor:o}):null]})},hh={style:"percent",maximumFractionDigits:0},Vd=({color:e,setColor:o})=>{let{locale:t}=useLocale(),r=useCallback(a=>{o(e.withChannelValue("alpha",a));},[e,o]);return jsx(Me,{"aria-label":e.getChannelName("alpha",t),value:e.getChannelValue("alpha"),formatOptions:hh,className:Tt,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var jn=({channel:e,...o})=>{let{locale:t}=useLocale(),r=useColorSliderState({...o,channel:e,locale:t}),a=ro.useRef(null),n=ro.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...o,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,t)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames($r,{[al({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:Dn}),jsx("div",{className:$r,style:i.style}),jsxs("div",{className:classNames(Gr({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:Dn,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:$r}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var Xr=({color:e,setColor:o,allowAlpha:t,onChangeEnd:r})=>{let[a,n]=ro.useState("hex"),{formatMessage:i}=F(Ye);return jsxs(Fragment,{children:[jsx(Ed,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:o,onChangeEnd:r}),jsxs("div",{className:Bn,children:[jsx(jn,{channel:"hue",value:e,onChange:o,onChangeEnd:r}),t?jsx(jn,{channel:"alpha",value:e,onChange:o,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(Bn,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Xe,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Sd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(Fd,{color:e,setColor:s=>{o(s),r?.(s);},allowAlpha:t}),a==="rgb"&&jsx(Hd,{color:e,setColor:s=>{o(s),r?.(s);},allowAlpha:t})]})]})};var Kd=({color:e,setColor:o,storePickedColorKey:t,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Ye),c=ro.useRef(null),u=wo(c.current),[m,d]=ol(t,[]),f=ro.useRef(null),[y,b]=ro.useState(e),v=ro.useMemo(()=>m.map(I=>({id:I,label:parseColor(I).getColorName(p),description:I})),[m,p]),_=useCallback(()=>{let I=i==="active"?e:y;if(m.includes(I.toString(ie))){f.current?.querySelector(`[data-key='${I.toString(ie)}']`)?.classList.add(En);return}d([...m,I.toString(ie)]);},[m,e,d,y,i]);useEffect(()=>{let I=f.current;function k(S){S.animationName===kd&&S.target?.classList.remove(En);}return I?.addEventListener("animationend",k),()=>{I?.removeEventListener("animationend",k);}},[]);let g=useId(),h=jsx(B,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),R=useCallback(I=>jsxs(ue,{size:"content",className:Ur({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(Xr,{color:y,setColor:b,allowAlpha:s}),jsx(O,{}),jsx(L,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(L,{display:"inline-flex",gap:"lg",children:[jsx(U,{label:l("cancel"),size:"sm",variant:"secondary",onPress:I}),jsx(U,{label:l("add"),variant:"primary",onPress:()=>{_(),I();},size:"sm"})]})})]}),[y,_,l,s]),x=useCallback(I=>{invariant(I instanceof Set,"Key must be a set");let k=[...I][0];k&&o(parseColor(k).toFormat(ie));},[o]);return jsxs(Fragment,{children:[jsx(O,{}),jsxs("div",{className:classNames(xd,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:g,children:n}),jsxs(L,{display:"flex",children:[!!m.length&&m.includes(e.toString(ie))&&jsx(B,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{d(m.filter(I=>I!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(u==="mobile"?jsxs(we,{children:[jsx(jr,{children:h}),jsx(Ee,{style:{zIndex:1e5},children:({close:I})=>R(I)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:h}),jsx(Re,{placement:"right top",className:qr,offset:6,children:({close:I})=>R(I)})]}))]})]}),!!m.length&&jsx(le,{items:v,layout:"grid","aria-labelledby":g,className:classNames(Ar,Kr,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Wr,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:x})]})};var Un=ro.forwardRef(({setColor:e,color:o,triggerRef:t,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Ye),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===Se?null:parseColor(u.id).toFormat(ie)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(Kr,"BaselineUI-ColorInput-Presets"),style:{minWidth:t.current?.offsetWidth},ref:i,children:jsx(le,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:Ar,renderOption:Wr,selectionMode:"single",selectedKeys:[o?.toString(Nt)||Se],onSelectionChange:p})})});Un.displayName="ColorPresetList";var Et=ro.forwardRef(({color:e,colorLabel:o,colorName:t,...r},a)=>{let n=ro.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l}),d=or(),f=or();return jsxs("button",{...mergeProps(p,i,u,m),style:r.style,className:classNames(gd({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(Ze,{color:e?.toString("hexa")}),o?jsx("div",{className:zd,id:f,"aria-hidden":"true",children:t}):typeof t=="string"&&jsx(VisuallyHidden,{children:t})]})});Et.displayName="ColorInputButton";var Qr=ro.forwardRef(({className:e,style:o,icon:t,...r},a)=>{let n=ro.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:u}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,u,m),ref:M(a,n),style:o,className:classNames(Pd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(t,{size:16}),jsx("div",{className:bd,style:{backgroundColor:r.color||void 0}})]})});Qr.displayName="IconColorInputButton";function ou({colorLabel:e,color:o,presets:t}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>t.find(p=>p.id===Se?!o:o?Td(o,parseColor(p.id)):!1),[t,o]),i=useMemo(()=>typeof e=="function"?e?.(o):e?Nd(o,n,r(Gh.transparent)):!1,[o,e,r,n]),s=useMemo(()=>{if(n?.label)return n.label;o?.getColorName(a);},[o,a,n?.label]);return {colorName:i,humanReadableName:s}}var Gh=$({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Ko=ro.forwardRef(({className:e,style:o,allowRemoval:t,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,onChangeEnd:l,defaultValue:c,storePickedColorKey:u="baselinePickedColor",value:m,addColorButtonLabel:d,removeColorButtonLabel:f,customColorsLabel:y,renderTriggerButton:b=({isOpen:k,color:S,ref:N,colorName:w,triggerProps:T,labelId:P})=>jsx(Et,{...mergeProps(T,{...x.label?{"aria-labelledby":P}:{"aria-label":x["aria-label"]}}),ref:N,isOpen:k,isDisabled:x.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":h,"data-block-class":R,...x},I)=>{let k=ro.useRef(null),S=ro.useRef(null),N=useOverlayTriggerState(x),{triggerProps:w,overlayProps:T}=useOverlayTrigger({type:"listbox"},N,k),P=ge(x.portalContainer),[C,E]=useControlledState(m===void 0?void 0:so(m),so(c),X=>p?.(X?.toFormat("rgba")||null)),{formatMessage:H}=F(Ye),D=useMemo(()=>Ld(H(Jr.noColor),a),[a,H]),K=useId(),{colorName:j}=ou({colorLabel:i,color:C,presets:D}),G=useMemo(()=>D.filter(X=>t||X.id!==Se),[D,t]),A=d||H(Jr.addColor),ee=f||H(Jr.removeColor),V=y||H(Jr.customColors),W=jsx(Kd,{color:C||Lt,setColor:X=>{E(X),l?.(X?.toFormat("rgba")||null);},storePickedColorKey:u,addColorButtonLabel:A,removeColorButtonLabel:ee,customColorsLabel:V,pickerMode:v,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[vd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":R,style:o,ref:I,children:[x.label?jsx("label",{id:K,className:_d({labelPosition:n}),children:x.label}):null,b({isOpen:N.isOpen,color:C,ref:k,colorName:j,triggerProps:w,labelId:K})]}),jsx(ye,{...x,portalContainer:P,placement:g,state:N,offset:_,className:classNames(qr,"BaselineUI-ColorInput-Popover"),triggerRef:k,overlayProps:T,children:jsxs(ue,{size:"content",className:Ur({includesCustomColorPicker:s}),ref:S,"aria-labelledby":K,"aria-label":x["aria-label"],children:[s&&v==="active"?jsxs(Fragment,{children:[jsx(Xr,{color:C||Lt,setColor:E,allowAlpha:r,onChangeEnd:X=>{l?.(X?.toFormat("rgba")||null);}}),W]}):null,!!G.length&&jsxs(Fragment,{children:[s&&v==="active"?jsx(O,{}):null,jsx(Un,{autoFocus:s&&v==="active"?!1:"first",state:N,triggerRef:k,presets:G,color:C,setColor:X=>{E(X),l?.(X?.toFormat("rgba")||null);}})]}),s&&v==="lazy"?W:null]})})]})});Ko.displayName="ColorInput";var Jr=$({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 nu=ro.forwardRef(({className:e,style:o,icon:t,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=ro.useRef(null),l=useCallback(({isOpen:c,color:u,ref:m,colorName:d,triggerProps:f})=>jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(Et,{...f,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:u,colorLabel:!1,colorName:d}):jsx(Qr,{...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:o,ref:M(s,p),children:[r==="standard"&&t?jsx(t,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Ko,{...i,colorLabel:!1,renderTriggerButton:l})]})});nu.displayName="IconColorInput";var iu={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 ea=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"]]}),su="_1yep5z6d8",oa=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var lu=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"]]}),pu="_1i0ytqa0",ta=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:[]}),cu=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:o}){let t=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/Go),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!t.current[i])){let l=e.slice(i*Go-(i>0?1:0),i*Go+Go);n=getSvgPathFromStroke(getStroke(l.map(([c,u,m])=>({x:c,y:u,pressure:m})),o)),l.length>=(i>0?Go+1:Go)&&(t.current[i]=n);}return n},[e,o]);return [...t.current,r]}var Go=60*3;var Cx={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},mu=ro.forwardRef(({className:e,style:o,canvasClassName:t,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:u=!0,isDisabled:m,placeholder:d,clearLabel:f,undoLabel:y,redoLabel:b,footerClassName:v,canvasRef:_,value:g,footerStyle:h,"data-block-id":R,"data-block-class":x,"aria-label":I="Drawing canvas",description:k="This is a canvas for drawing using a mouse or touch input.",...S},N)=>{let w=F(iu),T=ro.useRef(null),[P,C]=ro.useState(g||p||[]),E=ro.useMemo(()=>({...Cx,...S}),[S]),[H,D]=ro.useState(),K=useId(),{labelProps:j,fieldProps:G}=useLabel({...S,"aria-label":I,labelElementType:"span"}),{isFocusVisible:A,focusProps:ee}=useFocusRing({within:!0}),{hoverProps:V,isHovered:W}=useHover({isDisabled:m}),{undo:X,redo:ze,canRedo:Ce,canUndo:Pe,push:ke}=Ys(P,{onAction:Y=>{Y&&(C(Y),l?.(Y));},isDisabled:!c}),{keyboardProps:He}=useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?Qt():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Ce&&ze():Pe&&X());}}),[oe,de]=useState(!1),it=useCallback(Y=>{let q=Y.currentTarget.getBoundingClientRect();D(q),Y.target.setPointerCapture(Y.pointerId);let pe=[Y.clientX-q.x,Y.clientY-q.y,Y.pressure];C(Z=>[...Z,[pe]]),de(!0);},[]),to=useCallback(Y=>{if(Y.buttons!==1||!H)return;let pe=bu(Y.nativeEvent).map(Z=>[a?clamp(Z.clientX-H.left,0,H.width):Z.clientX-H.left,a?clamp(Z.clientY-H.top,0,H.height):Z.clientY-H.top,Z.pressure]);C(Z=>{let he=[...Z];return he[Z.length-1]=[...he[Z.length-1],...pe],he});},[H,a]),Pa=()=>{H&&(l?.(P),ke(P),de(!1));};useEffect(()=>{s?.(P);},[P,s]);let Qt=()=>{C([]),s?.([]),ke([]);};return jsxs("div",{ref:M(T,N),className:classNames(pu,"BaselineUI-FreehandCanvas",e),style:o,"aria-disabled":m,"data-block-id":R,"data-block-class":x,children:[S.label||c?jsxs("div",{className:cu({isInline:u}),children:[S.label?jsx(Q,{type:"label",size:"sm",...j,children:S.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(B,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:UndoIcon,onPress:X,"aria-label":y||w.formatMessage("undo")}),jsx(B,{variant:"secondary",size:"sm",isDisabled:!Ce||m,icon:RedoIcon,onPress:ze,"aria-label":b||w.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(ee,He,V,G),tabIndex:m?void 0:0,className:classNames(ea({isInline:u,isHovered:W}),lu({isFocusVisible:A,isInline:u,isDisabled:!!m}),t),"aria-describedby":S["aria-describedby"]||K,style:r,ref:_,children:[jsx(VisuallyHidden,{children:jsx("div",{id:K,children:k})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:it,onPointerMove:to,onPointerUp:Pa,children:(g||P).map((Y,q,pe)=>q<pe.length-1||!oe?jsx(fu,{line:Y,options:E,strokeColor:i,strokeWidth:n},q):jsx(yu,{line:Y,options:E,strokeColor:i,strokeWidth:n},q))})]}),d||f?jsx("div",{style:h,className:classNames(ta({isInline:u,isDisabled:m}),v),children:(P.length||!d)&&f?jsx(U,{size:"sm",variant:"ghost",label:f,isDisabled:m,onPress:Qt}):jsx(U,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});mu.displayName="FreehandCanvas";var fu=ro.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),o)),[e,o]);return jsx("path",{d:a,stroke:t,strokeWidth:r})});fu.displayName="Stroke";var yu=ro.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=du({line:e,options:o});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:t,strokeWidth:r},i))})});yu.displayName="SplitStroke";function bu(e){if(typeof e.getCoalescedEvents=="function"){let o=e.getCoalescedEvents();return o.length>0?o.flatMap(t=>bu(t)):[e]}return [e]}var gu="_1vac7ws0",vu=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function zu(e,o){let[t,r]=useState([]),a=()=>e?.flatMap(n=>[...o.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),t}function hu(e){let{scrollable:o,ownerDocument:t,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(o,t);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",r),()=>{a.removeEventListener("scroll",r);}},[o,r,t]);}var Ox=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Cu=ro.forwardRef(({className:e,children:o,isRotatable:t,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:u,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:v,onRotate:_,onSnap:g,isSnappable:h,elementGuidelines:R,hideAnchorOnDrag:x=!0,title:I,rotationPosition:k,autoUpdate:S,bound:N,snapRotationDegrees:w,snapRotationThreshold:T,scrollableAncestor:P,renderDirections:C,stopPropagation:E,transformOrigin:H,preventDefault:D},K)=>{let j=useRef(null),G=useRef(null),[A,ee]=useState(document),V=useRef(A.createElement("div")),[W,X]=useState({}),[ze,Ce]=useState(!1),[Pe,ke]=useState(!1),[He,oe]=useState(),de=zu(R,A);useLayoutEffect(()=>{let q=V.current;return V.current=A.createElement("div"),()=>{q.remove();}},[A]);let{keyboardProps:it}=useKeyboard({onKeyDown:q=>{let pe=q.shiftKey?10:1,Z=q.metaKey||q.ctrlKey;Z&&q.shiftKey&&(pe=45);function he(st,gy="x"){Z?G.current?.request("rotatable",{deltaRotate:st*pe},!0):G.current?.request("draggable",gy==="x"?{deltaX:st*pe}:{deltaY:st*pe},!0);}switch(q.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 q=fe(j.current);ee(q);let pe=V.current;q.body.append(V.current);function Z(st){ke(st.shiftKey);}function he(){ke(!1);}return q.addEventListener("keydown",Z),q.addEventListener("keyup",he),()=>{q.removeEventListener("keydown",Z),q.removeEventListener("keyup",he),pe.remove();}},[]),hu({scrollable:P,onScroll:()=>{G.current?.updateRect();},ownerDocument:A});let to=useCallback(q=>{X(pe=>({...pe,...q.style})),i?.(q);},[i]),Pa=useCallback(q=>{if(Ce(!0),j.current?.focus(),N){let Z=getHTMLElement(N,A)?.getBoundingClientRect();oe({position:"client",left:Z?.left??0,top:Z?.top??0,right:Z?.right??0,bottom:Z?.bottom??0});}c?.(q);},[N,A,c]),Qt=useCallback(q=>{Ce(!1),u?.(q);},[u]),Y=o({style:{...W.width&&{width:W.width},...W.height&&{height:W.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",...it,ref:M(j,K),style:{display:"inline-block",...n,...W},className:classNames(gu,e),onDoubleClick:l,tabIndex:0,title:I,children:Y}),createPortal(jsx(Ox,{ref:G,target:j,draggable:a,resizable:r,rotatable:t,keepRatio:Pe,throttleDrag:1,snappable:h||!!N,elementGuidelines:de,snapRenderThreshold:.9,className:vu({isDragging:ze&&x}),onRender:to,onDragStart:Pa,onDragEnd:Qt,useResizeObserver:S,useMutationObserver:S,onRenderEnd:p,onDrag:m,onResizeStart:d,onResizeEnd:f,onResize:y,onRotateStart:b,onRotateEnd:v,onRotate:_,onRenderStart:s,onSnap:g,rotationPosition:k,bounds:He,snapRotationDegrees:w,snapRotationThreshold:T,renderDirections:C,stopPropagation:E,preventDefault:D,transformOrigin:H}),V.current)]})});Cu.displayName="Transform";var Pu={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 wu=ro.forwardRef(({className:e,style:o,isInline:t=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:u=!0,"data-block-id":m,"data-block-class":d,pickerButtonStyle:f,pickerButtonClassName:y,footerClassName:b,footerStyle:v,clearLabel:_,placeholder:g,labelStyle:h,labelClassName:R,...x},I)=>{let k=ro.useRef(null),S=ro.useRef(null),{formatMessage:N}=F(Pu),[w,T]=useControlledState(n,a||null,oe=>{invariant(typeof oe!="string"),x.onValueChange?.(oe?[oe]:[]);}),P=useMemo(()=>eC(w||void 0),[w]),{fieldProps:C,labelProps:E}=useField(x),{dropProps:H,isDropTarget:D}=useDrop({ref:k,onDrop:async oe=>{if(p)return;let de=await yn({items:oe.items});de.length&&T(de[0]),l?.(oe);},...x}),{clipboardProps:K}=useClipboard({onPaste:async oe=>{if(p)return;let de=await yn({items:oe});de.length&&T(de[0]),c?.(oe);},...x}),j=()=>{T(null),S.current&&(S.current.value="");},G={type:"file",onChange:oe=>{let de=[...oe.target.files];T(de[0]),x.onChange?.(oe);},accept:r,disabled:p},{focusProps:A,isFocused:ee,isFocusVisible:V}=useFocusRing({within:!0}),{hoverProps:W,isHovered:X}=useHover({isDisabled:p}),{imgProps:ze,isLoading:Ce,isLoaded:Pe}=ko({src:P,alt:i||""}),ke={label:s||N("selectImage"),onPress:()=>k.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(cr({isFocusVisible:V}),{[su]:D&&!p},y),style:f},He=filterTruthyValues({"data-loaded":Pe,"data-block-id":m,"data-block-class":d,"data-hovered":X,"data-focused":ee,"data-drop-target":D,"data-disabled":p,"data-focus-visible":V});return jsxs(L,{...He,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:o,ref:I,children:[jsxs("label",{...mergeProps(H,W,A,E),className:classNames(ea({isInline:t,isHovered:X,isDisabled:p,hasLoadedImage:!!P&&Pe,showFocusRing:D||!!P&&V}),R),style:h,ref:k,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(C,K,G),ref:S})}),!P&&jsx(U,{...ke}),!!P&&(Ce?jsx(Oo,{}):jsx("img",{className:oa({isInline:t,isDisabled:p,hasLoadedImage:!!P&&Pe&&u}),...ze}))]}),g||_?jsx("div",{style:v,className:classNames(ta({isInline:t,isDisabled:p}),b),children:(P||!g)&&_?jsx(U,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:j}):jsx(U,{size:"sm",variant:"ghost",label:g,isDisabled:!0})}):null]})});wu.displayName="ImageDropZone";function eC(e){return e instanceof File?URL.createObjectURL(e):e}var Ru="_1vm2oh49 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7 _1yep5z6g4",Qn="_1vm2oh48 _1yep5z6ld _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6k2 _1yep5z6k3 _1yep5z6k4 _1yep5z6jt _1yep5z6ju _1yep5z6jv",Su=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 Lu=ro.forwardRef(({className:e,style:o,isDisabled:t,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:u,addAriaLabel:m,accent:d="positive","data-block-id":f,"data-block-class":y,...b},v)=>{let{focusProps:_,isFocused:g,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:R,hoverProps:x}=useHover({isDisabled:t}),{pressProps:I}=usePress({isDisabled:t,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let k=filterTruthyValues({"data-hovered":R,"data-focus-visible":h,"data-focused":g,"data-disabled":t});return jsxs("div",{...b,className:classNames(Su({isInline:r,isFocusVisible:h,isDisabled:t,isHovered:R,accent:d}),"BaselineUI-Preview",e),"data-block-id":f,"data-block-class":y,"aria-label":b["aria-label"]||a||s,style:o,ref:v,children:[typeof i=="string"?jsx("button",{disabled:t,...mergeProps(x,_,I,k),className:Qn,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(x,_,I,k),disabled:t,style:p,"aria-label":m,className:Qn,children:[n?jsx("img",{src:n,alt:a,className:oa({isInline:r,isDisabled:t})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(B,{isDisabled:t,className:Ru,"aria-label":u,size:"xs",icon:TrashIcon,onPress:c}):null]})});Lu.displayName="Preview";var Mu="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69c _1yep5z69d _1yep5z69e",Eu=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),Bu="cw3m0n7",Du=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:[]}),Fu="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6l9",Hu=z({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var gC=({label:e,description:o},{isSelected:t,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:Du({labelPosition:n}),children:[jsx("div",{className:Hu({isSelected:t,isFocusVisible:r,isDisabled:a}),children:t?jsx("div",{className:Bu}):null}),e?jsxs("div",{className:Mu,children:[jsx("span",{className:Mr({isDisabled:a}),children:e}),o?jsx("span",{className:Eu({isDisabled:a}),children:o}):null]}):null]}),Vu=({state:e,renderOption:o=gC,item:t,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(t.id),l=ro.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=useRadio({...s,isDisabled:p,children:t.label,value:t.id},e,l),{focusProps:d,isFocusVisible: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})}),o(t,{isFocusVisible:f,isSelected:m,isFocused:y,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var Ou=ro.forwardRef(({className:e,style:o,optionsContainerClassName:t,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":u,"data-block-class":m,...d},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),h=Ie({...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(je({labelPosition:n}),"BaselineUI-RadioGroup",e),style:o,ref:f,children:[d.label||h?jsxs("div",{className:Oe({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...v,className:classNames(Ve,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsxs("div",{className:classNames({[Ro]:d.isDisabled}),children:[jsx("div",{className:classNames(Fu,t),style:r,children:a.map(x=>jsx(Vu,{state:y,renderOption:i,item:x,...d,value:x.id},x.id))}),n==="top"&&h]})]})});Ou.displayName="RadioGroup";var ju=({id:e,defaultMessage:o,elementType:t=Fragment$1})=>{invariant(e||o,"`id` or `defaultMessage` is required.");let r=F();return jsx(t,{children:r.formatMessage(e)||o})};ju.displayName="MessageFormat";var Au=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:o,...s,ref:p,children:t})});Au.displayName="Group";var ri="UNSUPPORTED_IN_MENU";function qu(e){return useMemo(()=>ro.Children.toArray(e).map(o=>{let t=o,r=uniqueId("item"),a=Vt(t,Ne),n=Uu(t),i,s;if(a){let v=Vt(a,Le);invariant(v),i=Uu(v),s=Vt(a,Re).props.children;}else n?i=n:i=t;let{onPress:p,label:l,"aria-label":c,iconStart:u,isDisabled:m,icon:d}=i.props,f=l||c||ri;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},t)}),[e])}function Vt(e,o){return o?flatMapDeep(ro.Children.toArray(e),r=>ro.isValidElement(r)&&r.props.children?[r,...ro.Children.toArray(r.props.children)]:[r]).find(r=>ro.isValidElement(r)&&r.type===o):void 0}function Uu(e){return Vt(e,U)||Vt(e,B)}var Ku="_1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6i2 _1yep5z6i3 _1yep5z6i4 _1yep5z6lc _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l4",Gu={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var ni=ro.forwardRef(({className:e,style:o,children:t,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=F(),[u,m]=useState(),d=qu(t),f=useListState({...p,children:d}),y=ae(l),b=useRef(null),[{visibleItems:v,isMeasuring:_},g]=Ia({visibleItems:f.collection.size,isMeasuring:!1}),h=useCallback(()=>{let T=P=>{if(b.current&&y.current){let C=[...b.current.children],E=y.current.getBoundingClientRect().width,H=P<f.collection.size,D=0,K=0;if(H){let j=C.pop();j&&(D+=Zu(j,!1,!0));}for(let[j,G]of C.entries())if(D+=Zu(G,j===0,j===C.length-1),Math.round(D)<=Math.round(E))K++;else break;return K}return P};g(function*(){yield {visibleItems:f.collection.size,isMeasuring:!0};let P=T(f.collection.size),C=P<f.collection.size&&P>0;yield {visibleItems:P,isMeasuring:C},C&&(yield {visibleItems:T(P),isMeasuring:!1});});},[g,y,f.collection.size]),R=useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);Ba({ref:R,onResize:h}),xe(h,[f.collection,h]);let{toolbarProps:x}=useToolbar(p,y),I=[...f.collection],k=I.slice(0,v),S=I.slice(v).filter(T=>T.textValue!==ri),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(x,w),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...o,flexBasis:_?"100%":void 0},ref:y,children:jsxs("div",{ref:b,className:Ku,children:[k.map(T=>T.rendered),N?jsxs(Fragment,{children:[!_&&i?jsx(L,{flexGrow:1}):null,jsx(wr,{placement:"bottom end",renderTrigger:({buttonProps:T,ref:P})=>jsx(B,{...T,size:"md",icon:MoreIcon,"aria-label":c(UC.more),variant:"toolbar",ref:P}),...r,disabledKeys:S.filter(T=>T.props?.isDisabled).map(T=>T.key),items:S.map(T=>{let P=T.textValue||T["aria-label"];return invariant(P,"ActionItem must have a label"),{id:T.key,label:P,icon:T.props.icon}}),onAction:T=>{let P=f.collection.getItem(T);invariant(P,"Item not found");let{onPress:C,dialogContent:E}=P.props;C?.(),m(E);}})]}):null]})}),jsx(we,{isOpen:!!u,onOpenChange:T=>{T||m(void 0);},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:1e5},children:u?ro.cloneElement(u,{inheritDrawer:!0}):null})})]})});ni.displayName="CollapsibleToolbar";function Zu(e,o,t){let a=re(e).getComputedStyle(e);return e.getBoundingClientRect().width+(o?0:Qu(a.marginLeft))+(t?0:Qu(a.marginRight))}function Qu(e){let o=Number.parseInt(e,10);return Number.isNaN(o)?0:o}var UC=$({more:{id:"more",defaultMessage:"More"}});var ii=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=ro.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(Gu[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:o,"data-block-id":t,"data-block-class":r,ref:M(s,p),children:i.children})});ii.displayName="WrappedToolbar";var ia=ro.forwardRef((e,o)=>{let t=e.isCollapsible?ni:ii;return jsx(t,{...e,ref:o})});ia.displayName="Toolbar";var em=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),om=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"]]}),tm=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"]]}),am=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 aP={xxs:8,xs:12,sm:16,md:20,lg:24},be=ro.forwardRef((e,o)=>{let t=ae(o),{tooltipProps:r}=sr(e,t);return r?jsx(ne,{...r,children:jsx(si,{...e,ref:o})}):jsx(si,{...e,ref:o})});be.displayName="ToggleIconButton";var si=ro.forwardRef(({className:e,style:o,icon:t,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:u,ref:m,isFocusVisible:d,isFocused:f,isHovered:y,uiStateOptions:b}=pr(s,l),v=useMemo(()=>typeof t=="function"?t:l.isSelected?t.selected:t.unselected,[t,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"&&am(_),a==="primary"&&om(_),a==="secondary"&&tm(_),a==="tertiary"&&rm(_),em({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof o=="function"?o(b):o,ref:M(m,p),children:jsx(v,{size:aP[r]})})});si.displayName="ToggleIconButtonCore";var im="f6jv6bm",sm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jh _1yep5z6ji _1yep5z6jj",Yo="_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"]]}),sa=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:[]}),pm="f6jv6bj _1yep5z6wg _1yep5z6wh _1yep5z6wi _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi",cm="f6jv6bk";var dm="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",um=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:[]}),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",fm="_1yep5z6jn _1yep5z6jo _1yep5z6jp",ym="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu _1yep5z6e3 _1yep5z6lc",bm=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:[]}),gm="f6jv6bl",vm="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ie _1yep5z6if _1yep5z6ig _1yep5z6eu",la=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),pa="f6jv6b9 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",jt="f6jv6bo";var zm=[["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:At}}=layoutSprinkleValues,hm=({isOpen:e,onClose:o})=>{let{formatMessage:t}=F(),r=useId();return jsx(we,{isOpen:e,onOpenChange:a=>{a||o();},children:jsx(Ee,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(ue,{"aria-labelledby":r,className:pm,drawerBackground:"subtle",children:[jsxs(L,{paddingLeft:At.padding.horizontal.lg,paddingRight:At.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:cm,children:[jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:t($t.help)}),jsx(B,{icon:XIcon,size:"md",variant:"secondary","aria-label":t($t.close),onPress:o})]}),jsx(O,{className:gm}),jsxs(L,{paddingX:At.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:At.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:t($t.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:t($t.shortcut)})]})}),jsx("div",{role:"rowgroup",children:zm.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:At.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:t($t[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==zm.length-1&&jsx(O,{})]},a))})]})]})})})},$t=$({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 ca=ro.forwardRef(({value:e,defaultValue:o,onChange:t,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:u,saveOnEnter:m,onSave:d},f)=>{let y=ro.useRef(null),[b,v]=useControlledState(e,o||"",t),_=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 h=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:x,isFocusVisible:I}=useFocusRing(),{hoverProps:k,isHovered:S}=useHover({}),N=filterTruthyValues({"data-focus-visible":I,"data-hovered":S,"data-focused":x});return jsx("textarea",{...mergeProps(R,k,N),ref:M(y,n),className:classNames(s?ym:[sa(),la({isInline:i}),vm]),autoFocus:u,onChange:_,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:g})});ca.displayName="PlainEditor";var Kt="mention",da="mention_input",Mm=ro.forwardRef(({onCancel:e,editor:o,element:t,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ma),p=useSelected(),[l,c]=useState(""),{contains:u}=useFilter({sensitivity:"base"}),{formatMessage:m}=F(),d=useMemo(()=>{let C=i.filter(E=>l===""||u(E.displayName,l)).map(E=>({id:E.id,label:E.displayName,data:E}));return s?take(C,s):C},[i,s,l,u]),f=useCallback(C=>jsx(Item,{children:C.label},C.id),[]),y=useCallback((C=!1)=>{let E=findNodePath(o,t);E&&(removeNodes(o,{at:E}),C&&focusEditor(o));},[o,t]),b=useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:C=>{y(!0),r?.(C);}}),v=ro.useRef(null),_=ro.useRef(null),g=ro.useRef(null),h=ro.useRef(null),R=useHTMLInputCursorState(_);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:x,listBoxProps:I}=useComboBox({defaultItems:d,inputRef:_,buttonRef:v,listBoxRef:g,popoverRef:h,menuTrigger:"focus","aria-label":m(VP.mention)},b);useEffect(()=>{_.current?.focus();},[]);let k=useCallback((C="manual",E=!1)=>{y(E),e?.(C,b.inputValue);},[e,y,b.inputValue]),S=useRef(p);useEffect(()=>{S.current&&!p&&k("deselect"),S.current=p;},[p,k]);let N=R?.atStart??!1,w=R?.atEnd??!1,T=useCallback(C=>{C.key==="Backspace"&&N?k("backspace",!0):C.key==="Escape"?k("escape",!0):C.key==="ArrowLeft"&&N?k("arrowLeft",!0):C.key==="ArrowRight"&&w&&k("arrowRight",!0);let E=Hotkeys.isUndo(C)&&o.history.undos.length>0,H=Hotkeys.isRedo(C)&&o.history.redos.length>0;(E||H)&&(C.preventDefault(),o[E?"undo":"redo"](),focusEditor(o));},[N,w,k,o]),P=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let C=re(_.current),E=_.current?C?.getComputedStyle(_.current).font:void 0;return {width:E?getTextDimensions({text:b.inputValue,font:E}).width+10:"4ch"}}},[b.inputValue]);return jsxs(ao.Provider,{value:b,children:[jsx("input",{...mergeProps(x,{onKeyDown:T,onBlur:()=>{k("blur",!0);},onChange:C=>{c(C.target.value);}}),style:P,className:dm,ref:M(a,_)}),jsx(ye,{triggerRef:n,className:mm,isNonModal:!0,ref:h,state:b,children:jsx(le,{...I,items:void 0,autoFocus:"first",ref:g,className:sprinkles({width:"full"}),renderOption:Bm})})]})});Mm.displayName="MentionInputContentElement";var ui=withRef(({className:e,...o},t)=>{let{children:r,editor:a,element:n}=o,{items:i}=useContext(ma),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}),lt()&&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:Kt,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:t,...o,children:[jsx(Mm,{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]})});ui.displayName="MentionInputElement";var mi=withRef(({className:e,onClick:o,children:t,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:getHandler(o,n),ref:a,...r,children:["@",n.displayName,t]})});mi.displayName="MentionElement";var Em=(e,{options:{trigger:o,triggerPreviousCharPattern:t,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===o;return e.insertText=i=>{if(!e.selection||!n(i)||r&&!r(e)){a(i);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(t?.test(s)){ua(e);return}a(i);},e},VP=$({mention:{defaultMessage:"Mention",id:"mention"}});function Fm({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("p",{children:o})})}function ok(e){return Object.entries(e).map(([o,t])=>`${kebabCase(o)}:${t}`).filter(([,o])=>!!o).join(";")}function tk(e){return "text"in e}function rk(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Gt(e){if(!e)return "";function o(t){if(tk(t)){let a=rk(t.text);return t.bold&&(a=`<b>${a}</b>`),t.italic&&(a=`<i>${a}</i>`),t.underline&&(a=`<u>${a}</u>`),(t.color||t.backgroundColor)&&(a=`<span style="${ok(filterTruthyValues({color:t.color||void 0,backgroundColor:t.backgroundColor||void 0}))}">${a}</span>`),a}let r=t.children?.map(Gt).join("");switch(t.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${t.url}">${r}</a>`;case Kt:return `<span data-user-id="${t.value}">${t.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(t=>o(t)).join(""):o(e)}function ak(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(o=>o.split(":").map(t=>t.trim())).map(([o,t])=>[camelCase(o),t]))):{}}function vi(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let o=new DOMParser().parseFromString(Hm.default.sanitize(e),"text/html"),t=o.querySelectorAll("[style]");for(let a of t)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=o.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
|
|
53
|
+
`:"<p>";return Om(o.body)}function Om(e,o){if(e.nodeType===Node.TEXT_NODE)return jsx$1("text",o,e.textContent);if(e.nodeType!==Node.ELEMENT_NODE)return null;let t={...o};switch(e.nodeName.toUpperCase()){case"B":{t.bold=!0;break}case"I":{t.italic=!0;break}case"EM":{t.italic=!0;break}case"U":{t.underline=!0;break}case"SPAN":{let a=ak(e.getAttribute("style")||"");a["text-decoration"]==="underline"&&(t.underline=!0),a.color&&(t.color=a.color),a.backgroundColor&&(t.backgroundColor=a.backgroundColor);break}}let r=[...e.childNodes].flatMap(a=>Om(a,t));switch(r.length===0&&r.push(jsx$1("text",t,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",o,`
|
|
54
|
+
`);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:Kt,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 jm(e){let o=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[t]=o||[{url:""}];return t?.url}function ua(e){let o={children:[{text:" "}],type:da};e.insertNode(o);}var nk=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:Kt,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:da}],withOverrides:Em}),Am=createPlugins([createParagraphPlugin({component:Fm}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:$m}),nk({component:mi})],{components:{[da]:ui}});var Gm=({isDisabled:e})=>{let{formatMessage:o}=F(),t=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:jsx(B,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":o(mo.addLink),className:Yo,preventFocusOnPress:!0})}),jsx(Re,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(ue,{size:"content",style:{minWidth:240},children:jsx(mk,{close:()=>{r(),setTimeout(()=>{focusEditor(t,t.selection);},0);}})})})]})},mk=({close:e})=>{let o=useEditorRef(),{formatMessage:t}=F(),r=useEditorSelector(l=>jm(l),[]),[a,n]=ro.useState(r?"show":"add"),[i,s]=ro.useState(r||""),p=jsx(L,{padding:"lg",children:jsx(Ke,{label:t(mo.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(L,{display:"flex",justifyContent:"flex-end",padding:"lg",className:im,children:jsx(U,{isDisabled:!isUrl(i,!0),label:t(mo.addLink),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(L,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(U,{label:t(mo.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(U,{label:t(mo.removeLink),size:"sm",onPress:()=>{unwrapLink(o),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(U,{label:t(mo.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(U,{label:t(mo.save),size:"sm",onPress:()=>{upsertLink(o,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function $m({className:e,children:o,...t}){return jsx(PlateElement,{asChild:!0,className:e,...t,children:jsx("a",{className:Rr({size:"sm"}),children:o})})}var mo=$({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 yk=parseColor("#ffffff00").toString("hexa"),_i=[{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"}];[..._i,{label:"Transparent",color:yk}];var ya=({nodeType:e,icon:o,ariaLabel:t,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(be,{variant:"tertiary",isSelected:a,size:"sm",icon:o,"aria-label":t,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},hi=({nodeType:e,"aria-label":o,isDisabled:t})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:p,triggerProps:l})=>jsx(B,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":o,size:"md",variant:"popover",isDisabled:t,className:Yo,preventFocusOnPress:!0,...l,ref:p}),[e,o,t]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Ko,{presets:_i,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:t})};var qk=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ma=ro.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Pi=ro.forwardRef(({value:e,defaultValue:o,onChange:t,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:u,editorHandle:m,maxMentionableUsersSuggestions:d,autoFocus:f,editorRef:y,saveOnEnter:b,onSave:v},_)=>{let g=useRef(null),h=useId(),{formatMessage:R}=F(),x=useRef(null),I=x.current,k=useRef(null),S=useMemo(()=>I?.getRootNode()instanceof ShadowRoot,[I]),[N,w]=useControlledState(e?vi(e):void 0,vi(o||"<p></p>"),C=>{t&&t(Gt(C));}),{keyboardProps:T}=useKeyboard({onKeyDown:C=>{(b&&C.key==="Enter"&&!C.shiftKey||(C.ctrlKey||C.metaKey)&&C.key==="Enter")&&(C.preventDefault(),v()),C.altKey&&C.key==="F10"?(C.preventDefault(),g.current&&g.current.querySelector("button")?.focus()):C.continuePropagation(),lt()&&S&&k.current&&focusEditor(k.current);}});useEffect(()=>{s&&k.current&&deselect(k.current);},[s]),useImperativeHandle(_,()=>({startMention:()=>{k.current&&!x.current?.querySelector("input[role='combobox']")&&ua(k.current);}})),useImperativeHandle(m,()=>({setCaretPosition:C=>{k.current&&(focusEditor(k.current),moveSelection(k.current,{distance:C,unit:"character"}));},focus:()=>{k.current&&focusEditor(k.current);}}));let P=useMemo(()=>({items:u||[],containerRef:l,maxMentionableUsersSuggestions:d}),[u,l,d]);return jsx(ma.Provider,{value:P,children:jsxs(Plate,{initialValue:N||qk,plugins:Am,editorRef:M(k,y||null),onChange:C=>{w(C);},children:[jsxs(ia,{className:pa,"aria-controls":h,ref:g,children:[jsxs(L,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(ya,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:R(et.bold),isDisabled:s}),jsx(ya,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:R(et.italic),isDisabled:s}),jsx(ya,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:R(et.underline),isDisabled:s})]}),jsx(O,{orientation:"vertical",className:jt}),jsx(hi,{nodeType:MARK_COLOR,"aria-label":R(et.fontColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:jt}),jsx(hi,{nodeType:MARK_BG_COLOR,"aria-label":R(et.backgroundColor),isDisabled:s}),jsx(O,{orientation:"vertical",className:jt}),jsx(Gm,{isDisabled:s}),jsx(O,{orientation:"vertical",className:jt}),jsx(B,{className:Yo,icon:QuestionmarkCircleIcon,size:"sm","aria-label":R(et.help),onPress:c})]}),jsx(O,{variant:"secondary"}),jsx("div",{...T,ref:x,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:f,spellCheck:a,"aria-label":p,className:classNames(sa({isDisabled:s}),la({isInline:i})),renderPlaceholder:({attributes:C,children:E})=>jsx("span",{...C,className:sprinkles({paddingY:"lg"}),children:E})})})]})})});Pi.displayName="RichEditor";var Bm=({key:e,value:o},{isDisabled:t,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:t}),{label:p,data:l}=o;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:um({isDisabled:t,isHovered:a}),"data-active":a,ref:i,children:[jsx($o,{name:p,...l?.avatar}),jsxs(L,{display:"flex",flexDirection:"column",children:[jsx(Q,{type:"subtitle",size:"sm",children:p}),jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(O,{})]})},et=$({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 Jm=ro.memo(ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":u,"aria-describedby":m,"aria-labelledby":d,"aria-details":f,editableContentAriaLabel:y="Editing Area",footerButtons:b,clearOnCancel:v,clearOnSave:_,...g},h)=>{let R=useRef(null),{formatMessage:x}=F(),I=useRef(null),k=useRef(null),S=useRef(null),N=!a&&g.variant==="minimal",w=useRef(null),[T,P]=ro.useState(g.value||g.defaultValue),C=g.isDisabled||g.isSaveDisabled||!getPlainText(T||""),{fieldProps:E}=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(()=>{P(""),a?R.current?.reset():k.current?.clear();},[a]),D=useCallback(()=>{C||(i?.(a?Gt(R.current?.children):I.current.value),_&&H());},[H,_,a,i,C]),K=jsx(B,{variant:"ghost","aria-label":l||x(Ii.save),icon:p,isDisabled:C,size:"md",excludeFromTabOrder:N,className:N?fm:void 0,onPress:D,preventFocusOnPress:!0}),[j,G]=ro.useState(!1),{keyboardProps:A}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),G(!0));}}),ee=useCallback(V=>{P(V),g.onChange?.(V);},[g]);return jsxs("div",{...mergeProps(E,a?A:{}),role:"application",ref:M(S,h),style:o,"data-block-id":t,"data-block-class":r,className:classNames(lm({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx($o,{className:sm,name:g.avatarName||""}):null,jsxs("div",{className:bm({isInline:s}),children:[jsx(ca,{isMinimal:N,textBoxRef:I,isInline:s,editableContentAriaLabel:y,...g,onChange:ee,onSave:D}),K]})]}):jsxs(Fragment,{children:[a?jsx(Pi,{containerRef:S,ref:w,editorRef:R,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{G(!0);},...g,onChange:ee,onSave:D}):jsxs(Fragment,{children:[!s&&jsx(O,{variant:"secondary"}),jsx(ca,{onCancel:n,textBoxRef:I,ref:k,isInline:s,editableContentAriaLabel:y,...g,onChange:V=>{P(V),g.onChange?.(V);},onSave:D})]}),jsx(O,{variant:"secondary"}),jsxs("div",{className:classNames(pa,sprinkles({justifyContent:"space-between"})),children:[jsxs(L,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&g.mentionableUsers?jsx(B,{icon:AtIcon,size:"sm","aria-label":x(Ii.mention),onPress:()=>w.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:W},X)=>V==="action"?jsx(B,{...W,size:"sm",isDisabled:g.isDisabled||W.isDisabled},X):jsx(be,{...W,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||W.isDisabled},X))]}),jsxs(L,{children:[!!n&&jsx(B,{variant:"secondary",icon:CrossCircleFilledIcon,isDisabled:g.isDisabled,size:"md",onPress:()=>{n(),v&&H();},"aria-label":c||x(Ii.cancel)}),K]})]})]}),jsx(hm,{isOpen:j,onClose:()=>{G(!1);}})]})}));Jm.displayName="Editor";var Ii=$({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var ga=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),u=animated[s];return c((m,d)=>d&&jsx(u,{className:e,"data-block-id":t,"data-block-class":r,style:{...o,...m},...p,ref:l,children:n}))});ga.displayName="Transition";var ef="_8kqf970 _1yep5z6pd _1yep5z6pe _1yep5z6pf _1yep5z6149 _1yep5z614a _1yep5z614b _1yep5z614i _1yep5z614j _1yep5z614k _1yep5z6150 _1yep5z6151 _1yep5z6152 _1yep5z6yy _1yep5z6v7 _1yep5z6v8 _1yep5z6v9 _1yep5z6176";var tf=2,rf=ro.forwardRef(({className:e,style:o,hideForKeyboard:t,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=ro.useRef(null),u=useInteractionModality(),[m,d]=ro.useState(!1),f=useCallback(()=>{let N=r?.current||fe(c.current).body;return re(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+tf>=0:N.scrollTop+N.clientHeight+tf>=N.scrollHeight},[r]),[y,b]=ro.useState(f),v=Io(),{buttonProps:_,isPressed:g}=useButton({onPress:()=>{let N=r?.current||fe(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:h,isFocused:R,isFocusVisible:x}=useFocusRing(),{hoverProps:I,isHovered:k}=useHover({}),S=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":g,"data-focus-visible":x,"data-hovered":k,"data-focused":R});return useEffect(()=>{b(f());},[f]),useEffect(()=>{let N=r?.current||fe(c.current).body,w="onscrollend"in re(N),T=()=>{setTimeout(()=>{d(!1),b(f());},n);},P=()=>{d(!0),w||T();};return N.addEventListener("scroll",P),N.addEventListener("scrollend",T),()=>{N.removeEventListener("scroll",P),N.removeEventListener("scrollend",T);}},[r,n,f]),jsxs(ga,{isMounted:(t?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(_,h,I,S),className:classNames(ef,Er({isFocusVisible:x,variant:"high-contrast",isHovered:k}),Br({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:o,ref:M(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:Ct({variant:"high-contrast"})}),a]})});rf.displayName="ScrollControlButton";var Ri="_1yep5z6jt _1yep5z6ju _1yep5z6jv _1yep5z6k2 _1yep5z6k3 _1yep5z6k4",af=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"]]}),nf="_1v0p2z10";var _a=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:u=!0,onPrimaryAction:m,onCancel:d,autoFocusButton: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(ue,{className:e,style:o,"data-block-id":t,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":v,children:[jsxs("div",{className:af({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(B,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(_0.close),onPress:d}):null]}),l?g:null]}),a?jsx(L,{elementType:"section",className:nf,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(L,{paddingX:"lg",paddingBottom:"lg",children:jsx(Ke,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(O,{}),jsxs(L,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(U,{variant:"secondary",className:Ri,label:s,onPress:d,autoFocus:f==="cancel"}):null,i?jsx(U,{className:Ri,label:i,onPress:m,autoFocus:f==="primary",isDisabled:y}):null]})]}):null]})});_a.displayName="AlertDialog";var _0=$({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var sf="_1t55bp71",lf="_1yep5z6e3 _1yep5z6eu _1yep5z6in _1yep5z6io _1yep5z6ip _1yep5z69i _1yep5z69j _1yep5z69k",pf="_1t55bp70";var k0=P0(),cf=ro.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=t;return (!t||Array.isArray(t)&&t.length===0)&&(p=""),k0.render(p)},[t]);return jsx("div",{className:classNames(lf,pf,{[sf]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:o,ref:i,dangerouslySetInnerHTML:{__html:s}})});cf.displayName="Markdown";function ff(e){let{formatMessage:o,locale:t}=F(),[r,a]=ro.useState(!1),[n,i]=ro.useState(0),[s,p]=ro.useState(0),[l,c]=ro.useState(!1);useEffect(()=>{if(!e.current)return;let d=e.current,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(o(uf.playing),"polite")):(e.current.pause(),a(!1),announce(o(uf.paused),"polite"))))();},[o,e]),m=useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,announce(R0(e.current.currentTime,t.locale),"assertive"));},[t.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:u,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?mf(e.current?.currentTime):"00:00",formattedDuration:s?mf(s):"00:00",setIsSliderDragging:c}}var uf=$({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function R0(e,o){let t=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...t&&{hours:t},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(o,{style:"long"}).format(n)}function mf(e){let o=Math.floor(e%3600/60),t=Math.floor(e%60);return [o,t].map(r=>r.toString().padStart(2,"0")).join(":")}var yf="_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",gf="rta2n90";var zf=ro.forwardRef(({className:e,style:o,size:t="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro.useRef(null),{isPlaying:l,progress:c,duration:u,togglePlay:m,seek:d,formattedDuration:f,formattedCurrentTime:y,setProgress:b,setIsSliderDragging:v}=ff(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(yf,"BaselineUI-AudioPlayer",e),role:"group",style:o,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:R})=>jsx("source",{src:h,type:R},h))})}),jsx(be,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:t,"aria-label":_(l?Ti.pause:Ti.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:bf,children:[jsx("span",{"aria-hidden":!0,children:y}),jsx(Lo,{"aria-label":_(Ti.audioTimeline),value:c,minValue:0,maxValue:100,className:gf,onChange:h=>{b(h),v(!0);},onChangeEnd:h=>{d(h),v(!1);}}),jsx("span",{"aria-hidden":!0,children:f})]})]})});zf.displayName="AudioPlayer";var Ti=$({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var hf="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6i5 _1yep5z6i6 _1yep5z6i7",xf="_1w920rn1 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k",Cf="_1w920rn0 _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z6l3",ha=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"]]}),Pf="_1w920rnb _1yep5z6ld",kf=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"]]}),If="_1w920rnc";var Rf=({items:e,ulRef:o})=>{let{length:t}=e,r=ro.useRef(null);return useLayoutEffect(()=>{if(!r.current)return;let a=r.current.closest(".BaselineUI-ImageGallery")?.querySelector(`[data-image-key='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(a,"Node is not defined."),r.current?.prepend(a);},[e,o]),jsx("div",{className:ha(),ref:r,children:jsx(L,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:If,children:t})})};function Sf(e,o){return e.find(t=>t.id===o)}function Tf(e,o,t){let r=e.findIndex(i=>i.id===o),a=[...t].map(i=>e.findIndex(s=>s.id===i)),n=[...e];for(let i of a){let[s]=n.splice(i,1);n.splice(r,0,s);}return n}function Nf(e,o,t){let r=e.findIndex(s=>s.id===o),a=[...t].map(s=>e.findIndex(p=>p.id===s)),n=[...e],i=0;for(let s of a){let[p]=n.splice(s-i,1);n.splice(r,0,p),i++;}return n}function Ni(e){return e.map(o=>({id:o.id,label:o.label,data:{src:o.src,alt:o.alt}}))}function xa(e){return e.map(o=>({id:o.id,label:o.label,src:o.data?.src,alt:o.data?.alt}))}var $0=({fit:e,item:o,deleteElement:t})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:n,isLoaded:i}=ko({src:o.data?.src,alt:o.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(Oo,{"aria-label":r(Yt.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Pf,children:t}))},Lf=({item:{value:e},options:{optionProps:o,isFocusVisible:t,isSelected:r},liRef:a,fit:n="contain",onDelete:i,className:s,imageClassName:p,imageLabelClassName:l,imageDimensions:c,style:u,renderImage:m=(d,{deleteElement:f})=>jsx($0,{item:d,deleteElement:f,fit:n})})=>{let d=useId(),{formatMessage:f}=F();invariant(e&&_o(e),"Expected value to be a list option");let y=i?jsx("div",{className:hf,children:jsx(B,{"aria-label":f(Yt.delete),size:"xs",icon:XIcon$2,onPress:()=>{i(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,b=useCallback(v=>{let _={},g=typeof v=="function"?v(xa([e])[0],{isSelected:r}):v;return g&&(_.width=typeof g.width=="string"?Mi[g.width]:g.width,_.aspectRatio="height"in g?`${_.width} / ${g.height}`:g?.aspectRatio?.toString()),_},[r,e]);return jsxs("li",{...o,ref:a,className:classNames(xf,s),"aria-labelledby":d,style:u,children:[jsx(L,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(ha({isFocusVisible:t,isSelected:r,isLoading:!0}),p),style:b(c),"data-image-key":e.id,children:m(e,{deleteElement:y??void 0,onDelete:i})})}),jsx("span",{id:d,className:classNames(kf({isFocusVisible:t,isSelected:r}),l),children:e.label})]})};var X0={width:0,display:"block"};var Mi=(t=>(t[t.sm=102]="sm",t[t.md=170]="md",t))(Mi||{}),Bf=ro.forwardRef(({className:e,style:o,fit:t="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:u,imageContainerClassName:m,imageClassName:d,labelClassName:f,onListChange:y,renderImage:b,imageDimensions:v={width:s,aspectRatio:p},imageContainerStyle:_,...g},h)=>{let R=ro.useRef(null),[x,I]=useState([]),{formatMessage:k}=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?Ni(l):void 0,Ni(c),y?D=>{y?.(xa(D));}:void 0),P=useCallback(D=>{let K=D.target.key,j=D.keys;if(D.target.dropPosition==="before"){let G=Tf(w,K,j);T(G);}else if(D.target.dropPosition==="after"){let G=Nf(w,K,j);T(G);}r?.(D);},[w,r,T]),C=useCallback(()=>{i&&x.length&&(T(w.filter(D=>!x.includes(D.id))),i(new Set(x)),I([]));},[x,w,i,T]),E=useCallback((D,K,j)=>jsx(Lf,{item:D,options:K,liRef:j,fit:t,onDelete:i?G=>{I([G]);}:void 0,renderImage:b,className:m,imageClassName:d,imageLabelClassName:f,imageDimensions:v,style:_}),[t,i,b,m,d,f,v,_]),{keyboardProps:H}=useKeyboard({onKeyDown(D){if(u?.(D),D.key==="Backspace"||D.key==="Delete"){if(!i)return;if([...S].length)I([...S]);else {let j=D.target.dataset.key;I([j]);}}}});return jsxs("div",{...H,ref:h,style:o,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(le,{...g,selectedKeys:S,items:w,onReorder:P,layout:"grid",orientation:"vertical",className:Cf,ref:R,dropIndicatorStyle:X0,renderOption:E,renderDragPreview:D=>jsx(Rf,{items:D,ulRef:R}),onSelectionChange:N,getItems:D=>[...D].map(K=>{let j=Sf(w,K);return {src:j?.src||"",alt:j?.alt||"",key:K}})}),jsx(we,{isOpen:!![...x].length,onOpenChange:D=>{D||I([]);},children:jsx(Ee,{isDismissable:!0,children:jsx(_a,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:k(Yt.delete),cancelLabel:k(Yt.cancel),onCancel:()=>{I([]);},onPrimaryAction:C,autoFocusButton:"cancel"})})})]})});Bf.displayName="ImageGallery";var Yt=$({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var Df="_1sexph00",Ff="_1sexph01 _1yep5z617n _1yep5z617o _1yep5z617p _1yep5z619z _1yep5z61a0 _1yep5z61a1 _1yep5z61b5 _1yep5z61b6 _1yep5z61b7 _1yep5z618t _1yep5z618u _1yep5z618v _1yep5z61rj _1yep5z61rk _1yep5z61rl";var Of=ro.forwardRef(({className:e,style:o,items:t,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:u,defaultSelected:m,onButtonSelectionChange:d,moreAriaLabel:f,optionStyle:y,optionClassName:b,triggerClassName:v,triggerStyle:_,tooltipProps:g,...h},R)=>{let{formatMessage:x}=F(),I=te(),k=useSelectState({items:t,...h,defaultSelectedKey:h.defaultSelectedKey||t?.[0]?.id,children:I,validationState:h.validationState==="error"?"invalid":"valid"}),[S,N]=useControlledState(u,!!m,A=>{d?.({isSelected:A,selectedKey:k.selectedKey});}),{hoverProps:w,isHovered:T}=useHover({isDisabled:s}),P=useMemo(()=>{let A=k.collection.getItem(k.selectedKey),ee=A?.textValue||A?.["aria-label"],V=A?.value,W=V?.icon,X={size:i,isSelected:S,onPress:ze=>{N(!S),c?.(ze);},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&&W?jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:ee,placement:"bottom start",offset:4,...typeof g=="function"?g("button"):g,children:jsx(be,{icon:W,"aria-label":ee,variant:"toolbar",...X})}):jsx(Lr,{iconStart:W,label:ee,variant:"toolbar",...X})},[l,n,S,s,c,b,y,N,i,k.collection,k.selectedKey,g]),C=h["aria-label"],E=useCallback(({buttonProps:A,ref:ee})=>{delete A["aria-labelledby"];let V=f||`${x(aI.more)} ${C}`;return jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:V,placement:"bottom start",offset:4,...g,children:jsx(PressResponder,{...A,children:jsx(B,{"aria-label":V,ref:ee,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:W})=>classNames(Nr({isSelected:S,isFocusVisible:W}),Ff,v),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[C,l,x,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":k.isOpen}),D=ae(R),K=useMemo(()=>({state:k,popoverAnchorRef:D}),[k,D]),j=useCallback(A=>typeof b=="function"?b(A,{isButton:!1,isSelected:k.selectionManager.isSelected(A.id)}):b,[b,k.selectionManager]),G=useCallback(A=>typeof y=="function"?y(A,{isButton:!1,isSelected:k.selectionManager.isSelected(A.id)}):y,[y,k.selectionManager]);return jsx(Fr.Provider,{value:K,children:jsxs(L,{...w,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(Df,"BaselineUI-ButtonSelect",e),"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],"aria-describedby":h["aria-describedby"],"aria-details":h["aria-details"],style:o,ref:D,...H,children:[P,jsx(Xe,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:t,...h,style:{width:20},optionClassName:j,optionStyle:G,variant:"ghost",renderTrigger:E})]})})});Of.displayName="ButtonSelect";var aI=$({more:{id:"more",defaultMessage:"More"}});var jf=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:[]}),Af=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:[]}),$f=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ik _1yep5z6il _1yep5z6im _1yep5z6l9",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z6106",warning:"_1yep5z610e"},isReadOnly:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]}),Uf=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"]]}),qf=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610q"}},defaultVariants:{},compoundVariants:[]}),Kf=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"]]}),Gf=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lf",variantClassNames:{isFocusVisible:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isHovered:{true:"_1yep5z611w _1yep5z613t _1yep5z6177"},isOpen:{true:"_1yep5z613t _1yep5z6177"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isHovered:!0},"_1yep5z61no _1yep5z61pl _1yep5z61sz"],[{isOpen:!0},"_1yep5z61pl _1yep5z61sz"]]});var Yf=ro.forwardRef(({className:e,style:o,inputStyle:t,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:u=!1,labelPosition:m="top",validationState:d="valid",variant:f="primary",toggleLabel:y,renderOption:b,showIcon:v=!0,filter:_,minValue:g,maxValue:h,inputType:R="text",...x},I)=>{let{contains:k}=useFilter({sensitivity:"base"}),S=te(),N=useComboBoxState({...x,defaultFilter:_||k,defaultItems:s,onSelectionChange:l,onInputChange:c,children:S,validationState:u?"invalid":"valid"}),w=ro.useRef(null),T=ro.useRef(null),P=ro.useRef(null),C=ro.useRef(null),E=ro.useRef(null),{buttonProps:H,inputProps:D,listBoxProps:K,labelProps:j,errorMessageProps:G,descriptionProps:A,validationErrors:ee}=useComboBox({...x,inputRef:T,defaultItems:s,buttonRef:w,listBoxRef:P,popoverRef:C,validationState:d==="error"?"invalid":"valid"},N),V=x.errorMessage||ee.join(" "),W=Ie({...x,errorMessage:V,descriptionProps:A,errorMessageProps:G,labelPosition:m});V&&(d="error");let{hoverProps:X,isHovered:ze}=useHover({isDisabled:x.isDisabled}),{isFocused:Ce,focusProps:Pe,isFocusVisible:ke}=useFocusRing(),He=Fo({isReadOnly:x.isReadOnly,validationState:d}),oe=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":d,"data-focused":Ce,"data-focus-visible":ke}),{labelProps:de,fieldProps:it}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]});return jsx(ao.Provider,{value:N,children:jsxs("div",{className:classNames(jf({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:o,ref:I,children:[i||m==="start"&&W?jsxs("div",{className:Kf({labelPosition:m,hasMessage:!!W}),children:[jsx("label",{...mergeProps(j,de),className:qf({isDisabled:x.isDisabled}),children:i}),m==="start"&&W]}):null,jsxs("div",{...X,className:Uf({validationState:d,isHovered:ze,isFocused:Ce,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:E,children:[jsx("input",{...mergeProps(D,Pe,oe,it,R==="number"?{type:"number",min:g,max:h,onKeyDown:to=>{(to.key==="ArrowUp"||to.key==="ArrowDown")&&to.preventDefault();}}:null),ref:T,className:classNames(Af({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:t}),He&&v?jsx(He,{className:$f({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsx(U,{...H,ref:w,variant:"popover",label:y,className:Gf({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&ke,isHovered:!x.isDisabled&&!x.isReadOnly&&ze,isOpen:N.isOpen})})]}),jsx(ye,{className:qe,ref:C,triggerRef:E,state:N,children:jsx(le,{...K,items:s,ref:P,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:kr})}),m==="top"&&W]})})});Yf.displayName="ComboBox";var Fi=ro.forwardRef(({item:e,renderGridItem:o,state:t},r)=>{let a=ae(r),n=useGridListItem({node:e},t,a),i=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:s}=useGridListSelectionCheckbox({key:e.key},t);return o(e,{...n,checkBoxProps:i?s:void 0},a)});Fi.displayName="GridListItem";var hI=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},Qf=ro.forwardRef(({className:e,style:o,isEditing:t=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,...i},s)=>{let p=te(),l=useListState({...i,children:p}),c=ae(s),{gridProps:u}=useGridList(i,l,c);useImperativeHandle(n,()=>({setFocused:d=>{l.selectionManager.setFocused(d);},setFocusedKey:d=>{l.selectionManager.setFocusedKey(d);}}),[l]);let m=t?hI:u.onKeyDownCapture;return jsx("ul",{...u,className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,onKeyDownCapture:m,children:[...l.collection].map(d=>jsx(Fi,{item:d,state:l,renderGridItem:i.renderGridItem},d.key))})});Qf.displayName="GridList";var Jf="_1yep5z6f5",ey="_1dc3b8m0";var oy=ro.forwardRef(({className:e,selectionMode:o,style:t,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...p},l)=>{let c=ae(l),u=te(),m=useListState({...p,selectionMode:o,suppressTextValueWarning:!0,children:u}),{actionGroupProps:d}=useActionGroup({...p,selectionMode:o,children:u},m,c),f=[...m.collection].map(y=>(invariant(y.value),jsx(SI,{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:t,ref:c,children:[jsx(i,{size:24,className:Jf}),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:t,ref:c,children:f})});oy.displayName="ActionGroup";var SI=({item:e,state:o,tooltipProps:t,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},o),s=n||o.selectionManager.isDisabled(e.key),p=o.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof t=="function"?t(e.value):t),[t,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(ne,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(B,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[ey]:p},"BaselineUI-ActionGroup-Item")})})})};var ty="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",ry="_1yep5z61qa _1yep5z61qb _1yep5z61qc _1yep5z61gz _1yep5z61h0 _1yep5z61h1";var ny=ro.forwardRef(({className:e,style:o,items:t,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:u,labelPosition:m="top","data-block-id":d,"data-block-class":f,...y},b)=>{let v=useMemo(()=>t.map(g=>({id:g.color,label:g.label})),[t]),_=useId();return useEffect(()=>{!a&&!y["aria-label"]&&!y["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,y]),jsxs(L,{...Na(y),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:o,ref:b,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:_,type:"label",size:"sm",children:a}):null]}):null,jsx(le,{className:classNames(ry,r),selectionMode:"single",items:v,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?v.map(g=>g.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:g=>{p?.([...g][0]);},optionClassName:c,optionStyle:u,renderOption:({key:g,textValue:h},{isSelected:R,isFocusVisible:x,isDisabled:I,optionProps:k},S)=>jsx("li",{...k,"data-disabled":I,className:classNames(ty,k.className),ref:S,children:jsx(Ze,{isFocusVisible:x,color:g,isSelected:R,"aria-label":h,isInteractive:!0,isDisabled:I})}),...y,"aria-labelledby":a?_:y["aria-labelledby"]})]})});ny.displayName="ColorSwatchPicker";var iy="_10dw1p96",sy="_10dw1p95",ly=z({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ih _1yep5z6ii _1yep5z6ij _1yep5z6iq _1yep5z6ir _1yep5z6is _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6lf _1yep5z6l2 _1yep5z6kz",variantClassNames:{isSelected:{true:"_1yep5z611v"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z613h _1yep5z617a _1yep5z6178"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isSelected:!1,isRenaming:!1},"_1yep5z61nm _1yep5z61pf _1yep5z61t1 _1yep5z61t0"]]});var dy=({context:e,depth:o,children:t,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:p,primaryActionAriaLabel:l,secondaryActionAriaLabel:c,onRename:u,onAction:m,renderItemTitle:d=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 h=createFocusManager(v),R=useCallback(P=>{if(P.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))v.current?.setAttribute("tabindex","-1"),P.preventDefault(),P.stopPropagation(),h.focusNext();else switch(P.key){case"ArrowLeft":{h.focusPrevious()?(P.preventDefault(),P.stopPropagation()):(_?.(P),e.focusItem(!0));break}case"Enter":{e.toggleExpandedState();break}default:_?.(P);}},[e,h,_,r,v]),x=useMemo(()=>{let P=s,C=p,E=typeof l=="function"?l(r.index):l,H=typeof c=="function"?c(r.index):c;return P||C?jsxs(L,{display:"flex",flexDirection:"row",children:[P?jsx(be,{icon:P,"aria-label":E,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,C?jsx(be,{icon:C,"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]),I=useCallback(P=>{P.key==="Enter"?(u?.({key:r.index,value:P.target.value}),e.stopRenamingItem()):P.key==="Escape"?(e.stopRenamingItem(),v.current?.setAttribute("tabindex","0"),v.current?.focus()):P.key!=="ArrowRight"&&P.key!=="ArrowLeft"&&P.key!=="ArrowUp"&&P.key!=="ArrowDown"&&!P.metaKey&&P.continuePropagation();},[r.index,e,u,v]),k=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,ly({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":o,"aria-level":o+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:v,children:jsxs(L,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?x:null,jsxs(L,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(L,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${o*2} * ${themeVars.spacing.lg})`},children:[jsx(B,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":f(e.isExpanded?ji.collapse:ji.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(iy,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),k?jsx(k,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(L,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:P=>{S&&(P.stopPropagation(),P.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:P=>{P.stopPropagation();},children:jsx(Ke,{defaultValue:r.data.label,autoFocus:!0,onBlur:P=>{u?.({key:r.index,value:P.target.value}),e.stopRenamingItem();},"aria-label":f(ji.rename),onKeyDown:I,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"?x:null]})}),t]})},ji=$({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function JI(e,{posInset:o,setSize:t}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:o,setSize:t},isFolder:!!e.children?.length}}function ew(e,o){let t={};function r(a,n,i){if(t[a.id]=o(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),t}var yy=ro.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:u,actionsPosition:m="start",onRename:d,onAction:f,renderItemTitle:y,...b},v)=>{let _=te(),g=useRef(null),h=useTreeState({...b,items:a.children,children:_}),R=useMemo(()=>Object.fromEntries(Object.entries(ew(a,JI)).map(([w,T])=>[w,{...T,canRename:!!d}])),[a,d]),x=useId(),[I,k]=ro.useState(a.children?.[0]?.id??""),S=useRef(I),N=useMemo(()=>({[`tree-${x}`]:{focusedItem:I,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[I,h.expandedKeys,h.selectionManager.selectedKeys,x]);return useEffect(()=>{if(!g.current)return;let w=Te(g.current),T=w instanceof ShadowRoot,P=g.current?.contains(w?.activeElement??null);T&&P&&Te(g.current)?.querySelector(`[data-rct-item-id="${I}"]`)?.focus();},[I]),jsx(ControlledTreeEnvironment,{items:R,getItemTitle:w=>w.data?.label,viewState:N,onExpandItem:w=>{h.setExpandedKeys(new Set([...h.expandedKeys,w.index])),b.onExpand?.(w.index.toString());},onFocusItem:w=>{k(w.index),w.index&&(S.current=w.index);},onCollapseItem:w=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(T=>T!==w.index))),b.onCollapse?.(w.index.toString());},onSelectItems:w=>{h.selectionManager.setSelectedKeys(new Set(w));},renderItem:w=>jsx(dy,{...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(Ae,{children:jsx(VisuallyHidden,{children:w})}),renderTreeContainer:({containerProps:w,children:T})=>jsx("div",{...vo(w,{onBlur:P=>{P.currentTarget.contains(P.relatedTarget)||P.currentTarget.querySelector(`[data-key="${S.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":t,"data-block-class":r,style:{...o,...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-${x}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});yy.displayName="TreeView";var sw=forwardRef(({className:e,isCollapsible:o=!1,...t},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:o,ref:a,id:n,...t})});sw.displayName="Panel";var fw=forwardRef(({className:e,...o},t)=>{let r=useRef(null);return useImperativeHandle(t,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...o})});fw.displayName="PanelGroup";var by="_6abhjk0";var vw=({className:e,isDisabled:o=!1,...t})=>jsx(PanelResizeHandle,{disabled:o,className:classNames(by,"BaselineUI-PanelResizeHandle",e),...t});vw.displayName="PanelResizeHandle";
|
|
55
55
|
|
|
56
|
-
export {
|
|
56
|
+
export { Sc as Accordion, Fc as AccordionItem, U as ActionButton, oy as ActionGroup, SI as ActionGroupItem, B as ActionIconButton, _a as AlertDialog, zf as AudioPlayer, $o as Avatar, L as Box, Of as ButtonSelect, Qp as Checkbox, Ko as ColorInput, Ze as ColorSwatch, ny as ColorSwatchPicker, Yf as ComboBox, pc as DateFormat, ue as Dialog, Nl as DialogTitle, Ms as DomNodeRenderer, hr as Drawer, Jm as Editor, hp as FileUpload, mu as FreehandCanvas, Qf as GridList, Au as Group, Js as I18nProvider, nu as IconColorInput, Qr as IconColorInputButton, Uc as IconSelect, Ul as IconSlider, wu as ImageDropZone, Bf as ImageGallery, fd as InlineAlert, up as Link, le as ListBox, cf as Markdown, wr as Menu, ju as MessageFormat, we as Modal, Yz as ModalClose, Ee as ModalContent, jr as ModalTrigger, Ho as NumberFormat, Me as NumberInput, lc as Pagination, sw as Panel, fw as PanelGroup, vw as PanelResizeHandle, Ne as Popover, Re as PopoverContent, Le as PopoverTrigger, Ae as Portal, rl as PortalContainerProvider, Lu as Preview, Tp as ProgressBar, Oo as ProgressSpinner, Ou as RadioGroup, Hp as Reaction, rf as ScrollControlButton, np as SearchInput, Xe as Select, O as Separator, Lo as Slider, ep as Switch, nd as TabItem, ad as Tabs, _c as TagGroup, Q as Text, Ke as TextInput, To as ThemeProvider, Lr as ToggleButton, be as ToggleIconButton, ia as Toolbar, ne as Tooltip, Cu as Transform, ga as Transition, yy as TreeView, $ as defineMessages, vT as isInsideOverlayContent, ws as isRect, wo as useDevice, F as useI18n, ko as useImage, Gs as useIntersectionObserver, Io as useIsFirstRender, ol as useLocalStorage, pL as useMutationObserver, ge as usePortalContainer, Ws as useResizeObserver, bL as useTextSelection, Ys as useUndoRedo, Xa as useUserPreferences };
|