@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.js CHANGED
@@ -14,9 +14,9 @@ var _8 = require('@baseline-ui/icons/8');
14
14
  var _16 = require('@baseline-ui/icons/16');
15
15
  var focus = require('@react-aria/focus');
16
16
  var dynamic = require('@vanilla-extract/dynamic');
17
- var Fb = require('lodash/isEmpty');
17
+ var Hb = require('lodash/isEmpty');
18
18
  var _20 = require('@baseline-ui/icons/20');
19
- var Dv = require('react-dom');
19
+ var Fv = require('react-dom');
20
20
  var _12 = require('@baseline-ui/icons/12');
21
21
  var interactions = require('@react-aria/interactions');
22
22
  var color = require('@react-stately/color');
@@ -31,11 +31,11 @@ var plateFont = require('@udecode/plate-font');
31
31
  var plateParagraph = require('@udecode/plate-paragraph');
32
32
  var plateLink = require('@udecode/plate-link');
33
33
  var cn$1 = require('@udecode/cn');
34
- var Fm = require('dompurify');
34
+ var Hm = require('dompurify');
35
35
  var slateHyperscript = require('slate-hyperscript');
36
36
  var plateCombobox = require('@udecode/plate-combobox');
37
37
  var slateReact = require('slate-react');
38
- var C0 = require('markdown-it');
38
+ var P0 = require('markdown-it');
39
39
  var liveAnnouncer = require('@react-aria/live-announcer');
40
40
  var actiongroup = require('@react-aria/actiongroup');
41
41
  var reactComplexTree = require('react-complex-tree');
@@ -62,10 +62,10 @@ function _interopNamespace(e) {
62
62
  }
63
63
 
64
64
  var ro__default = /*#__PURE__*/_interopDefault(ro);
65
- var Fb__default = /*#__PURE__*/_interopDefault(Fb);
66
- var Dv__default = /*#__PURE__*/_interopDefault(Dv);
67
- var Fm__namespace = /*#__PURE__*/_interopNamespace(Fm);
68
- var C0__default = /*#__PURE__*/_interopDefault(C0);
65
+ var Hb__default = /*#__PURE__*/_interopDefault(Hb);
66
+ var Fv__default = /*#__PURE__*/_interopDefault(Fv);
67
+ var Hm__namespace = /*#__PURE__*/_interopNamespace(Hm);
68
+ var P0__default = /*#__PURE__*/_interopDefault(P0);
69
69
 
70
70
  /**
71
71
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
@@ -76,9 +76,9 @@ var C0__default = /*#__PURE__*/_interopDefault(C0);
76
76
  * This notice may not be removed from this file.
77
77
  *
78
78
  */
79
- var xe=typeof document<"u"?ro__default.default.useLayoutEffect:()=>{};function ka(e){let o=ro.useRef(null);return xe(()=>{o.current=e;},[e]),ro.useCallback((...t)=>{let r=o.current;return r?.(...t)},[])}function Ia(e){let[o,t]=ro.useState(e),r=ro.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__default.default.createContext(Jt),Py=ro__default.default.createContext(!1);var ky=!!(typeof window<"u"&&window.document&&window.document.createElement),wa=new WeakMap;function Iy(e=!1){let o=ro.useContext(ji),t=ro.useRef(null);if(t.current===null&&!e){var r,a;let n=(a=ro__default.default.__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=ro.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__default.default.useId(),[t]=ro.useState(Ai()),r=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Jt.prefix}`;return e||`${r}-${o}`}var Sa=typeof ro__default.default.useId=="function"?Ry:wy;function Sy(){return !1}function Ty(){return !0}function Ny(e){return ()=>{}}function Ai(){return typeof ro__default.default.useSyncExternalStore=="function"?ro__default.default.useSyncExternalStore(Ny,Sy,Ty):ro.useContext(Py)}var Dy=!!(typeof window<"u"&&window.document&&window.document.createElement),er=new Map;function or(e){let[o,t]=ro.useState(e),r=ro.useRef(null),a=Sa(o),n=ro.useCallback(i=>{r.current=i;},[]);return Dy&&er.set(a,n),xe(()=>{let i=a;return ()=>{er.delete(i);}},[a]),ro.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=ro.useRef(null);return ro.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;ro.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)?jsxRuntime.jsx(reactStately.Section,{items:e.children,title:e.title,"aria-label":e.title,children:o=>jsxRuntime.jsx(reactStately.Item,{textValue:o.label,children:o.label},o.id)},e.id):jsxRuntime.jsx(reactStately.Item,{textValue:e.label,children:e.label},e.id)}function te(){return ro.useCallback(e=>Wy(e),[])}function Zi(e,o,t){let{direction:r}=reactAria.useLocale(),a=reactStately.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 utils.invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});reactAria.useDraggableCollection(e,a,t);let n=reactStately.useDroppableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:i}=reactAria.useDroppableCollection({...e,keyboardDelegate:new reactAria.ListKeyboardDelegate({collection:o.collection,disabledKeys:o.disabledKeys,ref:t,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new reactAria.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__default.default.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}=reactAria.useSeparator({...p,orientation:r,elementType:n});return jsxRuntime.jsx(n,{...c,className:utils.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 tokens.sprinkles.properties.has(e)}var M=ro__default.default.forwardRef(({elementType:e="div",children:o,...t},r)=>{let a=e,{sprinkleProps:n,domProps:i}=ro.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 jsxRuntime.jsx(a,{...i,className:utils.classNames(tokens.sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:o})});M.displayName="Box";var pt=ro__default.default.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)=>{utils.invariant(e.value&&vo(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=reactAria.useHover({isDisabled:o}),v=utils.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 jsxRuntime.jsxs("li",{...reactAria.mergeProps(a,y,v),className:utils.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:[jsxRuntime.jsxs(M,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsxRuntime.jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsxRuntime.jsx(_24.CheckmarkIcon,{size:24}):null}):null,d?jsxRuntime.jsx(d,{size:24}):null,jsxRuntime.jsx("span",{...p,children:f})]}),i?jsxRuntime.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:jsxRuntime.jsx("li",{...p,ref:c,"data-drop-target":i,className:utils.classNames(os({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:t}),...n})=>{let i=ro__default.default.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=reactAria.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}=reactAria.useDraggableItem({key:e.key},r);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ha,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),o(n),t.collection.getKeyAfter(e.key)==null&&jsxRuntime.jsx(Ha,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};ds.displayName="DraggableListOption";var ct=ro__default.default.forwardRef(({item:e,renderOption:o=(m,d,f)=>jsxRuntime.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__default.default.useRef(null),d=reactAria.useOption({key:e.key},r,m),{value:f}=e;utils.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?jsxRuntime.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:{...reactAria.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__default.default.useRef(null),{itemProps:l,groupProps:c,headingProps:u}=reactAria.useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=o.collection.getChildren?.(e.key);utils.invariant(m,"children must be defined");let{value:d}=e;utils.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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e.key===o.collection.getFirstKey()?null:jsxRuntime.jsx(O,{UNSAFE_omitRole:!0}),jsxRuntime.jsxs("li",{...l,style:{...l.style,...f},className:utils.classNames(is,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsxRuntime.jsx(M,{...u,className:utils.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,jsxRuntime.jsx("ul",{...c,children:[...m].map(b=>jsxRuntime.jsx(ct,{item:b,state:o,...s},b.key))})]})]})};var ao=ro__default.default.createContext(null),Va=ro__default.default.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__default.default.useRef(null),{direction:b}=reactAria.useLocale(),v=ro__default.default.useRef(null),{listBoxProps:_}=reactAria.useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new reactAria.ListKeyboardDelegate({collection:u.collection,ref:v,layout:o,orientation:t,direction:b,disabledKeys:u.disabledKeys})},u,v),g=ro.useCallback((P,C)=>{let E=v.current?.querySelector(`[data-key="${P}"][role="option"]`);E&&E?.scrollIntoView({block:"nearest",inline:"nearest",...C});},[]);ro.useImperativeHandle(m,()=>({scrollIntoView:g}),[g]),granularHooks.useGranularEffect(()=>{let P=Te(v.current)instanceof ShadowRoot,C=u.selectionManager.focusedKey;P&&C&&g(C);},[u.selectionManager.focusedKey],[g]);let h=web.useReducedMotion(),R=ro.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}=reactAria.useFocusRing(),T=utils.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 jsxRuntime.jsxs("ul",{...reactAria.mergeProps(_,w,T,x),className:utils.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"?jsxRuntime.jsx(ys,{...C,section:P}):jsxRuntime.jsx(ct,{...C,item:P})}),l?jsxRuntime.jsx(reactAria.DragPreview,{ref:y,children:l}):null]})});Va.displayName="ListBoxCore";var gs=ro__default.default.forwardRef((e,o)=>{let t=te(),r=reactStately.useListState({...e,children:t});return jsxRuntime.jsx(Va,{...e,ref:o,state:r})});gs.displayName="ListBoxStandalone";var le=ro__default.default.forwardRef((e,o)=>{let t=ro.useContext(ao);return ro.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?jsxRuntime.jsx(Va,{...e,ref:o,state:t}):jsxRuntime.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__default.default.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...o})=>{let t=ro__default.default.useRef(null),r=reactStately.useOverlayTriggerState(o),a=reactAria.useOverlayTrigger(o,r),n=ro.useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:t}),[r,a]);return jsxRuntime.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__default.default.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:o})=>{let{state:t,overlayTriggerAria:r,triggerRef:a}=ro.useContext(dt);utils.invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=ro.useMemo(()=>({...n,isSelected:t.isOpen,ref:a}),[n,t.isOpen,a]);return utils.invariant(!o&&e||o&&!e,"Either one of anchorRect or children has to be provided."),utils.invariant(!o||Is(o),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsxRuntime.jsx(ir.Provider,{value:i,children:o?jsxRuntime.jsx("button",{className:utils.classNames(Cs,"BaselineUI-PopoverTrigger-Hidden"),style:o,ref:a,tabIndex:-1},JSON.stringify(o)):e})};function sr({tooltip:e,...o},t){let[r,a]=ro.useState(o["aria-label"]||""),n=o["aria-labelledby"];return ro.useEffect(()=>{if(n){let p=fe(t.current).querySelector(`#${n}`);p&&a(p.textContent||"");}},[n,t]),{tooltipProps:ro.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__default.default.useRef(null),{ref:t,...r}=ro.useContext(ir)||{},{buttonProps:a,isPressed:n}=reactAria.useButton({...e,...r},o),{isFocusVisible:i,isFocused:s,focusProps:p}=reactAria.useFocusRing(),{hoverProps:l,isHovered:c}=reactAria.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__default.default.useRef(null),{ref:r,...a}=ro.useContext(ir)||{},{buttonProps:n,isPressed:i}=reactAria.useToggleButton({...e,...a},o,t);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=reactAria.useFocusRing(),{hoverProps:c,isHovered:u}=reactAria.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__default.default.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=utils.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 jsxRuntime.jsxs(i,{...reactAria.mergeProps(d,R),className:utils.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&&jsxRuntime.jsx(r,{size:h,className:ja({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsxRuntime.jsx(a,{size:h,className:ja({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsxRuntime.jsx(_8.CaretDownIcon,{size:8,className:nr})]})});U.displayName="ActionButton";var Ls=ro__default.default.forwardRef(({className:e,style:o,node:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=ro__default.default.useRef(null);ro__default.default.useEffect(()=>{let c=s.current;return c?.append(t),()=>{c?.contains(t)&&t.remove();}},[t]);let{pressProps:p,isPressed:l}=reactAria.usePress(n);return jsxRuntime.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?jsxRuntime.jsx("div",{...t,className:ho({isDisabled:i,labelPosition:n}),children:e}):a?jsxRuntime.jsx("div",{...o,className:ho({hasError:!0,labelPosition:n}),children:a}):r?jsxRuntime.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__default.default.forwardRef(({children:e,state:o,overlayProps:t,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=reactAria.useTooltip({isOpen:o.isOpen},o),u=ro.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=web.useReducedMotion(),[d]=web.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 jsxRuntime.jsxs(web.animated.span,{...t,style:{...d,...t.style},ref:l,"data-placement":f,children:[p?jsxRuntime.jsx("div",{className:As({placement:f,variant:n}),...r}):null,jsxRuntime.jsx("div",{...reactAria.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__default.default.useRef(null);ro.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]),ro.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__default.default.useRef(null),[a,n]=ro__default.default.useState();return ro__default.default.useEffect(()=>{if(t){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),o?.(i);});},[o,t,n]),ro__default.default.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]=ro.useState(!1),[a,n]=ro.useState(!1),[i,s]=ro.useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return ro.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=ro.useRef(!0);return ro.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]=ro.useReducer(Eb,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=y=>{n({type:Ws,data:y});},c=ro.useRef(),u=()=>{c.current=mr,n({type:mr});},m=()=>{c.current=fr,n({type:fr});},d=!!i?.length,f=!!p?.length;return granularHooks.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__default.default.createContext({messages:{},shouldLogMissingMessages:!0}),Qs=({children:e,messages:o={},shouldLogMissingMessages:t=!0,...r})=>{let a=ro__default.default.useMemo(()=>({messages:o,shouldLogMissingMessages:t}),[o,t]);return jsxRuntime.jsx(reactAria.I18nProvider,{...r,children:jsxRuntime.jsx(Ga.Provider,{value:a,children:e})})};Qs.displayName="I18nProvider";function F(e){let{messages:o,shouldLogMissingMessages:t}=ro.useContext(Ga);ro.useEffect(()=>{!e&&Fb__default.default(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=reactAria.useMessageFormatter(e?utils.cleanKeyFromGlobImport(e):o),a=reactAria.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__default.default.useRef(null);return ro__default.default.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]=ro.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__default.default.useRef(null);reactAria.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();}}),ro.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=ro.useCallback(()=>{let a=re(e??document.body),n=a.matchMedia(tokens.queries.tablet);return a.matchMedia(tokens.queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[t,r]=ro__default.default.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__default.default.createContext(void 0),tl=({portalContainer:e,children:o})=>jsxRuntime.jsx(Wa.Provider,{value:e,children:o});tl.displayName="PortalContainerProvider";function ge(e){let o=ro.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]=ro.useState("light"),[r,a]=ro.useState(!1),[n,i]=ro.useState(!1),[s,p]=ro.useState(!1);return ro.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]),ro.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]),ro.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]),ro.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=ro.createContext({theme:tokens.lightTheme,setTheme:()=>{}});var il="var(--hj25q10)";var gr={LIGHT:{name:"light",theme:tokens.lightTheme},DARK:{name:"dark",theme:tokens.darkTheme}},So=ro__default.default.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}=reactAria.useLocale(),{colorScheme:c,reducedMotion:u,highContrast:m,transparency:d}=Xa(),{name:f,theme:y}=ro.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},_=ro.useMemo(()=>({theme:y,setTheme:t}),[y,t]);return jsxRuntime.jsx(Ro.Provider,{value:_,children:jsxRuntime.jsx("div",{...reactAria.mergeProps(n,v),className:utils.classNames(al,"BaselineUI-ThemeProvider",r),style:{...dynamic.assignInlineVars(tokens.themeVars,y),...dynamic.assignInlineVars({[il]:l==="rtl"?"-1":"1"}),...a},ref:p,children:o})})});So.displayName="ThemeProvider";var Ae=ro__default.default.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=ro.useContext(Ro);return jsxRuntime.jsx(reactAria.Overlay,{...n,children:jsxRuntime.jsx(So,{ref:i,theme:s,style:o,className:utils.classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:t})})});Ae.displayName="Portal";var ne=ro__default.default.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__default.default.useRef(null),y=ro__default.default.useRef(null),b=!m.text||m.isDisabled,v=reactStately.useTooltipTriggerState({...m,delay:t,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:g}=reactAria.useTooltipTrigger({...m,isDisabled:b,delay:t,closeDelay:r},v,f),h=ge(s),{overlayProps:R,arrowProps:x,placement:I,updatePosition:k}=reactAria.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}),jsxRuntime.jsxs(focus.FocusableProvider,{..._,ref:f,children:[e,v.isOpen?jsxRuntime.jsx(Ae,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":u,children:jsxRuntime.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__default.default.forwardRef((e,o)=>{let t=ae(o),{tooltipProps:r}=sr(e,t);return r?jsxRuntime.jsx(ne,{...r,children:jsxRuntime.jsx(Za,{...e,ref:t})}):jsxRuntime.jsx(Za,{...e,ref:t})});B.displayName="ActionIconButton";var Za=ro__default.default.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"];ro.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}),_=utils.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 jsxRuntime.jsxs(i,{...reactAria.mergeProps(u,_),className:utils.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:[jsxRuntime.jsx(t,{role:"presentation",size:zg[r]}),a==="popover"&&jsxRuntime.jsx(_8.CaretDownIcon,{size:8,className:nr})]})});Za.displayName="ActionIconButtonCore";var Me=ro__default.default.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=ro__default.default.useRef(null),{locale:p}=reactAria.useLocale(),l=reactStately.useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:u}=reactAria.useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:f}=reactAria.useFocusRing(),{labelProps:y,decrementButtonProps:b,inputProps:v,incrementButtonProps:_,groupProps:g,descriptionProps:h,errorMessageProps:R}=reactAria.useNumberField(n,l,s),x=ro.useMemo(()=>n.isReadOnly?_16.ReadOnlyIcon:n.isInvalid?_16.ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),I=Ie({description:n.description,errorMessageProps:R,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:t,isDisabled:n.isDisabled}),k=utils.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 jsxRuntime.jsxs("div",{style:o,className:utils.classNames(je({labelPosition:t}),"BaselineUI-NumberInput",e),...k,ref:i,children:[n.label?jsxRuntime.jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!I}),children:[jsxRuntime.jsx("label",{...y,className:Ve,children:n.label}),t==="start"&&I]}):null,jsxRuntime.jsxs("div",{className:utils.classNames({[wo]:n.isDisabled}),children:[jsxRuntime.jsxs("div",{...reactAria.mergeProps(g,c),className:utils.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:[jsxRuntime.jsx("input",{...reactAria.mergeProps(v,m),ref:s,className:utils.classNames("BaselineUI-NumberInput-Input",dr({isDisabled:n.isDisabled,labelPosition:t}))}),x?jsxRuntime.jsx(x,{className:xo({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxRuntime.jsxs("div",{className:Os({isHoveredOrFocused:u||f,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsxRuntime.jsx(B,{variant:"secondary",size:"xxs",icon:_8.MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsxRuntime.jsx(O,{style:{height:16},orientation:"vertical"}),jsxRuntime.jsx(B,{variant:"secondary",size:"xxs",icon:_8.PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),t==="top"&&I]})]})});Me.displayName="NumberInput";var No=ro__default.default.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__default.default.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=reactAria.useNumberFormatter(a),S=reactStately.useSliderState({...I,numberFormatter:k}),{trackProps:N,groupProps:w,labelProps:T}=reactAria.useSlider(I,S,x),P=jsxRuntime.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 jsxRuntime.jsxs("div",{...w,style:o,"data-block-id":f,"data-block-class":y,className:utils.classNames(Ms,"BaselineUI-Slider",e),children:[_?jsxRuntime.jsxs("div",{className:Bs,children:[jsxRuntime.jsx("label",{...T,className:utils.classNames(Ds({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?P:null]}):null,jsxRuntime.jsxs("div",{className:Es,children:[jsxRuntime.jsx("div",{...N,className:utils.classNames(Hs,"BaselineUI-Slider-Track"),ref:L(x,R),"data-testid":"track",children:jsxRuntime.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__default.default.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=reactAria.useSliderThumb({trackRef:o,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=reactAria.useFocusRing(),{hoverProps:u,isHovered:m}=reactAria.useHover({isDisabled:t}),d=utils.filterTruthyValues({"data-disabled":t,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:utils.classNames(Vs({isDisabled:t,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxRuntime.jsx("div",{...reactAria.mergeProps(n,u,d),className:utils.classNames(Fs({isDisabled:t,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{ref:a,...reactAria.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__default.default.forwardRef(({elementType:e="span",type:o="title",children:t,size:r="md",...a},n)=>jsxRuntime.jsx(e,{...a,className:utils.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__default.default.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__default.default.useRef(null),{dialogProps:d,titleProps:f}=reactAria.useDialog(l,m),{focusProps:y,isFocusVisible:b}=reactAria.useFocusRing();return jsxRuntime.jsxs("div",{...reactAria.mergeProps(d,y),className:utils.classNames(gl({background:r,isFocusVisible:b}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:o,ref:L(c,m),children:[jsxRuntime.jsxs(M,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:vl,children:[jsxRuntime.jsx(Q,{type:"title",size:"sm",...f,className:nl,children:a}),jsxRuntime.jsxs(M,{children:[n?jsxRuntime.jsx(B,{...n,variant:"secondary"}):null,jsxRuntime.jsx(B,{variant:"secondary",size:"md",icon:_20.XIcon,onPress:p,"aria-label":u(Zg.close)})]})]}),jsxRuntime.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=web.useReducedMotion(),[n,i]=ro__default.default.useState("100vh");ro.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]=web.useSpring(()=>({y:0,immediate:a,config:{easing:web.easings.easeOutCubic}})),l=ro.useRef(0),c=ro.useCallback(()=>{p.start({y:l.current,onRest:()=>{o.close();}});},[p,o]),u=ro.useCallback(d=>{d.target.closest("[data-drawer]")||c();},[c]);granularHooks.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__default.default.createContext({state:null,triggerProps:{},overlayProps:{}}),we=({children:e,...o})=>{let t=reactStately.useOverlayTriggerState(o),{triggerProps:r,overlayProps:a}=reactAria.useOverlayTrigger({type:"dialog"},t),n=ro.useMemo(()=>({state:t,triggerProps:r,overlayProps:a}),[t,r,a]);return jsxRuntime.jsx(Ue.Provider,{value:n,children:e})};we.displayName="Modal";var on=ro__default.default.createContext({isDrawer:!1,closeDrawer:()=>{}}),tn=ro__default.default.createContext({setIsPopoverSafelyClosed:()=>{}}),gv=web.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__default.default.useContext(Ue),[u,m]=ro__default.default.useState(!0),d=Io(n),f=ge(n),y=typeof s=="boolean"&&s||s==="auto"&&d==="mobile";utils.invariant(c,"ModalContent must be a child of Modal");let b=ro__default.default.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}=reactAria.useModalOverlay({isDismissable:!y&&u,isKeyboardDismissDisabled:_},c,b),{theme:S}=ro.useContext(Ro),N=web.useReducedMotion(),w=web.useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!N||i,config:{easing:web.easings.easeInBounce}}),T=ro.useMemo(()=>({...I.style,...y?{...h.style,width:"100%"}:w}),[h.style,I.style,y,w]),P=ro.useMemo(()=>({isDrawer:y,closeDrawer:R}),[y,R]),C=ro.useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsxRuntime.jsx(reactAria.Overlay,{portalContainer:f,children:jsxRuntime.jsx(on.Provider,{value:P,children:jsxRuntime.jsx(tn.Provider,{value:C,children:jsxRuntime.jsxs(gv,{className:utils.classNames(Cl({enableDrawer:y}),o),theme:S,"data-block-id":p,"data-block-class":l,style:{...t,height:y?x:"auto",...dynamic.assignInlineVars({[_l]:x})},children:[jsxRuntime.jsx(web.animated.div,{...reactAria.mergeProps(k,g,{onPointerDown:y?g.onPointerDown:k.onPointerDown}),"data-testid":"underlay",style:g.style,className:utils.classNames(Pl,"BaselineUI-Modal-Underlay")}),jsxRuntime.jsx(web.animated.div,{...reactAria.mergeProps(I,h),style:T,ref:b,"data-drawer":y,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})})},_v=web.animated(vv),Ee=({children:e,style:o,...t})=>{let{state:r}=ro__default.default.useContext(Ue);utils.invariant(r,"ModalContent must be a child of Modal");let a=web.useReducedMotion();return web.useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||t.disableAnimation})((i,s)=>s&&jsxRuntime.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__default.default.createContext({titleProps:{}}),ue=ro__default.default.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__default.default.useRef(null),m=ro__default.default.useRef(null),{isDrawer:d,closeDrawer:f}=ro.useContext(on),[y,b]=ro__default.default.useState(""),{focusProps:v,isFocusVisible:_}=reactAria.useFocusRing();ro.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}=reactAria.useDialog(l,u),R=ro.useMemo(()=>({titleProps:h}),[h]);return d&&r?jsxRuntime.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}):jsxRuntime.jsx(an.Provider,{value:R,children:jsxRuntime.jsx("section",{...reactAria.mergeProps(g,v),"data-block-id":i,"data-block-class":s,ref:L(u,c),style:t,className:utils.classNames(Sl({size:d?"content":a,variant:n,isDrawer:d,isFocusVisible:_}),"BaselineUI-Dialog",o),children:e})})});ue.displayName="Dialog";var Tl=ro__default.default.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:a}=ro.useContext(an);return ro__default.default.isValidElement(e)?ro__default.default.cloneElement(e,{...a,ref:r,className:utils.classNames(e.props.className,o),style:{...e.props.style,...t}}):jsxRuntime.jsx("h3",{...a,ref:r,className:o,style:t,children:e})});Tl.displayName="DialogTitle";function Nl({placement:e,isOpen:o}){let t=web.useReducedMotion();return web.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:web.config.stiff})}var Ml=({children:e,isOpen:o,popoverContentRef:t,portalContainer:r=document.body,style:a})=>{let[n,i]=ro.useState(!1),[s,p]=ro.useState(null),l=ro.useRef(null),{setIsPopoverSafelyClosed:c}=ro.useContext(tn);ro.useEffect(()=>{o?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[o]),ro.useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let u=t.current;return ro.useEffect(()=>{u&&p(u.getBoundingClientRect());},[u]),ro.useEffect(()=>{c(!n);},[n,c]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n?Dv__default.default.createPortal(jsxRuntime.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}=tokens.themeVars,ye=ro__default.default.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__default.default.useRef(null),b=ge(p),v=i?8:0,{underlayProps:_,popoverProps:g,placement:h,arrowProps:R}=reactAria.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 jsxRuntime.jsx(Ml,{isOpen:t.isOpen,popoverContentRef:y,portalContainer:b,style:g.style,children:x((k,S)=>S&&jsxRuntime.jsxs(Ae,{portalContainer:b,style:o,ref:f,"data-block-id":u,"data-block-class":m,children:[!d.isNonModal&&jsxRuntime.jsx("div",{..._,className:utils.classNames(Ps,a,"BaselineUI-Popover-Underlay")}),jsxRuntime.jsxs(web.animated.div,{...g,style:{...g.style,...k,...dynamic.assignInlineVars({[ks]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:L(y,f),className:utils.classNames(hs,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(N=>h?.includes(N)),children:[i?jsxRuntime.jsxs("svg",{className:utils.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:[jsxRuntime.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}),jsxRuntime.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,jsxRuntime.jsx(reactAria.DismissButton,{onDismiss:t.close}),jsxRuntime.jsx("div",{...r,style:c,className:utils.classNames(xs,l),children:typeof n=="function"?n(t):n}),jsxRuntime.jsx(reactAria.DismissButton,{onDismiss:t.close})]})]}))})});ye.displayName="PopoverContentCore";var Re=ro__default.default.forwardRef((e,o)=>{let{state:t,overlayTriggerAria:{overlayProps:r},triggerRef:a}=ro.useContext(dt);return utils.invariant(a),t?jsxRuntime.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__default.default.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]=utils$1.useControlledState(p.value,p.defaultValue||0,t),[d,f]=ro__default.default.useState(!1),{keyboardProps:y}=reactAria.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 jsxRuntime.jsxs(M,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:utils.classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:o,ref:c,children:[a?jsxRuntime.jsx(a,{size:24,className:tokens.sprinkles({color:"icon.primary"})}):null,jsxRuntime.jsxs(Ne,{type:"dialog",isOpen:d,onOpenChange:f,children:[jsxRuntime.jsx(Le,{children:jsxRuntime.jsx(ne,{text:p["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,...i,children:jsxRuntime.jsx(U,{label:b,variant:"popover","aria-label":v,style:{fontVariantNumeric:"tabular-nums"}})})}),jsxRuntime.jsx(Re,{placement:"bottom start",...s,className:utils.classNames(qe,s?.className),children:jsxRuntime.jsx(ue,{size:"content","aria-label":v,children:jsxRuntime.jsx(reactAria.FocusScope,{autoFocus:!0,children:jsxRuntime.jsx(M,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...y,children:jsxRuntime.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__default.default.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__default.default.useRef(null),c=reactStately.useToggleState(s),{inputProps:u,isPressed:m}=reactAria.useSwitch(s,c,l),{isFocusVisible:d,focusProps:f}=reactAria.useFocusRing(),{hoverProps:y,isHovered:b}=reactAria.useHover({isDisabled:s.isDisabled}),v=utils.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}),_=jsxRuntime.jsx("div",{className:utils.classNames(Ul({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsxRuntime.jsx("div",{className:utils.classNames(ql({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxRuntime.jsxs("label",{...reactAria.mergeProps(v,y),className:utils.classNames(Gl({labelPosition:t}),"BaselineUI-Switch",e),style:a,ref:p,children:[o?jsxRuntime.jsx("span",{className:utils.classNames(Kl,"BaselineUI-Switch-Label"),children:o}):null,jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...reactAria.mergeProps(u,f),ref:l})}),r?jsxRuntime.jsxs("div",{className:Xl({labelPosition:t}),children:[jsxRuntime.jsx("span",{className:utils.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:_20.SearchIcon,md:_24.SearchIcon,lg:_24.SearchIcon},ap=ro__default.default.forwardRef(({className:e,size:o="md",variant:t="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=ro__default.default.useRef(null),l=reactStately.useSearchFieldState(i),{inputProps:c,clearButtonProps:u}=reactAria.useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:d,isFocused:f}=reactAria.useFocusRing({within:!0,isTextInput:!0}),y=m_[o],b=o==="sm"?_12.XIcon:_16.XIcon,v=utils.filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":f,"data-disabled":i.isDisabled,"data-focus-visible":d});return jsxRuntime.jsxs("div",{...v,className:utils.classNames(op({size:o,isFocused:f,variant:t,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsxRuntime.jsx(y,{size:o==="sm"?20:24}),jsxRuntime.jsx("input",{...reactAria.mergeProps(c,m),className:ep,ref:p}),l.value!==""&&jsxRuntime.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}=reactAria.useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e.key!==t.collection.getFirstKey()&&jsxRuntime.jsx(O,{elementType:"li"}),jsxRuntime.jsxs("li",{...r,children:[e.value?.title?jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("span",{...n,children:e.value.title})}):null,jsxRuntime.jsx("ul",{...a,className:ip,children:[...e.childNodes].map(i=>(utils.invariant(i.type==="item"),jsxRuntime.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__default.default.useRef(null),n=reactAria.useMenuItem({key:e.key},o,a),{isFocusVisible:i,focusProps:s}=reactAria.useFocusRing();return jsxRuntime.jsx(pt,{item:e,liProps:reactAria.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__default.default.forwardRef(({className:e,itemClassName:o,onContentKeyDown:t,...r},a)=>{let n=reactStately.useTreeState(r),i=ro__default.default.useRef(null),{menuProps:s}=reactAria.useMenu(r,n,i),{keyboardProps:p}=reactAria.useKeyboard({onKeyDown:t});return jsxRuntime.jsx("ul",{...reactAria.mergeProps(s,p),className:utils.classNames(np,e),ref:L(i,a),children:[...n.collection].map(l=>l.type==="section"?jsxRuntime.jsx(cn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsxRuntime.jsx(Ir,{item:l,state:n,className:o,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});un.displayName="MenuContent";var wr=ro__default.default.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:_})=>jsxRuntime.jsx(U,{...v,variant:"popover",ref:_}),portalContainer:f,...y},b)=>{let v=ro__default.default.useRef(null),_=ge(f),g=reactStately.useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o}),{menuTriggerProps:h,menuProps:R}=reactAria.useMenuTrigger({isDisabled:r,type:"menu"},g,v),x=te(),I=ro.useMemo(()=>reactAria.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 ro.useEffect(()=>{!m&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,m]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d({buttonProps:I,ref:v}),jsxRuntime.jsx(ye,{triggerRef:v,state:g,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u||2,className:utils.classNames(qe,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsxRuntime.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__default.default.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__default.default.useRef(null),{linkProps:f,isPressed:y}=reactAria.useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:b,isFocused:v,focusProps:_}=reactAria.useFocusRing(),{hoverProps:g,isHovered:h}=reactAria.useHover({isDisabled:u.isDisabled}),R=n,x=utils.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 jsxRuntime.jsx(R,{...reactAria.mergeProps(f,_,g,x),className:utils.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=reactAria.useId(),l=reactAria.useId(),c=reactAria.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=>(utils.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__default.default.forwardRef(({className:e,label:o,description:t,icon:r,variant:a="default",...n},i)=>{let s=ro__default.default.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=up(n),{dropProps:u}=reactAria.useDrop({ref:s,onDrop:async({items:b})=>{let v=b.filter(g=>g.kind==="file").map(async g=>(utils.invariant(g.kind==="file"),g.getFile())),_=await Promise.all(v);n.onValueChange?.(_);}}),{focusProps:m,isFocusVisible:d}=reactAria.useFocusRing(),{hoverProps:f,isHovered:y}=reactAria.useHover({isDisabled:n.isDisabled});return jsxRuntime.jsxs("label",{...reactAria.mergeProps(u,f,c),className:utils.classNames(mp({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:L(i,s),children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...reactAria.mergeProps(m,p)})}),r?jsxRuntime.jsx(r,{size:20,className:yp({disabled:n.isDisabled})}):null,jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:bp({disabled:n.isDisabled,hovered:y}),children:o}),t?jsxRuntime.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__default.default.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=reactAria.useId(),{labelProps:u,progressBarProps:m}=reactAria.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=jsxRuntime.jsx("output",{className:Rp({hasLabel:!!b}),children:m["aria-valuetext"]}),h=t==="error"?n:a;return jsxRuntime.jsxs("div",{...m,style:o,className:utils.classNames(hp,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxRuntime.jsxs("div",{className:xp,children:[jsxRuntime.jsx("label",{...u,className:Pp,children:b}),r?g:null]}):null,jsxRuntime.jsxs("div",{className:wp,children:[jsxRuntime.jsxs("div",{className:Ip,children:[jsxRuntime.jsx("div",{className:kp,children:jsxRuntime.jsx("div",{style:{width:_},className:Cp({variant:t})})}),!b&&r?g:null]}),h?jsxRuntime.jsx("div",{className:ho({hasError:t==="error"}),id:c,children:h}):null]})]})});Sp.displayName="ProgressBar";function Do({isReadOnly:e,validationState:o}){return e?_16.ReadOnlyIcon:o==="error"?_16.ErrorFilledIcon:o==="warning"?_16.WarningFilledIcon:null}var Ke=ro__default.default.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__default.default.useRef(null),{inputProps:m,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=reactAria.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}=reactAria.useHover({isDisabled:l.isDisabled}),{isFocused:R,focusProps:x,isFocusVisible:I}=reactAria.useFocusRing(),k=Do({isReadOnly:l.isReadOnly,validationState:o}),S=utils.filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":o,"data-focused":R,"data-focus-visible":I});return jsxRuntime.jsxs("div",{className:utils.classNames(je({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&_?jsxRuntime.jsxs("div",{className:Oe({labelPosition:a,hasMessage:!!_}),children:[jsxRuntime.jsx("label",{...d,className:Ve,children:l.label}),a==="start"&&_]}):null,jsxRuntime.jsxs("div",{className:utils.classNames({[wo]:l.isDisabled}),children:[jsxRuntime.jsxs("div",{...g,className:Co({validationState:o,isHovered:h,isFocused:R,variant:t,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsxRuntime.jsx("input",{...reactAria.mergeProps(m,x,S),className:utils.classNames(dr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:u}),k?jsxRuntime.jsx(k,{className:xo({validationState:o,isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Ke.displayName="TextInput";var Fo=({value:e,...o})=>{let t=reactAria.useNumberFormatter(o);return jsxRuntime.jsx(jsxRuntime.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__default.default.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"?_20.CheckmarkIcon:_16.CheckmarkIcon);!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__default.default.useRef(null),m=reactStately.useToggleState({...s,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:v}=reactAria.useSwitch({...s,...l},m,u),{focusProps:_,isFocused:g,isFocusVisible:h}=reactAria.useFocusRing(),{hoverProps:R,isHovered:x}=reactAria.useHover({}),I=utils.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 jsxRuntime.jsxs("label",{ref:p,style:t,className:utils.classNames(Np,"BaselineUI-Reaction",e),...I,children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...d,..._,ref:u})}),jsxRuntime.jsxs("div",{...R,className:Lp({isSelected:v,isFocusVisible:h,isHovered:x,isReadOnly:b,isDisabled:y}),children:[jsxRuntime.jsx("div",{className:Ep({isDisabled:y,isReadOnly:b}),children:jsxRuntime.jsx(c,{size:r==="md"?20:16})}),jsxRuntime.jsx("div",{className:Mp({isSelected:m.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsxRuntime.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:[_16.CheckFilledIcon,_16.ErrorAltFilledIcon],md:[_20.CheckFilledIcon,_20.ErrorAltFilledIcon]},Vo=ro__default.default.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}=reactAria.useProgressBar({...i,isIndeterminate:!0}),c=R6[t],u=c/2-2,m=2*u*Math.PI,d=S6[t][r==="success"?0:1];return jsxRuntime.jsxs("div",{className:utils.classNames($p,"BaselineUI-ProgressSpinner",e),ref:s,style:{...dynamic.assignInlineVars({[Op]:`${m}px`}),...o},"data-block-id":a,"data-block-class":n,children:[jsxRuntime.jsxs("div",{...l,className:Up,children:[(r==="active"||r==="inactive")&&jsxRuntime.jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsxRuntime.jsx("circle",{role:"presentation",className:Hp,cx:c/2,cy:c/2,r:u}),r==="active"&&jsxRuntime.jsx("circle",{role:"presentation",className:Vp,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsxRuntime.jsx(d,{className:qp,size:c}),r==="error"&&jsxRuntime.jsx(d,{className:jp,size:c})]}),i.label?jsxRuntime.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__default.default.forwardRef(({className:e,style:o,iconStart:t,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=reactStately.useToggleState(i),{buttonProps:l,isPressed:c,ref:u,isFocusVisible:m,isFocused:d,isHovered:f,uiStateOptions:y}=pr(i,p),b=utils.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 jsxRuntime.jsxs(a,{...reactAria.mergeProps(l,b),className:utils.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?jsxRuntime.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__default.default.forwardRef(({className:e,style:o,label:t,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro__default.default.useRef(null),l=reactStately.useToggleState(i),{isFocusVisible:c,isFocused:u,focusProps:m}=reactAria.useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:v}=reactAria.useCheckbox({...i,children:t},l,p),{hoverProps:_,isHovered:g}=reactAria.useHover({isDisabled:y}),h=utils.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 jsxRuntime.jsxs("label",{...h,className:utils.classNames(Gp({labelPosition:r}),"BaselineUI-Checkbox",e),style:o,ref:s,children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...reactAria.mergeProps(d,m),ref:p})}),jsxRuntime.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?jsxRuntime.jsx(_12.CheckmarkIcon,{size:12}):null,i.isIndeterminate?jsxRuntime.jsx(_12.MinusIcon,{size:12}):null]}),t?jsxRuntime.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:[_12.CaretLeftIcon,_12.CaretRightIcon],sm:[_16.CaretLeftIcon,_16.CaretRightIcon],md:[_20.CaretLeftIcon,_20.CaretRightIcon],lg:[_24.CaretLeftIcon,_24.CaretRightIcon]},sc=ro__default.default.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}=reactAria.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__default.default.useRef(null),v=reactStately.useNumberFieldState({...y,locale:d}),{inputProps:_,decrementButtonProps:g,incrementButtonProps:h,groupProps:R}=reactAria.useNumberField({...y,onKeyDown:D=>{D.key==="Enter"&&b.current?.blur(),u.onKeyDown?.(D);},isDisabled:c},v,b),{hoverProps:x,isHovered:I}=reactAria.useHover({}),{focusProps:k,isFocused:S,isFocusVisible:N}=reactAria.useFocusRing(),w=p==="floating",[T,P]=d5[s],C=utils.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=interactions.useInteractionModality()==="keyboard";return jsxRuntime.jsxs("div",{...reactAria.mergeProps(R,x,C),className:utils.classNames(oc({size:s,variant:p}),"BaselineUI-Pagination",e),style:o,ref:m,children:[l?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.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"&&jsxRuntime.jsx(O,{orientation:"vertical"})]}),jsxRuntime.jsxs("div",{className:Jp({isFocused:S,variant:p,size:s}),"aria-label":f.formatMessage("pageXofY",{arg0:_.value,arg1:v.maxValue}),children:[jsxRuntime.jsx("input",{...reactAria.mergeProps(_,k),ref:b,className:utils.classNames("BaselineUI-Pagination-Input",ec),style:{width:`${_.value?.toString().length||1}ch`}}),jsxRuntime.jsxs("span",{className:tc({isDisabled:c}),children:["/ ",jsxRuntime.jsx(Fo,{value:v.maxValue})]})]}),l?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p==="floating"&&jsxRuntime.jsx(O,{orientation:"vertical"}),jsxRuntime.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=reactAria.useDateFormatter(o);return jsxRuntime.jsx(jsxRuntime.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__default.default.useRef(null),{focusProps:a,isFocusVisible:n}=reactAria.useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:u,allowsSelection:m}=reactAria.useTag({item:e},o,r),d=ro__default.default.useRef(null),{buttonProps:f}=reactAria.useButton(p,d),{hoverProps:y,isHovered:b}=reactAria.useHover({isDisabled:c}),{hoverProps:v,isHovered:_}=reactAria.useHover({isDisabled:c}),g=e.value?.icon,h=e.value?.data?.variant??t;return jsxRuntime.jsx("div",{...reactAria.mergeProps(i,a,v),ref:r,className:utils.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:jsxRuntime.jsxs("div",{...s,className:pc,children:[u?jsxRuntime.jsx(_16.CheckmarkIcon,{size:16,className:xt({variant:h,isDisabled:c,isSelected:u})}):null,!u&&g?jsxRuntime.jsx(g,{size:16,className:xt({variant:h,isDisabled:c,isSelected:u})}):null,e.rendered,l?jsxRuntime.jsx("button",{...reactAria.mergeProps(f,y),className:dc({variant:h,isHovered:b}),children:jsxRuntime.jsx(_12.XIcon,{})}):null]})})};var vc=ro__default.default.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,...n},i)=>{let s=ro.useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),p=te(),l=ro__default.default.useRef(null),c=reactStately.useListState({...n,items:s,children:p}),{gridProps:u}=reactAria.useTagGroup(n,c,l);return jsxRuntime.jsx("div",{...u,className:utils.classNames(cc,"BaselineUI-TagGroup",e),style:o,"data-block-id":t,"data-block-class":r,ref:L(i,l),children:[...c.collection].map(m=>jsxRuntime.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__default.default.forwardRef(({children:e,className:o,style:t},r)=>{let{headers:a}=ro.useContext(Ge),{disabledKeys:n}=ro.useContext(Ge),{keyboardProps:i}=reactAria.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 jsxRuntime.jsx("div",{...i,style:t,className:utils.classNames(_c,o),ref:r,children:ro__default.default.Children.map(e,(s,p)=>ro__default.default.cloneElement(s,{index:p}))})});zn.displayName="AccordionBase";var Ge=ro__default.default.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Rc=ro__default.default.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__default.default.useState(t),u=ro__default.default.useRef(new Map).current,[m,d]=ro__default.default.useState(a);ro.useEffect(()=>{d(m);},[m]),ro.useEffect(()=>{n?.(l);},[l,n]);let f=ro.useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:o,headers:u,expansionMode:m}),[r,l,o,u,m]);return jsxRuntime.jsx(Ge.Provider,{value:f,children:jsxRuntime.jsx(reactAria.FocusScope,{children:jsxRuntime.jsx(zn,{className:i,style:s,ref:p,children:e})})})});Rc.displayName="Accordion";var xn=ro__default.default.forwardRef(({title:e,actions:o,controlId:t,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=ro__default.default.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:f}=ro.useContext(Ge),y=d?.has(r),b=reactAria.useFocusManager();utils.invariant(b);let{focusNext:v,focusPrevious:_}=b,{keyboardProps:g}=reactAria.useKeyboard({onKeyDown:C=>{C.key==="ArrowRight"?v({wrap:!0}):C.key==="ArrowLeft"?_({wrap:!0}):C.continuePropagation();},isDisabled:y});ro.useEffect(()=>{utils.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}=reactAria.useButton({"aria-expanded":c.has(r),"aria-controls":t,onPress:h,isDisabled:y},l),{pressProps:x}=reactAria.usePress({onPress:h,isDisabled:y}),{focusProps:I,isFocusVisible:k}=reactAria.useFocusRing(),{hoverProps:S,isHovered:N}=reactAria.useHover({isDisabled:y}),{focusProps:w,isFocusVisible:T}=reactAria.useFocusRing({within:!0}),P=c.has(r);return jsxRuntime.jsxs("h3",{...reactAria.mergeProps(g,x,S,w),className:Cc({isFocusVisible:k,isHovered:N,isDisabled:y}),ref:p,children:[jsxRuntime.jsxs("div",{className:kc({isDisabled:!!y}),children:[jsxRuntime.jsx(_8.ChevronRightIcon,{className:hc({isExpanded:P}),size:8}),jsxRuntime.jsx("button",{...reactAria.mergeProps(R,I),id:a,"data-key":r,className:Pc,ref:l,children:e})]}),o?.length?jsxRuntime.jsx("div",{"data-testid":"action-buttons",className:zc({showActionsOnTriggerOnly:s,isTriggered:T||N}),children:o.map((C,E)=>jsxRuntime.jsx(B,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...C},E))}):null,i?jsxRuntime.jsx("div",{className:xc,children:i}):null]})});xn.displayName="AccordionHeader";var Dc=ro__default.default.forwardRef(({title:e,actions:o,children:t,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=reactAria.useId(),u=reactAria.useId(),{expandedKeys:m}=ro.useContext(Ge),d=ro__default.default.useRef(null),f=m.has(r),y=ko(),b=web.useReducedMotion(),v=web.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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactAria.FocusScope,{children:jsxRuntime.jsx(xn,{value:r,actions:o,id:u,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),v(_=>jsxRuntime.jsx(web.animated.div,{role:"region","aria-labelledby":u,id:c,style:{..._,overflow:"hidden"},children:jsxRuntime.jsx("div",{ref:d,className:s,style:i,children:t})}))]})});Dc.displayName="AccordionItem";var It=ro__default.default.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__default.default.useRef(null),{buttonProps:d,isPressed:f}=reactAria.useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:b}=reactAria.useHover({isDisabled:c.isDisabled}),{focusProps:v,isFocused:_,isFocusVisible:g}=reactAria.useFocusRing(),h=Do({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(d.disabled=!1);let R=utils.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 jsxRuntime.jsxs("button",{...reactAria.mergeProps(d,y,v,R),ref:L(u,m),className:utils.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:[jsxRuntime.jsxs("span",{className:Vl,children:[t?jsxRuntime.jsx(t,{size:24}):null,jsxRuntime.jsx("span",{...a,children:n})]}),h?jsxRuntime.jsx("span",{"aria-hidden":!0,className:utils.classNames(xo({validationState:r,isReadOnly:!!c.isReadOnly}),Hl),children:jsxRuntime.jsx(h,{size:16})}):null,jsxRuntime.jsx("span",{"aria-hidden":!0,children:jsxRuntime.jsx(_8.CaretDownIcon,{size:8,className:Dl({isOpen:o})})})]})});It.displayName="SelectButton";var Fr=ro__default.default.createContext({state:null,popoverAnchorRef:null}),kn=ro__default.default.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 jsxRuntime.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}=ro.useContext(Fr),b=ro__default.default.useRef(null),v=ge(d.portalContainer),{labelProps:_,triggerProps:g,valueProps:h,menuProps:R,descriptionProps:x,errorMessageProps:I}=reactAria.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 jsxRuntime.jsxs(ao.Provider,{value:u,children:[jsxRuntime.jsxs("div",{style:o,className:utils.classNames(je({labelPosition:t}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:f,children:[d.label||k?jsxRuntime.jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!k}),children:[d.label?jsxRuntime.jsx("div",{..._,className:utils.classNames(Ve,"BaselineUI-Select-Label"),children:d.label}):null,t==="start"&&k]}):null,jsxRuntime.jsx(reactAria.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?jsxRuntime.jsx(ye,{placement:p,portalContainer:v,offset:d.offset||2,state:u,triggerRef:y||b,style:o,className:utils.classNames(qe,"BaselineUI-Select-Popover"),...d,children:jsxRuntime.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__default.default.forwardRef((e,o)=>{let t=te(),r=reactStately.useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:t});return jsxRuntime.jsx(kn,{...e,ref:o,state:r})});jc.displayName="SelectStandalone";var Xe=ro__default.default.forwardRef((e,o)=>{let{state:t}=ro.useContext(Fr);return ro.useEffect(()=>{utils.invariant(t||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,t]),t?jsxRuntime.jsx(kn,{state:t,...e,ref:o}):jsxRuntime.jsx(jc,{...e,ref:o})});Xe.displayName="Select";var $c=ro__default.default.forwardRef(({className:e,style:o,variant:t,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=ro__default.default.useRef(null),l=ro.useCallback(({buttonProps:c,selectedValue:u,valueProps:m,isOpen:d,ref:f})=>{let y=u&&"icon"in u&&u.icon;return jsxRuntime.jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsxRuntime.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 jsxRuntime.jsxs(M,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:utils.classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:o,ref:L(s,p),children:[a?jsxRuntime.jsx(a,{size:24,className:tokens.sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsxRuntime.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:_16.AvatarIcon,md:_24.AvatarIcon},Ao=ro__default.default.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 jsxRuntime.jsxs("span",{className:utils.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?jsxRuntime.jsx("img",{...d,loading:l,className:Kc}):null,!i&&!n&&jsxRuntime.jsx(r,{size:t==="sm"?16:24}),i&&!n?t==="sm"?f[0]:f:null,p?jsxRuntime.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__default.default.useRef(null),{tabPanelProps:r}=reactAria.useTabPanel(o,e,t),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=reactAria.useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsxRuntime.jsx("div",{...reactAria.mergeProps(r,n),ref:t,className:utils.classNames({[Zc]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var Tn=ro__default.default.forwardRef(({className:e,style:o,tabHeaderStyle:t,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=reactStately.useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),u=ro__default.default.useRef(null),{tabListProps:m}=reactAria.useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,u);return jsxRuntime.jsxs("div",{className:utils.classNames("BaselineUI-Tabs",e),style:o,ref:l,"data-block-id":s,children:[jsxRuntime.jsxs("div",{className:utils.classNames(Qc({variant:a}),r),style:t,children:[jsxRuntime.jsx("div",{...m,className:Xc({variant:a}),ref:u,children:[...c.collection].map(d=>(utils.invariant(d.value,"TabItem requires a value prop"),jsxRuntime.jsx(od,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,f)=>jsxRuntime.jsx("div",{className:Gc,children:jsxRuntime.jsx(B,{...d,variant:"secondary",size:"sm",className:utils.classNames(Yc,d.className)})},f))]}),jsxRuntime.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__default.default.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=reactAria.useTab({key:a},t,i),{hoverProps:c,isHovered:u}=reactAria.useHover({});utils.invariant(n,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:f,titleClassName:y}=n,{focusProps:b,isFocusVisible:v,isFocused:_}=reactAria.useFocusRing(),{keyboardProps:g}=reactAria.useKeyboard({onKeyDown:R=>{R.key==="Backspace"&&o?o(a):R.continuePropagation();}}),h=utils.filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":u,"data-focus-visible":v});return jsxRuntime.jsxs("div",{...reactAria.mergeProps(g,s,c,b,h),className:utils.classNames(Wc({isHovered:u,isSelected:p,isFocusVisible:v,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",y),style:f,ref:i,children:[d?jsxRuntime.jsx(d,{size:20,className:wn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null,m,o?jsxRuntime.jsx(B,{variant:"secondary",elementType:"div",icon:_8.XIcon,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__default.default.forwardRef(({children:e,...o},t)=>{let r=ro.useMemo(()=>ro__default.default.Children.map(e,a=>!a||!ro__default.default.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsxRuntime.jsx(Tn,{...o,ref:t,items:r,children:a=>jsxRuntime.jsx(reactStately.Item,{title:a.title,children:a.children},a.key)})});rd.displayName="Tabs";var ad=({children:e,title:o,value:t})=>(utils.invariant(t,"TabItem requires a value prop"),utils.invariant(o,"TabItem requires a title prop"),utils.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:_16.ErrorAltFilledIcon,md:_20.ErrorAltFilledIcon},info:{sm:_16.InfoFilledIcon,md:_20.InfoFilledIcon},success:{sm:_16.CheckFilledIcon,md:_20.CheckFilledIcon},warning:{sm:_16.WarningFilledIcon,md:_20.WarningFilledIcon}},md=ro__default.default.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&&jsxRuntime.jsx(U,{variant:s==="compact"?"tertiary":"ghost",label:t,onPress:r}),y=Az[n][l];return jsxRuntime.jsxs("div",{className:utils.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:[jsxRuntime.jsxs("div",{className:ud({arrangement:s}),children:[jsxRuntime.jsx(y,{className:cd({variant:n}),size:16}),jsxRuntime.jsxs("div",{className:id({arrangement:s}),children:[jsxRuntime.jsx("h3",{className:dd({size:l}),children:i}),jsxRuntime.jsx("section",{className:ld({size:l}),children:o})]}),s==="compact"&&f]}),jsxRuntime.jsxs("div",{className:pd({arrangement:s}),children:[s!=="compact"&&f,p?jsxRuntime.jsx(B,{variant:"secondary",icon:_16.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__default.default.useContext(Ue);return jsxRuntime.jsx(interactions.PressResponder,{...o,children:e})};jr.displayName="ModalTrigger";var Xz=({children:e})=>{let{state:o}=ro__default.default.useContext(Ue);return jsxRuntime.jsx(interactions.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__default.default.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"?color.parseColor(e):e),{formatMessage:d}=F(),f=!m,{colorSwatchProps:y}=color$1.useColorSwatch({color:f?"#000000":e}),{hoverProps:b,isHovered:v}=reactAria.useHover({isDisabled:a||!r}),_=utils.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 jsxRuntime.jsx("div",{...reactAria.mergeProps(b,_,f?{}:y),style:n,"aria-label":f?d(nh.none):y["aria-label"],role:"img",className:utils.classNames(kd({removeBlendMode:f,isFocusVisible:o,isDisabled:!!a,isSelected:!!t,isHovered:v}),"BaselineUI-ColorSwatch",i),ref:u,id:s,...c,children:jsxRuntime.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?jsxRuntime.jsx(_16.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=color.parseColor("#000000").toFormat("hsla"),ie="hsla",Tt="hexa";function so(e){return typeof e=="string"?color.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:color.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)=>(utils.invariant(e.value&&"label"in e.value,"Item must have label"),jsxRuntime.jsx("li",{...o,ref:a,className:zd,children:jsxRuntime.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%, ${tokens.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__default.default.useRef(null),r=ro__default.default.useRef(null),a=ro__default.default.useRef(null),n=color.useColorAreaState({...o,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=color$1.useColorArea({...o,value:e,inputXRef:t,inputYRef:r,containerRef:a},n);ro.useEffect(()=>{t.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=reactAria.useFocusRing();return jsxRuntime.jsx("div",{ref:a,...i,className:utils.classNames(fd,"BaselineUI-ColorInput-ColorArea"),children:jsxRuntime.jsxs("div",{...l,className:utils.classNames(Gr({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:so(e)?.withChannelValue("alpha",1).toString("css")},children:[jsxRuntime.jsx("input",{ref:t,...s,...c}),jsxRuntime.jsx("input",{ref:r,...p,...c})]})})};var Dd=({color:e,setColor:o,allowAlpha:t,...r})=>{let a=color.useColorFieldState({value:e,onChange:u=>{o(so(u)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Nt);}}),n=ro__default.default.useRef(null),{inputProps:i}=color$1.useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=reactAria.useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=reactAria.useHover({});return jsxRuntime.jsxs("div",{className:utils.classNames(Mn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"hexa":"hex",children:[jsxRuntime.jsx("input",{...reactAria.mergeProps(i,s,l),ref:n,className:xd({isFocused:p,isHovered:c,allowAlpha:t})}),t?jsxRuntime.jsx(Hd,{color:e,setColor:o}):null]})},Fd=({color:e,setColor:o,allowAlpha:t})=>{let r=e.toFormat("rgba"),{locale:a}=reactAria.useLocale();return jsxRuntime.jsxs("div",{className:utils.classNames(Mn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"rgba":"rgb",children:[jsxRuntime.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}),jsxRuntime.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}),jsxRuntime.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?jsxRuntime.jsx(Hd,{color:e,setColor:o}):null]})},zh={style:"percent",maximumFractionDigits:0},Hd=({color:e,setColor:o})=>{let{locale:t}=reactAria.useLocale(),r=ro.useCallback(a=>{o(e.withChannelValue("alpha",a));},[e,o]);return jsxRuntime.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}=reactAria.useLocale(),r=color.useColorSliderState({...o,channel:e,locale:t}),a=ro__default.default.useRef(null),n=ro__default.default.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=color$1.useColorSlider({...o,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,t)},r),{focusProps:l,isFocusVisible:c}=reactAria.useFocusRing();return jsxRuntime.jsxs("div",{className:utils.classNames($r,{[rl({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsxRuntime.jsx("div",{className:Dn}),jsxRuntime.jsx("div",{className:$r,style:i.style}),jsxRuntime.jsxs("div",{className:utils.classNames(Gr({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsxRuntime.jsx("div",{className:Dn,style:{backgroundColor:"#ffffff"}}),jsxRuntime.jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:$r}),jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{ref:n,...p,...l})})]})]})};var Xr=({color:e,setColor:o,allowAlpha:t,onChangeEnd:r})=>{let[a,n]=ro__default.default.useState("hex"),{formatMessage:i}=F(Ye);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Md,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:o,onChangeEnd:r}),jsxRuntime.jsxs("div",{className:Bn,children:[jsxRuntime.jsx(jn,{channel:"hue",value:e,onChange:o,onChangeEnd:r}),t?jsxRuntime.jsx(jn,{channel:"alpha",value:e,onChange:o,onChangeEnd:r}):null]}),jsxRuntime.jsxs("div",{className:utils.classNames(Bn,tokens.sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsxRuntime.jsx(Xe,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Rd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsxRuntime.jsx(Dd,{color:e,setColor:s=>{o(s),r?.(s);},allowAlpha:t}),a==="rgb"&&jsxRuntime.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}=reactAria.useLocale(),{formatMessage:l}=F(Ye),c=ro__default.default.useRef(null),u=Io(c.current),[m,d]=el(t,[]),f=ro__default.default.useRef(null),[y,b]=ro__default.default.useState(e),v=ro__default.default.useMemo(()=>m.map(I=>({id:I,label:color.parseColor(I).getColorName(p),description:I})),[m,p]),_=ro.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]);ro.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=reactAria.useId(),h=jsxRuntime.jsx(B,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:_20.PlusIcon,onPress:i==="active"?_:void 0}),R=ro.useCallback(I=>jsxRuntime.jsxs(ue,{size:"content",className:Ur({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsxRuntime.jsx(Xr,{color:y,setColor:b,allowAlpha:s}),jsxRuntime.jsx(O,{}),jsxRuntime.jsx(M,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxRuntime.jsxs(M,{display:"inline-flex",gap:"lg",children:[jsxRuntime.jsx(U,{label:l("cancel"),size:"sm",variant:"secondary",onPress:I}),jsxRuntime.jsx(U,{label:l("add"),variant:"primary",onPress:()=>{_(),I();},size:"sm"})]})})]}),[y,_,l,s]),x=ro.useCallback(I=>{utils.invariant(I instanceof Set,"Key must be a set");let k=[...I][0];k&&o(color.parseColor(k).toFormat(ie));},[o]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(O,{}),jsxRuntime.jsxs("div",{className:utils.classNames(hd,"BaselineUI-ColorInput-CustomColors"),children:[jsxRuntime.jsx("span",{id:g,children:n}),jsxRuntime.jsxs(M,{display:"flex",children:[!!m.length&&m.includes(e.toString(ie))&&jsxRuntime.jsx(B,{variant:"secondary",size:"md",elementType:"div",icon:_20.MinusIcon,"aria-label":a,onPress:()=>{d(m.filter(I=>I!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(u==="mobile"?jsxRuntime.jsxs(we,{children:[jsxRuntime.jsx(jr,{children:h}),jsxRuntime.jsx(Ee,{style:{zIndex:1e5},children:({close:I})=>R(I)})]}):jsxRuntime.jsxs(Ne,{type:"dialog",children:[jsxRuntime.jsx(Le,{children:h}),jsxRuntime.jsx(Re,{placement:"right top",className:qr,offset:6,children:({close:I})=>R(I)})]}))]})]}),!!m.length&&jsxRuntime.jsx(le,{items:v,layout:"grid","aria-labelledby":g,className:utils.classNames(Ar,Kr,tokens.sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Wr,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:x})]})};var Un=ro__default.default.forwardRef(({setColor:e,color:o,triggerRef:t,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Ye),p=ro.useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],u=a.find(m=>m.id===c);utils.invariant(u,"Preset not found"),e(u.id===Se?null:color.parseColor(u.id).toFormat(ie)),n.close();}},[n,a,e]);return jsxRuntime.jsx("div",{className:utils.classNames(Kr,"BaselineUI-ColorInput-Presets"),style:{minWidth:t.current?.offsetWidth},ref:i,children:jsxRuntime.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__default.default.forwardRef(({color:e,colorLabel:o,colorName:t,...r},a)=>{let n=ro__default.default.useRef(null),{hoverProps:i,isHovered:s}=reactAria.useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=reactAria.useButton(r,n),{isFocusVisible:c,focusProps:u}=reactAria.useFocusRing(),m=utils.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 jsxRuntime.jsxs("button",{...reactAria.mergeProps(p,i,u,m),style:r.style,className:utils.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:[jsxRuntime.jsx(Ze,{color:e?.toString("hexa")}),o?jsxRuntime.jsx("div",{className:_d,id:f,"aria-hidden":"true",children:t}):typeof t=="string"&&jsxRuntime.jsx(reactAria.VisuallyHidden,{children:t})]})});Mt.displayName="ColorInputButton";var Qr=ro__default.default.forwardRef(({className:e,style:o,icon:t,...r},a)=>{let n=ro__default.default.useRef(null),{hoverProps:i,isHovered:s}=reactAria.useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=reactAria.useButton(r,n),{isFocusVisible:c,focusProps:u}=reactAria.useFocusRing(),m=utils.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 jsxRuntime.jsxs("button",{...reactAria.mergeProps(p,i,u,m),ref:L(a,n),style:o,className:utils.classNames(Cd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsxRuntime.jsx(t,{size:16}),jsxRuntime.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}=reactAria.useLocale(),n=ro.useMemo(()=>t.find(p=>p.id===Se?!o:o?Sd(o,color.parseColor(p.id)):!1),[t,o]),i=ro.useMemo(()=>typeof e=="function"?e?.(o):e?Td(o,n,r(Kh.transparent)):!1,[o,e,r,n]),s=ro.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__default.default.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})=>jsxRuntime.jsx(Mt,{...reactAria.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__default.default.useRef(null),S=ro__default.default.useRef(null),N=reactStately.useOverlayTriggerState(x),{triggerProps:w,overlayProps:T}=reactAria.useOverlayTrigger({type:"listbox"},N,k),P=ge(x.portalContainer),[C,E]=utils$1.useControlledState(m===void 0?void 0:so(m),so(c),X=>p?.(X?.toFormat("rgba")||null)),{formatMessage:H}=F(Ye),D=ro.useMemo(()=>Nd(H(Jr.noColor),a),[a,H]),K=reactAria.useId(),{colorName:j}=eu({colorLabel:i,color:C,presets:D}),G=ro.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=jsxRuntime.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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:utils.classNames({[gd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":R,style:o,ref:I,children:[x.label?jsxRuntime.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})]}),jsxRuntime.jsx(ye,{...x,portalContainer:P,placement:g,state:N,offset:_,className:utils.classNames(qr,"BaselineUI-ColorInput-Popover"),triggerRef:k,overlayProps:T,children:jsxRuntime.jsxs(ue,{size:"content",className:Ur({includesCustomColorPicker:s}),ref:S,"aria-labelledby":K,"aria-label":x["aria-label"],children:[s&&v==="active"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Xr,{color:C||Nt,setColor:E,allowAlpha:r,onChangeEnd:X=>{l?.(X?.toFormat("rgba")||null);}}),W]}):null,!!G.length&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&v==="active"?jsxRuntime.jsx(O,{}):null,jsxRuntime.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__default.default.forwardRef(({className:e,style:o,icon:t,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=ro__default.default.useRef(null),l=ro.useCallback(({isOpen:c,color:u,ref:m,colorName:d,triggerProps:f})=>jsxRuntime.jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsxRuntime.jsx(Mt,{...f,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:u,colorLabel:!1,colorName:d}):jsxRuntime.jsx(Qr,{...f,isOpen:c,icon:_20.TextIcon,color:u?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxRuntime.jsxs(M,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:utils.classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:o,ref:L(s,p),children:[r==="standard"&&t?jsxRuntime.jsx(t,{size:24,className:tokens.sprinkles({color:"icon.primary"})}):null,jsxRuntime.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=ro.useRef([]),r=ro.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=utils.getSvgPathFromStroke(perfectFreehand.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__default.default.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__default.default.useRef(null),[P,C]=ro__default.default.useState(g||p||[]),E=ro__default.default.useMemo(()=>({...xx,...S}),[S]),[H,D]=ro__default.default.useState(),K=reactAria.useId(),{labelProps:j,fieldProps:G}=reactAria.useLabel({...S,"aria-label":I,labelElementType:"span"}),{isFocusVisible:A,focusProps:ee}=reactAria.useFocusRing({within:!0}),{hoverProps:V,isHovered:W}=reactAria.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}=reactAria.useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?Qt():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Ce&&ze():Pe&&X());}}),[oe,de]=ro.useState(!1),nt=ro.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=ro.useCallback(Y=>{if(Y.buttons!==1||!H)return;let pe=yu(Y.nativeEvent).map(Z=>[a?utils$1.clamp(Z.clientX-H.left,0,H.width):Z.clientX-H.left,a?utils$1.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));};ro.useEffect(()=>{s?.(P);},[P,s]);let Qt=()=>{C([]),s?.([]),ke([]);};return jsxRuntime.jsxs("div",{ref:L(T,N),className:utils.classNames(lu,"BaselineUI-FreehandCanvas",e),style:o,"aria-disabled":m,"data-block-id":R,"data-block-class":x,children:[S.label||c?jsxRuntime.jsxs("div",{className:pu({isInline:u}),children:[S.label?jsxRuntime.jsx(Q,{type:"label",size:"sm",...j,children:S.label}):jsxRuntime.jsx("span",{}),c?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(B,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:_16.UndoIcon,onPress:X,"aria-label":y||w.formatMessage("undo")}),jsxRuntime.jsx(B,{variant:"secondary",size:"sm",isDisabled:!Ce||m,icon:_16.RedoIcon,onPress:ze,"aria-label":b||w.formatMessage("redo")})]}):null]}):null,jsxRuntime.jsxs("div",{role:"application",...reactAria.mergeProps(ee,He,V,G),tabIndex:m?void 0:0,className:utils.classNames(ea({isInline:u,isHovered:W}),su({isFocusVisible:A,isInline:u,isDisabled:!!m}),t),"aria-describedby":S["aria-describedby"]||K,style:r,ref:_,children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("div",{id:K,children:k})}),jsxRuntime.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?jsxRuntime.jsx(mu,{line:Y,options:E,strokeColor:i,strokeWidth:n},q):jsxRuntime.jsx(fu,{line:Y,options:E,strokeColor:i,strokeWidth:n},q))})]}),d||f?jsxRuntime.jsx("div",{style:h,className:utils.classNames(ta({isInline:u,isDisabled:m}),v),children:(P.length||!d)&&f?jsxRuntime.jsx(U,{size:"sm",variant:"ghost",label:f,isDisabled:m,onPress:Qt}):jsxRuntime.jsx(U,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});uu.displayName="FreehandCanvas";var mu=ro__default.default.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=ro.useMemo(()=>utils.getSvgPathFromStroke(perfectFreehand.getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),o)),[e,o]);return jsxRuntime.jsx("path",{d:a,stroke:t,strokeWidth:r})});mu.displayName="Stroke";var fu=ro__default.default.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=cu({line:e,options:o});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:a.map((n,i)=>jsxRuntime.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]=ro.useState([]),a=()=>e?.flatMap(n=>[...o.querySelectorAll(n)]).map(n=>({current:n}));return granularHooks.useGranularEffect(()=>{r(a());},[],[a]),granularHooks.useGranularEffect(()=>{let n=a();r(n);},[e],[a]),t}function zu(e){let{scrollable:o,ownerDocument:t,onScroll:r}=e;ro.useEffect(()=>{let a=utils.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=reactMoveable.makeMoveable([reactMoveable.Draggable,reactMoveable.Resizable,reactMoveable.Rotatable,reactMoveable.Snappable]),xu=ro__default.default.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=ro.useRef(null),G=ro.useRef(null),[A,ee]=ro.useState(document),V=ro.useRef(A.createElement("div")),[W,X]=ro.useState({}),[ze,Ce]=ro.useState(!1),[Pe,ke]=ro.useState(!1),[He,oe]=ro.useState(),de=_u(R,A);ro.useLayoutEffect(()=>{let q=V.current;return V.current=A.createElement("div"),()=>{q.remove();}},[A]);let{keyboardProps:nt}=reactAria.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();});}});ro.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=ro.useCallback(q=>{X(pe=>({...pe,...q.style})),i?.(q);},[i]),Pa=ro.useCallback(q=>{if(Ce(!0),j.current?.focus(),N){let Z=utils.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=ro.useCallback(q=>{Ce(!1),u?.(q);},[u]),Y=o({style:{...W.width&&{width:W.width},...W.height&&{height:W.height}}});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{role:"button",...nt,ref:L(j,K),style:{display:"inline-block",...n,...W},className:utils.classNames(bu,e),onDoubleClick:l,tabIndex:0,title:I,children:Y}),Dv.createPortal(jsxRuntime.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__default.default.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__default.default.useRef(null),S=ro__default.default.useRef(null),{formatMessage:N}=F(Cu),[w,T]=utils$1.useControlledState(n,a||null,oe=>{utils.invariant(typeof oe!="string"),x.onValueChange?.(oe?[oe]:[]);}),P=ro.useMemo(()=>Jx(w||void 0),[w]),{fieldProps:C,labelProps:E}=reactAria.useField(x),{dropProps:H,isDropTarget:D}=reactAria.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}=reactAria.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}=reactAria.useFocusRing({within:!0}),{hoverProps:W,isHovered:X}=reactAria.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:utils.classNames(cr({isFocusVisible:V}),{[iu]:D&&!p},y),style:f},He=utils.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 jsxRuntime.jsxs(M,{...He,className:utils.classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:o,ref:I,children:[jsxRuntime.jsxs("label",{...reactAria.mergeProps(H,W,A,E),className:utils.classNames(ea({isInline:t,isHovered:X,isDisabled:p,hasLoadedImage:!!P&&Pe,showFocusRing:D||!!P&&V}),R),style:h,ref:k,children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...reactAria.mergeProps(C,K,G),ref:S})}),!P&&jsxRuntime.jsx(U,{...ke}),!!P&&(Ce?jsxRuntime.jsx(Vo,{}):jsxRuntime.jsx("img",{className:oa({isInline:t,isDisabled:p,hasLoadedImage:!!P&&Pe&&u}),...ze}))]}),g||_?jsxRuntime.jsx("div",{style:v,className:utils.classNames(ta({isInline:t,isDisabled:p}),b),children:(P||!g)&&_?jsxRuntime.jsx(U,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:j}):jsxRuntime.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__default.default.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}=reactAria.useFocusRing({within:!0}),{isHovered:R,hoverProps:x}=reactAria.useHover({isDisabled:t}),{pressProps:I}=reactAria.usePress({isDisabled:t,onPress:l});utils.invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let k=utils.filterTruthyValues({"data-hovered":R,"data-focus-visible":h,"data-focused":g,"data-disabled":t});return jsxRuntime.jsxs("div",{...b,className:utils.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"?jsxRuntime.jsx("button",{disabled:t,...reactAria.mergeProps(x,_,I,k),className:Qn,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxRuntime.jsxs("button",{...reactAria.mergeProps(x,_,I,k),disabled:t,style:p,"aria-label":m,className:Qn,children:[n?jsxRuntime.jsx("img",{src:n,alt:a,className:oa({isInline:r,isDisabled:t})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsxRuntime.jsx(B,{isDisabled:t,className:wu,"aria-label":u,size:"xs",icon:_16.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})=>jsxRuntime.jsxs("div",{className:Bu({labelPosition:n}),children:[jsxRuntime.jsx("div",{className:Fu({isSelected:t,isFocusVisible:r,isDisabled:a}),children:t?jsxRuntime.jsx("div",{className:Eu}):null}),e?jsxRuntime.jsxs("div",{className:Lu,children:[jsxRuntime.jsx("span",{className:Mr({isDisabled:a}),children:e}),o?jsxRuntime.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__default.default.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=reactAria.useRadio({...s,isDisabled:p,children:t.label,value:t.id},e,l),{focusProps:d,isFocusVisible:f,isFocused:y}=reactAria.useFocusRing(),{isHovered:b}=reactAria.useHover({isDisabled:p}),v=utils.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 jsxRuntime.jsxs("label",{...v,style:a,className:utils.classNames("BaselineUI-Radio-Item",n),children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...reactAria.mergeProps(c,d),ref:l})}),o(t,{isFocusVisible:f,isSelected:m,isFocused:y,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var Vu=ro__default.default.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=reactStately.useRadioGroupState(d),{radioGroupProps:b,labelProps:v,descriptionProps:_,errorMessageProps:g}=reactAria.useRadioGroup({...d,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},y),h=Ie({...d,descriptionProps:_,errorMessageProps:g,labelPosition:n}),R=utils.filterTruthyValues({"data-orientation":d.orientation,"data-block-id":u,"data-block-class":m,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxRuntime.jsxs("div",{...reactAria.mergeProps(b,R),className:utils.classNames(je({labelPosition:n}),"BaselineUI-RadioGroup",e),style:o,ref:f,children:[d.label||h?jsxRuntime.jsxs("div",{className:Oe({labelPosition:n,hasMessage:!!h}),children:[jsxRuntime.jsx("span",{...v,className:utils.classNames(Ve,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsxRuntime.jsxs("div",{className:utils.classNames({[wo]:d.isDisabled}),children:[jsxRuntime.jsx("div",{className:utils.classNames(Du,t),style:r,children:a.map(x=>jsxRuntime.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=ro.Fragment})=>{utils.invariant(e||o,"`id` or `defaultMessage` is required.");let r=F();return jsxRuntime.jsx(t,{children:r.formatMessage(e)||o})};Ou.displayName="MessageFormat";var ju=ro__default.default.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}=reactAria.useHover({isDisabled:i});return jsxRuntime.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 ro.useMemo(()=>ro__default.default.Children.toArray(e).map(o=>{let t=o,r=lodash.uniqueId("item"),a=Ht(t,Ne),n=$u(t),i,s;if(a){let v=Ht(a,Le);utils.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;utils.invariant(typeof f=="string","ActionGroup children must have a string label");let y=`${r}-${f}`;return ro.createElement(reactStately.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?lodash.flatMapDeep(ro__default.default.Children.toArray(e),r=>ro__default.default.isValidElement(r)&&r.props.children?[r,...ro__default.default.Children.toArray(r.props.children)]:[r]).find(r=>ro__default.default.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__default.default.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]=ro.useState(),d=Uu(t),f=reactStately.useListState({...p,children:d}),y=ae(l),b=ro.useRef(null),[{visibleItems:v,isMeasuring:_},g]=Ia({visibleItems:f.collection.size,isMeasuring:!1}),h=ro.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=ro.useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);Ba({ref:R,onResize:h}),xe(h,[f.collection,h]);let{toolbarProps:x}=toolbar.useToolbar(p,y),I=[...f.collection],k=I.slice(0,v),S=I.slice(v).filter(T=>T.textValue!==ri),N=S.length>0;ro.useEffect(()=>{m(void 0);},[S.length]),ro.useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:w}=reactAria.useKeyboard({onKeyDown:s});return jsxRuntime.jsxs(reactAria.FocusScope,{children:[jsxRuntime.jsx("div",{...reactAria.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:jsxRuntime.jsxs("div",{ref:b,className:qu,children:[k.map(T=>T.rendered),N?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!_&&i?jsxRuntime.jsx(M,{flexGrow:1}):null,jsxRuntime.jsx(wr,{placement:"bottom end",renderTrigger:({buttonProps:T,ref:P})=>jsxRuntime.jsx(B,{...T,size:"md",icon:_24.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 utils.invariant(P,"ActionItem must have a label"),{id:T.key,label:P,icon:T.props.icon}}),onAction:T=>{let P=f.collection.getItem(T);utils.invariant(P,"Item not found");let{onPress:C,dialogContent:E}=P.props;C?.(),m(E);}})]}):null]})}),jsxRuntime.jsx(we,{isOpen:!!u,onOpenChange:T=>{T||m(void 0);},children:jsxRuntime.jsx(Ee,{enableDrawer:"auto",style:{zIndex:1e5},children:u?ro__default.default.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__default.default.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=ro__default.default.useRef(null),{toolbarProps:l}=toolbar.useToolbar(i,p),{keyboardProps:c}=reactAria.useKeyboard({onKeyDown:n});return jsxRuntime.jsx("div",{...reactAria.mergeProps(l,c),"aria-controls":a,className:utils.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__default.default.forwardRef((e,o)=>{let t=e.isCollapsible?ni:ii;return jsxRuntime.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__default.default.forwardRef((e,o)=>{let t=ae(o),{tooltipProps:r}=sr(e,t);return r?jsxRuntime.jsx(ne,{...r,children:jsxRuntime.jsx(si,{...e,ref:o})}):jsxRuntime.jsx(si,{...e,ref:o})});be.displayName="ToggleIconButton";var si=ro__default.default.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=reactStately.useToggleState(s),{buttonProps:c,isPressed:u,ref:m,isFocusVisible:d,isFocused:f,isHovered:y,uiStateOptions:b}=pr(s,l),v=ro.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=utils.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 jsxRuntime.jsx("button",{...reactAria.mergeProps(c,g),className:utils.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:jsxRuntime.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}}=tokens.layoutSprinkleValues,zm=({isOpen:e,onClose:o})=>{let{formatMessage:t}=F(),r=reactAria.useId();return jsxRuntime.jsx(we,{isOpen:e,onOpenChange:a=>{a||o();},children:jsxRuntime.jsx(Ee,{enableDrawer:"auto",style:{zIndex:999999},children:jsxRuntime.jsxs(ue,{"aria-labelledby":r,className:lm,drawerBackground:"subtle",children:[jsxRuntime.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:[jsxRuntime.jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:t(At.help)}),jsxRuntime.jsx(B,{icon:_20.XIcon,size:"md",variant:"secondary","aria-label":t(At.close),onPress:o})]}),jsxRuntime.jsx(O,{className:bm}),jsxRuntime.jsxs(M,{paddingX:jt.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsxRuntime.jsx("div",{role:"rowgroup",children:jsxRuntime.jsxs(M,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:jt.padding.vertical.md,color:"text.primary",children:[jsxRuntime.jsx("h6",{className:tokens.sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:t(At.action)}),jsxRuntime.jsx("h6",{className:tokens.sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:t(At.shortcut)})]})}),jsxRuntime.jsx("div",{role:"rowgroup",children:_m.map(([a,n],i)=>jsxRuntime.jsxs(ro.Fragment,{children:[jsxRuntime.jsxs(M,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:jt.padding.vertical.xs,style:{minHeight:40},children:[jsxRuntime.jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:t(At[lodash.camelCase(a)])}),jsxRuntime.jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:utils.getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==_m.length-1&&jsxRuntime.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__default.default.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__default.default.useRef(null),[b,v]=utils$1.useControlledState(e,o||"",t),_=ro.useCallback(w=>{v(w.currentTarget.value||"");},[v]),g=ro.useCallback(w=>{(m&&w.key==="Enter"&&!w.shiftKey||(w.ctrlKey||w.metaKey)&&w.key==="Enter")&&(w.preventDefault(),d());},[m,d]);ro.useImperativeHandle(f,()=>({clear:()=>{v("");}}));let h=ro.useCallback(w=>{w.currentTarget.style.height="16px",w.currentTarget.style.height=w.currentTarget.scrollHeight+"px";},[]);granularHooks.useGranularLayoutEffect(()=>{let w=y.current;w&&(w.style.height="16px",w.style.height=w.scrollHeight+"px");},[s],[b]),ro.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}=reactAria.useFocusRing(),{hoverProps:k,isHovered:S}=reactAria.useHover({}),N=utils.filterTruthyValues({"data-focus-visible":I,"data-hovered":S,"data-focused":x});return jsxRuntime.jsx("textarea",{...reactAria.mergeProps(R,k,N),ref:L(y,n),className:utils.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__default.default.forwardRef(({onCancel:e,editor:o,element:t,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=ro.useContext(ma),p=slateReact.useSelected(),[l,c]=ro.useState(""),{contains:u}=reactAria.useFilter({sensitivity:"base"}),{formatMessage:m}=F(),d=ro.useMemo(()=>{let C=i.filter(E=>l===""||u(E.displayName,l)).map(E=>({id:E.id,label:E.displayName,data:E}));return s?lodash.take(C,s):C},[i,s,l,u]),f=ro.useCallback(C=>jsxRuntime.jsx(reactStately.Item,{children:C.label},C.id),[]),y=ro.useCallback((C=!1)=>{let E=plateCommon.findNodePath(o,t);E&&(plateCommon.removeNodes(o,{at:E}),C&&plateCommon.focusEditor(o));},[o,t]),b=reactStately.useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:C=>{y(!0),r?.(C);}}),v=ro__default.default.useRef(null),_=ro__default.default.useRef(null),g=ro__default.default.useRef(null),h=ro__default.default.useRef(null),R=plateCombobox.useHTMLInputCursorState(_);reactAria.useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:x,listBoxProps:I}=reactAria.useComboBox({defaultItems:d,inputRef:_,buttonRef:v,listBoxRef:g,popoverRef:h,menuTrigger:"focus","aria-label":m(HP.mention)},b);ro.useEffect(()=>{_.current?.focus();},[]);let k=ro.useCallback((C="manual",E=!1)=>{y(E),e?.(C,b.inputValue);},[e,y,b.inputValue]),S=ro.useRef(p);ro.useEffect(()=>{S.current&&!p&&k("deselect"),S.current=p;},[p,k]);let N=R?.atStart??!1,w=R?.atEnd??!1,T=ro.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=plateCommon.Hotkeys.isUndo(C)&&o.history.undos.length>0,H=plateCommon.Hotkeys.isRedo(C)&&o.history.redos.length>0;(E||H)&&(C.preventDefault(),o[E?"undo":"redo"](),plateCommon.focusEditor(o));},[N,w,k,o]),P=ro.useMemo(()=>{if(!CSS.supports("field-sizing","content")){let C=re(_.current),E=_.current?C?.getComputedStyle(_.current).font:void 0;return {width:E?utils.getTextDimensions({text:b.inputValue,font:E}).width+10:"4ch"}}},[b.inputValue]);return jsxRuntime.jsxs(ao.Provider,{value:b,children:[jsxRuntime.jsx("input",{...reactAria.mergeProps(x,{onKeyDown:T,onBlur:()=>{k("blur",!0);},onChange:C=>{c(C.target.value);}}),style:P,className:cm,ref:L(a,_)}),jsxRuntime.jsx(ye,{triggerRef:n,className:um,isNonModal:!0,ref:h,state:b,children:jsxRuntime.jsx(le,{...I,items:void 0,autoFocus:"first",ref:g,className:tokens.sprinkles({width:"full"}),renderOption:Em})})]})});Lm.displayName="MentionInputContentElement";var ui=cn$1.withRef(({className:e,...o},t)=>{let{children:r,editor:a,element:n}=o,{items:i}=ro.useContext(ma),s=ro.useRef(null),[p,l]=ro.useState(null);ro.useEffect(()=>{let m=plateCommon.findNodePath(a,n);if(!m)return;let d=plateCommon.getPointBefore(a,m);if(!d)return;let f=plateCommon.createPointRef(a,d);return l(f),()=>{f.unref();}},[a,n]);let c=ro.useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;plateCommon.moveSelection(a,{unit:"offset"}),plateCommon.moveSelection(a,{unit:"character",distance:1}),st()&&m&&plateCommon.focusEditor(a);},[a]),u=ro.useCallback(m=>{if(!m)return;let d=s.current?.getRootNode()instanceof ShadowRoot,f=i.find(b=>b.id===m);utils.invariant(f,"User not found");let y={type:qt,value:f.id,displayName:f.displayName,children:[{text:""}]};plateCommon.insertNodes(a,[y,{text:" "}]),d?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxRuntime.jsxs(plateCommon.PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:t,...o,children:[jsxRuntime.jsx(Lm,{onCancel:(m,d)=>{m!=="backspace"&&plateCommon.insertText(a,"@"+d,{at:p?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&plateCommon.moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:u,ref:s,element:n,editor:a}),r]})});ui.displayName="MentionInputElement";var mi=cn$1.withRef(({className:e,onClick:o,children:t,...r},a)=>{let n=plateCommon.useElement();return jsxRuntime.jsxs(plateCommon.PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:plateCommon.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=plateCommon.getEditorString(e,plateCommon.getRange(e,e.selection,plateCommon.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 jsxRuntime.jsx(plateCommon.PlateElement,{asChild:!0,className:e,...t,children:jsxRuntime.jsx("p",{children:o})})}function ek(e){return Object.entries(e).map(([o,t])=>`${lodash.kebabCase(o)}:${t}`).filter(([,o])=>!!o).join(";")}function ok(e){return "text"in e}function tk(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}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(utils.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 plateParagraph.ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case plateLink.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])=>[lodash.camelCase(o),t]))):{}}function vi(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let o=new DOMParser().parseFromString(Fm__namespace.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")?`
80
- `:"<p>";return Vm(o.body)}function Vm(e,o){if(e.nodeType===Node.TEXT_NODE)return slateHyperscript.jsx("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=rk(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=>Vm(a,t));switch(r.length===0&&r.push(slateHyperscript.jsx("text",t,"")),e.nodeName.toUpperCase()){case"BR":return slateHyperscript.jsx("text",o,`
81
- `);case"SPAN":{let a=e.dataset.userId;return a?slateHyperscript.jsx("element",{type:qt,value:a,displayName:e.textContent},{text:""}):r}case"P":return slateHyperscript.jsx("element",{type:plateParagraph.ELEMENT_PARAGRAPH},r);case"A":return slateHyperscript.jsx("element",{type:plateLink.ELEMENT_LINK,url:e.getAttribute("href")},r);default:return r}}function Om(e){let o=plateCommon.findNode(e,{match:{type:plateCommon.getPluginType(e,plateLink.ELEMENT_LINK)}}),[t]=o||[{url:""}];return t?.url}function ua(e){let o={children:[{text:" "}],type:da};e.insertNode(o);}var ak=plateCommon.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=plateCommon.createPlugins([plateParagraph.createParagraphPlugin({component:Dm}),plateBasicMarks.createBoldPlugin({component:cn$1.withProps(plateCommon.PlateLeaf,{as:"b"})}),plateBasicMarks.createItalicPlugin({component:cn$1.withProps(plateCommon.PlateLeaf,{as:"i"})}),plateBasicMarks.createUnderlinePlugin({component:cn$1.withProps(plateCommon.PlateLeaf,{as:"u"})}),plateFont.createFontColorPlugin(),plateFont.createFontBackgroundColorPlugin(),plateLink.createLinkPlugin({component:Am}),ak({component:mi})],{components:{[da]:ui}});var Km=({isDisabled:e})=>{let{formatMessage:o}=F(),t=plateCommon.useEditorRef();return jsxRuntime.jsxs(Ne,{type:"dialog",children:[jsxRuntime.jsx(Le,{children:jsxRuntime.jsx(B,{icon:_20.LinkIcon,size:"sm",isDisabled:e,"aria-label":o(mo.addLink),className:Xo,preventFocusOnPress:!0})}),jsxRuntime.jsx(Re,{className:tokens.sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsxRuntime.jsx(ue,{size:"content",style:{minWidth:240},children:jsxRuntime.jsx(uk,{close:()=>{r(),setTimeout(()=>{plateCommon.focusEditor(t,t.selection);},0);}})})})]})},uk=({close:e})=>{let o=plateCommon.useEditorRef(),{formatMessage:t}=F(),r=plateCommon.useEditorSelector(l=>Om(l),[]),[a,n]=ro__default.default.useState(r?"show":"add"),[i,s]=ro__default.default.useState(r||""),p=jsxRuntime.jsx(M,{padding:"lg",children:jsxRuntime.jsx(Ke,{label:t(mo.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a==="add"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p,jsxRuntime.jsx(M,{display:"flex",justifyContent:"flex-end",padding:"lg",className:nm,children:jsxRuntime.jsx(U,{isDisabled:!utils.isUrl(i,!0),label:t(mo.addLink),size:"sm",onPress:()=>{plateLink.upsertLink(o,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(M,{padding:"lg",children:jsxRuntime.jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxRuntime.jsxs(M,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsxRuntime.jsx(U,{label:t(mo.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsxRuntime.jsx(U,{label:t(mo.removeLink),size:"sm",onPress:()=>{plateLink.unwrapLink(o),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p,jsxRuntime.jsxs(M,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsxRuntime.jsx(U,{label:t(mo.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsxRuntime.jsx(U,{label:t(mo.save),size:"sm",onPress:()=>{plateLink.upsertLink(o,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function Am({className:e,children:o,...t}){return jsxRuntime.jsx(plateCommon.PlateElement,{asChild:!0,className:e,...t,children:jsxRuntime.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=color.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=plateCommon.useEditorSelector(i=>plateCommon.isMarkActive(i,e),[]),n=plateCommon.useEditorRef();return jsxRuntime.jsx(be,{variant:"tertiary",isSelected:a,size:"sm",icon:o,"aria-label":t,isDisabled:r,onPress:()=>{plateCommon.toggleMark(n,{key:e});},preventFocusOnPress:!0})},hi=({nodeType:e,"aria-label":o,isDisabled:t})=>{let{updateColor:r,clearColor:a,color:n}=plateFont.useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=ro.useCallback(({ref:p,triggerProps:l})=>jsxRuntime.jsx(B,{icon:e==="color"?_24.TextIcon:_24.HighlightTextIcon,"aria-label":o,size:"md",variant:"popover",isDisabled:t,className:Xo,preventFocusOnPress:!0,...l,ref:p}),[e,o,t]),s=ro.useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsxRuntime.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:plateParagraph.ELEMENT_PARAGRAPH,children:[{text:""}]}],ma=ro__default.default.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Pi=ro__default.default.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=ro.useRef(null),h=reactAria.useId(),{formatMessage:R}=F(),x=ro.useRef(null),I=x.current,k=ro.useRef(null),S=ro.useMemo(()=>I?.getRootNode()instanceof ShadowRoot,[I]),[N,w]=utils$1.useControlledState(e?vi(e):void 0,vi(o||"<p></p>"),C=>{t&&t(Kt(C));}),{keyboardProps:T}=reactAria.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&&plateCommon.focusEditor(k.current);}});ro.useEffect(()=>{s&&k.current&&plateCommon.deselect(k.current);},[s]),ro.useImperativeHandle(_,()=>({startMention:()=>{k.current&&!x.current?.querySelector("input[role='combobox']")&&ua(k.current);}})),ro.useImperativeHandle(m,()=>({setCaretPosition:C=>{k.current&&(plateCommon.focusEditor(k.current),plateCommon.moveSelection(k.current,{distance:C,unit:"character"}));},focus:()=>{k.current&&plateCommon.focusEditor(k.current);}}));let P=ro.useMemo(()=>({items:u||[],containerRef:l,maxMentionableUsersSuggestions:d}),[u,l,d]);return jsxRuntime.jsx(ma.Provider,{value:P,children:jsxRuntime.jsxs(plateCommon.Plate,{initialValue:N||Uk,plugins:jm,editorRef:L(k,y||null),onChange:C=>{w(C);},children:[jsxRuntime.jsxs(ia,{className:pa,"aria-controls":h,ref:g,children:[jsxRuntime.jsxs(M,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsxRuntime.jsx(ya,{nodeType:plateBasicMarks.MARK_BOLD,icon:_20.BoldIcon,ariaLabel:R(Jo.bold),isDisabled:s}),jsxRuntime.jsx(ya,{nodeType:plateBasicMarks.MARK_ITALIC,icon:_20.ItalicIcon,ariaLabel:R(Jo.italic),isDisabled:s}),jsxRuntime.jsx(ya,{nodeType:plateBasicMarks.MARK_UNDERLINE,icon:_20.UnderlineIcon,ariaLabel:R(Jo.underline),isDisabled:s})]}),jsxRuntime.jsx(O,{orientation:"vertical",className:Ot}),jsxRuntime.jsx(hi,{nodeType:plateFont.MARK_COLOR,"aria-label":R(Jo.fontColor),isDisabled:s}),jsxRuntime.jsx(O,{orientation:"vertical",className:Ot}),jsxRuntime.jsx(hi,{nodeType:plateFont.MARK_BG_COLOR,"aria-label":R(Jo.backgroundColor),isDisabled:s}),jsxRuntime.jsx(O,{orientation:"vertical",className:Ot}),jsxRuntime.jsx(Km,{isDisabled:s}),jsxRuntime.jsx(O,{orientation:"vertical",className:Ot}),jsxRuntime.jsx(B,{className:Xo,icon:_24.QuestionmarkCircleIcon,size:"sm","aria-label":R(Jo.help),onPress:c})]}),jsxRuntime.jsx(O,{variant:"secondary"}),jsxRuntime.jsx("div",{...T,ref:x,children:jsxRuntime.jsx(plateCommon.PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:f,spellCheck:a,"aria-label":p,className:utils.classNames(sa({isDisabled:s}),la({isInline:i})),renderPlaceholder:({attributes:C,children:E})=>jsxRuntime.jsx("span",{...C,className:tokens.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}=reactAria.useHover({isDisabled:t}),{label:p,data:l}=o;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("li",{...reactAria.mergeProps(r,s),className:dm({isDisabled:t,isHovered:a}),"data-active":a,ref:i,children:[jsxRuntime.jsx(Ao,{name:p,...l?.avatar}),jsxRuntime.jsxs(M,{display:"flex",flexDirection:"column",children:[jsxRuntime.jsx(Q,{type:"subtitle",size:"sm",children:p}),jsxRuntime.jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsxRuntime.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__default.default.memo(ro__default.default.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=_20.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=ro.useRef(null),{formatMessage:x}=F(),I=ro.useRef(null),k=ro.useRef(null),S=ro.useRef(null),N=!a&&g.variant==="minimal",w=ro.useRef(null),[T,P]=ro__default.default.useState(g.value||g.defaultValue),C=g.isDisabled||g.isSaveDisabled||!utils.getPlainText(T||""),{fieldProps:E}=reactAria.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=ro.useCallback(()=>{P(""),a?R.current?.reset():k.current?.clear();},[a]),D=ro.useCallback(()=>{C||(i?.(a?Kt(R.current?.children):I.current.value),_&&H());},[H,_,a,i,C]),K=jsxRuntime.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__default.default.useState(!1),{keyboardProps:A}=reactAria.useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),G(!0));}}),ee=ro.useCallback(V=>{P(V),g.onChange?.(V);},[g]);return jsxRuntime.jsxs("div",{...reactAria.mergeProps(E,a?A:{}),role:"application",ref:L(S,h),style:o,"data-block-id":t,"data-block-class":r,className:utils.classNames(sm({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[N?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s?jsxRuntime.jsx(Ao,{className:im,name:g.avatarName||""}):null,jsxRuntime.jsxs("div",{className:ym({isInline:s}),children:[jsxRuntime.jsx(ca,{isMinimal:N,textBoxRef:I,isInline:s,editableContentAriaLabel:y,...g,onChange:ee,onSave:D}),K]})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a?jsxRuntime.jsx(Pi,{containerRef:S,ref:w,editorRef:R,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{G(!0);},...g,onChange:ee,onSave:D}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!s&&jsxRuntime.jsx(O,{variant:"secondary"}),jsxRuntime.jsx(ca,{onCancel:n,textBoxRef:I,ref:k,isInline:s,editableContentAriaLabel:y,...g,onChange:V=>{P(V),g.onChange?.(V);},onSave:D})]}),jsxRuntime.jsx(O,{variant:"secondary"}),jsxRuntime.jsxs("div",{className:utils.classNames(pa,tokens.sprinkles({justifyContent:"space-between"})),children:[jsxRuntime.jsxs(M,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&g.mentionableUsers?jsxRuntime.jsx(B,{icon:_20.AtIcon,size:"sm","aria-label":x(Ii.mention),onPress:()=>w.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:W},X)=>V==="action"?jsxRuntime.jsx(B,{...W,size:"sm",isDisabled:g.isDisabled||W.isDisabled},X):jsxRuntime.jsx(be,{...W,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||W.isDisabled},X))]}),jsxRuntime.jsxs(M,{children:[!!n&&jsxRuntime.jsx(B,{variant:"secondary",icon:_20.CrossCircleFilledIcon,isDisabled:g.isDisabled,size:"md",onPress:()=>{n(),v&&H();},"aria-label":c||x(Ii.cancel)}),K]})]})]}),jsxRuntime.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__default.default.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=web.useTransition(a,i),u=web.animated[s];return c((m,d)=>d&&jsxRuntime.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__default.default.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__default.default.useRef(null),u=interactions.useInteractionModality(),[m,d]=ro__default.default.useState(!1),f=ro.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__default.default.useState(f),v=ko(),{buttonProps:_,isPressed:g}=reactAria.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}=reactAria.useFocusRing(),{hoverProps:I,isHovered:k}=reactAria.useHover({}),S=utils.filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":g,"data-focus-visible":x,"data-hovered":k,"data-focused":R});return ro.useEffect(()=>{b(f());},[f]),ro.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]),jsxRuntime.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},...reactAria.mergeProps(_,h,I,S),className:utils.classNames(Jm,Er({isFocusVisible:x,variant:"high-contrast",isHovered:k}),Br({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:o,ref:L(l,c),children:[jsxRuntime.jsx(_16.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__default.default.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=reactAria.useId(),{formatMessage:_}=F(),g=n&&jsxRuntime.jsx(Q,{id:v,type:"title",size:"sm",elementType:"h3",children:n});return jsxRuntime.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:[jsxRuntime.jsxs("div",{className:rf({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!u}),children:[jsxRuntime.jsxs(M,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsxRuntime.jsx(l,{style:{color:c},size:24}):null,!l&&g,u?jsxRuntime.jsx(B,{icon:_20.XIcon,variant:"secondary",size:"md","aria-label":_(v0.close),onPress:d}):null]}),l?g:null]}),a?jsxRuntime.jsx(M,{elementType:"section",className:af,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsxRuntime.jsx(M,{paddingX:"lg",paddingBottom:"lg",children:jsxRuntime.jsx(Ke,{...p})}):null,s||i?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(O,{}),jsxRuntime.jsxs(M,{padding:"lg",display:"flex",gap:"xl",children:[s?jsxRuntime.jsx(U,{variant:"secondary",className:Ri,label:s,onPress:d,autoFocus:f==="cancel"}):null,i?jsxRuntime.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__default.default(),pf=ro__default.default.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=ro.useMemo(()=>{let p=t;return (!t||Array.isArray(t)&&t.length===0)&&(p=""),P0.render(p)},[t]);return jsxRuntime.jsx("div",{className:utils.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__default.default.useState(!1),[n,i]=ro__default.default.useState(0),[s,p]=ro__default.default.useState(0),[l,c]=ro__default.default.useState(!1);ro.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=ro.useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),liveAnnouncer.announce(o(df.playing),"polite")):(e.current.pause(),a(!1),liveAnnouncer.announce(o(df.paused),"polite"))))();},[o,e]),m=ro.useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,liveAnnouncer.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__default.default.forwardRef(({className:e,style:o,size:t="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro__default.default.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=utils.filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":u>0});return jsxRuntime.jsxs("div",{...g,...i,className:utils.classNames(ff,"BaselineUI-AudioPlayer",e),role:"group",style:o,ref:s,children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("audio",{ref:p,children:r.map(({url:h,type:R})=>jsxRuntime.jsx("source",{src:h,type:R},h))})}),jsxRuntime.jsx(be,{icon:l?_24.PauseIcon:_24.PlayIcon,variant:"toolbar",isSelected:l,size:t,"aria-label":_(l?Ti.pause:Ti.play),style:{borderRadius:"50%"},onPress:m}),jsxRuntime.jsxs("div",{className:yf,children:[jsxRuntime.jsx("span",{"aria-hidden":!0,children:y}),jsxRuntime.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);}}),jsxRuntime.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__default.default.useRef(null);return ro.useLayoutEffect(()=>{if(!r.current)return;let a=r.current.closest(".BaselineUI-ImageGallery")?.querySelector(`[data-image-key='${e?.at(-1)?.key}']`)?.cloneNode(!0);utils.invariant(a,"Node is not defined."),r.current?.prepend(a);},[e,o]),jsxRuntime.jsx("div",{className:ha(),ref:r,children:jsxRuntime.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=web.useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsxRuntime.jsx(Vo,{"aria-label":r(Xt.loading)}):s((p,l)=>l&&jsxRuntime.jsx(web.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})=>jsxRuntime.jsx(A0,{item:d,deleteElement:f,fit:n})})=>{let d=reactAria.useId(),{formatMessage:f}=F();utils.invariant(e&&vo(e),"Expected value to be a list option");let y=i?jsxRuntime.jsx("div",{className:zf,children:jsxRuntime.jsx(B,{"aria-label":f(Xt.delete),size:"xs",icon:_12.XIcon,onPress:()=>{i(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,b=ro.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 jsxRuntime.jsxs("li",{...o,ref:a,className:utils.classNames(hf,s),"aria-labelledby":d,style:u,children:[jsxRuntime.jsx(M,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsxRuntime.jsx("div",{className:utils.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})})}),jsxRuntime.jsx("span",{id:d,className:utils.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__default.default.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__default.default.useRef(null),[x,I]=ro.useState([]),{formatMessage:k}=F();ro.useEffect(()=>{(p||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,p]);let[S,N]=utils$1.useControlledState(g.selectedKeys,g.defaultSelectedKeys??[],g.onSelectionChange),[w,T]=utils$1.useControlledState(l?Ni(l):void 0,Ni(c),y?D=>{y?.(xa(D));}:void 0),P=ro.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=ro.useCallback(()=>{i&&x.length&&(T(w.filter(D=>!x.includes(D.id))),i(new Set(x)),I([]));},[x,w,i,T]),E=ro.useCallback((D,K,j)=>jsxRuntime.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}=reactAria.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 jsxRuntime.jsxs("div",{...H,ref:h,style:o,className:utils.classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsxRuntime.jsx(le,{...g,selectedKeys:S,items:w,onReorder:P,layout:"grid",orientation:"vertical",className:xf,ref:R,dropIndicatorStyle:W0,renderOption:E,renderDragPreview:D=>jsxRuntime.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}})}),jsxRuntime.jsx(we,{isOpen:!![...x].length,onOpenChange:D=>{D||I([]);},children:jsxRuntime.jsx(Ee,{isDismissable:!0,children:jsxRuntime.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__default.default.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=reactStately.useSelectState({items:t,...h,defaultSelectedKey:h.defaultSelectedKey||t?.[0]?.id,children:I,validationState:h.validationState==="error"?"invalid":"valid"}),[S,N]=utils$1.useControlledState(u,!!m,A=>{d?.({isSelected:A,selectedKey:k.selectedKey});}),{hoverProps:w,isHovered:T}=reactAria.useHover({isDisabled:s}),P=ro.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?jsxRuntime.jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:ee,placement:"bottom start",offset:4,...typeof g=="function"?g("button"):g,children:jsxRuntime.jsx(be,{icon:W,"aria-label":ee,variant:"toolbar",...X})}):jsxRuntime.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=ro.useCallback(({buttonProps:A,ref:ee})=>{delete A["aria-labelledby"];let V=f||`${x(rI.more)} ${C}`;return jsxRuntime.jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:V,placement:"bottom start",offset:4,...g,children:jsxRuntime.jsx(interactions.PressResponder,{...A,children:jsxRuntime.jsx(B,{"aria-label":V,ref:ee,icon:_8.CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:W})=>utils.classNames(Nr({isSelected:S,isFocusVisible:W}),Df,v),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[C,l,x,S,s,f,i,g,v,_]),H=utils.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=ro.useMemo(()=>({state:k,popoverAnchorRef:D}),[k,D]),j=ro.useCallback(A=>typeof b=="function"?b(A,{isButton:!1,isSelected:k.selectionManager.isSelected(A.id)}):b,[b,k.selectionManager]),G=ro.useCallback(A=>typeof y=="function"?y(A,{isButton:!1,isSelected:k.selectionManager.isSelected(A.id)}):y,[y,k.selectionManager]);return jsxRuntime.jsx(Fr.Provider,{value:K,children:jsxRuntime.jsxs(M,{...w,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:utils.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,jsxRuntime.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__default.default.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}=reactAria.useFilter({sensitivity:"base"}),S=te(),N=reactStately.useComboBoxState({...x,defaultFilter:_||k,defaultItems:s,onSelectionChange:l,onInputChange:c,children:S,validationState:u?"invalid":"valid"}),w=ro__default.default.useRef(null),T=ro__default.default.useRef(null),P=ro__default.default.useRef(null),C=ro__default.default.useRef(null),E=ro__default.default.useRef(null),{buttonProps:H,inputProps:D,listBoxProps:K,labelProps:j,errorMessageProps:G,descriptionProps:A,validationErrors:ee}=reactAria.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}=reactAria.useHover({isDisabled:x.isDisabled}),{isFocused:Ce,focusProps:Pe,isFocusVisible:ke}=reactAria.useFocusRing(),He=Do({isReadOnly:x.isReadOnly,validationState:d}),oe=utils.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}=reactAria.useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]});return jsxRuntime.jsx(ao.Provider,{value:N,children:jsxRuntime.jsxs("div",{className:utils.classNames(Of({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:o,ref:I,children:[i||m==="start"&&W?jsxRuntime.jsxs("div",{className:qf({labelPosition:m,hasMessage:!!W}),children:[jsxRuntime.jsx("label",{...reactAria.mergeProps(j,de),className:Uf({isDisabled:x.isDisabled}),children:i}),m==="start"&&W]}):null,jsxRuntime.jsxs("div",{...X,className:$f({validationState:d,isHovered:ze,isFocused:Ce,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:E,children:[jsxRuntime.jsx("input",{...reactAria.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:utils.classNames(jf({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:t}),He&&v?jsxRuntime.jsx(He,{className:Af({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsxRuntime.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})})]}),jsxRuntime.jsx(ye,{className:qe,ref:C,triggerRef:E,state:N,children:jsxRuntime.jsx(le,{...K,items:s,ref:P,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:kr})}),m==="top"&&W]})})});Xf.displayName="ComboBox";var Fi=ro__default.default.forwardRef(({item:e,renderGridItem:o,state:t},r)=>{let a=ae(r),n=reactAria.useGridListItem({node:e},t,a),i=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:s}=reactAria.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__default.default.forwardRef(({className:e,style:o,isEditing:t=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,...i},s)=>{let p=te(),l=reactStately.useListState({...i,children:p}),c=ae(s),{gridProps:u}=reactAria.useGridList(i,l,c);ro.useImperativeHandle(n,()=>({setFocused:d=>{l.selectionManager.setFocused(d);},setFocusedKey:d=>{l.selectionManager.setFocusedKey(d);}}),[l]);let m=t?zI:u.onKeyDownCapture;return jsxRuntime.jsx("ul",{...u,className:utils.classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,onKeyDownCapture:m,children:[...l.collection].map(d=>jsxRuntime.jsx(Fi,{item:d,state:l,renderGridItem:i.renderGridItem},d.key))})});Zf.displayName="GridList";var Qf="_1dc3b8m0";var ey=ro__default.default.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=reactStately.useListState({...s,selectionMode:o,suppressTextValueWarning:!0,children:c}),{actionGroupProps:m}=actiongroup.useActionGroup({...s,selectionMode:o,children:c},u,l);return jsxRuntime.jsx(M,{...m,display:"flex",flexDirection:"row",gap:"xs",className:utils.classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:t,ref:l,children:[...u.collection].map(d=>(utils.invariant(d.value),jsxRuntime.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}=actiongroup.useActionGroupItem({key:e.key},o),s=n||o.selectionManager.isDisabled(e.key),p=o.selectionManager.isSelected(e.key);utils.invariant(e.value);let{icon:l}=e.value;utils.invariant(l);let c=ro.useMemo(()=>(utils.invariant(e.value),typeof t=="function"?t(e.value):t),[t,e.value]);return jsxRuntime.jsx(interactions.PressResponder,{...reactAria.mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsxRuntime.jsx(ne,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsxRuntime.jsx(B,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:utils.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__default.default.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=ro.useMemo(()=>t.map(g=>({id:g.color,label:g.label})),[t]),_=reactAria.useId();return ro.useEffect(()=>{!a&&!y["aria-label"]&&!y["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,y]),jsxRuntime.jsxs(M,{...Na(y),className:utils.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?jsxRuntime.jsxs(M,{display:"flex",alignItems:"center",gap:"md",children:[n?jsxRuntime.jsx(n,{size:24,className:tokens.sprinkles({color:"icon.primary"})}):null,a?jsxRuntime.jsx(Q,{id:_,type:"label",size:"sm",children:a}):null]}):null,jsxRuntime.jsx(le,{className:utils.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)=>jsxRuntime.jsx("li",{...k,"data-disabled":I,className:utils.classNames(oy,k.className),ref:S,children:jsxRuntime.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}=reactAria.useHover({}),v=ro.useRef(null),{onKeyDown:_,...g}=e.interactiveElementProps;delete g.onFocus,delete g.onClick;let h=focus.createFocusManager(v),R=ro.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=ro.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?jsxRuntime.jsxs(M,{display:"flex",flexDirection:"row",children:[P?jsxRuntime.jsx(be,{icon:P,"aria-label":E,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,C?jsxRuntime.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=ro.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}=reactAria.usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:w,focusProps:T}=focus.useFocusRing();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{...reactAria.mergeProps({onKeyDown:R,onFocus:()=>{e.focusItem(!1);}},N,T,y,e.itemContainerWithoutChildrenProps,g),className:utils.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:jsxRuntime.jsxs(M,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?x:null,jsxRuntime.jsxs(M,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxRuntime.jsxs(M,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${o*2} * ${tokens.themeVars.spacing.lg})`},children:[jsxRuntime.jsx(B,{icon:_8.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:utils.classNames(ny,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),k?jsxRuntime.jsx(k,{size:16,style:{color:tokens.themeVars.color.icon.interactive.disabled}}):null]}),jsxRuntime.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?jsxRuntime.jsx("div",{onClick:P=>{P.stopPropagation();},children:jsxRuntime.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"})}):jsxRuntime.jsx(Q,{type:"label",size:"sm",className:utils.classNames(tokens.sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:d(r)}),r.data.description?jsxRuntime.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__default.default.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=ro.useRef(null),h=reactStately.useTreeState({...b,items:a.children,children:_}),R=ro.useMemo(()=>Object.fromEntries(Object.entries(QI(a,ZI)).map(([w,T])=>[w,{...T,canRename:!!d}])),[a,d]),x=reactAria.useId(),[I,k]=ro__default.default.useState(a.children?.[0]?.id??""),S=ro.useRef(I),N=ro.useMemo(()=>({[`tree-${x}`]:{focusedItem:I,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[I,h.expandedKeys,h.selectionManager.selectedKeys,x]);return ro.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]),jsxRuntime.jsx(reactComplexTree.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=>jsxRuntime.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})=>jsxRuntime.jsx(Ae,{children:jsxRuntime.jsx(reactAria.VisuallyHidden,{children:w})}),renderTreeContainer:({containerProps:w,children:T})=>jsxRuntime.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:utils.classNames(e,"BaselineUI-TreeView"),ref:L(v,w.ref,g),role:"treegrid",children:T}),renderItemsContainer:({children:w})=>w,children:jsxRuntime.jsx(reactComplexTree.Tree,{treeId:`tree-${x}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});fy.displayName="TreeView";var nw=ro.forwardRef(({className:e,isCollapsible:o=!1,...t},r)=>{let a=ro.useRef(null),n=reactAria.useId();return ro.useImperativeHandle(r,()=>({resize:a.current?.resize})),jsxRuntime.jsx(reactResizablePanels.Panel,{className:utils.classNames("BaselineUI-Panel",e),collapsible:o,ref:a,id:n,...t})});nw.displayName="Panel";var uw=ro.forwardRef(({className:e,...o},t)=>{let r=ro.useRef(null);return ro.useImperativeHandle(t,()=>({setLayout:r.current?.setLayout})),jsxRuntime.jsx(reactResizablePanels.PanelGroup,{className:utils.classNames("BaselineUI-PanelGroup",e),ref:r,...o})});uw.displayName="PanelGroup";var yy="_6abhjk0";var bw=({className:e,isDisabled:o=!1,...t})=>jsxRuntime.jsx(reactResizablePanels.PanelResizeHandle,{disabled:o,className:utils.classNames(yy,"BaselineUI-PanelResizeHandle",e),...t});bw.displayName="PanelResizeHandle";
79
+ var xe=typeof document<"u"?ro__default.default.useLayoutEffect:()=>{};function ka(e){let o=ro.useRef(null);return xe(()=>{o.current=e;},[e]),ro.useCallback((...t)=>{let r=o.current;return r?.(...t)},[])}function Ia(e){let[o,t]=ro.useState(e),r=ro.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__default.default.createContext(Jt),ky=ro__default.default.createContext(!1);var Iy=!!(typeof window<"u"&&window.document&&window.document.createElement),wa=new WeakMap;function wy(e=!1){let o=ro.useContext(Ai),t=ro.useRef(null);if(t.current===null&&!e){var r,a;let n=(a=ro__default.default.__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=ro.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__default.default.useId(),[t]=ro.useState($i()),r=t||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Jt.prefix}`;return e||`${r}-${o}`}var Sa=typeof ro__default.default.useId=="function"?Sy:Ry;function Ty(){return !1}function Ny(){return !0}function Ly(e){return ()=>{}}function $i(){return typeof ro__default.default.useSyncExternalStore=="function"?ro__default.default.useSyncExternalStore(Ly,Ty,Ny):ro.useContext(ky)}var Fy=!!(typeof window<"u"&&window.document&&window.document.createElement),er=new Map;function or(e){let[o,t]=ro.useState(e),r=ro.useRef(null),a=Sa(o),n=ro.useCallback(i=>{r.current=i;},[]);return Fy&&er.set(a,n),xe(()=>{let i=a;return ()=>{er.delete(i);}},[a]),ro.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=ro.useRef(null);return ro.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;ro.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)?jsxRuntime.jsx(reactStately.Section,{items:e.children,title:e.title,"aria-label":e.title,children:o=>jsxRuntime.jsx(reactStately.Item,{textValue:o.label,children:o.label},o.id)},e.id):jsxRuntime.jsx(reactStately.Item,{textValue:e.label,children:e.label},e.id)}function te(){return ro.useCallback(e=>Xy(e),[])}function Qi(e,o,t){let{direction:r}=reactAria.useLocale(),a=reactStately.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 utils.invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});reactAria.useDraggableCollection(e,a,t);let n=reactStately.useDroppableCollectionState({...e,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:i}=reactAria.useDroppableCollection({...e,keyboardDelegate:new reactAria.ListKeyboardDelegate({collection:o.collection,disabledKeys:o.disabledKeys,ref:t,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new reactAria.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__default.default.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}=reactAria.useSeparator({...p,orientation:r,elementType:n});return jsxRuntime.jsx(n,{...c,className:utils.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 tokens.sprinkles.properties.has(e)}var L=ro__default.default.forwardRef(({elementType:e="div",children:o,...t},r)=>{let a=e,{sprinkleProps:n,domProps:i}=ro.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 jsxRuntime.jsx(a,{...i,className:utils.classNames(tokens.sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:o})});L.displayName="Box";var ct=ro__default.default.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)=>{utils.invariant(e.value&&_o(e.value),"Item cannot be a section");let{icon:d,label:f}=e.value,{hoverProps:y,isHovered:b}=reactAria.useHover({isDisabled:o}),v=utils.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 jsxRuntime.jsxs("li",{...reactAria.mergeProps(a,y,v),className:utils.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:[jsxRuntime.jsxs(L,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsxRuntime.jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsxRuntime.jsx(_24.CheckmarkIcon,{size:24}):null}):null,d?jsxRuntime.jsx(d,{size:24}):null,jsxRuntime.jsx("span",{...p,children:f})]}),i?jsxRuntime.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:jsxRuntime.jsx("li",{...p,ref:c,"data-drop-target":i,className:utils.classNames(ts({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:t}),...n})=>{let i=ro__default.default.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=reactAria.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}=reactAria.useDraggableItem({key:e.key},r);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ha,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),o(n),t.collection.getKeyAfter(e.key)==null&&jsxRuntime.jsx(Ha,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};us.displayName="DraggableListOption";var dt=ro__default.default.forwardRef(({item:e,renderOption:o=(m,d,f)=>jsxRuntime.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__default.default.useRef(null),d=reactAria.useOption({key:e.key},r,m),{value:f}=e;utils.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?jsxRuntime.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:{...reactAria.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__default.default.useRef(null),{itemProps:l,groupProps:c,headingProps:u}=reactAria.useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=o.collection.getChildren?.(e.key);utils.invariant(m,"children must be defined");let{value:d}=e;utils.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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e.key===o.collection.getFirstKey()?null:jsxRuntime.jsx(O,{UNSAFE_omitRole:!0}),jsxRuntime.jsxs("li",{...l,style:{...l.style,...f},className:utils.classNames(ss,y,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsxRuntime.jsx(L,{...u,className:utils.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,jsxRuntime.jsx("ul",{...c,children:[...m].map(b=>jsxRuntime.jsx(dt,{item:b,state:o,...s},b.key))})]})]})};var ao=ro__default.default.createContext(null),Va=ro__default.default.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__default.default.useRef(null),{direction:b}=reactAria.useLocale(),v=ro__default.default.useRef(null),{listBoxProps:_}=reactAria.useListBox({...d,shouldSelectOnPressUp:i,keyboardDelegate:new reactAria.ListKeyboardDelegate({collection:u.collection,ref:v,layout:o,orientation:t,direction:b,disabledKeys:u.disabledKeys})},u,v),g=ro.useCallback((P,C)=>{let E=v.current?.querySelector(`[data-key="${P}"][role="option"]`);E&&E?.scrollIntoView({block:"nearest",inline:"nearest",...C});},[]);ro.useImperativeHandle(m,()=>({scrollIntoView:g}),[g]),granularHooks.useGranularEffect(()=>{let P=Te(v.current)instanceof ShadowRoot,C=u.selectionManager.focusedKey;P&&C&&g(C);},[u.selectionManager.focusedKey],[g]);let h=web.useReducedMotion(),R=ro.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}=reactAria.useFocusRing(),T=utils.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 jsxRuntime.jsxs("ul",{...reactAria.mergeProps(_,w,T,x),className:utils.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"?jsxRuntime.jsx(bs,{...C,section:P}):jsxRuntime.jsx(dt,{...C,item:P})}),l?jsxRuntime.jsx(reactAria.DragPreview,{ref:y,children:l}):null]})});Va.displayName="ListBoxCore";var vs=ro__default.default.forwardRef((e,o)=>{let t=te(),r=reactStately.useListState({...e,children:t});return jsxRuntime.jsx(Va,{...e,ref:o,state:r})});vs.displayName="ListBoxStandalone";var le=ro__default.default.forwardRef((e,o)=>{let t=ro.useContext(ao);return ro.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?jsxRuntime.jsx(Va,{...e,ref:o,state:t}):jsxRuntime.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__default.default.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...o})=>{let t=ro__default.default.useRef(null),r=reactStately.useOverlayTriggerState(o),a=reactAria.useOverlayTrigger(o,r),n=ro.useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:t}),[r,a]);return jsxRuntime.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__default.default.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:o})=>{let{state:t,overlayTriggerAria:r,triggerRef:a}=ro.useContext(ut);utils.invariant(t,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=ro.useMemo(()=>({...n,isSelected:t.isOpen,ref:a}),[n,t.isOpen,a]);return utils.invariant(!o&&e||o&&!e,"Either one of anchorRect or children has to be provided."),utils.invariant(!o||ws(o),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsxRuntime.jsx(ir.Provider,{value:i,children:o?jsxRuntime.jsx("button",{className:utils.classNames(Ps,"BaselineUI-PopoverTrigger-Hidden"),style:o,ref:a,tabIndex:-1},JSON.stringify(o)):e})};function sr({tooltip:e,...o},t){let[r,a]=ro.useState(o["aria-label"]||""),n=o["aria-labelledby"];return ro.useEffect(()=>{if(n){let p=fe(t.current).querySelector(`#${n}`);p&&a(p.textContent||"");}},[n,t]),{tooltipProps:ro.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__default.default.useRef(null),{ref:t,...r}=ro.useContext(ir)||{},{buttonProps:a,isPressed:n}=reactAria.useButton({...e,...r},o),{isFocusVisible:i,isFocused:s,focusProps:p}=reactAria.useFocusRing(),{hoverProps:l,isHovered:c}=reactAria.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__default.default.useRef(null),{ref:r,...a}=ro.useContext(ir)||{},{buttonProps:n,isPressed:i}=reactAria.useToggleButton({...e,...a},o,t);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=reactAria.useFocusRing(),{hoverProps:c,isHovered:u}=reactAria.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__default.default.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=utils.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 jsxRuntime.jsxs(i,{...reactAria.mergeProps(d,R),className:utils.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&&jsxRuntime.jsx(r,{size:h,className:ja({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsxRuntime.jsx(a,{size:h,className:ja({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsxRuntime.jsx(_8.CaretDownIcon,{size:8,className:nr})]})});U.displayName="ActionButton";var Ms=ro__default.default.forwardRef(({className:e,style:o,node:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=ro__default.default.useRef(null);ro__default.default.useEffect(()=>{let c=s.current;return c?.append(t),()=>{c?.contains(t)&&t.remove();}},[t]);let{pressProps:p,isPressed:l}=reactAria.usePress(n);return jsxRuntime.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?jsxRuntime.jsx("div",{...t,className:xo({isDisabled:i,labelPosition:n}),children:e}):a?jsxRuntime.jsx("div",{...o,className:xo({hasError:!0,labelPosition:n}),children:a}):r?jsxRuntime.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__default.default.forwardRef(({children:e,state:o,overlayProps:t,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=reactAria.useTooltip({isOpen:o.isOpen},o),u=ro.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=web.useReducedMotion(),[d]=web.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 jsxRuntime.jsxs(web.animated.span,{...t,style:{...d,...t.style},ref:l,"data-placement":f,children:[p?jsxRuntime.jsx("div",{className:$s({placement:f,variant:n}),...r}):null,jsxRuntime.jsx("div",{...reactAria.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__default.default.useRef(null);ro.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]),ro.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__default.default.useRef(null),[a,n]=ro__default.default.useState();return ro__default.default.useEffect(()=>{if(t){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),o?.(i);});},[o,t,n]),ro__default.default.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]=ro.useState(!1),[a,n]=ro.useState(!1),[i,s]=ro.useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return ro.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=ro.useRef(!0);return ro.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]=ro.useReducer(Bb,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=y=>{n({type:Xs,data:y});},c=ro.useRef(),u=()=>{c.current=mr,n({type:mr});},m=()=>{c.current=fr,n({type:fr});},d=!!i?.length,f=!!p?.length;return granularHooks.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__default.default.createContext({messages:{},shouldLogMissingMessages:!0}),Js=({children:e,messages:o={},shouldLogMissingMessages:t=!0,...r})=>{let a=ro__default.default.useMemo(()=>({messages:o,shouldLogMissingMessages:t}),[o,t]);return jsxRuntime.jsx(reactAria.I18nProvider,{...r,children:jsxRuntime.jsx(Ga.Provider,{value:a,children:e})})};Js.displayName="I18nProvider";function F(e){let{messages:o,shouldLogMissingMessages:t}=ro.useContext(Ga);ro.useEffect(()=>{!e&&Hb__default.default(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=reactAria.useMessageFormatter(e?utils.cleanKeyFromGlobImport(e):o),a=reactAria.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__default.default.useRef(null);return ro__default.default.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]=ro.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__default.default.useRef(null);reactAria.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();}}),ro.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=ro.useCallback(()=>{let a=re(e??document.body),n=a.matchMedia(tokens.queries.tablet);return a.matchMedia(tokens.queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[t,r]=ro__default.default.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__default.default.createContext(void 0),rl=({portalContainer:e,children:o})=>jsxRuntime.jsx(Wa.Provider,{value:e,children:o});rl.displayName="PortalContainerProvider";function ge(e){let o=ro.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]=ro.useState("light"),[r,a]=ro.useState(!1),[n,i]=ro.useState(!1),[s,p]=ro.useState(!1);return ro.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]),ro.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]),ro.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]),ro.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=ro.createContext({theme:tokens.lightTheme,setTheme:()=>{}});var sl="var(--hj25q10)";var gr={LIGHT:{name:"light",theme:tokens.lightTheme},DARK:{name:"dark",theme:tokens.darkTheme}},To=ro__default.default.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}=reactAria.useLocale(),{colorScheme:c,reducedMotion:u,highContrast:m,transparency:d}=Xa(),{name:f,theme:y}=ro.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},_=ro.useMemo(()=>({theme:y,setTheme:t}),[y,t]);return jsxRuntime.jsx(So.Provider,{value:_,children:jsxRuntime.jsx("div",{...reactAria.mergeProps(n,v),className:utils.classNames(nl,"BaselineUI-ThemeProvider",r),style:{...dynamic.assignInlineVars(tokens.themeVars,y),...dynamic.assignInlineVars({[sl]:l==="rtl"?"-1":"1"}),...a},ref:p,children:o})})});To.displayName="ThemeProvider";var Ae=ro__default.default.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=ro.useContext(So);return jsxRuntime.jsx(reactAria.Overlay,{...n,children:jsxRuntime.jsx(To,{ref:i,theme:s,style:o,className:utils.classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:t})})});Ae.displayName="Portal";var ne=ro__default.default.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__default.default.useRef(null),y=ro__default.default.useRef(null),b=!m.text||m.isDisabled,v=reactStately.useTooltipTriggerState({...m,delay:t,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:g}=reactAria.useTooltipTrigger({...m,isDisabled:b,delay:t,closeDelay:r},v,f),h=ge(s),{overlayProps:R,arrowProps:x,placement:I,updatePosition:k}=reactAria.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}),jsxRuntime.jsxs(focus.FocusableProvider,{..._,ref:f,children:[e,v.isOpen?jsxRuntime.jsx(Ae,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":u,children:jsxRuntime.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__default.default.forwardRef((e,o)=>{let t=ae(o),{tooltipProps:r}=sr(e,t);return r?jsxRuntime.jsx(ne,{...r,children:jsxRuntime.jsx(Za,{...e,ref:t})}):jsxRuntime.jsx(Za,{...e,ref:t})});B.displayName="ActionIconButton";var Za=ro__default.default.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"];ro.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}),_=utils.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 jsxRuntime.jsxs(i,{...reactAria.mergeProps(u,_),className:utils.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:[jsxRuntime.jsx(t,{role:"presentation",size:hg[r]}),a==="popover"&&jsxRuntime.jsx(_8.CaretDownIcon,{size:8,className:nr})]})});Za.displayName="ActionIconButtonCore";var Me=ro__default.default.forwardRef(({className:e,style:o,labelPosition:t="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=ro__default.default.useRef(null),{locale:p}=reactAria.useLocale(),l=reactStately.useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:u}=reactAria.useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:d,isFocused:f}=reactAria.useFocusRing(),{labelProps:y,decrementButtonProps:b,inputProps:v,incrementButtonProps:_,groupProps:g,descriptionProps:h,errorMessageProps:R}=reactAria.useNumberField(n,l,s),x=ro.useMemo(()=>n.isReadOnly?_16.ReadOnlyIcon:n.isInvalid?_16.ErrorFilledIcon:null,[n.isInvalid,n.isReadOnly]),I=Ie({description:n.description,errorMessageProps:R,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:t,isDisabled:n.isDisabled}),k=utils.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 jsxRuntime.jsxs("div",{style:o,className:utils.classNames(je({labelPosition:t}),"BaselineUI-NumberInput",e),...k,ref:i,children:[n.label?jsxRuntime.jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!I}),children:[jsxRuntime.jsx("label",{...y,className:Ve,children:n.label}),t==="start"&&I]}):null,jsxRuntime.jsxs("div",{className:utils.classNames({[Ro]:n.isDisabled}),children:[jsxRuntime.jsxs("div",{...reactAria.mergeProps(g,c),className:utils.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:[jsxRuntime.jsx("input",{...reactAria.mergeProps(v,m),ref:s,className:utils.classNames("BaselineUI-NumberInput-Input",dr({isDisabled:n.isDisabled,labelPosition:t}))}),x?jsxRuntime.jsx(x,{className:Co({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxRuntime.jsxs("div",{className:js({isHoveredOrFocused:u||f,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsxRuntime.jsx(B,{variant:"secondary",size:"xxs",icon:_8.MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsxRuntime.jsx(O,{style:{height:16},orientation:"vertical"}),jsxRuntime.jsx(B,{variant:"secondary",size:"xxs",icon:_8.PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),t==="top"&&I]})]})});Me.displayName="NumberInput";var Lo=ro__default.default.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__default.default.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=reactAria.useNumberFormatter(a),S=reactStately.useSliderState({...I,numberFormatter:k}),{trackProps:N,groupProps:w,labelProps:T}=reactAria.useSlider(I,S,x),P=jsxRuntime.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 jsxRuntime.jsxs("div",{...w,style:o,"data-block-id":f,"data-block-class":y,className:utils.classNames(Es,"BaselineUI-Slider",e),children:[_?jsxRuntime.jsxs("div",{className:Ds,children:[jsxRuntime.jsx("label",{...T,className:utils.classNames(Fs({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?P:null]}):null,jsxRuntime.jsxs("div",{className:Bs,children:[jsxRuntime.jsx("div",{...N,className:utils.classNames(Vs,"BaselineUI-Slider-Track"),ref:M(x,R),"data-testid":"track",children:jsxRuntime.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__default.default.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=reactAria.useSliderThumb({trackRef:o,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=reactAria.useFocusRing(),{hoverProps:u,isHovered:m}=reactAria.useHover({isDisabled:t}),d=utils.filterTruthyValues({"data-disabled":t,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:utils.classNames(Os({isDisabled:t,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxRuntime.jsx("div",{...reactAria.mergeProps(n,u,d),className:utils.classNames(Hs({isDisabled:t,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb"),"data-testid":"thumb",children:jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{ref:a,...reactAria.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__default.default.forwardRef(({elementType:e="span",type:o="title",children:t,size:r="md",...a},n)=>jsxRuntime.jsx(e,{...a,className:utils.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__default.default.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__default.default.useRef(null),{dialogProps:d,titleProps:f}=reactAria.useDialog(l,m),{focusProps:y,isFocusVisible:b}=reactAria.useFocusRing();return jsxRuntime.jsxs("div",{...reactAria.mergeProps(d,y),className:utils.classNames(vl({background:r,isFocusVisible:b}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:o,ref:M(c,m),children:[jsxRuntime.jsxs(L,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:_l,children:[jsxRuntime.jsx(Q,{type:"title",size:"sm",...f,className:il,children:a}),jsxRuntime.jsxs(L,{children:[n?jsxRuntime.jsx(B,{...n,variant:"secondary"}):null,jsxRuntime.jsx(B,{variant:"secondary",size:"md",icon:_20.XIcon,onPress:p,"aria-label":u(Qg.close)})]})]}),jsxRuntime.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=web.useReducedMotion(),[n,i]=ro__default.default.useState("100vh");ro.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]=web.useSpring(()=>({y:0,immediate:a,config:{easing:web.easings.easeOutCubic}})),l=ro.useRef(0),c=ro.useCallback(()=>{p.start({y:l.current,onRest:()=>{o.close();}});},[p,o]),u=ro.useCallback(d=>{d.target.closest("[data-drawer]")||c();},[c]);granularHooks.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__default.default.createContext({state:null,triggerProps:{},overlayProps:{}}),we=({children:e,...o})=>{let t=reactStately.useOverlayTriggerState(o),{triggerProps:r,overlayProps:a}=reactAria.useOverlayTrigger({type:"dialog"},t),n=ro.useMemo(()=>({state:t,triggerProps:r,overlayProps:a}),[t,r,a]);return jsxRuntime.jsx(Ue.Provider,{value:n,children:e})};we.displayName="Modal";var on=ro__default.default.createContext({isDrawer:!1,closeDrawer:()=>{}}),tn=ro__default.default.createContext({setIsPopoverSafelyClosed:()=>{}}),vv=web.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__default.default.useContext(Ue),[u,m]=ro__default.default.useState(!0),d=wo(n),f=ge(n),y=typeof s=="boolean"&&s||s==="auto"&&d==="mobile";utils.invariant(c,"ModalContent must be a child of Modal");let b=ro__default.default.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}=reactAria.useModalOverlay({isDismissable:!y&&u,isKeyboardDismissDisabled:_},c,b),{theme:S}=ro.useContext(So),N=web.useReducedMotion(),w=web.useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!N||i,config:{easing:web.easings.easeInBounce}}),T=ro.useMemo(()=>({...I.style,...y?{...h.style,width:"100%"}:w}),[h.style,I.style,y,w]),P=ro.useMemo(()=>({isDrawer:y,closeDrawer:R}),[y,R]),C=ro.useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsxRuntime.jsx(reactAria.Overlay,{portalContainer:f,children:jsxRuntime.jsx(on.Provider,{value:P,children:jsxRuntime.jsx(tn.Provider,{value:C,children:jsxRuntime.jsxs(vv,{className:utils.classNames(Pl({enableDrawer:y}),o),theme:S,"data-block-id":p,"data-block-class":l,style:{...t,height:y?x:"auto",...dynamic.assignInlineVars({[zl]:x})},children:[jsxRuntime.jsx(web.animated.div,{...reactAria.mergeProps(k,g,{onPointerDown:y?g.onPointerDown:k.onPointerDown}),"data-testid":"underlay",style:g.style,className:utils.classNames(kl,"BaselineUI-Modal-Underlay")}),jsxRuntime.jsx(web.animated.div,{...reactAria.mergeProps(I,h),style:T,ref:b,"data-drawer":y,className:"BaselineUI-Modal-Content",children:typeof e=="function"?e(c):e})]})})})})},zv=web.animated(_v),Ee=({children:e,style:o,...t})=>{let{state:r}=ro__default.default.useContext(Ue);utils.invariant(r,"ModalContent must be a child of Modal");let a=web.useReducedMotion();return web.useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||t.disableAnimation})((i,s)=>s&&jsxRuntime.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__default.default.createContext({titleProps:{}}),ue=ro__default.default.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__default.default.useRef(null),m=ro__default.default.useRef(null),{isDrawer:d,closeDrawer:f}=ro.useContext(on),[y,b]=ro__default.default.useState(""),{focusProps:v,isFocusVisible:_}=reactAria.useFocusRing();ro.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}=reactAria.useDialog(l,u),R=ro.useMemo(()=>({titleProps:h}),[h]);return d&&r?jsxRuntime.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}):jsxRuntime.jsx(an.Provider,{value:R,children:jsxRuntime.jsx("section",{...reactAria.mergeProps(g,v),"data-block-id":i,"data-block-class":s,ref:M(u,c),style:t,className:utils.classNames(Tl({size:d?"content":a,variant:n,isDrawer:d,isFocusVisible:_}),"BaselineUI-Dialog",o),children:e})})});ue.displayName="Dialog";var Nl=ro__default.default.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:a}=ro.useContext(an);return ro__default.default.isValidElement(e)?ro__default.default.cloneElement(e,{...a,ref:r,className:utils.classNames(e.props.className,o),style:{...e.props.style,...t}}):jsxRuntime.jsx("h3",{...a,ref:r,className:o,style:t,children:e})});Nl.displayName="DialogTitle";function Ll({placement:e,isOpen:o}){let t=web.useReducedMotion();return web.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:web.config.stiff})}var El=({children:e,isOpen:o,popoverContentRef:t,portalContainer:r=document.body,style:a})=>{let[n,i]=ro.useState(!1),[s,p]=ro.useState(null),l=ro.useRef(null),{setIsPopoverSafelyClosed:c}=ro.useContext(tn);ro.useEffect(()=>{o?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[o]),ro.useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let u=t.current;return ro.useEffect(()=>{u&&p(u.getBoundingClientRect());},[u]),ro.useEffect(()=>{c(!n);},[n,c]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n?Fv__default.default.createPortal(jsxRuntime.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}=tokens.themeVars,ye=ro__default.default.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__default.default.useRef(null),b=ge(p),v=i?8:0,{underlayProps:_,popoverProps:g,placement:h,arrowProps:R}=reactAria.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 jsxRuntime.jsx(El,{isOpen:t.isOpen,popoverContentRef:y,portalContainer:b,style:g.style,children:x((k,S)=>S&&jsxRuntime.jsxs(Ae,{portalContainer:b,style:o,ref:f,"data-block-id":u,"data-block-class":m,children:[!d.isNonModal&&jsxRuntime.jsx("div",{..._,className:utils.classNames(ks,a,"BaselineUI-Popover-Underlay")}),jsxRuntime.jsxs(web.animated.div,{...g,style:{...g.style,...k,...dynamic.assignInlineVars({[Is]:`${d.triggerRef?.current?.offsetWidth}px`})},ref:M(y,f),className:utils.classNames(xs,"BaselineUI-Popover-Content",e),"data-placement":["top","bottom","left","right"].filter(N=>h?.includes(N)),children:[i?jsxRuntime.jsxs("svg",{className:utils.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:[jsxRuntime.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}),jsxRuntime.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,jsxRuntime.jsx(reactAria.DismissButton,{onDismiss:t.close}),jsxRuntime.jsx("div",{...r,style:c,className:utils.classNames(Cs,l),children:typeof n=="function"?n(t):n}),jsxRuntime.jsx(reactAria.DismissButton,{onDismiss:t.close})]})]}))})});ye.displayName="PopoverContentCore";var Re=ro__default.default.forwardRef((e,o)=>{let{state:t,overlayTriggerAria:{overlayProps:r},triggerRef:a}=ro.useContext(ut);return utils.invariant(a),t?jsxRuntime.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__default.default.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]=utils$1.useControlledState(l.value,l.defaultValue||0,t),[f,y]=ro__default.default.useState(!1),{keyboardProps:b}=reactAria.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 jsxRuntime.jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:utils.classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:o,ref:u,children:[a?jsxRuntime.jsx(a,{size:24,className:tokens.sprinkles({color:"icon.primary"})}):null,jsxRuntime.jsxs(Ne,{type:"dialog",isOpen:f,onOpenChange:y,children:[jsxRuntime.jsx(Le,{children:jsxRuntime.jsx(ne,{text:l["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:p,...i,children:jsxRuntime.jsx(U,{label:v,variant:"popover","aria-label":_,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsxRuntime.jsx(Re,{placement:"bottom start",...s,className:utils.classNames(qe,s?.className),children:jsxRuntime.jsx(ue,{size:"content","aria-label":_,children:jsxRuntime.jsx(reactAria.FocusScope,{autoFocus:!0,children:jsxRuntime.jsx(L,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...b,children:jsxRuntime.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__default.default.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__default.default.useRef(null),c=reactStately.useToggleState(s),{inputProps:u,isPressed:m}=reactAria.useSwitch(s,c,l),{isFocusVisible:d,focusProps:f}=reactAria.useFocusRing(),{hoverProps:y,isHovered:b}=reactAria.useHover({isDisabled:s.isDisabled}),v=utils.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}),_=jsxRuntime.jsx("div",{className:utils.classNames(ql({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:d,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsxRuntime.jsx("div",{className:utils.classNames(Kl({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxRuntime.jsxs("label",{...reactAria.mergeProps(v,y),className:utils.classNames(Wl({labelPosition:t}),"BaselineUI-Switch",e),style:a,ref:p,children:[o?jsxRuntime.jsx("span",{className:utils.classNames(Gl,"BaselineUI-Switch-Label"),children:o}):null,jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...reactAria.mergeProps(u,f),ref:l})}),r?jsxRuntime.jsxs("div",{className:Yl({labelPosition:t}),children:[jsxRuntime.jsx("span",{className:utils.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:_20.SearchIcon,md:_24.SearchIcon,lg:_24.SearchIcon},np=ro__default.default.forwardRef(({className:e,size:o="md",variant:t="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=ro__default.default.useRef(null),l=reactStately.useSearchFieldState(i),{inputProps:c,clearButtonProps:u}=reactAria.useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:d,isFocused:f}=reactAria.useFocusRing({within:!0,isTextInput:!0}),y=f_[o],b=o==="sm"?_12.XIcon:_16.XIcon,v=utils.filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":f,"data-disabled":i.isDisabled,"data-focus-visible":d});return jsxRuntime.jsxs("div",{...v,className:utils.classNames(tp({size:o,isFocused:f,variant:t,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsxRuntime.jsx(y,{size:o==="sm"?20:24}),jsxRuntime.jsx("input",{...reactAria.mergeProps(c,m),className:op,ref:p}),l.value!==""&&jsxRuntime.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}=reactAria.useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e.key!==t.collection.getFirstKey()&&jsxRuntime.jsx(O,{elementType:"li"}),jsxRuntime.jsxs("li",{...r,children:[e.value?.title?jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("span",{...n,children:e.value.title})}):null,jsxRuntime.jsx("ul",{...a,className:sp,children:[...e.childNodes].map(i=>(utils.invariant(i.type==="item"),jsxRuntime.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__default.default.useRef(null),n=reactAria.useMenuItem({key:e.key},o,a),{isFocusVisible:i,focusProps:s}=reactAria.useFocusRing();return jsxRuntime.jsx(ct,{item:e,liProps:reactAria.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__default.default.forwardRef(({className:e,itemClassName:o,onContentKeyDown:t,...r},a)=>{let n=reactStately.useTreeState(r),i=ro__default.default.useRef(null),{menuProps:s}=reactAria.useMenu(r,n,i),{keyboardProps:p}=reactAria.useKeyboard({onKeyDown:t});return jsxRuntime.jsx("ul",{...reactAria.mergeProps(s,p),className:utils.classNames(ip,e),ref:M(i,a),children:[...n.collection].map(l=>l.type==="section"?jsxRuntime.jsx(cn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsxRuntime.jsx(Ir,{item:l,state:n,className:o,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});un.displayName="MenuContent";var wr=ro__default.default.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:_})=>jsxRuntime.jsx(U,{...v,variant:"popover",ref:_}),portalContainer:f,...y},b)=>{let v=ro__default.default.useRef(null),_=ge(f),g=reactStately.useMenuTriggerState({defaultOpen:e,isOpen:t,onOpenChange:o}),{menuTriggerProps:h,menuProps:R}=reactAria.useMenuTrigger({isDisabled:r,type:"menu"},g,v),x=te(),I=ro.useMemo(()=>reactAria.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 ro.useEffect(()=>{!m&&!d&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[d,m]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d({buttonProps:I,ref:v}),jsxRuntime.jsx(ye,{triggerRef:v,state:g,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:u||2,className:utils.classNames(qe,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsxRuntime.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__default.default.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__default.default.useRef(null),{linkProps:f,isPressed:y}=reactAria.useLink({...u,elementType:u.onPress?"span":n},d),{isFocusVisible:b,isFocused:v,focusProps:_}=reactAria.useFocusRing(),{hoverProps:g,isHovered:h}=reactAria.useHover({isDisabled:u.isDisabled}),R=n,x=utils.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 jsxRuntime.jsx(R,{...reactAria.mergeProps(f,_,g,x),className:utils.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=reactAria.useId(),l=reactAria.useId(),c=reactAria.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=>(utils.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__default.default.forwardRef(({className:e,label:o,description:t,icon:r,variant:a="default",...n},i)=>{let s=ro__default.default.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=mp(n),{dropProps:u}=reactAria.useDrop({ref:s,onDrop:async({items:b})=>{let v=b.filter(g=>g.kind==="file").map(async g=>(utils.invariant(g.kind==="file"),g.getFile())),_=await Promise.all(v);n.onValueChange?.(_);}}),{focusProps:m,isFocusVisible:d}=reactAria.useFocusRing(),{hoverProps:f,isHovered:y}=reactAria.useHover({isDisabled:n.isDisabled});return jsxRuntime.jsxs("label",{...reactAria.mergeProps(u,f,c),className:utils.classNames(fp({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:y||d}),e),ref:M(i,s),children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...reactAria.mergeProps(m,p)})}),r?jsxRuntime.jsx(r,{size:20,className:bp({disabled:n.isDisabled})}):null,jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:gp({disabled:n.isDisabled,hovered:y}),children:o}),t?jsxRuntime.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__default.default.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=reactAria.useId(),{labelProps:u,progressBarProps:m}=reactAria.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=jsxRuntime.jsx("output",{className:Sp({hasLabel:!!b}),children:m["aria-valuetext"]}),h=t==="error"?n:a;return jsxRuntime.jsxs("div",{...m,style:o,className:utils.classNames(xp,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxRuntime.jsxs("div",{className:Cp,children:[jsxRuntime.jsx("label",{...u,className:kp,children:b}),r?g:null]}):null,jsxRuntime.jsxs("div",{className:Rp,children:[jsxRuntime.jsxs("div",{className:wp,children:[jsxRuntime.jsx("div",{className:Ip,children:jsxRuntime.jsx("div",{style:{width:_},className:Pp({variant:t})})}),!b&&r?g:null]}),h?jsxRuntime.jsx("div",{className:xo({hasError:t==="error"}),id:c,children:h}):null]})]})});Tp.displayName="ProgressBar";function Fo({isReadOnly:e,validationState:o}){return e?_16.ReadOnlyIcon:o==="error"?_16.ErrorFilledIcon:o==="warning"?_16.WarningFilledIcon:null}var Ke=ro__default.default.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__default.default.useRef(null),{inputProps:m,labelProps:d,descriptionProps:f,errorMessageProps:y,validationErrors:b}=reactAria.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}=reactAria.useHover({isDisabled:l.isDisabled}),{isFocused:R,focusProps:x,isFocusVisible:I}=reactAria.useFocusRing(),k=Fo({isReadOnly:l.isReadOnly,validationState:o}),S=utils.filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":o,"data-focused":R,"data-focus-visible":I});return jsxRuntime.jsxs("div",{className:utils.classNames(je({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&_?jsxRuntime.jsxs("div",{className:Oe({labelPosition:a,hasMessage:!!_}),children:[jsxRuntime.jsx("label",{...d,className:Ve,children:l.label}),a==="start"&&_]}):null,jsxRuntime.jsxs("div",{className:utils.classNames({[Ro]:l.isDisabled}),children:[jsxRuntime.jsxs("div",{...g,className:Po({validationState:o,isHovered:h,isFocused:R,variant:t,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsxRuntime.jsx("input",{...reactAria.mergeProps(m,x,S),className:utils.classNames(dr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:u}),k?jsxRuntime.jsx(k,{className:Co({validationState:o,isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Ke.displayName="TextInput";var Ho=({value:e,...o})=>{let t=reactAria.useNumberFormatter(o);return jsxRuntime.jsx(jsxRuntime.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__default.default.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"?_20.CheckmarkIcon:_16.CheckmarkIcon);!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__default.default.useRef(null),m=reactStately.useToggleState({...s,...l}),{inputProps:d,isPressed:f,isDisabled:y,isReadOnly:b,isSelected:v}=reactAria.useSwitch({...s,...l},m,u),{focusProps:_,isFocused:g,isFocusVisible:h}=reactAria.useFocusRing(),{hoverProps:R,isHovered:x}=reactAria.useHover({}),I=utils.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 jsxRuntime.jsxs("label",{ref:p,style:t,className:utils.classNames(Lp,"BaselineUI-Reaction",e),...I,children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...d,..._,ref:u})}),jsxRuntime.jsxs("div",{...R,className:Mp({isSelected:v,isFocusVisible:h,isHovered:x,isReadOnly:b,isDisabled:y}),children:[jsxRuntime.jsx("div",{className:Bp({isDisabled:y,isReadOnly:b}),children:jsxRuntime.jsx(c,{size:r==="md"?20:16})}),jsxRuntime.jsx("div",{className:Ep({isSelected:m.isSelected,isDisabled:y,isReadOnly:b,size:r}),children:jsxRuntime.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:[_16.CheckFilledIcon,_16.ErrorAltFilledIcon],md:[_20.CheckFilledIcon,_20.ErrorAltFilledIcon]},Oo=ro__default.default.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}=reactAria.useProgressBar({...i,isIndeterminate:!0}),c=S6[t],u=c/2-2,m=2*u*Math.PI,d=T6[t][r==="success"?0:1];return jsxRuntime.jsxs("div",{className:utils.classNames(Up,"BaselineUI-ProgressSpinner",e),ref:s,style:{...dynamic.assignInlineVars({[jp]:`${m}px`}),...o},"data-block-id":a,"data-block-class":n,children:[jsxRuntime.jsxs("div",{...l,className:qp,children:[(r==="active"||r==="inactive")&&jsxRuntime.jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsxRuntime.jsx("circle",{role:"presentation",className:Vp,cx:c/2,cy:c/2,r:u}),r==="active"&&jsxRuntime.jsx("circle",{role:"presentation",className:Op,cx:c/2,cy:c/2,r:u})]}),r==="success"&&jsxRuntime.jsx(d,{className:Kp,size:c}),r==="error"&&jsxRuntime.jsx(d,{className:Ap,size:c})]}),i.label?jsxRuntime.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__default.default.forwardRef(({className:e,style:o,iconStart:t,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=reactStately.useToggleState(i),{buttonProps:l,isPressed:c,ref:u,isFocusVisible:m,isFocused:d,isHovered:f,uiStateOptions:y}=pr(i,p),b=utils.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 jsxRuntime.jsxs(a,{...reactAria.mergeProps(l,b),className:utils.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?jsxRuntime.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__default.default.forwardRef(({className:e,style:o,label:t,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro__default.default.useRef(null),l=reactStately.useToggleState(i),{isFocusVisible:c,isFocused:u,focusProps:m}=reactAria.useFocusRing(),{inputProps:d,isPressed:f,isDisabled:y,isSelected:b,isReadOnly:v}=reactAria.useCheckbox({...i,children:t},l,p),{hoverProps:_,isHovered:g}=reactAria.useHover({isDisabled:y}),h=utils.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 jsxRuntime.jsxs("label",{...h,className:utils.classNames(Wp({labelPosition:r}),"BaselineUI-Checkbox",e),style:o,ref:s,children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...reactAria.mergeProps(d,m),ref:p})}),jsxRuntime.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?jsxRuntime.jsx(_12.CheckmarkIcon,{size:12}):null,i.isIndeterminate?jsxRuntime.jsx(_12.MinusIcon,{size:12}):null]}),t?jsxRuntime.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:[_12.CaretLeftIcon,_12.CaretRightIcon],sm:[_16.CaretLeftIcon,_16.CaretRightIcon],md:[_20.CaretLeftIcon,_20.CaretRightIcon],lg:[_24.CaretLeftIcon,_24.CaretRightIcon]},lc=ro__default.default.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}=reactAria.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__default.default.useRef(null),v=reactStately.useNumberFieldState({...y,locale:d}),{inputProps:_,decrementButtonProps:g,incrementButtonProps:h,groupProps:R}=reactAria.useNumberField({...y,onKeyDown:D=>{D.key==="Enter"&&b.current?.blur(),u.onKeyDown?.(D);},isDisabled:c},v,b),{hoverProps:x,isHovered:I}=reactAria.useHover({}),{focusProps:k,isFocused:S,isFocusVisible:N}=reactAria.useFocusRing(),w=p==="floating",[T,P]=u5[s],C=utils.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=interactions.useInteractionModality()==="keyboard";return jsxRuntime.jsxs("div",{...reactAria.mergeProps(R,x,C),className:utils.classNames(tc({size:s,variant:p}),"BaselineUI-Pagination",e),style:o,ref:m,children:[l?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.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"&&jsxRuntime.jsx(O,{orientation:"vertical"})]}),jsxRuntime.jsxs("div",{className:ec({isFocused:S,variant:p,size:s}),"aria-label":f.formatMessage("pageXofY",{arg0:_.value,arg1:v.maxValue}),children:[jsxRuntime.jsx("input",{...reactAria.mergeProps(_,k),ref:b,className:utils.classNames("BaselineUI-Pagination-Input",oc),style:{width:`${_.value?.toString().length||1}ch`}}),jsxRuntime.jsxs("span",{className:rc({isDisabled:c}),children:["/ ",jsxRuntime.jsx(Ho,{value:v.maxValue})]})]}),l?null:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p==="floating"&&jsxRuntime.jsx(O,{orientation:"vertical"}),jsxRuntime.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=reactAria.useDateFormatter(o);return jsxRuntime.jsx(jsxRuntime.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__default.default.useRef(null),{focusProps:a,isFocusVisible:n}=reactAria.useFocusRing({within:!0}),{rowProps:i,gridCellProps:s,removeButtonProps:p,allowsRemoving:l,isDisabled:c,isSelected:u,allowsSelection:m}=reactAria.useTag({item:e},o,r),d=ro__default.default.useRef(null),{buttonProps:f}=reactAria.useButton(p,d),{hoverProps:y,isHovered:b}=reactAria.useHover({isDisabled:c}),{hoverProps:v,isHovered:_}=reactAria.useHover({isDisabled:c}),g=e.value?.icon,h=e.value?.data?.variant??t;return jsxRuntime.jsx("div",{...reactAria.mergeProps(i,a,v),ref:r,className:utils.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:jsxRuntime.jsxs("div",{...s,className:cc,children:[u?jsxRuntime.jsx(_16.CheckmarkIcon,{size:16,className:Ct({variant:h,isDisabled:c,isSelected:u})}):null,!u&&g?jsxRuntime.jsx(g,{size:16,className:Ct({variant:h,isDisabled:c,isSelected:u})}):null,e.rendered,l?jsxRuntime.jsx("button",{...reactAria.mergeProps(f,y),className:uc({variant:h,isHovered:b}),children:jsxRuntime.jsx(_12.XIcon,{})}):null]})})};var _c=ro__default.default.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,items:a,...n},i)=>{let s=ro.useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),p=te(),l=ro__default.default.useRef(null),c=reactStately.useListState({...n,items:s,children:p}),{gridProps:u}=reactAria.useTagGroup(n,c,l);return jsxRuntime.jsx("div",{...u,className:utils.classNames(dc,"BaselineUI-TagGroup",e),style:o,"data-block-id":t,"data-block-class":r,ref:M(i,l),children:[...c.collection].map(m=>jsxRuntime.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__default.default.forwardRef(({children:e,className:o,style:t},r)=>{let{headers:a}=ro.useContext(Ge),{disabledKeys:n}=ro.useContext(Ge),{keyboardProps:i}=reactAria.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 jsxRuntime.jsx("div",{...i,style:t,className:utils.classNames(zc,o),ref:r,children:ro__default.default.Children.map(e,(s,p)=>ro__default.default.cloneElement(s,{index:p}))})});zn.displayName="AccordionBase";var Ge=ro__default.default.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Sc=ro__default.default.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__default.default.useState(t),u=ro__default.default.useRef(new Map).current,[m,d]=ro__default.default.useState(a);ro.useEffect(()=>{d(m);},[m]),ro.useEffect(()=>{n?.(l);},[l,n]);let f=ro.useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:o,headers:u,expansionMode:m}),[r,l,o,u,m]);return jsxRuntime.jsx(Ge.Provider,{value:f,children:jsxRuntime.jsx(reactAria.FocusScope,{children:jsxRuntime.jsx(zn,{className:i,style:s,ref:p,children:e})})})});Sc.displayName="Accordion";var xn=ro__default.default.forwardRef(({title:e,actions:o,controlId:t,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=ro__default.default.useRef(null),{expandedKeys:c,setExpandedKeys:u,expansionMode:m,disabledKeys:d,headers:f}=ro.useContext(Ge),y=d?.has(r),b=reactAria.useFocusManager();utils.invariant(b);let{focusNext:v,focusPrevious:_}=b,{keyboardProps:g}=reactAria.useKeyboard({onKeyDown:C=>{C.key==="ArrowRight"?v({wrap:!0}):C.key==="ArrowLeft"?_({wrap:!0}):C.continuePropagation();},isDisabled:y});ro.useEffect(()=>{utils.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}=reactAria.useButton({"aria-expanded":c.has(r),"aria-controls":t,onPress:h,isDisabled:y},l),{pressProps:x}=reactAria.usePress({onPress:h,isDisabled:y}),{focusProps:I,isFocusVisible:k}=reactAria.useFocusRing(),{hoverProps:S,isHovered:N}=reactAria.useHover({isDisabled:y}),{focusProps:w,isFocusVisible:T}=reactAria.useFocusRing({within:!0}),P=c.has(r);return jsxRuntime.jsxs("h3",{...reactAria.mergeProps(g,x,S,w),className:Pc({isFocusVisible:k,isHovered:N,isDisabled:y}),ref:p,children:[jsxRuntime.jsxs("div",{className:Ic({isDisabled:!!y}),children:[jsxRuntime.jsx(_8.ChevronRightIcon,{className:xc({isExpanded:P}),size:8}),jsxRuntime.jsx("button",{...reactAria.mergeProps(R,I),id:a,"data-key":r,className:kc,ref:l,children:e})]}),o?.length?jsxRuntime.jsx("div",{"data-testid":"action-buttons",className:hc({showActionsOnTriggerOnly:s,isTriggered:T||N}),children:o.map((C,E)=>jsxRuntime.jsx(B,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:y,...C},E))}):null,i?jsxRuntime.jsx("div",{className:Cc,children:i}):null]})});xn.displayName="AccordionHeader";var Fc=ro__default.default.forwardRef(({title:e,actions:o,children:t,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=reactAria.useId(),u=reactAria.useId(),{expandedKeys:m}=ro.useContext(Ge),d=ro__default.default.useRef(null),f=m.has(r),y=Io(),b=web.useReducedMotion(),v=web.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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactAria.FocusScope,{children:jsxRuntime.jsx(xn,{value:r,actions:o,id:u,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),v(_=>jsxRuntime.jsx(web.animated.div,{role:"region","aria-labelledby":u,id:c,style:{..._,overflow:"hidden"},children:jsxRuntime.jsx("div",{ref:d,className:s,style:i,children:t})}))]})});Fc.displayName="AccordionItem";var wt=ro__default.default.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__default.default.useRef(null),{buttonProps:d,isPressed:f}=reactAria.useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:y,isHovered:b}=reactAria.useHover({isDisabled:c.isDisabled}),{focusProps:v,isFocused:_,isFocusVisible:g}=reactAria.useFocusRing(),h=Fo({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(d.disabled=!1);let R=utils.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 jsxRuntime.jsxs("button",{...reactAria.mergeProps(d,y,v,R),ref:M(u,m),className:utils.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:[jsxRuntime.jsxs("span",{className:Ol,children:[t?jsxRuntime.jsx(t,{size:24}):null,jsxRuntime.jsx("span",{...a,children:n})]}),h?jsxRuntime.jsx("span",{"aria-hidden":!0,className:utils.classNames(Co({validationState:r,isReadOnly:!!c.isReadOnly}),Vl),children:jsxRuntime.jsx(h,{size:16})}):null,jsxRuntime.jsx("span",{"aria-hidden":!0,children:jsxRuntime.jsx(_8.CaretDownIcon,{size:8,className:Fl({isOpen:o})})})]})});wt.displayName="SelectButton";var Fr=ro__default.default.createContext({state:null,popoverAnchorRef:null}),kn=ro__default.default.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 jsxRuntime.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}=ro.useContext(Fr),b=ro__default.default.useRef(null),v=ge(d.portalContainer),{labelProps:_,triggerProps:g,valueProps:h,menuProps:R,descriptionProps:x,errorMessageProps:I}=reactAria.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 jsxRuntime.jsxs(ao.Provider,{value:u,children:[jsxRuntime.jsxs("div",{style:o,className:utils.classNames(je({labelPosition:t}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:f,children:[d.label||k?jsxRuntime.jsxs("div",{className:Oe({labelPosition:t,hasMessage:!!k}),children:[d.label?jsxRuntime.jsx("div",{..._,className:utils.classNames(Ve,"BaselineUI-Select-Label"),children:d.label}):null,t==="start"&&k]}):null,jsxRuntime.jsx(reactAria.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?jsxRuntime.jsx(ye,{placement:p,portalContainer:v,offset:d.offset||2,state:u,triggerRef:y||b,style:o,className:utils.classNames(qe,"BaselineUI-Select-Popover"),...d,children:jsxRuntime.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__default.default.forwardRef((e,o)=>{let t=te(),r=reactStately.useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:t});return jsxRuntime.jsx(kn,{...e,ref:o,state:r})});Ac.displayName="SelectStandalone";var Xe=ro__default.default.forwardRef((e,o)=>{let{state:t}=ro.useContext(Fr);return ro.useEffect(()=>{utils.invariant(t||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,t]),t?jsxRuntime.jsx(kn,{state:t,...e,ref:o}):jsxRuntime.jsx(Ac,{...e,ref:o})});Xe.displayName="Select";var Uc=ro__default.default.forwardRef(({className:e,style:o,variant:t,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=ro__default.default.useRef(null),l=ro.useCallback(({buttonProps:c,selectedValue:u,valueProps:m,isOpen:d,ref:f})=>{let y=u&&"icon"in u&&u.icon;return jsxRuntime.jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsxRuntime.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 jsxRuntime.jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:utils.classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:o,ref:M(s,p),children:[a?jsxRuntime.jsx(a,{size:24,className:tokens.sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsxRuntime.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:_16.AvatarIcon,md:_24.AvatarIcon},$o=ro__default.default.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 jsxRuntime.jsxs("span",{className:utils.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?jsxRuntime.jsx("img",{...d,loading:l,className:Gc}):null,!i&&!n&&jsxRuntime.jsx(r,{size:t==="sm"?16:24}),i&&!n?t==="sm"?f[0]:f:null,p?jsxRuntime.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__default.default.useRef(null),{tabPanelProps:r}=reactAria.useTabPanel(o,e,t),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=reactAria.useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsxRuntime.jsx("div",{...reactAria.mergeProps(r,n),ref:t,className:utils.classNames({[Qc]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var Tn=ro__default.default.forwardRef(({className:e,style:o,tabHeaderStyle:t,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=reactStately.useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),u=ro__default.default.useRef(null),{tabListProps:m}=reactAria.useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,u);return jsxRuntime.jsxs("div",{className:utils.classNames("BaselineUI-Tabs",e),style:o,ref:l,"data-block-id":s,children:[jsxRuntime.jsxs("div",{className:utils.classNames(Jc({variant:a}),r),style:t,children:[jsxRuntime.jsx("div",{...m,className:Yc({variant:a}),ref:u,children:[...c.collection].map(d=>(utils.invariant(d.value,"TabItem requires a value prop"),jsxRuntime.jsx(td,{item:d,state:c,onRemove:i,variant:a},d.key)))}),n?.map((d,f)=>jsxRuntime.jsx("div",{className:Wc,children:jsxRuntime.jsx(B,{...d,variant:"secondary",size:"sm",className:utils.classNames(Zc,d.className)})},f))]}),jsxRuntime.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__default.default.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=reactAria.useTab({key:a},t,i),{hoverProps:c,isHovered:u}=reactAria.useHover({});utils.invariant(n,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:f,titleClassName:y}=n,{focusProps:b,isFocusVisible:v,isFocused:_}=reactAria.useFocusRing(),{keyboardProps:g}=reactAria.useKeyboard({onKeyDown:R=>{R.key==="Backspace"&&o?o(a):R.continuePropagation();}}),h=utils.filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":u,"data-focus-visible":v});return jsxRuntime.jsxs("div",{...reactAria.mergeProps(g,s,c,b,h),className:utils.classNames(Xc({isHovered:u,isSelected:p,isFocusVisible:v,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",y),style:f,ref:i,children:[d?jsxRuntime.jsx(d,{size:20,className:wn({isHovered:u,isSelected:p,isDisabled:l,variant:r})}):null,m,o?jsxRuntime.jsx(B,{variant:"secondary",elementType:"div",icon:_8.XIcon,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__default.default.forwardRef(({children:e,...o},t)=>{let r=ro.useMemo(()=>ro__default.default.Children.map(e,a=>!a||!ro__default.default.isValidElement(a)||typeof a.type=="string"?null:{...a.props,id:a.props.value}).filter(Boolean),[e]);return jsxRuntime.jsx(Tn,{...o,ref:t,items:r,children:a=>jsxRuntime.jsx(reactStately.Item,{title:a.title,children:a.children},a.key)})});ad.displayName="Tabs";var nd=({children:e,title:o,value:t})=>(utils.invariant(t,"TabItem requires a value prop"),utils.invariant(o,"TabItem requires a title prop"),utils.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:_16.ErrorAltFilledIcon,md:_20.ErrorAltFilledIcon},info:{sm:_16.InfoFilledIcon,md:_20.InfoFilledIcon},success:{sm:_16.CheckFilledIcon,md:_20.CheckFilledIcon},warning:{sm:_16.WarningFilledIcon,md:_20.WarningFilledIcon}},fd=ro__default.default.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&&jsxRuntime.jsx(U,{variant:s==="compact"?"tertiary":"ghost",label:t,onPress:r}),y=$z[n][l];return jsxRuntime.jsxs("div",{className:utils.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:[jsxRuntime.jsxs("div",{className:md({arrangement:s}),children:[jsxRuntime.jsx(y,{className:dd({variant:n}),size:16}),jsxRuntime.jsxs("div",{className:sd({arrangement:s}),children:[jsxRuntime.jsx("h3",{className:ud({size:l}),children:i}),jsxRuntime.jsx("section",{className:pd({size:l}),children:o})]}),s==="compact"&&f]}),jsxRuntime.jsxs("div",{className:cd({arrangement:s}),children:[s!=="compact"&&f,p?jsxRuntime.jsx(B,{variant:"secondary",icon:_16.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__default.default.useContext(Ue);return jsxRuntime.jsx(interactions.PressResponder,{...o,children:e})};jr.displayName="ModalTrigger";var Yz=({children:e})=>{let{state:o}=ro__default.default.useContext(Ue);return jsxRuntime.jsx(interactions.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__default.default.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"?color.parseColor(e):e),{formatMessage:d}=F(),f=!m,{colorSwatchProps:y}=color$1.useColorSwatch({color:f?"#000000":e}),{hoverProps:b,isHovered:v}=reactAria.useHover({isDisabled:a||!r}),_=utils.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 jsxRuntime.jsx("div",{...reactAria.mergeProps(b,_,f?{}:y),style:n,"aria-label":f?d(ih.none):y["aria-label"],role:"img",className:utils.classNames(Id({removeBlendMode:f,isFocusVisible:o,isDisabled:!!a,isSelected:!!t,isHovered:v}),"BaselineUI-ColorSwatch",i),ref:u,id:s,...c,children:jsxRuntime.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?jsxRuntime.jsx(_16.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=color.parseColor("#000000").toFormat("hsla"),ie="hsla",Nt="hexa";function so(e){return typeof e=="string"?color.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:color.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)=>(utils.invariant(e.value&&"label"in e.value,"Item must have label"),jsxRuntime.jsx("li",{...o,ref:a,className:hd,children:jsxRuntime.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%, ${tokens.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__default.default.useRef(null),r=ro__default.default.useRef(null),a=ro__default.default.useRef(null),n=color.useColorAreaState({...o,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=color$1.useColorArea({...o,value:e,inputXRef:t,inputYRef:r,containerRef:a},n);ro.useEffect(()=>{t.current?.focus();},[]);let{focusProps:c,isFocusVisible:u}=reactAria.useFocusRing();return jsxRuntime.jsx("div",{ref:a,...i,className:utils.classNames(yd,"BaselineUI-ColorInput-ColorArea"),children:jsxRuntime.jsxs("div",{...l,className:utils.classNames(Gr({isFocusVisible:u}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:so(e)?.withChannelValue("alpha",1).toString("css")},children:[jsxRuntime.jsx("input",{ref:t,...s,...c}),jsxRuntime.jsx("input",{ref:r,...p,...c})]})})};var Fd=({color:e,setColor:o,allowAlpha:t,...r})=>{let a=color.useColorFieldState({value:e,onChange:u=>{o(so(u)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Lt);}}),n=ro__default.default.useRef(null),{inputProps:i}=color$1.useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=reactAria.useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=reactAria.useHover({});return jsxRuntime.jsxs("div",{className:utils.classNames(Mn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"hexa":"hex",children:[jsxRuntime.jsx("input",{...reactAria.mergeProps(i,s,l),ref:n,className:Cd({isFocused:p,isHovered:c,allowAlpha:t})}),t?jsxRuntime.jsx(Vd,{color:e,setColor:o}):null]})},Hd=({color:e,setColor:o,allowAlpha:t})=>{let r=e.toFormat("rgba"),{locale:a}=reactAria.useLocale();return jsxRuntime.jsxs("div",{className:utils.classNames(Mn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":t?"rgba":"rgb",children:[jsxRuntime.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}),jsxRuntime.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}),jsxRuntime.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?jsxRuntime.jsx(Vd,{color:e,setColor:o}):null]})},hh={style:"percent",maximumFractionDigits:0},Vd=({color:e,setColor:o})=>{let{locale:t}=reactAria.useLocale(),r=ro.useCallback(a=>{o(e.withChannelValue("alpha",a));},[e,o]);return jsxRuntime.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}=reactAria.useLocale(),r=color.useColorSliderState({...o,channel:e,locale:t}),a=ro__default.default.useRef(null),n=ro__default.default.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=color$1.useColorSlider({...o,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,t)},r),{focusProps:l,isFocusVisible:c}=reactAria.useFocusRing();return jsxRuntime.jsxs("div",{className:utils.classNames($r,{[al({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsxRuntime.jsx("div",{className:Dn}),jsxRuntime.jsx("div",{className:$r,style:i.style}),jsxRuntime.jsxs("div",{className:utils.classNames(Gr({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsxRuntime.jsx("div",{className:Dn,style:{backgroundColor:"#ffffff"}}),jsxRuntime.jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:$r}),jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{ref:n,...p,...l})})]})]})};var Xr=({color:e,setColor:o,allowAlpha:t,onChangeEnd:r})=>{let[a,n]=ro__default.default.useState("hex"),{formatMessage:i}=F(Ye);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ed,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:o,onChangeEnd:r}),jsxRuntime.jsxs("div",{className:Bn,children:[jsxRuntime.jsx(jn,{channel:"hue",value:e,onChange:o,onChangeEnd:r}),t?jsxRuntime.jsx(jn,{channel:"alpha",value:e,onChange:o,onChangeEnd:r}):null]}),jsxRuntime.jsxs("div",{className:utils.classNames(Bn,tokens.sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsxRuntime.jsx(Xe,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Sd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsxRuntime.jsx(Fd,{color:e,setColor:s=>{o(s),r?.(s);},allowAlpha:t}),a==="rgb"&&jsxRuntime.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}=reactAria.useLocale(),{formatMessage:l}=F(Ye),c=ro__default.default.useRef(null),u=wo(c.current),[m,d]=ol(t,[]),f=ro__default.default.useRef(null),[y,b]=ro__default.default.useState(e),v=ro__default.default.useMemo(()=>m.map(I=>({id:I,label:color.parseColor(I).getColorName(p),description:I})),[m,p]),_=ro.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]);ro.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=reactAria.useId(),h=jsxRuntime.jsx(B,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:_20.PlusIcon,onPress:i==="active"?_:void 0}),R=ro.useCallback(I=>jsxRuntime.jsxs(ue,{size:"content",className:Ur({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsxRuntime.jsx(Xr,{color:y,setColor:b,allowAlpha:s}),jsxRuntime.jsx(O,{}),jsxRuntime.jsx(L,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxRuntime.jsxs(L,{display:"inline-flex",gap:"lg",children:[jsxRuntime.jsx(U,{label:l("cancel"),size:"sm",variant:"secondary",onPress:I}),jsxRuntime.jsx(U,{label:l("add"),variant:"primary",onPress:()=>{_(),I();},size:"sm"})]})})]}),[y,_,l,s]),x=ro.useCallback(I=>{utils.invariant(I instanceof Set,"Key must be a set");let k=[...I][0];k&&o(color.parseColor(k).toFormat(ie));},[o]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(O,{}),jsxRuntime.jsxs("div",{className:utils.classNames(xd,"BaselineUI-ColorInput-CustomColors"),children:[jsxRuntime.jsx("span",{id:g,children:n}),jsxRuntime.jsxs(L,{display:"flex",children:[!!m.length&&m.includes(e.toString(ie))&&jsxRuntime.jsx(B,{variant:"secondary",size:"md",elementType:"div",icon:_20.MinusIcon,"aria-label":a,onPress:()=>{d(m.filter(I=>I!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(u==="mobile"?jsxRuntime.jsxs(we,{children:[jsxRuntime.jsx(jr,{children:h}),jsxRuntime.jsx(Ee,{style:{zIndex:1e5},children:({close:I})=>R(I)})]}):jsxRuntime.jsxs(Ne,{type:"dialog",children:[jsxRuntime.jsx(Le,{children:h}),jsxRuntime.jsx(Re,{placement:"right top",className:qr,offset:6,children:({close:I})=>R(I)})]}))]})]}),!!m.length&&jsxRuntime.jsx(le,{items:v,layout:"grid","aria-labelledby":g,className:utils.classNames(Ar,Kr,tokens.sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:Wr,ref:f,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:x})]})};var Un=ro__default.default.forwardRef(({setColor:e,color:o,triggerRef:t,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Ye),p=ro.useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],u=a.find(m=>m.id===c);utils.invariant(u,"Preset not found"),e(u.id===Se?null:color.parseColor(u.id).toFormat(ie)),n.close();}},[n,a,e]);return jsxRuntime.jsx("div",{className:utils.classNames(Kr,"BaselineUI-ColorInput-Presets"),style:{minWidth:t.current?.offsetWidth},ref:i,children:jsxRuntime.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__default.default.forwardRef(({color:e,colorLabel:o,colorName:t,...r},a)=>{let n=ro__default.default.useRef(null),{hoverProps:i,isHovered:s}=reactAria.useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=reactAria.useButton(r,n),{isFocusVisible:c,focusProps:u}=reactAria.useFocusRing(),m=utils.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 jsxRuntime.jsxs("button",{...reactAria.mergeProps(p,i,u,m),style:r.style,className:utils.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:[jsxRuntime.jsx(Ze,{color:e?.toString("hexa")}),o?jsxRuntime.jsx("div",{className:zd,id:f,"aria-hidden":"true",children:t}):typeof t=="string"&&jsxRuntime.jsx(reactAria.VisuallyHidden,{children:t})]})});Et.displayName="ColorInputButton";var Qr=ro__default.default.forwardRef(({className:e,style:o,icon:t,...r},a)=>{let n=ro__default.default.useRef(null),{hoverProps:i,isHovered:s}=reactAria.useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=reactAria.useButton(r,n),{isFocusVisible:c,focusProps:u}=reactAria.useFocusRing(),m=utils.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 jsxRuntime.jsxs("button",{...reactAria.mergeProps(p,i,u,m),ref:M(a,n),style:o,className:utils.classNames(Pd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsxRuntime.jsx(t,{size:16}),jsxRuntime.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}=reactAria.useLocale(),n=ro.useMemo(()=>t.find(p=>p.id===Se?!o:o?Td(o,color.parseColor(p.id)):!1),[t,o]),i=ro.useMemo(()=>typeof e=="function"?e?.(o):e?Nd(o,n,r(Gh.transparent)):!1,[o,e,r,n]),s=ro.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__default.default.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})=>jsxRuntime.jsx(Et,{...reactAria.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__default.default.useRef(null),S=ro__default.default.useRef(null),N=reactStately.useOverlayTriggerState(x),{triggerProps:w,overlayProps:T}=reactAria.useOverlayTrigger({type:"listbox"},N,k),P=ge(x.portalContainer),[C,E]=utils$1.useControlledState(m===void 0?void 0:so(m),so(c),X=>p?.(X?.toFormat("rgba")||null)),{formatMessage:H}=F(Ye),D=ro.useMemo(()=>Ld(H(Jr.noColor),a),[a,H]),K=reactAria.useId(),{colorName:j}=ou({colorLabel:i,color:C,presets:D}),G=ro.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=jsxRuntime.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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:utils.classNames({[vd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":R,style:o,ref:I,children:[x.label?jsxRuntime.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})]}),jsxRuntime.jsx(ye,{...x,portalContainer:P,placement:g,state:N,offset:_,className:utils.classNames(qr,"BaselineUI-ColorInput-Popover"),triggerRef:k,overlayProps:T,children:jsxRuntime.jsxs(ue,{size:"content",className:Ur({includesCustomColorPicker:s}),ref:S,"aria-labelledby":K,"aria-label":x["aria-label"],children:[s&&v==="active"?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Xr,{color:C||Lt,setColor:E,allowAlpha:r,onChangeEnd:X=>{l?.(X?.toFormat("rgba")||null);}}),W]}):null,!!G.length&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&v==="active"?jsxRuntime.jsx(O,{}):null,jsxRuntime.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__default.default.forwardRef(({className:e,style:o,icon:t,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=ro__default.default.useRef(null),l=ro.useCallback(({isOpen:c,color:u,ref:m,colorName:d,triggerProps:f})=>jsxRuntime.jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsxRuntime.jsx(Et,{...f,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:u,colorLabel:!1,colorName:d}):jsxRuntime.jsx(Qr,{...f,isOpen:c,icon:_20.TextIcon,color:u?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxRuntime.jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:utils.classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:o,ref:M(s,p),children:[r==="standard"&&t?jsxRuntime.jsx(t,{size:24,className:tokens.sprinkles({color:"icon.primary"})}):null,jsxRuntime.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=ro.useRef([]),r=ro.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=utils.getSvgPathFromStroke(perfectFreehand.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__default.default.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__default.default.useRef(null),[P,C]=ro__default.default.useState(g||p||[]),E=ro__default.default.useMemo(()=>({...Cx,...S}),[S]),[H,D]=ro__default.default.useState(),K=reactAria.useId(),{labelProps:j,fieldProps:G}=reactAria.useLabel({...S,"aria-label":I,labelElementType:"span"}),{isFocusVisible:A,focusProps:ee}=reactAria.useFocusRing({within:!0}),{hoverProps:V,isHovered:W}=reactAria.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}=reactAria.useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?Qt():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Ce&&ze():Pe&&X());}}),[oe,de]=ro.useState(!1),it=ro.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=ro.useCallback(Y=>{if(Y.buttons!==1||!H)return;let pe=bu(Y.nativeEvent).map(Z=>[a?utils$1.clamp(Z.clientX-H.left,0,H.width):Z.clientX-H.left,a?utils$1.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));};ro.useEffect(()=>{s?.(P);},[P,s]);let Qt=()=>{C([]),s?.([]),ke([]);};return jsxRuntime.jsxs("div",{ref:M(T,N),className:utils.classNames(pu,"BaselineUI-FreehandCanvas",e),style:o,"aria-disabled":m,"data-block-id":R,"data-block-class":x,children:[S.label||c?jsxRuntime.jsxs("div",{className:cu({isInline:u}),children:[S.label?jsxRuntime.jsx(Q,{type:"label",size:"sm",...j,children:S.label}):jsxRuntime.jsx("span",{}),c?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(B,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:_16.UndoIcon,onPress:X,"aria-label":y||w.formatMessage("undo")}),jsxRuntime.jsx(B,{variant:"secondary",size:"sm",isDisabled:!Ce||m,icon:_16.RedoIcon,onPress:ze,"aria-label":b||w.formatMessage("redo")})]}):null]}):null,jsxRuntime.jsxs("div",{role:"application",...reactAria.mergeProps(ee,He,V,G),tabIndex:m?void 0:0,className:utils.classNames(ea({isInline:u,isHovered:W}),lu({isFocusVisible:A,isInline:u,isDisabled:!!m}),t),"aria-describedby":S["aria-describedby"]||K,style:r,ref:_,children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("div",{id:K,children:k})}),jsxRuntime.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?jsxRuntime.jsx(fu,{line:Y,options:E,strokeColor:i,strokeWidth:n},q):jsxRuntime.jsx(yu,{line:Y,options:E,strokeColor:i,strokeWidth:n},q))})]}),d||f?jsxRuntime.jsx("div",{style:h,className:utils.classNames(ta({isInline:u,isDisabled:m}),v),children:(P.length||!d)&&f?jsxRuntime.jsx(U,{size:"sm",variant:"ghost",label:f,isDisabled:m,onPress:Qt}):jsxRuntime.jsx(U,{size:"sm",variant:"ghost",label:d,isDisabled:!0})}):null]})});mu.displayName="FreehandCanvas";var fu=ro__default.default.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=ro.useMemo(()=>utils.getSvgPathFromStroke(perfectFreehand.getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),o)),[e,o]);return jsxRuntime.jsx("path",{d:a,stroke:t,strokeWidth:r})});fu.displayName="Stroke";var yu=ro__default.default.memo(({line:e,options:o,strokeColor:t,strokeWidth:r})=>{let a=du({line:e,options:o});return jsxRuntime.jsx(jsxRuntime.Fragment,{children:a.map((n,i)=>jsxRuntime.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]=ro.useState([]),a=()=>e?.flatMap(n=>[...o.querySelectorAll(n)]).map(n=>({current:n}));return granularHooks.useGranularEffect(()=>{r(a());},[],[a]),granularHooks.useGranularEffect(()=>{let n=a();r(n);},[e],[a]),t}function hu(e){let{scrollable:o,ownerDocument:t,onScroll:r}=e;ro.useEffect(()=>{let a=utils.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=reactMoveable.makeMoveable([reactMoveable.Draggable,reactMoveable.Resizable,reactMoveable.Rotatable,reactMoveable.Snappable]),Cu=ro__default.default.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=ro.useRef(null),G=ro.useRef(null),[A,ee]=ro.useState(document),V=ro.useRef(A.createElement("div")),[W,X]=ro.useState({}),[ze,Ce]=ro.useState(!1),[Pe,ke]=ro.useState(!1),[He,oe]=ro.useState(),de=zu(R,A);ro.useLayoutEffect(()=>{let q=V.current;return V.current=A.createElement("div"),()=>{q.remove();}},[A]);let{keyboardProps:it}=reactAria.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();});}});ro.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=ro.useCallback(q=>{X(pe=>({...pe,...q.style})),i?.(q);},[i]),Pa=ro.useCallback(q=>{if(Ce(!0),j.current?.focus(),N){let Z=utils.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=ro.useCallback(q=>{Ce(!1),u?.(q);},[u]),Y=o({style:{...W.width&&{width:W.width},...W.height&&{height:W.height}}});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{role:"button",...it,ref:M(j,K),style:{display:"inline-block",...n,...W},className:utils.classNames(gu,e),onDoubleClick:l,tabIndex:0,title:I,children:Y}),Fv.createPortal(jsxRuntime.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__default.default.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__default.default.useRef(null),S=ro__default.default.useRef(null),{formatMessage:N}=F(Pu),[w,T]=utils$1.useControlledState(n,a||null,oe=>{utils.invariant(typeof oe!="string"),x.onValueChange?.(oe?[oe]:[]);}),P=ro.useMemo(()=>eC(w||void 0),[w]),{fieldProps:C,labelProps:E}=reactAria.useField(x),{dropProps:H,isDropTarget:D}=reactAria.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}=reactAria.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}=reactAria.useFocusRing({within:!0}),{hoverProps:W,isHovered:X}=reactAria.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:utils.classNames(cr({isFocusVisible:V}),{[su]:D&&!p},y),style:f},He=utils.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 jsxRuntime.jsxs(L,{...He,className:utils.classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:o,ref:I,children:[jsxRuntime.jsxs("label",{...reactAria.mergeProps(H,W,A,E),className:utils.classNames(ea({isInline:t,isHovered:X,isDisabled:p,hasLoadedImage:!!P&&Pe,showFocusRing:D||!!P&&V}),R),style:h,ref:k,children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...reactAria.mergeProps(C,K,G),ref:S})}),!P&&jsxRuntime.jsx(U,{...ke}),!!P&&(Ce?jsxRuntime.jsx(Oo,{}):jsxRuntime.jsx("img",{className:oa({isInline:t,isDisabled:p,hasLoadedImage:!!P&&Pe&&u}),...ze}))]}),g||_?jsxRuntime.jsx("div",{style:v,className:utils.classNames(ta({isInline:t,isDisabled:p}),b),children:(P||!g)&&_?jsxRuntime.jsx(U,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:j}):jsxRuntime.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__default.default.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}=reactAria.useFocusRing({within:!0}),{isHovered:R,hoverProps:x}=reactAria.useHover({isDisabled:t}),{pressProps:I}=reactAria.usePress({isDisabled:t,onPress:l});utils.invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let k=utils.filterTruthyValues({"data-hovered":R,"data-focus-visible":h,"data-focused":g,"data-disabled":t});return jsxRuntime.jsxs("div",{...b,className:utils.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"?jsxRuntime.jsx("button",{disabled:t,...reactAria.mergeProps(x,_,I,k),className:Qn,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxRuntime.jsxs("button",{...reactAria.mergeProps(x,_,I,k),disabled:t,style:p,"aria-label":m,className:Qn,children:[n?jsxRuntime.jsx("img",{src:n,alt:a,className:oa({isInline:r,isDisabled:t})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsxRuntime.jsx(B,{isDisabled:t,className:Ru,"aria-label":u,size:"xs",icon:_16.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})=>jsxRuntime.jsxs("div",{className:Du({labelPosition:n}),children:[jsxRuntime.jsx("div",{className:Hu({isSelected:t,isFocusVisible:r,isDisabled:a}),children:t?jsxRuntime.jsx("div",{className:Bu}):null}),e?jsxRuntime.jsxs("div",{className:Mu,children:[jsxRuntime.jsx("span",{className:Mr({isDisabled:a}),children:e}),o?jsxRuntime.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__default.default.useRef(null),{inputProps:c,isPressed:u,isSelected:m}=reactAria.useRadio({...s,isDisabled:p,children:t.label,value:t.id},e,l),{focusProps:d,isFocusVisible:f,isFocused:y}=reactAria.useFocusRing(),{isHovered:b}=reactAria.useHover({isDisabled:p}),v=utils.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 jsxRuntime.jsxs("label",{...v,style:a,className:utils.classNames("BaselineUI-Radio-Item",n),children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("input",{...reactAria.mergeProps(c,d),ref:l})}),o(t,{isFocusVisible:f,isSelected:m,isFocused:y,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var Ou=ro__default.default.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=reactStately.useRadioGroupState(d),{radioGroupProps:b,labelProps:v,descriptionProps:_,errorMessageProps:g}=reactAria.useRadioGroup({...d,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},y),h=Ie({...d,descriptionProps:_,errorMessageProps:g,labelPosition:n}),R=utils.filterTruthyValues({"data-orientation":d.orientation,"data-block-id":u,"data-block-class":m,"data-disabled":d.isDisabled,"data-readonly":d.isReadOnly});return jsxRuntime.jsxs("div",{...reactAria.mergeProps(b,R),className:utils.classNames(je({labelPosition:n}),"BaselineUI-RadioGroup",e),style:o,ref:f,children:[d.label||h?jsxRuntime.jsxs("div",{className:Oe({labelPosition:n,hasMessage:!!h}),children:[jsxRuntime.jsx("span",{...v,className:utils.classNames(Ve,"BaselineUI-RadioGroup-Label"),children:d.label}),n==="start"&&h]}):null,jsxRuntime.jsxs("div",{className:utils.classNames({[Ro]:d.isDisabled}),children:[jsxRuntime.jsx("div",{className:utils.classNames(Fu,t),style:r,children:a.map(x=>jsxRuntime.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=ro.Fragment})=>{utils.invariant(e||o,"`id` or `defaultMessage` is required.");let r=F();return jsxRuntime.jsx(t,{children:r.formatMessage(e)||o})};ju.displayName="MessageFormat";var Au=ro__default.default.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}=reactAria.useHover({isDisabled:i});return jsxRuntime.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 ro.useMemo(()=>ro__default.default.Children.toArray(e).map(o=>{let t=o,r=lodash.uniqueId("item"),a=Vt(t,Ne),n=Uu(t),i,s;if(a){let v=Vt(a,Le);utils.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;utils.invariant(typeof f=="string","ActionGroup children must have a string label");let y=`${r}-${f}`;return ro.createElement(reactStately.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?lodash.flatMapDeep(ro__default.default.Children.toArray(e),r=>ro__default.default.isValidElement(r)&&r.props.children?[r,...ro__default.default.Children.toArray(r.props.children)]:[r]).find(r=>ro__default.default.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__default.default.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]=ro.useState(),d=qu(t),f=reactStately.useListState({...p,children:d}),y=ae(l),b=ro.useRef(null),[{visibleItems:v,isMeasuring:_},g]=Ia({visibleItems:f.collection.size,isMeasuring:!1}),h=ro.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=ro.useMemo(()=>({get current(){return y.current?.parentElement}}),[y]);Ba({ref:R,onResize:h}),xe(h,[f.collection,h]);let{toolbarProps:x}=toolbar.useToolbar(p,y),I=[...f.collection],k=I.slice(0,v),S=I.slice(v).filter(T=>T.textValue!==ri),N=S.length>0;ro.useEffect(()=>{m(void 0);},[S.length]),ro.useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:w}=reactAria.useKeyboard({onKeyDown:s});return jsxRuntime.jsxs(reactAria.FocusScope,{children:[jsxRuntime.jsx("div",{...reactAria.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:jsxRuntime.jsxs("div",{ref:b,className:Ku,children:[k.map(T=>T.rendered),N?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!_&&i?jsxRuntime.jsx(L,{flexGrow:1}):null,jsxRuntime.jsx(wr,{placement:"bottom end",renderTrigger:({buttonProps:T,ref:P})=>jsxRuntime.jsx(B,{...T,size:"md",icon:_24.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 utils.invariant(P,"ActionItem must have a label"),{id:T.key,label:P,icon:T.props.icon}}),onAction:T=>{let P=f.collection.getItem(T);utils.invariant(P,"Item not found");let{onPress:C,dialogContent:E}=P.props;C?.(),m(E);}})]}):null]})}),jsxRuntime.jsx(we,{isOpen:!!u,onOpenChange:T=>{T||m(void 0);},children:jsxRuntime.jsx(Ee,{enableDrawer:"auto",style:{zIndex:1e5},children:u?ro__default.default.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__default.default.forwardRef(({className:e,style:o,"data-block-id":t,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=ro__default.default.useRef(null),{toolbarProps:l}=toolbar.useToolbar(i,p),{keyboardProps:c}=reactAria.useKeyboard({onKeyDown:n});return jsxRuntime.jsx("div",{...reactAria.mergeProps(l,c),"aria-controls":a,className:utils.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__default.default.forwardRef((e,o)=>{let t=e.isCollapsible?ni:ii;return jsxRuntime.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__default.default.forwardRef((e,o)=>{let t=ae(o),{tooltipProps:r}=sr(e,t);return r?jsxRuntime.jsx(ne,{...r,children:jsxRuntime.jsx(si,{...e,ref:o})}):jsxRuntime.jsx(si,{...e,ref:o})});be.displayName="ToggleIconButton";var si=ro__default.default.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=reactStately.useToggleState(s),{buttonProps:c,isPressed:u,ref:m,isFocusVisible:d,isFocused:f,isHovered:y,uiStateOptions:b}=pr(s,l),v=ro.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=utils.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 jsxRuntime.jsx("button",{...reactAria.mergeProps(c,g),className:utils.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:jsxRuntime.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}}=tokens.layoutSprinkleValues,hm=({isOpen:e,onClose:o})=>{let{formatMessage:t}=F(),r=reactAria.useId();return jsxRuntime.jsx(we,{isOpen:e,onOpenChange:a=>{a||o();},children:jsxRuntime.jsx(Ee,{enableDrawer:"auto",style:{zIndex:999999},children:jsxRuntime.jsxs(ue,{"aria-labelledby":r,className:pm,drawerBackground:"subtle",children:[jsxRuntime.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:[jsxRuntime.jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:t($t.help)}),jsxRuntime.jsx(B,{icon:_20.XIcon,size:"md",variant:"secondary","aria-label":t($t.close),onPress:o})]}),jsxRuntime.jsx(O,{className:gm}),jsxRuntime.jsxs(L,{paddingX:At.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsxRuntime.jsx("div",{role:"rowgroup",children:jsxRuntime.jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:At.padding.vertical.md,color:"text.primary",children:[jsxRuntime.jsx("h6",{className:tokens.sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:t($t.action)}),jsxRuntime.jsx("h6",{className:tokens.sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:t($t.shortcut)})]})}),jsxRuntime.jsx("div",{role:"rowgroup",children:zm.map(([a,n],i)=>jsxRuntime.jsxs(ro.Fragment,{children:[jsxRuntime.jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:At.padding.vertical.xs,style:{minHeight:40},children:[jsxRuntime.jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:t($t[lodash.camelCase(a)])}),jsxRuntime.jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:utils.getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==zm.length-1&&jsxRuntime.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__default.default.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__default.default.useRef(null),[b,v]=utils$1.useControlledState(e,o||"",t),_=ro.useCallback(w=>{v(w.currentTarget.value||"");},[v]),g=ro.useCallback(w=>{(m&&w.key==="Enter"&&!w.shiftKey||(w.ctrlKey||w.metaKey)&&w.key==="Enter")&&(w.preventDefault(),d());},[m,d]);ro.useImperativeHandle(f,()=>({clear:()=>{v("");}}));let h=ro.useCallback(w=>{w.currentTarget.style.height="16px",w.currentTarget.style.height=w.currentTarget.scrollHeight+"px";},[]);granularHooks.useGranularLayoutEffect(()=>{let w=y.current;w&&(w.style.height="16px",w.style.height=w.scrollHeight+"px");},[s],[b]),ro.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}=reactAria.useFocusRing(),{hoverProps:k,isHovered:S}=reactAria.useHover({}),N=utils.filterTruthyValues({"data-focus-visible":I,"data-hovered":S,"data-focused":x});return jsxRuntime.jsx("textarea",{...reactAria.mergeProps(R,k,N),ref:M(y,n),className:utils.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__default.default.forwardRef(({onCancel:e,editor:o,element:t,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=ro.useContext(ma),p=slateReact.useSelected(),[l,c]=ro.useState(""),{contains:u}=reactAria.useFilter({sensitivity:"base"}),{formatMessage:m}=F(),d=ro.useMemo(()=>{let C=i.filter(E=>l===""||u(E.displayName,l)).map(E=>({id:E.id,label:E.displayName,data:E}));return s?lodash.take(C,s):C},[i,s,l,u]),f=ro.useCallback(C=>jsxRuntime.jsx(reactStately.Item,{children:C.label},C.id),[]),y=ro.useCallback((C=!1)=>{let E=plateCommon.findNodePath(o,t);E&&(plateCommon.removeNodes(o,{at:E}),C&&plateCommon.focusEditor(o));},[o,t]),b=reactStately.useComboBoxState({items:d,children:f,menuTrigger:"focus",onSelectionChange:C=>{y(!0),r?.(C);}}),v=ro__default.default.useRef(null),_=ro__default.default.useRef(null),g=ro__default.default.useRef(null),h=ro__default.default.useRef(null),R=plateCombobox.useHTMLInputCursorState(_);reactAria.useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:x,listBoxProps:I}=reactAria.useComboBox({defaultItems:d,inputRef:_,buttonRef:v,listBoxRef:g,popoverRef:h,menuTrigger:"focus","aria-label":m(VP.mention)},b);ro.useEffect(()=>{_.current?.focus();},[]);let k=ro.useCallback((C="manual",E=!1)=>{y(E),e?.(C,b.inputValue);},[e,y,b.inputValue]),S=ro.useRef(p);ro.useEffect(()=>{S.current&&!p&&k("deselect"),S.current=p;},[p,k]);let N=R?.atStart??!1,w=R?.atEnd??!1,T=ro.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=plateCommon.Hotkeys.isUndo(C)&&o.history.undos.length>0,H=plateCommon.Hotkeys.isRedo(C)&&o.history.redos.length>0;(E||H)&&(C.preventDefault(),o[E?"undo":"redo"](),plateCommon.focusEditor(o));},[N,w,k,o]),P=ro.useMemo(()=>{if(!CSS.supports("field-sizing","content")){let C=re(_.current),E=_.current?C?.getComputedStyle(_.current).font:void 0;return {width:E?utils.getTextDimensions({text:b.inputValue,font:E}).width+10:"4ch"}}},[b.inputValue]);return jsxRuntime.jsxs(ao.Provider,{value:b,children:[jsxRuntime.jsx("input",{...reactAria.mergeProps(x,{onKeyDown:T,onBlur:()=>{k("blur",!0);},onChange:C=>{c(C.target.value);}}),style:P,className:dm,ref:M(a,_)}),jsxRuntime.jsx(ye,{triggerRef:n,className:mm,isNonModal:!0,ref:h,state:b,children:jsxRuntime.jsx(le,{...I,items:void 0,autoFocus:"first",ref:g,className:tokens.sprinkles({width:"full"}),renderOption:Bm})})]})});Mm.displayName="MentionInputContentElement";var ui=cn$1.withRef(({className:e,...o},t)=>{let{children:r,editor:a,element:n}=o,{items:i}=ro.useContext(ma),s=ro.useRef(null),[p,l]=ro.useState(null);ro.useEffect(()=>{let m=plateCommon.findNodePath(a,n);if(!m)return;let d=plateCommon.getPointBefore(a,m);if(!d)return;let f=plateCommon.createPointRef(a,d);return l(f),()=>{f.unref();}},[a,n]);let c=ro.useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;plateCommon.moveSelection(a,{unit:"offset"}),plateCommon.moveSelection(a,{unit:"character",distance:1}),lt()&&m&&plateCommon.focusEditor(a);},[a]),u=ro.useCallback(m=>{if(!m)return;let d=s.current?.getRootNode()instanceof ShadowRoot,f=i.find(b=>b.id===m);utils.invariant(f,"User not found");let y={type:Kt,value:f.id,displayName:f.displayName,children:[{text:""}]};plateCommon.insertNodes(a,[y,{text:" "}]),d?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxRuntime.jsxs(plateCommon.PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:t,...o,children:[jsxRuntime.jsx(Mm,{onCancel:(m,d)=>{m!=="backspace"&&plateCommon.insertText(a,"@"+d,{at:p?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&plateCommon.moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:u,ref:s,element:n,editor:a}),r]})});ui.displayName="MentionInputElement";var mi=cn$1.withRef(({className:e,onClick:o,children:t,...r},a)=>{let n=plateCommon.useElement();return jsxRuntime.jsxs(plateCommon.PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:plateCommon.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=plateCommon.getEditorString(e,plateCommon.getRange(e,e.selection,plateCommon.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 jsxRuntime.jsx(plateCommon.PlateElement,{asChild:!0,className:e,...t,children:jsxRuntime.jsx("p",{children:o})})}function ok(e){return Object.entries(e).map(([o,t])=>`${lodash.kebabCase(o)}:${t}`).filter(([,o])=>!!o).join(";")}function tk(e){return "text"in e}function rk(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}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(utils.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 plateParagraph.ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case plateLink.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])=>[lodash.camelCase(o),t]))):{}}function vi(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let o=new DOMParser().parseFromString(Hm__namespace.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")?`
80
+ `:"<p>";return Om(o.body)}function Om(e,o){if(e.nodeType===Node.TEXT_NODE)return slateHyperscript.jsx("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(slateHyperscript.jsx("text",t,"")),e.nodeName.toUpperCase()){case"BR":return slateHyperscript.jsx("text",o,`
81
+ `);case"SPAN":{let a=e.dataset.userId;return a?slateHyperscript.jsx("element",{type:Kt,value:a,displayName:e.textContent},{text:""}):r}case"P":return slateHyperscript.jsx("element",{type:plateParagraph.ELEMENT_PARAGRAPH},r);case"A":return slateHyperscript.jsx("element",{type:plateLink.ELEMENT_LINK,url:e.getAttribute("href")},r);default:return r}}function jm(e){let o=plateCommon.findNode(e,{match:{type:plateCommon.getPluginType(e,plateLink.ELEMENT_LINK)}}),[t]=o||[{url:""}];return t?.url}function ua(e){let o={children:[{text:" "}],type:da};e.insertNode(o);}var nk=plateCommon.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=plateCommon.createPlugins([plateParagraph.createParagraphPlugin({component:Fm}),plateBasicMarks.createBoldPlugin({component:cn$1.withProps(plateCommon.PlateLeaf,{as:"b"})}),plateBasicMarks.createItalicPlugin({component:cn$1.withProps(plateCommon.PlateLeaf,{as:"i"})}),plateBasicMarks.createUnderlinePlugin({component:cn$1.withProps(plateCommon.PlateLeaf,{as:"u"})}),plateFont.createFontColorPlugin(),plateFont.createFontBackgroundColorPlugin(),plateLink.createLinkPlugin({component:$m}),nk({component:mi})],{components:{[da]:ui}});var Gm=({isDisabled:e})=>{let{formatMessage:o}=F(),t=plateCommon.useEditorRef();return jsxRuntime.jsxs(Ne,{type:"dialog",children:[jsxRuntime.jsx(Le,{children:jsxRuntime.jsx(B,{icon:_20.LinkIcon,size:"sm",isDisabled:e,"aria-label":o(mo.addLink),className:Yo,preventFocusOnPress:!0})}),jsxRuntime.jsx(Re,{className:tokens.sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsxRuntime.jsx(ue,{size:"content",style:{minWidth:240},children:jsxRuntime.jsx(mk,{close:()=>{r(),setTimeout(()=>{plateCommon.focusEditor(t,t.selection);},0);}})})})]})},mk=({close:e})=>{let o=plateCommon.useEditorRef(),{formatMessage:t}=F(),r=plateCommon.useEditorSelector(l=>jm(l),[]),[a,n]=ro__default.default.useState(r?"show":"add"),[i,s]=ro__default.default.useState(r||""),p=jsxRuntime.jsx(L,{padding:"lg",children:jsxRuntime.jsx(Ke,{label:t(mo.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a==="add"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p,jsxRuntime.jsx(L,{display:"flex",justifyContent:"flex-end",padding:"lg",className:im,children:jsxRuntime.jsx(U,{isDisabled:!utils.isUrl(i,!0),label:t(mo.addLink),size:"sm",onPress:()=>{plateLink.upsertLink(o,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(L,{padding:"lg",children:jsxRuntime.jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxRuntime.jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsxRuntime.jsx(U,{label:t(mo.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsxRuntime.jsx(U,{label:t(mo.removeLink),size:"sm",onPress:()=>{plateLink.unwrapLink(o),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p,jsxRuntime.jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsxRuntime.jsx(U,{label:t(mo.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsxRuntime.jsx(U,{label:t(mo.save),size:"sm",onPress:()=>{plateLink.upsertLink(o,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function $m({className:e,children:o,...t}){return jsxRuntime.jsx(plateCommon.PlateElement,{asChild:!0,className:e,...t,children:jsxRuntime.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=color.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=plateCommon.useEditorSelector(i=>plateCommon.isMarkActive(i,e),[]),n=plateCommon.useEditorRef();return jsxRuntime.jsx(be,{variant:"tertiary",isSelected:a,size:"sm",icon:o,"aria-label":t,isDisabled:r,onPress:()=>{plateCommon.toggleMark(n,{key:e});},preventFocusOnPress:!0})},hi=({nodeType:e,"aria-label":o,isDisabled:t})=>{let{updateColor:r,clearColor:a,color:n}=plateFont.useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=ro.useCallback(({ref:p,triggerProps:l})=>jsxRuntime.jsx(B,{icon:e==="color"?_24.TextIcon:_24.HighlightTextIcon,"aria-label":o,size:"md",variant:"popover",isDisabled:t,className:Yo,preventFocusOnPress:!0,...l,ref:p}),[e,o,t]),s=ro.useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsxRuntime.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:plateParagraph.ELEMENT_PARAGRAPH,children:[{text:""}]}],ma=ro__default.default.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Pi=ro__default.default.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=ro.useRef(null),h=reactAria.useId(),{formatMessage:R}=F(),x=ro.useRef(null),I=x.current,k=ro.useRef(null),S=ro.useMemo(()=>I?.getRootNode()instanceof ShadowRoot,[I]),[N,w]=utils$1.useControlledState(e?vi(e):void 0,vi(o||"<p></p>"),C=>{t&&t(Gt(C));}),{keyboardProps:T}=reactAria.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&&plateCommon.focusEditor(k.current);}});ro.useEffect(()=>{s&&k.current&&plateCommon.deselect(k.current);},[s]),ro.useImperativeHandle(_,()=>({startMention:()=>{k.current&&!x.current?.querySelector("input[role='combobox']")&&ua(k.current);}})),ro.useImperativeHandle(m,()=>({setCaretPosition:C=>{k.current&&(plateCommon.focusEditor(k.current),plateCommon.moveSelection(k.current,{distance:C,unit:"character"}));},focus:()=>{k.current&&plateCommon.focusEditor(k.current);}}));let P=ro.useMemo(()=>({items:u||[],containerRef:l,maxMentionableUsersSuggestions:d}),[u,l,d]);return jsxRuntime.jsx(ma.Provider,{value:P,children:jsxRuntime.jsxs(plateCommon.Plate,{initialValue:N||qk,plugins:Am,editorRef:M(k,y||null),onChange:C=>{w(C);},children:[jsxRuntime.jsxs(ia,{className:pa,"aria-controls":h,ref:g,children:[jsxRuntime.jsxs(L,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsxRuntime.jsx(ya,{nodeType:plateBasicMarks.MARK_BOLD,icon:_20.BoldIcon,ariaLabel:R(et.bold),isDisabled:s}),jsxRuntime.jsx(ya,{nodeType:plateBasicMarks.MARK_ITALIC,icon:_20.ItalicIcon,ariaLabel:R(et.italic),isDisabled:s}),jsxRuntime.jsx(ya,{nodeType:plateBasicMarks.MARK_UNDERLINE,icon:_20.UnderlineIcon,ariaLabel:R(et.underline),isDisabled:s})]}),jsxRuntime.jsx(O,{orientation:"vertical",className:jt}),jsxRuntime.jsx(hi,{nodeType:plateFont.MARK_COLOR,"aria-label":R(et.fontColor),isDisabled:s}),jsxRuntime.jsx(O,{orientation:"vertical",className:jt}),jsxRuntime.jsx(hi,{nodeType:plateFont.MARK_BG_COLOR,"aria-label":R(et.backgroundColor),isDisabled:s}),jsxRuntime.jsx(O,{orientation:"vertical",className:jt}),jsxRuntime.jsx(Gm,{isDisabled:s}),jsxRuntime.jsx(O,{orientation:"vertical",className:jt}),jsxRuntime.jsx(B,{className:Yo,icon:_24.QuestionmarkCircleIcon,size:"sm","aria-label":R(et.help),onPress:c})]}),jsxRuntime.jsx(O,{variant:"secondary"}),jsxRuntime.jsx("div",{...T,ref:x,children:jsxRuntime.jsx(plateCommon.PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:f,spellCheck:a,"aria-label":p,className:utils.classNames(sa({isDisabled:s}),la({isInline:i})),renderPlaceholder:({attributes:C,children:E})=>jsxRuntime.jsx("span",{...C,className:tokens.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}=reactAria.useHover({isDisabled:t}),{label:p,data:l}=o;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("li",{...reactAria.mergeProps(r,s),className:um({isDisabled:t,isHovered:a}),"data-active":a,ref:i,children:[jsxRuntime.jsx($o,{name:p,...l?.avatar}),jsxRuntime.jsxs(L,{display:"flex",flexDirection:"column",children:[jsxRuntime.jsx(Q,{type:"subtitle",size:"sm",children:p}),jsxRuntime.jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsxRuntime.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__default.default.memo(ro__default.default.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=_20.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=ro.useRef(null),{formatMessage:x}=F(),I=ro.useRef(null),k=ro.useRef(null),S=ro.useRef(null),N=!a&&g.variant==="minimal",w=ro.useRef(null),[T,P]=ro__default.default.useState(g.value||g.defaultValue),C=g.isDisabled||g.isSaveDisabled||!utils.getPlainText(T||""),{fieldProps:E}=reactAria.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=ro.useCallback(()=>{P(""),a?R.current?.reset():k.current?.clear();},[a]),D=ro.useCallback(()=>{C||(i?.(a?Gt(R.current?.children):I.current.value),_&&H());},[H,_,a,i,C]),K=jsxRuntime.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__default.default.useState(!1),{keyboardProps:A}=reactAria.useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),G(!0));}}),ee=ro.useCallback(V=>{P(V),g.onChange?.(V);},[g]);return jsxRuntime.jsxs("div",{...reactAria.mergeProps(E,a?A:{}),role:"application",ref:M(S,h),style:o,"data-block-id":t,"data-block-class":r,className:utils.classNames(lm({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":g.isDisabled,children:[N?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s?jsxRuntime.jsx($o,{className:sm,name:g.avatarName||""}):null,jsxRuntime.jsxs("div",{className:bm({isInline:s}),children:[jsxRuntime.jsx(ca,{isMinimal:N,textBoxRef:I,isInline:s,editableContentAriaLabel:y,...g,onChange:ee,onSave:D}),K]})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a?jsxRuntime.jsx(Pi,{containerRef:S,ref:w,editorRef:R,isInline:s,editableContentAriaLabel:y,onHelpDialogOpenRequest:()=>{G(!0);},...g,onChange:ee,onSave:D}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!s&&jsxRuntime.jsx(O,{variant:"secondary"}),jsxRuntime.jsx(ca,{onCancel:n,textBoxRef:I,ref:k,isInline:s,editableContentAriaLabel:y,...g,onChange:V=>{P(V),g.onChange?.(V);},onSave:D})]}),jsxRuntime.jsx(O,{variant:"secondary"}),jsxRuntime.jsxs("div",{className:utils.classNames(pa,tokens.sprinkles({justifyContent:"space-between"})),children:[jsxRuntime.jsxs(L,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&g.mentionableUsers?jsxRuntime.jsx(B,{icon:_20.AtIcon,size:"sm","aria-label":x(Ii.mention),onPress:()=>w.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:W},X)=>V==="action"?jsxRuntime.jsx(B,{...W,size:"sm",isDisabled:g.isDisabled||W.isDisabled},X):jsxRuntime.jsx(be,{...W,size:"sm",variant:"tertiary",isDisabled:g.isDisabled||W.isDisabled},X))]}),jsxRuntime.jsxs(L,{children:[!!n&&jsxRuntime.jsx(B,{variant:"secondary",icon:_20.CrossCircleFilledIcon,isDisabled:g.isDisabled,size:"md",onPress:()=>{n(),v&&H();},"aria-label":c||x(Ii.cancel)}),K]})]})]}),jsxRuntime.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__default.default.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=web.useTransition(a,i),u=web.animated[s];return c((m,d)=>d&&jsxRuntime.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__default.default.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__default.default.useRef(null),u=interactions.useInteractionModality(),[m,d]=ro__default.default.useState(!1),f=ro.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__default.default.useState(f),v=Io(),{buttonProps:_,isPressed:g}=reactAria.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}=reactAria.useFocusRing(),{hoverProps:I,isHovered:k}=reactAria.useHover({}),S=utils.filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":g,"data-focus-visible":x,"data-hovered":k,"data-focused":R});return ro.useEffect(()=>{b(f());},[f]),ro.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]),jsxRuntime.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},...reactAria.mergeProps(_,h,I,S),className:utils.classNames(ef,Er({isFocusVisible:x,variant:"high-contrast",isHovered:k}),Br({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:o,ref:M(l,c),children:[jsxRuntime.jsx(_16.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__default.default.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=reactAria.useId(),{formatMessage:_}=F(),g=n&&jsxRuntime.jsx(Q,{id:v,type:"title",size:"sm",elementType:"h3",children:n});return jsxRuntime.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:[jsxRuntime.jsxs("div",{className:af({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!u}),children:[jsxRuntime.jsxs(L,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsxRuntime.jsx(l,{style:{color:c},size:24}):null,!l&&g,u?jsxRuntime.jsx(B,{icon:_20.XIcon,variant:"secondary",size:"md","aria-label":_(_0.close),onPress:d}):null]}),l?g:null]}),a?jsxRuntime.jsx(L,{elementType:"section",className:nf,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsxRuntime.jsx(L,{paddingX:"lg",paddingBottom:"lg",children:jsxRuntime.jsx(Ke,{...p})}):null,s||i?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(O,{}),jsxRuntime.jsxs(L,{padding:"lg",display:"flex",gap:"xl",children:[s?jsxRuntime.jsx(U,{variant:"secondary",className:Ri,label:s,onPress:d,autoFocus:f==="cancel"}):null,i?jsxRuntime.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__default.default(),cf=ro__default.default.forwardRef(({className:e,style:o,children:t,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=ro.useMemo(()=>{let p=t;return (!t||Array.isArray(t)&&t.length===0)&&(p=""),k0.render(p)},[t]);return jsxRuntime.jsx("div",{className:utils.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__default.default.useState(!1),[n,i]=ro__default.default.useState(0),[s,p]=ro__default.default.useState(0),[l,c]=ro__default.default.useState(!1);ro.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=ro.useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),liveAnnouncer.announce(o(uf.playing),"polite")):(e.current.pause(),a(!1),liveAnnouncer.announce(o(uf.paused),"polite"))))();},[o,e]),m=ro.useCallback(d=>{e.current&&(e.current.currentTime=d*e.current.duration/100,liveAnnouncer.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__default.default.forwardRef(({className:e,style:o,size:t="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=ro__default.default.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=utils.filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":u>0});return jsxRuntime.jsxs("div",{...g,...i,className:utils.classNames(yf,"BaselineUI-AudioPlayer",e),role:"group",style:o,ref:s,children:[jsxRuntime.jsx(reactAria.VisuallyHidden,{children:jsxRuntime.jsx("audio",{ref:p,children:r.map(({url:h,type:R})=>jsxRuntime.jsx("source",{src:h,type:R},h))})}),jsxRuntime.jsx(be,{icon:l?_24.PauseIcon:_24.PlayIcon,variant:"toolbar",isSelected:l,size:t,"aria-label":_(l?Ti.pause:Ti.play),style:{borderRadius:"50%"},onPress:m}),jsxRuntime.jsxs("div",{className:bf,children:[jsxRuntime.jsx("span",{"aria-hidden":!0,children:y}),jsxRuntime.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);}}),jsxRuntime.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__default.default.useRef(null);return ro.useLayoutEffect(()=>{if(!r.current)return;let a=r.current.closest(".BaselineUI-ImageGallery")?.querySelector(`[data-image-key='${e?.at(-1)?.key}']`)?.cloneNode(!0);utils.invariant(a,"Node is not defined."),r.current?.prepend(a);},[e,o]),jsxRuntime.jsx("div",{className:ha(),ref:r,children:jsxRuntime.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=web.useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsxRuntime.jsx(Oo,{"aria-label":r(Yt.loading)}):s((p,l)=>l&&jsxRuntime.jsx(web.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})=>jsxRuntime.jsx($0,{item:d,deleteElement:f,fit:n})})=>{let d=reactAria.useId(),{formatMessage:f}=F();utils.invariant(e&&_o(e),"Expected value to be a list option");let y=i?jsxRuntime.jsx("div",{className:hf,children:jsxRuntime.jsx(B,{"aria-label":f(Yt.delete),size:"xs",icon:_12.XIcon,onPress:()=>{i(e.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,b=ro.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 jsxRuntime.jsxs("li",{...o,ref:a,className:utils.classNames(xf,s),"aria-labelledby":d,style:u,children:[jsxRuntime.jsx(L,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsxRuntime.jsx("div",{className:utils.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})})}),jsxRuntime.jsx("span",{id:d,className:utils.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__default.default.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__default.default.useRef(null),[x,I]=ro.useState([]),{formatMessage:k}=F();ro.useEffect(()=>{(p||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,p]);let[S,N]=utils$1.useControlledState(g.selectedKeys,g.defaultSelectedKeys??[],g.onSelectionChange),[w,T]=utils$1.useControlledState(l?Ni(l):void 0,Ni(c),y?D=>{y?.(xa(D));}:void 0),P=ro.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=ro.useCallback(()=>{i&&x.length&&(T(w.filter(D=>!x.includes(D.id))),i(new Set(x)),I([]));},[x,w,i,T]),E=ro.useCallback((D,K,j)=>jsxRuntime.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}=reactAria.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 jsxRuntime.jsxs("div",{...H,ref:h,style:o,className:utils.classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsxRuntime.jsx(le,{...g,selectedKeys:S,items:w,onReorder:P,layout:"grid",orientation:"vertical",className:Cf,ref:R,dropIndicatorStyle:X0,renderOption:E,renderDragPreview:D=>jsxRuntime.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}})}),jsxRuntime.jsx(we,{isOpen:!![...x].length,onOpenChange:D=>{D||I([]);},children:jsxRuntime.jsx(Ee,{isDismissable:!0,children:jsxRuntime.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__default.default.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=reactStately.useSelectState({items:t,...h,defaultSelectedKey:h.defaultSelectedKey||t?.[0]?.id,children:I,validationState:h.validationState==="error"?"invalid":"valid"}),[S,N]=utils$1.useControlledState(u,!!m,A=>{d?.({isSelected:A,selectedKey:k.selectedKey});}),{hoverProps:w,isHovered:T}=reactAria.useHover({isDisabled:s}),P=ro.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?jsxRuntime.jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:ee,placement:"bottom start",offset:4,...typeof g=="function"?g("button"):g,children:jsxRuntime.jsx(be,{icon:W,"aria-label":ee,variant:"toolbar",...X})}):jsxRuntime.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=ro.useCallback(({buttonProps:A,ref:ee})=>{delete A["aria-labelledby"];let V=f||`${x(aI.more)} ${C}`;return jsxRuntime.jsx(ne,{variant:"inverse",size:"sm",includeArrow:!1,text:V,placement:"bottom start",offset:4,...g,children:jsxRuntime.jsx(interactions.PressResponder,{...A,children:jsxRuntime.jsx(B,{"aria-label":V,ref:ee,icon:_8.CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:W})=>utils.classNames(Nr({isSelected:S,isFocusVisible:W}),Ff,v),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[C,l,x,S,s,f,i,g,v,_]),H=utils.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=ro.useMemo(()=>({state:k,popoverAnchorRef:D}),[k,D]),j=ro.useCallback(A=>typeof b=="function"?b(A,{isButton:!1,isSelected:k.selectionManager.isSelected(A.id)}):b,[b,k.selectionManager]),G=ro.useCallback(A=>typeof y=="function"?y(A,{isButton:!1,isSelected:k.selectionManager.isSelected(A.id)}):y,[y,k.selectionManager]);return jsxRuntime.jsx(Fr.Provider,{value:K,children:jsxRuntime.jsxs(L,{...w,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:utils.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,jsxRuntime.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__default.default.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}=reactAria.useFilter({sensitivity:"base"}),S=te(),N=reactStately.useComboBoxState({...x,defaultFilter:_||k,defaultItems:s,onSelectionChange:l,onInputChange:c,children:S,validationState:u?"invalid":"valid"}),w=ro__default.default.useRef(null),T=ro__default.default.useRef(null),P=ro__default.default.useRef(null),C=ro__default.default.useRef(null),E=ro__default.default.useRef(null),{buttonProps:H,inputProps:D,listBoxProps:K,labelProps:j,errorMessageProps:G,descriptionProps:A,validationErrors:ee}=reactAria.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}=reactAria.useHover({isDisabled:x.isDisabled}),{isFocused:Ce,focusProps:Pe,isFocusVisible:ke}=reactAria.useFocusRing(),He=Fo({isReadOnly:x.isReadOnly,validationState:d}),oe=utils.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}=reactAria.useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]});return jsxRuntime.jsx(ao.Provider,{value:N,children:jsxRuntime.jsxs("div",{className:utils.classNames(jf({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:o,ref:I,children:[i||m==="start"&&W?jsxRuntime.jsxs("div",{className:Kf({labelPosition:m,hasMessage:!!W}),children:[jsxRuntime.jsx("label",{...reactAria.mergeProps(j,de),className:qf({isDisabled:x.isDisabled}),children:i}),m==="start"&&W]}):null,jsxRuntime.jsxs("div",{...X,className:Uf({validationState:d,isHovered:ze,isFocused:Ce,variant:f,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:E,children:[jsxRuntime.jsx("input",{...reactAria.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:utils.classNames(Af({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:t}),He&&v?jsxRuntime.jsx(He,{className:$f({validationState:d,isReadOnly:x.isReadOnly}),size:16}):null,jsxRuntime.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})})]}),jsxRuntime.jsx(ye,{className:qe,ref:C,triggerRef:E,state:N,children:jsxRuntime.jsx(le,{...K,items:s,ref:P,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:kr})}),m==="top"&&W]})})});Yf.displayName="ComboBox";var Fi=ro__default.default.forwardRef(({item:e,renderGridItem:o,state:t},r)=>{let a=ae(r),n=reactAria.useGridListItem({node:e},t,a),i=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:s}=reactAria.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__default.default.forwardRef(({className:e,style:o,isEditing:t=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,...i},s)=>{let p=te(),l=reactStately.useListState({...i,children:p}),c=ae(s),{gridProps:u}=reactAria.useGridList(i,l,c);ro.useImperativeHandle(n,()=>({setFocused:d=>{l.selectionManager.setFocused(d);},setFocusedKey:d=>{l.selectionManager.setFocusedKey(d);}}),[l]);let m=t?hI:u.onKeyDownCapture;return jsxRuntime.jsx("ul",{...u,className:utils.classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,onKeyDownCapture:m,children:[...l.collection].map(d=>jsxRuntime.jsx(Fi,{item:d,state:l,renderGridItem:i.renderGridItem},d.key))})});Qf.displayName="GridList";var Jf="_1yep5z6f5",ey="_1dc3b8m0";var oy=ro__default.default.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=reactStately.useListState({...p,selectionMode:o,suppressTextValueWarning:!0,children:u}),{actionGroupProps:d}=actiongroup.useActionGroup({...p,selectionMode:o,children:u},m,c),f=[...m.collection].map(y=>(utils.invariant(y.value),jsxRuntime.jsx(SI,{item:y,state:m,isDisabled:p.isDisabled,onAction:p.onAction,tooltipProps:n,renderActionItem:s},y.key)));return i?jsxRuntime.jsxs(L,{...d,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:utils.classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:t,ref:c,children:[jsxRuntime.jsx(i,{size:24,className:Jf}),jsxRuntime.jsx(L,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:f})]}):jsxRuntime.jsx(L,{...d,display:"flex",flexDirection:"row",gap:"xs",className:utils.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}=actiongroup.useActionGroupItem({key:e.key},o),s=n||o.selectionManager.isDisabled(e.key),p=o.selectionManager.isSelected(e.key);utils.invariant(e.value);let{icon:l}=e.value;utils.invariant(l);let c=ro.useMemo(()=>(utils.invariant(e.value),typeof t=="function"?t(e.value):t),[t,e.value]);return jsxRuntime.jsx(interactions.PressResponder,{...reactAria.mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsxRuntime.jsx(ne,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsxRuntime.jsx(B,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:utils.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__default.default.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=ro.useMemo(()=>t.map(g=>({id:g.color,label:g.label})),[t]),_=reactAria.useId();return ro.useEffect(()=>{!a&&!y["aria-label"]&&!y["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,y]),jsxRuntime.jsxs(L,{...Na(y),className:utils.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?jsxRuntime.jsxs(L,{display:"flex",alignItems:"center",gap:"md",children:[n?jsxRuntime.jsx(n,{size:24,className:tokens.sprinkles({color:"icon.primary"})}):null,a?jsxRuntime.jsx(Q,{id:_,type:"label",size:"sm",children:a}):null]}):null,jsxRuntime.jsx(le,{className:utils.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)=>jsxRuntime.jsx("li",{...k,"data-disabled":I,className:utils.classNames(ty,k.className),ref:S,children:jsxRuntime.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}=reactAria.useHover({}),v=ro.useRef(null),{onKeyDown:_,...g}=e.interactiveElementProps;delete g.onFocus,delete g.onClick;let h=focus.createFocusManager(v),R=ro.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=ro.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?jsxRuntime.jsxs(L,{display:"flex",flexDirection:"row",children:[P?jsxRuntime.jsx(be,{icon:P,"aria-label":E,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,C?jsxRuntime.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=ro.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}=reactAria.usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:w,focusProps:T}=focus.useFocusRing();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{...reactAria.mergeProps({onKeyDown:R,onFocus:()=>{e.focusItem(!1);}},N,T,y,e.itemContainerWithoutChildrenProps,g),className:utils.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:jsxRuntime.jsxs(L,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?x:null,jsxRuntime.jsxs(L,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxRuntime.jsxs(L,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${o*2} * ${tokens.themeVars.spacing.lg})`},children:[jsxRuntime.jsx(B,{icon:_8.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:utils.classNames(iy,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),k?jsxRuntime.jsx(k,{size:16,style:{color:tokens.themeVars.color.icon.interactive.disabled}}):null]}),jsxRuntime.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?jsxRuntime.jsx("div",{onClick:P=>{P.stopPropagation();},children:jsxRuntime.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"})}):jsxRuntime.jsx(Q,{type:"label",size:"sm",className:utils.classNames(tokens.sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:d(r)}),r.data.description?jsxRuntime.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__default.default.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=ro.useRef(null),h=reactStately.useTreeState({...b,items:a.children,children:_}),R=ro.useMemo(()=>Object.fromEntries(Object.entries(ew(a,JI)).map(([w,T])=>[w,{...T,canRename:!!d}])),[a,d]),x=reactAria.useId(),[I,k]=ro__default.default.useState(a.children?.[0]?.id??""),S=ro.useRef(I),N=ro.useMemo(()=>({[`tree-${x}`]:{focusedItem:I,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[I,h.expandedKeys,h.selectionManager.selectedKeys,x]);return ro.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]),jsxRuntime.jsx(reactComplexTree.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=>jsxRuntime.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})=>jsxRuntime.jsx(Ae,{children:jsxRuntime.jsx(reactAria.VisuallyHidden,{children:w})}),renderTreeContainer:({containerProps:w,children:T})=>jsxRuntime.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:utils.classNames(e,"BaselineUI-TreeView"),ref:M(v,w.ref,g),role:"treegrid",children:T}),renderItemsContainer:({children:w})=>w,children:jsxRuntime.jsx(reactComplexTree.Tree,{treeId:`tree-${x}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});yy.displayName="TreeView";var sw=ro.forwardRef(({className:e,isCollapsible:o=!1,...t},r)=>{let a=ro.useRef(null),n=reactAria.useId();return ro.useImperativeHandle(r,()=>({resize:a.current?.resize})),jsxRuntime.jsx(reactResizablePanels.Panel,{className:utils.classNames("BaselineUI-Panel",e),collapsible:o,ref:a,id:n,...t})});sw.displayName="Panel";var fw=ro.forwardRef(({className:e,...o},t)=>{let r=ro.useRef(null);return ro.useImperativeHandle(t,()=>({setLayout:r.current?.setLayout})),jsxRuntime.jsx(reactResizablePanels.PanelGroup,{className:utils.classNames("BaselineUI-PanelGroup",e),ref:r,...o})});fw.displayName="PanelGroup";var by="_6abhjk0";var vw=({className:e,isDisabled:o=!1,...t})=>jsxRuntime.jsx(reactResizablePanels.PanelResizeHandle,{disabled:o,className:utils.classNames(by,"BaselineUI-PanelResizeHandle",e),...t});vw.displayName="PanelResizeHandle";
82
82
 
83
83
  Object.defineProperty(exports, "useCollator", {
84
84
  enumerable: true,
@@ -92,96 +92,96 @@ Object.defineProperty(exports, "useNumberFormatter", {
92
92
  enumerable: true,
93
93
  get: function () { return reactAria.useNumberFormatter; }
94
94
  });
95
- exports.Accordion = Rc;
96
- exports.AccordionItem = Dc;
95
+ exports.Accordion = Sc;
96
+ exports.AccordionItem = Fc;
97
97
  exports.ActionButton = U;
98
- exports.ActionGroup = ey;
99
- exports.ActionGroupItem = RI;
98
+ exports.ActionGroup = oy;
99
+ exports.ActionGroupItem = SI;
100
100
  exports.ActionIconButton = B;
101
101
  exports.AlertDialog = _a;
102
- exports.AudioPlayer = _f;
103
- exports.Avatar = Ao;
104
- exports.Box = M;
105
- exports.ButtonSelect = Vf;
106
- exports.Checkbox = Zp;
107
- exports.ColorInput = qo;
102
+ exports.AudioPlayer = zf;
103
+ exports.Avatar = $o;
104
+ exports.Box = L;
105
+ exports.ButtonSelect = Of;
106
+ exports.Checkbox = Qp;
107
+ exports.ColorInput = Ko;
108
108
  exports.ColorSwatch = Ze;
109
- exports.ColorSwatchPicker = ay;
110
- exports.ComboBox = Xf;
111
- exports.DateFormat = lc;
109
+ exports.ColorSwatchPicker = ny;
110
+ exports.ComboBox = Yf;
111
+ exports.DateFormat = pc;
112
112
  exports.Dialog = ue;
113
- exports.DialogTitle = Tl;
114
- exports.DomNodeRenderer = Ls;
113
+ exports.DialogTitle = Nl;
114
+ exports.DomNodeRenderer = Ms;
115
115
  exports.Drawer = hr;
116
- exports.Editor = Qm;
117
- exports.FileUpload = zp;
118
- exports.FreehandCanvas = uu;
119
- exports.GridList = Zf;
120
- exports.Group = ju;
121
- exports.I18nProvider = Qs;
122
- exports.IconColorInput = au;
116
+ exports.Editor = Jm;
117
+ exports.FileUpload = hp;
118
+ exports.FreehandCanvas = mu;
119
+ exports.GridList = Qf;
120
+ exports.Group = Au;
121
+ exports.I18nProvider = Js;
122
+ exports.IconColorInput = nu;
123
123
  exports.IconColorInputButton = Qr;
124
- exports.IconSelect = $c;
125
- exports.IconSlider = $l;
126
- exports.ImageDropZone = Iu;
127
- exports.ImageGallery = Ef;
128
- exports.InlineAlert = md;
129
- exports.Link = dp;
124
+ exports.IconSelect = Uc;
125
+ exports.IconSlider = Ul;
126
+ exports.ImageDropZone = wu;
127
+ exports.ImageGallery = Bf;
128
+ exports.InlineAlert = fd;
129
+ exports.Link = up;
130
130
  exports.ListBox = le;
131
- exports.Markdown = pf;
131
+ exports.Markdown = cf;
132
132
  exports.Menu = wr;
133
- exports.MessageFormat = Ou;
133
+ exports.MessageFormat = ju;
134
134
  exports.Modal = we;
135
- exports.ModalClose = Xz;
135
+ exports.ModalClose = Yz;
136
136
  exports.ModalContent = Ee;
137
137
  exports.ModalTrigger = jr;
138
- exports.NumberFormat = Fo;
138
+ exports.NumberFormat = Ho;
139
139
  exports.NumberInput = Me;
140
- exports.Pagination = sc;
141
- exports.Panel = nw;
142
- exports.PanelGroup = uw;
143
- exports.PanelResizeHandle = bw;
140
+ exports.Pagination = lc;
141
+ exports.Panel = sw;
142
+ exports.PanelGroup = fw;
143
+ exports.PanelResizeHandle = vw;
144
144
  exports.Popover = Ne;
145
145
  exports.PopoverContent = Re;
146
146
  exports.PopoverTrigger = Le;
147
147
  exports.Portal = Ae;
148
- exports.PortalContainerProvider = tl;
149
- exports.Preview = Nu;
150
- exports.ProgressBar = Sp;
151
- exports.ProgressSpinner = Vo;
152
- exports.RadioGroup = Vu;
153
- exports.Reaction = Fp;
154
- exports.ScrollControlButton = tf;
155
- exports.SearchInput = ap;
148
+ exports.PortalContainerProvider = rl;
149
+ exports.Preview = Lu;
150
+ exports.ProgressBar = Tp;
151
+ exports.ProgressSpinner = Oo;
152
+ exports.RadioGroup = Ou;
153
+ exports.Reaction = Hp;
154
+ exports.ScrollControlButton = rf;
155
+ exports.SearchInput = np;
156
156
  exports.Select = Xe;
157
157
  exports.Separator = O;
158
- exports.Slider = No;
159
- exports.Switch = Jl;
160
- exports.TabItem = ad;
161
- exports.Tabs = rd;
162
- exports.TagGroup = vc;
158
+ exports.Slider = Lo;
159
+ exports.Switch = ep;
160
+ exports.TabItem = nd;
161
+ exports.Tabs = ad;
162
+ exports.TagGroup = _c;
163
163
  exports.Text = Q;
164
164
  exports.TextInput = Ke;
165
- exports.ThemeProvider = So;
165
+ exports.ThemeProvider = To;
166
166
  exports.ToggleButton = Lr;
167
167
  exports.ToggleIconButton = be;
168
168
  exports.Toolbar = ia;
169
169
  exports.Tooltip = ne;
170
- exports.Transform = xu;
170
+ exports.Transform = Cu;
171
171
  exports.Transition = ga;
172
- exports.TreeView = fy;
172
+ exports.TreeView = yy;
173
173
  exports.defineMessages = $;
174
- exports.isInsideOverlayContent = bT;
175
- exports.isRect = Is;
176
- exports.useDevice = Io;
174
+ exports.isInsideOverlayContent = vT;
175
+ exports.isRect = ws;
176
+ exports.useDevice = wo;
177
177
  exports.useI18n = F;
178
- exports.useImage = Po;
179
- exports.useIntersectionObserver = Ks;
180
- exports.useIsFirstRender = ko;
181
- exports.useLocalStorage = el;
182
- exports.useMutationObserver = sL;
178
+ exports.useImage = ko;
179
+ exports.useIntersectionObserver = Gs;
180
+ exports.useIsFirstRender = Io;
181
+ exports.useLocalStorage = ol;
182
+ exports.useMutationObserver = pL;
183
183
  exports.usePortalContainer = ge;
184
- exports.useResizeObserver = Gs;
185
- exports.useTextSelection = fL;
186
- exports.useUndoRedo = Xs;
184
+ exports.useResizeObserver = Ws;
185
+ exports.useTextSelection = bL;
186
+ exports.useUndoRedo = Ys;
187
187
  exports.useUserPreferences = Xa;