@baseline-ui/core 0.35.1 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -49,8 +49,8 @@ import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels';
49
49
  * This notice may not be removed from this file.
50
50
  *
51
51
  */
52
- var xe=typeof document<"u"?nt.useLayoutEffect:()=>{};function Fa(e){let t=useRef(null);return xe(()=>{t.current=e;},[e]),useCallback((...o)=>{let r=t.current;return r?.(...o)},[])}function Ha(e){let[t,o]=useState(e),r=useRef(null),a=Fa(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}t===i.value?a():o(i.value);});xe(()=>{r.current&&a();});let n=Fa(i=>{r.current=i(t),a();});return [t,n]}var sr={prefix:String(Math.round(Math.random()*1e10)),current:0},as=nt.createContext(sr),Jy=nt.createContext(!1);var e1=!!(typeof window<"u"&&window.document&&window.document.createElement),Va=new WeakMap;function t1(e=!1){let t=useContext(as),o=useRef(null);if(o.current===null&&!e){var r,a;let n=(a=nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=Va.get(n);i==null?Va.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==i.state&&(t.current=i.id,Va.delete(n));}o.current=++t.current;}return o.current}function o1(e){let t=useContext(as);t===sr&&!e1&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let o=t1(!!e),r=t===sr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${o}`}function r1(e){let t=nt.useId(),[o]=useState(ns()),r=o||process.env.NODE_ENV==="test"?"react-aria":`react-aria${sr.prefix}`;return e||`${r}-${t}`}var Aa=typeof nt.useId=="function"?r1:o1;function a1(){return !1}function n1(){return !0}function i1(e){return ()=>{}}function ns(){return typeof nt.useSyncExternalStore=="function"?nt.useSyncExternalStore(i1,a1,n1):useContext(Jy)}var d1=!!(typeof window<"u"&&window.document&&window.document.createElement),lr=new Map;function pr(e){let[t,o]=useState(e),r=useRef(null),a=Aa(t),n=useCallback(i=>{r.current=i;},[]);return d1&&lr.set(a,n),xe(()=>{let i=a;return ()=>{lr.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,o(i));}),a}function ja(e,t){if(e===t)return e;let o=lr.get(e);if(o)return o(t),t;let r=lr.get(t);return r?(r(e),e):t}function is(...e){return (...t)=>{for(let o of e)typeof o=="function"&&o(...t);}}var me=e=>{var t;return (t=e?.ownerDocument)!==null&&t!==void 0?t:document},pe=e=>e&&"window"in e&&e.window===e?e:me(e).defaultView||window,Ve=e=>{if(!e)return document;if(!e.isConnected)return null;let t=e.getRootNode?e.getRootNode():document;return ls(t)||ps(t)?t:null};function ss(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function ls(e){return ss(e)&&e.nodeType===Node.DOCUMENT_NODE}function ps(e){return ss(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function cs(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=cs(e[t]))&&(r&&(r+=" "),r+=o);}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function m1(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=cs(e))&&(r&&(r+=" "),r+=t);return r}var ds=m1;function xt(...e){let t={...e[0]};for(let o=1;o<e.length;o++){let r=e[o];for(let a in r){let n=t[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=is(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?t[a]=ds(n,i):a==="id"&&n&&i?t.id=ja(n,i):t[a]=i!==void 0?i:n;}}return t}function M(...e){return e.length===1&&e[0]?e[0]:t=>{for(let o of e)typeof o=="function"?o(t):o!=null&&(o.current=t);}}var u1=new Set(["id"]),f1=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),y1=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),b1=/^(data-.*)$/;function $a(e,t={}){let{labelable:o,isLink:r,propNames:a}=t,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(u1.has(i)||o&&f1.has(i)||r&&y1.has(i)||a?.has(i)||b1.test(i))&&(n[i]=e[i]);return n}function cr(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(o=>e.test(o.brand)))||e.test(window.navigator.userAgent)}function Se(e){let t=null;return ()=>(t==null&&(t=e()),t)}var yo=Se(function(){return cr(/Firefox/i)});function oe(e){let t=useRef(null);return useMemo(()=>({get current(){return t.current},set current(o){t.current=o,typeof e=="function"?e(o):e&&(e.current=o);}}),[e])}function C1(){return typeof window.ResizeObserver<"u"}function qa(e){let{ref:t,box:o,onResize:r}=e;useEffect(()=>{let a=t?.current;if(a)if(C1()){let n=new window.ResizeObserver(i=>{i.length&&r();});return n.observe(a,{box:o}),()=>{a&&n.unobserve(a);}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1);}},[r,t,o]);}function Oe(e){return !!e&&"label"in e&&!!e.label}function dr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function I1(e){return dr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:t=>jsx(Item,{textValue:t.label,children:t.label},t.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function ae(){return useCallback(e=>I1(e),[])}function mr(e,t,o){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=t.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,o);let n=useDroppableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:t.collection,disabledKeys:t.disabledKeys,ref:o,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(t.collection,o)},n,o);return {collectionProps:i,dragState:a,dropState:n}}function E1(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}function B1(e){var t=E1(e,"string");return typeof t=="symbol"?t:String(t)}function F1(e,t,o){return t=B1(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function gs(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,r);}return o}function vs(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?gs(Object(o),!0).forEach(function(r){F1(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):gs(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function _s(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var H1=(e,t,o)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=t[r])!==null&&a!==void 0?a:o[r]))return !1}return !0},z=e=>{var t=o=>{var r=e.defaultClassName,a=vs(vs({},e.defaultVariants),o);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,d]of e.compoundVariants)H1(c,a,e.defaultVariants)&&(r+=" "+d);return r};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return _s(e.variantClassNames,o=>_s(o,r=>r.split(" ")[0]))}},t};var zs=z({defaultClassName:"_6n12k9b _1yep5z6lm _1yep5z6ll _1yep5z6i6 _1yep5z6l4",variantClassNames:{isDropTarget:{true:"_1yep5z613r"},orientation:{vertical:"_1yep5z617e",horizontal:"_1yep5z617f"}},defaultVariants:{},compoundVariants:[]}),hs="_6n12k98 _1yep5z6lk _1yep5z6im _1yep5z6in _1yep5z6io",xs=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Cs=z({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6l4 _1yep5z6l7 _1yep5z6lk _1yep5z6lj _1yep5z6lh _1yep5z6le",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z613r _1yep5z617k _1yep5z617i _1yep5z617l _1yep5z6144 _1yep5z6145 _1yep5z6146"},isHovered:{true:"_1yep5z611z",false:"_1yep5z611y"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),Ps="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",ks="_6n12k90";var Is=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var A=nt.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(Is({isVertical:r==="vertical",isSecondary:o==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:t,role:a?void 0:c.role,ref:l})});A.displayName="Separator";function q1(e){return sprinkles.properties.has(e)}var L=nt.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in o)q1(l)?s[l]=o[l]:p[l]=o[l];return {sprinkleProps:s,domProps:p}},[o]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:t})});L.displayName="Box";var go=nt.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:d},u)=>{invariant(e.value&&Oe(e.value),"Item cannot be a section");let{icon:m,label:y}=e.value,{hoverProps:f,isHovered:b}=useHover({isDisabled:t}),g=filterTruthyValues({"data-selected":r,"data-disabled":t,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":o,"data-selection-mode":d.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,f,g),className:classNames(Cs({isHovered:b,isFocused:o,isFirstChild:d.collection.getFirstKey()===e.key,isLastChild:d.collection.getLastKey()===e.key,isDisabled:t}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:u,children:[jsxs(L,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,m?jsx(m,{size:24}):null,jsx("span",{...p,children:y})]}),i?jsx("span",{className:xs({isDisabled:t}),...s,children:i}):null]})});go.displayName="DefaultRenderOption";var Ct=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(zs({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let i=nt.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:t},i)};function Ae(e,t,o){return typeof e=="function"?e(t,o):e}function ur(e,t,o){return typeof e=="function"?e(t,o):e}function fr(e,t){return typeof e=="function"?e(t):e}function Xa(e,t){return typeof e=="function"?e(t):e}var Ss=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};Ss.displayName="DraggableListOption";var vo=nt.forwardRef(({item:e,renderOption:t=(u,m,y)=>jsx(go,{item:u,liProps:m.optionProps,...m,ref:y}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},d)=>{let u=nt.useRef(null),m=useOption({key:e.key},r,u),{value:y}=e;invariant(y&&Oe(y),"ListSection should not be passed to ListOption");let f={isFocusVisible:m.isFocusVisible,isSelected:m.isSelected,isFocused:m.isFocused,isDisabled:m.isDisabled,isPressed:m.isPressed},b={style:ur(l,y,f),className:Ae(c,y,f)};return a&&n?jsx(Ss,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:g=>t(e,{...m,showSelectedIcon:o,_state:r,optionProps:{...mergeProps(m.optionProps,g),...b}},M(u,d))}):t(e,{...m,showSelectedIcon:o,_state:r,optionProps:{...m.optionProps,...b}},M(u,d))});vo.displayName="Option";var Ds=({section:e,state:t,sectionClassName:o,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=nt.useRef(null),{itemProps:l,groupProps:c,headingProps:d}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),u=t.collection.getChildren?.(e.key);invariant(u,"children must be defined");let{value:m}=e;invariant(m&&dr(m),"section must be a ListSection");let y=typeof r=="function"?r(m):r,f=typeof o=="function"?o(m):o;return jsxs(Fragment,{children:[e.key===t.collection.getFirstKey()?null:jsx(A,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...y},className:classNames(ks,f,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(L,{...d,className:classNames("BaselineUI-ListBox-SectionHeader",Ps),ref:p,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...u].map(b=>jsx(vo,{item:b,state:t,...s},b.key))})]})]})};function gr({type:e="listbox",handle:t},o,r){let a=useCallback(i=>e==="listbox"?r.current?.querySelector(`[data-key="${i}"][role="option"]`):r.current?.querySelector(`[data-key="${i}"][role="row"]`),[e,r]),n=useCallback((i,s)=>{let p=a(i);p&&p?.scrollIntoView({block:"nearest",inline:"nearest",...s});},[a]);useImperativeHandle(t,()=>({scrollIntoView:n,setFocusedKey:i=>{o.selectionManager.setFocused(!0),o.selectionManager.setFocusedKey(i),n(i),a(i)?.focus();}}),[n,o.selectionManager,a]),useGranularEffect(()=>{let i=Ve(r.current)instanceof ShadowRoot,s=o.selectionManager.focusedKey;i&&s&&n(s);},[o.selectionManager.focusedKey],[n,r]);}var it=nt.createContext(null),Ya=nt.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:d,listBoxHandle:u,...m},y)=>{let f=nt.useRef(null),{direction:b}=useLocale(),g=nt.useRef(null),{listBoxProps:_}=useListBox({...m,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:d.collection,ref:g,layout:t,orientation:o,direction:b,disabledKeys:d.disabledKeys})},d,g);gr({handle:u},d,g);let v=useReducedMotion(),h=useCallback(S=>{let k=me(g.current);c&&(!v&&"startViewTransition"in k?k.startViewTransition(()=>{c(S);}):c(S));},[c,v]),{collectionProps:I,dragState:P,dropState:C}=mr({...m,onReorder:h,layout:t,orientation:o,enableReorder:i,preview:f},d,g),{isFocusVisible:x,isFocused:T,focusProps:N}=useFocusRing(),R=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":t,"data-empty":d.collection.size===0,"data-focused":T,"data-focus-visible":x,"data-orientation":o});return jsxs("ul",{...mergeProps(_,N,R,I),className:classNames(hs,"BaselineUI-ListBox",e),style:a,ref:M(y,g),children:[[...d.collection].map(S=>{let k={key:S.key,state:d,dragState:P,dropState:C,renderOption:n,renderDropIndicator:m.renderDropIndicator,renderSectionHeader:m.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:m.dropIndicatorStyle,dropIndicatorClassName:m.dropIndicatorClassName,optionStyle:m.optionStyle,optionClassName:m.optionClassName,sectionClassName:m.sectionClassName,sectionStyle:m.sectionStyle,showSectionHeader:m.showSectionHeader,withSectionHeaderPadding:m.withSectionHeaderPadding};return S.type==="section"?jsx(Ds,{...k,section:S}):jsx(vo,{...k,item:S})}),l?jsx(DragPreview,{ref:f,children:l}):null]})});Ya.displayName="ListBoxCore";var Bs=nt.forwardRef((e,t)=>{let o=ae(),r=useListState({...e,children:o});return jsx(Ya,{...e,ref:t,state:r})});Bs.displayName="ListBoxStandalone";var le=nt.forwardRef((e,t)=>{let o=useContext(it);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx(Ya,{...e,ref:t,state:o}):jsx(Bs,{...e,ref:t})});le.displayName="ListBox";var vr="uf19bsf _1yep5z6l4",Fs=z({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5 _1yep5z6lj _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6le",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6wi _1yep5z6wj _1yep5z6wk _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z6114"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6x0 _1yep5z6x1 _1yep5z6x2 _1yep5z6xo _1yep5z6xp _1yep5z6xq _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2",popover:"uf19bse _1yep5z6pl _1yep5z6pm _1yep5z6pn _1yep5z6n9 _1yep5z6na _1yep5z6nb _1yep5z6m0 _1yep5z6m1 _1yep5z6m2 _1yep5z6oc _1yep5z6od _1yep5z6oe _1yep5z6vl _1yep5z6vm _1yep5z6vn"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61nx"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61nx"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61n0"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mz _1yep5z61nx"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61n5"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61pr _1yep5z61tf _1yep5z61tj _1yep5z61tg"],[{variant:"ghost",isDisabled:!1},"_1yep5z61n4"],[{variant:"popover",size:"lg"},"_1yep5z61ic _1yep5z61id _1yep5z61ie _1yep5z61j0 _1yep5z61j1 _1yep5z61j2 _1yep5z61jo _1yep5z61jp _1yep5z61jq _1yep5z61kc _1yep5z61kd _1yep5z61ke"]]});var _o=nt.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...t})=>{let o=nt.useRef(null),r=useOverlayTriggerState(t),a=useOverlayTrigger(t,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:o}),[r,a]);return jsx(_o.Provider,{value:n,children:e})};var Vs={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Os="_1gzftth1 _1yep5z6im _1yep5z6in _1yep5z6io",As="_1gzftth6",js="_1gzftth8",$s="_1gzftth7",Us="var(--_1gzftth0)";function fN(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Ks(e){return typeof e=="object"&&typeof e.left=="number"&&typeof e.top=="number"&&(typeof e.width=="number"||e.width===void 0)&&(typeof e.height=="number"||e.height===void 0)}var _r=nt.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:t})=>{let{state:o,overlayTriggerAria:r,triggerRef:a}=useContext(_o);invariant(o,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:o.isOpen,ref:a}),[n,o.isOpen,a]);return invariant(!t&&e||t&&!e,"Either one of anchorRect or children has to be provided."),invariant(!t||Ks(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(_r.Provider,{value:i,children:t?jsx("div",{className:classNames(js,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:a,tabIndex:-1},JSON.stringify(t)):e})};var zr=({label:e,tooltip:t})=>({tooltipProps:useMemo(()=>{let r={size:"sm",variant:"inverse",text:e,includeArrow:!1,placement:"bottom start",offset:4};if(typeof t=="object")return {...r,...t};if(t)return r},[e,t])});function hr({tooltip:e,"aria-label":t,"aria-labelledby":o},r){let[a,n]=useState(t||"");useEffect(()=>{if(o){let p=me(r.current).querySelector(`#${o}`);p&&n(p.textContent||"");}else t&&n(t);},[o,r,t]);let{tooltipProps:i}=zr({label:a,tooltip:e});return {tooltipProps:i}}var xr=e=>{let t=nt.useRef(null),{ref:o,...r}=useContext(_r)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t),{isFocusVisible:i,isFocused:s,focusProps:p}=useFocusRing(),{hoverProps:l,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:xt(a,p,l),isPressed:n,ref:M(t,o||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},Cr=(e,t)=>{let o=nt.useRef(null),{ref:r,...a}=useContext(_r)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},t,o);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=useFocusRing(),{hoverProps:c,isHovered:d}=useHover({isDisabled:e.isDisabled});return {buttonProps:xt(n,l,c),isPressed:i,ref:M(o,r||null),isFocusVisible:s,isFocused:p,isHovered:d,uiStateOptions:{isHovered:d,isFocused:p,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:t.isSelected}}};var Pr=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6dy _1yep5z6l4",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9"},isDisabled:{true:"oom8bsa"},isFocusVisible:{true:"oom8bsb"},isHovered:{true:"oom8bsc"},size:{sm:"oom8bsd",md:"oom8bse",lg:"oom8bsf"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsg"],[{variant:"secondary",isHovered:!0},"oom8bsh"],[{variant:"tertiary",isHovered:!0},"oom8bsi"],[{variant:"popover",isHovered:!0},"oom8bsj"],[{variant:"ghost",isHovered:!0},"oom8bsk"],[{variant:"success",isHovered:!0},"oom8bsl"],[{variant:"warning",isHovered:!0},"oom8bsm"],[{variant:"error",isHovered:!0},"oom8bsn"],[{variant:"primary",isFocusVisible:!0},"oom8bso"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsp"],[{variant:"success",isFocusVisible:!0},"oom8bsq"],[{variant:"warning",isFocusVisible:!0},"oom8bsr"],[{variant:"error",isFocusVisible:!0},"oom8bss"]]}),Qa=z({defaultClassName:"oom8bst _1yep5z6l4",variantClassNames:{isDisabled:{true:"oom8bsu"},isFocusVisible:{true:"oom8bsv"},isHovered:{true:"_1yep5z610z"},variant:{primary:"_1yep5z6116",secondary:"_1yep5z6112",tertiary:"_1yep5z6117",ghost:"_1yep5z6117",popover:"_1yep5z6112",toolbar:"_1yep5z6112",success:"_1yep5z6115",warning:"_1yep5z6115",error:"_1yep5z6115"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:!0},"_1yep5z61n3"],[{variant:"ghost",isHovered:!0},"_1yep5z61n5"],[{variant:"tertiary",isFocusVisible:!0},"_1yep5z61n3"],[{variant:"secondary",isDisabled:!0},"_1yep5z61n1"],[{variant:"tertiary",isDisabled:!0},"_1yep5z61n1"],[{variant:"ghost",isDisabled:!0},"_1yep5z61n1"],[{variant:"popover",isDisabled:!0},"_1yep5z61n1"],[{variant:"toolbar",isDisabled:!0},"_1yep5z61n1"]]});var Wb={sm:16,md:20,lg:24},G=nt.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...d},u)=>{let{buttonProps:m,isPressed:y,ref:f,isFocusVisible:b,isFocused:g,isHovered:_,uiStateOptions:v}=xr({...d,elementType:i,isDisabled:s}),h=Wb[p],I=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":s,"data-focused":g,"data-focus-visible":b,"data-hovered":_,"data-pressed":y});return jsxs(i,{...mergeProps(m,I),className:classNames(Pr({isDisabled:!!s,isFocusVisible:b,isHovered:_,variant:n,size:p}),"BaselineUI-ActionButton",typeof o=="function"?o(v):o),style:typeof t=="function"?t(v):t,ref:M(u,f),children:[!!r&&jsx(r,{size:h,className:Qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsx(a,{size:h,className:Qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:vr})]})});G.displayName="ActionButton";var Zs=nt.forwardRef(({className:e,style:t,node:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=nt.useRef(null);nt.useEffect(()=>{let c=s.current;return c?.append(o),()=>{c?.contains(o)&&o.remove();}},[o]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...p,className:e,style:t,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:M(i,s)})});Zs.displayName="DomNodeRenderer";var Qs="_14uvjig0 z9nup81",Js="_14uvjig7",el="_14uvjig3",tl=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),ol=z({defaultClassName:"_14uvjigf _14uvjig1",variantClassNames:{active:{true:"_14uvjigg _14uvjig2"},isDisabled:{true:"_14uvjigh"},isReadOnly:{true:"_14uvjigi"},isFocusVisible:{true:"_14uvjigj _14uvjig2"},isHovered:{true:"_14uvjigk _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),rl="_14uvjige _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",al="_14uvjig8",nl=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var It=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),kr=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),Rt=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),je="nrh1eh3",$e=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Ue=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),wt=z({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function ke({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...o,className:It({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...t,className:It({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:It({isDisabled:i,labelPosition:n}),children:r}):null}var il=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),sl="_1lnwne0";var ll=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),pl=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var on=nt.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:t.isOpen},t),d=useMemo(()=>{switch(a){case"top":return {x:0,y:4};case"bottom":return {x:0,y:-4};case"left":return {x:4,y:0};case"right":return {x:-4,y:0};default:return {x:0,y:0}}},[a]),u=useReducedMotion(),[m]=useSpring(()=>({from:{opacity:0,transform:`translate(${d.x}px, ${d.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!u})),y=a==="center"?"bottom":a;return jsxs(animated.span,{...o,style:{...m,...o.style},ref:l,"data-placement":y,children:[p?jsx("div",{className:ll({placement:y,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:pl({variant:n,size:i}),children:e})]})});on.displayName="TooltipContent";function ml({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let i=nt.useRef(null);useEffect(()=>{if(o){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{t(s);},{root:n?.current,rootMargin:a,threshold:r});},[t,o,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function ul({ref:e,onResize:t,isDisabled:o}){let r=nt.useRef(null),[a,n]=nt.useState();return nt.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),t?.(i);});},[t,o,n]),nt.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function Tt({src:e,alt:t}){let[o,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:o,hasError:a,isLoading:i,imgProps:{src:o?e:void 0,alt:t}}}function St(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var fl="SET_STATE",Rr="UNDO",wr="REDO",ug=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case fl:return {past:[...o,r],present:t.data,future:[]};case Rr:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case wr:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},yl=(e={},{isDisabled:t,onAction:o})=>{let r=St(),[a,n]=useReducer(ug,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=f=>{n({type:fl,data:f});},c=useRef(),d=()=>{c.current=Rr,n({type:Rr});},u=()=>{c.current=wr,n({type:wr});},m=!!i?.length,y=!!p?.length;return useGranularEffect(()=>{(c.current===Rr||c.current===wr)&&(o?.(s,c.current),c.current=void 0);},[s],[o,r]),{state:s,push:t?()=>{}:l,undo:t?()=>{}:d,redo:t?()=>{}:u,pastStates:i,futureStates:p,canUndo:m,canRedo:y}};var an=nt.createContext({messages:{},shouldLogMissingMessages:!0,hasMissingErrorLoggedFor:{current:new Set},setLang:()=>{}}),vl=({children:e,messages:t={},shouldLogMissingMessages:o=!0,...r})=>{let a=useRef(new Set),[n,i]=useState("");useEffect(()=>{a.current.clear();},[n,r.locale]);let s=nt.useMemo(()=>({messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:a,setLang:i}),[t,o,a,i]);return jsx(I18nProvider,{...r,children:jsx(an.Provider,{value:s,children:e})})};vl.displayName="I18nProvider";function F(e){let{messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:r}=useContext(an);useEffect(()=>{!e&&_g(t)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,t]);let a=useMemo(()=>e?cleanKeyFromGlobImport(e):t,[e,t]),n=useMessageFormatter(a),i=useLocale(),s=useCallback(l=>{o&&!r.current.has(l)&&(console.log(`BUI \u{1F30D}: Translation not found for key: \`${l}\` for locale: \`${i.locale}\`. The default message, i.e. \`${l}\`, will be used instead.`),r.current.add(l));},[r,i.locale,o]),p=useCallback((l,c)=>{if(typeof l=="object")try{return n(l.id,c)}catch{return s(l.id),l.defaultMessage||l.id}else try{return n(l,c)}catch{return s(l),l}},[n,s]);return useMemo(()=>({formatMessage:p,locale:i}),[p,i])}var K=e=>e;function lM(e,t,o){let r=nt.useRef(null);return nt.useEffect(()=>{if(e)return r.current=new MutationObserver(o),r.current.observe(e,t),()=>{r.current&&r.current.disconnect();}},[e,t,o]),r.current}function xl(e,t){let[o,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(n){return console.log(n),t}});return [o,n=>{try{let i=n instanceof Function?n(o):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function yM({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=nt.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=pe(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&o?.(i);},onPressStart(){let n=pe(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=pe(n).getSelection();l&&e.current?.contains(l.anchorNode)&&t(l);}let s=me(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,t,r]);}function Nt(e){let t=useCallback(()=>{let a=pe(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[o,r]=nt.useState(t);return xe(()=>{let a=pe(e),n=()=>{r(t());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,t]),o}var nn=nt.createContext(void 0),Pl=({portalContainer:e,children:t})=>jsx(nn.Provider,{value:e,children:t});Pl.displayName="PortalContainerProvider";function ve(e){let t=useContext(nn);return e||t}var kl=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var Il="z9nup80",Lt="z9nup83",Rl="z9nup87";function sn(e=window){let[t,o]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=d=>{o(d.matches?"dark":"light");};return l.matches&&o("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=d=>{a(d.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=d=>{i(d.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=d=>{p(d.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:t,highContrast:r,reducedMotion:n,transparency:s}}var Mt=createContext({theme:lightTheme,setTheme:()=>{}});var wl="var(--hj25q10)";var Nr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},Dt=nt.forwardRef(({theme:e="system",children:t,setTheme:o,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:d,highContrast:u,transparency:m}=sn(),{name:y,theme:f}=useMemo(()=>{switch(e){case"system":return c==="light"?Nr.LIGHT:Nr.DARK;case"light":return Nr.LIGHT;case"dark":return Nr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=Nt(),g={"data-theme":y,"data-block-id":i,"data-block-class":s,"data-reduced-motion":d,"data-high-contrast":u,"data-transparency":m,"data-device":b},_=useMemo(()=>({theme:f,setTheme:o}),[f,o]);return jsx(Mt.Provider,{value:_,children:jsx("div",{...mergeProps(n,g),className:classNames(Il,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,f),...assignInlineVars({[wl]:l==="rtl"?"-1":"1"}),...a},ref:p,children:t})})});Dt.displayName="ThemeProvider";var Ke=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(Mt);return jsx(Overlay,{...n,children:jsx(Dt,{ref:i,theme:s,style:t,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:o})})});Ke.displayName="Portal";var re=nt.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":d,...u},m)=>{let y=nt.useRef(null),f=nt.useRef(null),b=!u.text||u.isDisabled,g=useTooltipTriggerState({...u,delay:o,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:v}=useTooltipTrigger({...u,isDisabled:b,delay:o,closeDelay:r},g,y),h=ve(s),{overlayProps:I,arrowProps:P,placement:C,updatePosition:x}=useOverlayPosition({arrowSize:i?13:0,targetRef:y,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:f,placement:t,isOpen:g.isOpen,...u});return ml({ref:f,threshold:1,onIntersect:x,isDisabled:!g.isOpen}),ul({ref:y,onResize:x,isDisabled:!g.isOpen}),jsxs(FocusableProvider,{..._,ref:y,children:[e,g.isOpen?jsx(Ke,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":d,children:jsx(on,{ref:M(m,f),state:g,arrowProps:P,overlayProps:I,placement:C,tooltipProps:v,variant:a,size:n,includeArrow:i,children:u.text})}):null]})});re.displayName="Tooltip";var Lr=nt.forwardRef(({elementType:e,children:t,...o},r)=>{let a=oe(r),{focusableProps:n}=useFocusable(o,a);return jsx(e??"div",{ref:a,...n,children:t})});Lr.displayName="Focusable";var nv={xxs:8,xs:12,sm:16,md:20,lg:24},E=nt.forwardRef((e,t)=>{let o=oe(t),{tooltipProps:r}=hr(e,o);return r?jsx(re,{...r,children:jsx(pn,{...e,ref:o})}):jsx(pn,{...e,ref:o})});E.displayName="ActionIconButton";var pn=nt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{let l=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!l&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,c]);let{buttonProps:d,isPressed:u,ref:m,isFocusVisible:y,isFocused:f,isHovered:b,uiStateOptions:g}=xr({...s,elementType:i}),_=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":f,"data-focus-visible":y,"data-disabled":s.isDisabled,"data-hovered":b,"data-pressed":u});return jsxs(i,{...mergeProps(d,_),className:classNames(Fs({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:y,isHovered:b}),"BaselineUI-ActionIconButton",typeof e=="function"?e(g):e),ref:M(p,m),style:typeof t=="function"?t(g):t,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(o,{role:"presentation",size:nv[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:vr})]})});pn.displayName="ActionIconButtonCore";var Me=nt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=nt.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:d}=useHover({isDisabled:n.isDisabled}),{focusProps:u,isFocusVisible:m,isFocused:y}=useFocusRing(),{labelProps:f,decrementButtonProps:b,inputProps:g,incrementButtonProps:_,groupProps:v,descriptionProps:h,errorMessageProps:I}=useNumberField(n,l,s),P=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorCircleFilledIcon:null,[n.isInvalid,n.isReadOnly]),C=ke({description:n.description,errorMessageProps:I,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),x=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":d,"data-focused":y,"data-focus-visible":m,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:t,className:classNames(Ue({labelPosition:o}),"BaselineUI-NumberInput",e),...x,ref:i,children:[n.label?jsxs("div",{className:$e({labelPosition:o,hasMessage:!!C}),children:[jsx("label",{...f,className:je,children:n.label}),o==="start"&&C]}):null,jsxs("div",{className:classNames({[Lt]:n.isDisabled}),children:[jsxs("div",{...mergeProps(v,c),className:classNames(wt({isHovered:d,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:y,variant:r}),{[sl]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(g,u),ref:s,className:classNames("BaselineUI-NumberInput-Input",kr({isDisabled:n.isDisabled,labelPosition:o}))}),P?jsx(P,{className:Rt({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:il({isHoveredOrFocused:d||y,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(E,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(A,{style:{height:16},orientation:"vertical"}),jsx(E,{variant:"secondary",size:"xxs",icon:PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),o==="top"&&C]})]})});Me.displayName="NumberInput";var Ft=nt.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":d,"aria-details":u,"aria-describedby":m,"data-block-id":y,"data-block-class":f,defaultValue:b,isReadOnly:g,label:_,id:v,includeNumberInput:h},I)=>{let P=nt.useRef(null),C={onChange:o===void 0?void 0:w=>{o(w[0]);},isDisabled:n||g,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:w=>{r(w[0]);},value:l===void 0?void 0:[l],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":d,"aria-details":u,"aria-describedby":m,id:v,label:_},x=useNumberFormatter(a),T=useSliderState({...C,numberFormatter:x}),{trackProps:N,groupProps:R,labelProps:S}=useSlider(C,T,P),k=jsx(Me,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":S.id,value:T.getThumbValue(0),formatOptions:a,onChange:w=>{T.setThumbValue(0,w);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...R,style:t,"data-block-id":y,"data-block-class":f,className:classNames(Qs,"BaselineUI-Slider",e),children:[_?jsxs("div",{className:el,children:[jsx("label",{...S,className:classNames(tl({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?k:null]}):null,jsxs("div",{className:Js,children:[jsx("div",{...N,className:classNames(al,"BaselineUI-Slider-Track"),ref:M(P,I),"data-testid":"track",children:jsx(Iv,{state:T,trackRef:P,isDisabled:n,isReadOnly:g})}),h&&!_?k:null]})]})});Ft.displayName="Slider";function Iv({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=nt.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:t,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:d,isHovered:u}=useHover({isDisabled:o}),m=filterTruthyValues({"data-disabled":o,"data-readonly":r,"data-hovered":u,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(nl({isDisabled:o,isFocusVisible:c,active:s,isHovered:u}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...mergeProps(n,d,m),className:classNames(rl,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:classNames(ol({isDisabled:o,isFocusVisible:c,active:s,isReadOnly:r,isHovered:u}),"BaselineUI-Slider-Thumb")}),jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})]})]})}var Hl=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610r",title:"_1yep5z610r",label:"_1yep5z610s",value:"_1yep5z610s",helper:"_1yep5z610t",body:"_1yep5z610r"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61l7"],[{type:"title",size:"md"},"_1yep5z61la"],[{type:"title",size:"lg"},"_1yep5z61ld"],[{type:"body",size:"sm"},"_1yep5z61lx"],[{type:"body",size:"md"},"_1yep5z61m0"],[{type:"body",size:"lg"},"_1yep5z61m0"],[{type:"subtitle",size:"sm"},"_1yep5z61lt"],[{type:"subtitle",size:"md"},"_1yep5z61lw"],[{type:"subtitle",size:"lg"},"_1yep5z61lw"],[{type:"label",size:"md"},"_1yep5z61lv"],[{type:"label",size:"lg"},"_1yep5z61lv"],[{type:"value",size:"md"},"_1yep5z61lv"],[{type:"value",size:"lg"},"_1yep5z61lv"],[{type:"helper",size:"sm"},"_1yep5z61lp"]]});var Q=nt.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Hl({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));Q.displayName="Text";var Vl=z({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6lv _1yep5z6lt _1yep5z6h4 _1yep5z6lk _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0",variantClassNames:{background:{subtle:"_1yep5z611y",medium:"_1yep5z611z"},isFocusVisible:{true:"_1yep5z617i _1yep5z617k _1yep5z617l _1yep5z613r"}},defaultVariants:{},compoundVariants:[]}),Ol="siobe25";var Dr=nt.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,contentStyle:l,contentClassName:c,...d},u)=>{let{formatMessage:m}=F(),y=nt.useRef(null),{dialogProps:f,titleProps:b}=useDialog(d,y),{focusProps:g,isFocusVisible:_}=useFocusRing();return jsxs("div",{...mergeProps(f,g),className:classNames(Vl({background:r,isFocusVisible:_}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:t,ref:M(u,y),children:[jsxs(L,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Ol,children:[jsx(Q,{type:"title",size:"sm",...b,className:Rl,children:a}),jsxs(L,{children:[n?jsx(E,{...n,variant:"secondary"}):null,jsx(E,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":m(Ev.close)})]})]}),jsx(A,{variant:r==="subtle"?"primary":"secondary"}),jsx(L,{display:"flex",flexDirection:"column",flex:1,style:{overflow:"auto",...l},className:classNames(c,"BaselineUI-Drawer-Content"),children:o})]})});Dr.displayName="Drawer";var Ev=K({close:{id:"close",defaultMessage:"Close"}});function Ul(e,t,o){let{isDisabled:r}=e,a=useReducedMotion(),[{y:n},i]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),s=useRef(0),p=useCallback(()=>{i.start({y:s.current,onRest:()=>{t.close();}});},[i,t]),l=useCallback(d=>{d.target.closest("[data-drawer]")||p();},[p]);useGranularLayoutEffect(()=>{s.current=o.current?.offsetHeight||0,i.set({y:s.current}),i.start({y:0,immediate:!!a});},[],[i,a]);let c=n.to({range:[0,s.current/2,s.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:n.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:c},onPointerDown:r||!e.isDismissable?void 0:l},close:p}}var Kl="aml2vl3 _1yep5z6im _1yep5z6in _1yep5z6io",ql=z({defaultClassName:"aml2vl0 _1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6id _1yep5z6ie _1yep5z6if",variantClassNames:{enableDrawer:{false:"_1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),Gl="_1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6gb _1yep5z6id _1yep5z6ie _1yep5z6if";var Ge=nt.createContext({state:null,triggerProps:{},overlayProps:{}}),Ie=({children:e,...t})=>{let o=useOverlayTriggerState(t),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},o),n=useMemo(()=>({state:o,triggerProps:r,overlayProps:a}),[o,r,a]);return jsx(Ge.Provider,{value:n,children:e})};Ie.displayName="Modal";var fn=nt.createContext({isDrawer:!1,closeDrawer:()=>{}}),yn=nt.createContext({setIsPopoverSafelyClosed:()=>{}}),Qv=animated(Dt),Jv=({children:e,className:t,style:o,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=nt.useContext(Ge),[d,u]=nt.useState(!0),m=Nt(n),y=ve(n),f=typeof s=="boolean"&&s||s==="auto"&&m==="mobile";invariant(c,"ModalContent must be a child of Modal");let b=nt.useRef(null),g=typeof r=="function"?r(f):r,_=typeof a=="function"?a(f):a,{underlayProps:v,overlayProps:h,close:I}=Ul({isDisabled:!f,isDismissable:g&&d},c,b),{modalProps:P,underlayProps:C}=useModalOverlay({isDismissable:!f&&d,isKeyboardDismissDisabled:_},c,b),{theme:x}=useContext(Mt),T=useReducedMotion(),N=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!T||i,config:{easing:easings.easeInBounce}}),R=useMemo(()=>({...P.style,...f?{...h.style,width:"100%"}:N}),[h.style,P.style,f,N]),S=useMemo(()=>({isDrawer:f,closeDrawer:I}),[f,I]),k=useMemo(()=>({setIsPopoverSafelyClosed:u}),[u]);return jsx(Overlay,{portalContainer:y,children:jsx(fn.Provider,{value:S,children:jsx(yn.Provider,{value:k,children:jsxs(Qv,{className:classNames(ql({enableDrawer:f}),t),theme:x,"data-block-id":p,"data-block-class":l,style:o,children:[jsx(animated.div,{...mergeProps(C,v,{onPointerDown:f?v.onPointerDown:C.onPointerDown}),"data-testid":"underlay",style:v.style,className:classNames(Gl,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(P,h),style:R,ref:b,"data-drawer":f,className:classNames(f?Kl:void 0,"BaselineUI-Modal-Content"),children:typeof e=="function"?e(c):e})]})})})})},e_=animated(Jv),De=({children:e,style:t,...o})=>{let{state:r}=nt.useContext(Ge);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||o.disableAnimation})((i,s)=>s&&jsx(e_,{...o,style:{...t,...i},children:typeof e=="function"?e(r):e}))};var Zl=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:"_1yep5z6131 _1yep5z617q _1yep5z617s",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2 _1yep5z617e"},isFocusVisible:{true:"_1yep5z613r _1yep5z617l _1yep5z617k _1yep5z617i"}},defaultVariants:{},compoundVariants:[]});var gn=nt.createContext({titleProps:{}}),ue=nt.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let d=nt.useRef(null),u=nt.useRef(null),{isDrawer:m,closeDrawer:y}=useContext(fn),[f,b]=nt.useState(""),{focusProps:g,isFocusVisible:_}=useFocusRing();useLayoutEffect(()=>{let P=u.current?.getRootNode(),C=l["aria-label"]||"";l["aria-labelledby"]&&(C=P?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(C);},[l]);let{dialogProps:v,titleProps:h}=useDialog(l,d),I=useMemo(()=>({titleProps:h}),[h]);return m&&r?jsx(Dr,{title:f,onCloseRequest:y,className:t,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:M(u,c),background:p,children:e}):jsx(gn.Provider,{value:I,children:jsx("section",{...mergeProps(v,g),"data-block-id":i,"data-block-class":s,ref:M(d,c),style:o,className:classNames(Zl({size:m?"content":a,variant:n,isDrawer:m,isFocusVisible:_}),"BaselineUI-Dialog",t),children:e})})});ue.displayName="Dialog";var Ql=nt.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(gn);return nt.isValidElement(e)?nt.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,t),style:{...e.props.style,...o}}):jsx("h3",{...a,ref:r,className:t,style:o,children:e})});Ql.displayName="DialogTitle";function Jl({placement:e,isOpen:t}){let o=useReducedMotion();return useTransition(t,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!o,config:config.stiff})}var tp=({children:e,isOpen:t,popoverContentRef:o,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,p]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(yn);useEffect(()=>{t?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[t]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let d=o.current;return useEffect(()=>{d&&p(d.getBoundingClientRect());},[d]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?g_.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var{color:_n}=themeVars,be=nt.forwardRef(({portalClassName:e,portalStyle:t,className:o,style:r,state:a,overlayProps:n,underlayClassName:i,children:s,includeArrow:p=!1,offset:l=2,portalContainer:c,contentContainerClassName:d,contentContainerStyle:u,"data-block-id":m,"data-block-class":y,...f},b)=>{let g=nt.useRef(null),_=ve(c),v=p?8:0,{underlayProps:h,popoverProps:I,placement:P,arrowProps:C}=usePopover({...f,offset:l+v,popoverRef:g,containerPadding:f.containerPadding||0},a);delete I.style?.position;let x=Jl({placement:P,isOpen:a.isOpen}),T=P==="center"?"bottom":P,N=useMemo(()=>({isOpen:a.isOpen}),[a.isOpen]),R=useMemo(()=>({...I.style,...assignInlineVars({[Us]:`${f.triggerRef?.current?.offsetWidth}px`}),...Xa(r,N)}),[I.style,f.triggerRef,r,N]);return jsx(tp,{isOpen:a.isOpen,popoverContentRef:g,portalContainer:_,style:I.style,children:x((S,k)=>k&&jsxs(Ke,{portalContainer:_,style:t,className:e,ref:b,"data-block-id":m,"data-block-class":y,children:[!f.isNonModal&&jsx("div",{...h,className:classNames($s,fr(i,N),"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...I,style:{...R,...S},ref:M(g,b),className:classNames(Os,"BaselineUI-Popover-Content",fr(o,N)),"data-placement":["top","bottom","left","right"].filter(w=>P?.includes(w)),children:[p?jsxs("svg",{className:classNames(Vs[T],"BaselineUI-PopoverContent-Arrow"),...C,style:{...C.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:_n.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:_n.background.primary.subtle,stroke:_n.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:a.close}),jsx("div",{...n,style:Xa(u,N),className:classNames(As,fr(d,N)),children:typeof s=="function"?s(a):s}),jsx(DismissButton,{onDismiss:a.close})]})]}))})});be.displayName="PopoverContentCore";var Re=nt.forwardRef((e,t)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(_o);return invariant(a),o?jsx(be,{ref:t,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:o}):null});Re.displayName="PopoverContent";var np=z({defaultClassName:"_1mdhlqv8",variantClassNames:{isOpen:{true:"_1mdhlqv9"}},defaultVariants:{},compoundVariants:[]}),We="_1mdhlqvb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",ip=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isOpen:{true:"_1mdhlqv2"},isDisabled:{true:"z9nup83 _1yep5z6ey"},isHovered:{true:"_1mdhlqv4"},variant:{primary:"_1mdhlqv5",ghost:"_1mdhlqv6"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"_1mdhlqv7"]]}),Hr="_1mdhlqvc _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1",sp="_1yep5z66x _1yep5z66y _1yep5z66z",lp="_1mdhlqva _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69i _1yep5z69j _1yep5z69k";var mp=nt.forwardRef(({className:e,style:t,onChange:o,"data-block-id":r,icon:a,formatValue:n=d=>d,tooltipProps:i,popoverContentProps:s,isDisabled:p,...l},c)=>{let d=oe(c),[u,m]=useControlledState(l.value,l.defaultValue||0,o),[y,f]=nt.useState(!1),{keyboardProps:b}=useKeyboard({onKeyDown:v=>{(v.key==="Enter"||v.key==="Escape")&&f(!1);}}),g=n(u||0),_=i?.isDisabled||l["aria-label"]?`${l["aria-label"]}, ${g}`:g.toString();return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:t,ref:d,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:y,onOpenChange:f,children:[jsx(Le,{children:jsx(re,{text:l["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:p,...i,children:jsx(G,{label:g,variant:"popover","aria-label":_,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(Re,{placement:"bottom start",...s,className:classNames(We,s?.className),children:jsx(ue,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(L,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...b,children:jsx(Ft,{...l,onChange:v=>{m(v),o?.(v);},value:u})})})})})]})]})});mp.displayName="IconSlider";var up=z({defaultClassName:"bpklwa7",variantClassNames:{isReadOnly:{true:"bpklwa8"},isDisabled:{true:"bpklwa9"},isSelected:{true:"bpklwaa"},isFocused:{true:"bpklwab"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1,isReadOnly:!1},"bpklwac"]]}),fp=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),yp="bpklwad",bp=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),gp="bpklwa6",vp=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var xp=nt.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=nt.useRef(null),c=useToggleState(s),{inputProps:d,isPressed:u}=useSwitch(s,c,l),{isFocusVisible:m,focusProps:y}=useFocusRing(),{hoverProps:f,isHovered:b}=useHover({isDisabled:s.isDisabled}),g=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":m,"data-disabled":s.isDisabled,"data-focus-visible":m,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":b,"data-pressed":u}),_=jsx("div",{className:classNames(up({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:m,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(fp({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(g,f),className:classNames(bp({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:p,children:[t?jsx("span",{className:classNames(yp,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,y),ref:l})}),r?jsxs("div",{className:vp({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",gp),children:c.isSelected?r.on:r.off}),_]}):_]})});xp.displayName="Switch";var Cp="_19n40yy9",Pp=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 W_={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},Rp=nt.forwardRef(({className:e,size:t="md",variant:o="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=nt.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:d}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:u,isFocusVisible:m,isFocused:y}=useFocusRing({within:!0,isTextInput:!0}),f=W_[t],b=t==="sm"?XIcon$2:XIcon$3,g=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":y,"data-disabled":i.isDisabled,"data-focus-visible":m});return jsxs("div",{...g,className:classNames(Pp({size:t,isFocused:y,variant:o,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(f,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(c,u),className:Cp,ref:p}),l.value!==""&&jsx(E,{icon:b,...d,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});Rp.displayName="SearchInput";var wp="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 _1yep5z6lm _1yep5z6ll _1yep5z6hx _1yep5z6lp _1yep5z6g1",Tp="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var xn=({section:e,showSelectedIcon:t,state:o})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==o.collection.getFirstKey()&&jsx(A,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:Tp,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(Vr,{item:i,state:o,showSelectedIcon:t},i.key)))})]})]})};xn.displayName="MenuSection";var Vr=({item:e,state:t,className:o,showSelectedIcon:r})=>{let a=nt.useRef(null),n=useMenuItem({key:e.key},t,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(go,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:o}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:t,showSelectedIcon:r})};Vr.displayName="MenuItem";var Pn=nt.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),i=nt.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(s,p),className:classNames(wp,e),ref:M(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(xn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(Vr,{item:l,state:n,className:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});Pn.displayName="MenuContent";var Or=nt.forwardRef(({defaultOpen:e,onOpenChange:t,isOpen:o,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:d,triggerLabel:u,renderTrigger:m=({buttonProps:g,ref:_})=>jsx(G,{...g,variant:"popover",ref:_}),portalContainer:y,...f},b)=>{let g=nt.useRef(null),_=ve(y),v=useMenuTriggerState({defaultOpen:e,isOpen:o,onOpenChange:t}),{menuTriggerProps:h,menuProps:I}=useMenuTrigger({isDisabled:r,type:"menu"},v,g),P=ae(),C=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:v.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof u=="function"?u(v.isOpen):u}),[h,r,v.isOpen,u]);return useEffect(()=>{!u&&!m&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[m,u]),jsxs(Fragment,{children:[m({buttonProps:C,ref:g}),jsx(be,{triggerRef:g,state:v,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:d||2,className:classNames(We,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsx(Pn,{className:a,...I,...f,ref:b,autoFocus:v.focusStrategy||"first",children:P})})]})});Or.displayName="Menu";var Ar=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=nt.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,role:c,...d},u)=>{let m=nt.useRef(null),{linkProps:y,isPressed:f}=useLink({...d,elementType:d.onPress?"span":n},m),{isFocusVisible:b,isFocused:g,focusProps:_}=useFocusRing(),{hoverProps:v,isHovered:h}=useHover({isDisabled:d.isDisabled}),I=n,P=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-disabled":d.isDisabled,"data-focused":g,"data-pressed":f,"data-focus-visible":b,"data-hovered":h,role:c,title:l});return jsx(I,{...mergeProps(y,_,v,P),className:classNames(Ar({variant:r,isFocusVisible:b,isHovered:h,isDisabled:d.isDisabled,size:a,isActive:f,type:i}),"BaselineUI-Link",e),ref:M(m,u),style:t,children:o})});Dp.displayName="Link";function Ep({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:u=>{let m=[...u.target.files||[]];t?.(m),o?.(u);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function Rn({items:e}){let t=e.filter(o=>o.kind==="file").map(async o=>(invariant(o.kind==="file"),o.getFile()));return await Promise.all(t)}var Bp=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:[]}),Hp=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Vp=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var $p=nt.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},i)=>{let s=nt.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=Ep(n),{dropProps:d}=useDrop({ref:s,onDrop:async({items:b})=>{let g=b.filter(v=>v.kind==="file").map(async v=>(invariant(v.kind==="file"),v.getFile())),_=await Promise.all(g);n.onValueChange?.(_);}}),{focusProps:u,isFocusVisible:m}=useFocusRing(),{hoverProps:y,isHovered:f}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(d,y,c),className:classNames(Bp({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:f||m}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,p)})}),r?jsx(r,{size:20,className:Hp({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Vp({disabled:n.isDisabled,hovered:f}),children:t}),o?jsx("div",{...l,className:Fp({disabled:n.isDisabled}),children:o}):null]})]})});$p.displayName="FileUpload";var Up="_12vfhl40 z9nup81",Kp="_12vfhl41 z9nup82",qp=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Gp="_12vfhl42",Wp="_12vfhl47",Xp="_12vfhl46 z9nup82",Yp="_12vfhl45",Zp=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Qp=nt.forwardRef(({className:e,style:t,variant:o="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:d,progressBarProps:u}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:m=0,maxValue:y=100,value:f=0,label:b}=p,g=(f-m)/(y-m),_=`${Math.round(g*100)}%`,v=jsx("output",{className:Zp({hasLabel:!!b}),children:u["aria-valuetext"]}),h=o==="error"?n:a;return jsxs("div",{...u,style:t,className:classNames(Up,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Kp,children:[jsx("label",{...d,className:Gp,children:b}),r?v:null]}):null,jsxs("div",{className:Yp,children:[jsxs("div",{className:Xp,children:[jsx("div",{className:Wp,children:jsx("div",{style:{width:_},className:qp({variant:o})})}),!b&&r?v:null]}),h?jsx("div",{className:It({hasError:o==="error"}),id:c,children:h}):null]})]})});Qp.displayName="ProgressBar";function jt({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorCircleFilledIcon:t==="warning"?WarningFilledIcon:null}var Xe=nt.forwardRef(({className:e,validationState:t,variant:o="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let d=nt.useRef(null),{inputProps:u,labelProps:m,descriptionProps:y,errorMessageProps:f,validationErrors:b}=useTextField({...l,validationState:t?t==="error"?"invalid":"valid":void 0},d),g=l.errorMessage||b.join(" "),_=ke({...l,errorMessage:g,descriptionProps:y,errorMessageProps:f,labelPosition:a});g&&(t="error");let{hoverProps:v,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:I,focusProps:P,isFocusVisible:C}=useFocusRing(),x=jt({isReadOnly:l.isReadOnly,validationState:t??"valid"}),T=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":t,"data-focused":I,"data-focus-visible":C});return jsxs("div",{className:classNames(Ue({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&_?jsxs("div",{className:$e({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...m,className:je,children:l.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[Lt]:l.isDisabled}),children:[jsxs("div",{...v,className:wt({validationState:t??"valid",isHovered:h,isFocused:I,variant:o,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(u,P,T),className:classNames(kr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:d}),x?jsx(x,{className:Rt({validationState:t??"valid",isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Xe.displayName="TextInput";var $t=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};$t.displayName="NumberFormat";var ec="_1yep5z6ip _1yep5z6iq _1yep5z6ir",tc=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"]]}),oc=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"]]}),rc=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var ic=nt.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let d=nt.useRef(null),u=useToggleState({...s,...l}),{inputProps:m,isPressed:y,isDisabled:f,isReadOnly:b,isSelected:g}=useSwitch({...s,...l},u,d),{focusProps:_,isFocused:v,isFocusVisible:h}=useFocusRing(),{hoverProps:I,isHovered:P}=useHover({}),C=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":v,"data-focus-visible":h,"data-disabled":f,"data-hovered":P,"data-pressed":y,"data-selected":g});return jsxs("label",{ref:p,style:o,className:classNames(ec,"BaselineUI-Reaction",e),...C,children:[jsx(VisuallyHidden,{children:jsx("input",{...m,..._,ref:d})}),jsxs("div",{...I,className:tc({isSelected:g,isFocusVisible:h,isHovered:P,isReadOnly:b,isDisabled:f}),children:[jsx("div",{className:rc({isDisabled:f,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:oc({isSelected:u.isSelected,isDisabled:f,isReadOnly:b,size:r}),children:jsx($t,{value:t})})]})]})});ic.displayName="Reaction";var sc="_1azy5686",lc="_1azy5685",pc="var(--_1azy5680)",cc="_1azy5688",dc="_1azy5689",mc="_1azy5681 z9nup82",uc="_1azy5682";var fc="_1azy5687";var p5={sm:16,md:20},c5={sm:[CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon],md:[CheckCircleFilledIcon,ErrorAltCircleFilledIcon$1]},Kt=nt.forwardRef(({className:e,style:t,size:o="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=p5[o],d=c/2-2,u=2*d*Math.PI,m=c5[o][r==="success"?0:1];return jsxs("div",{className:classNames(mc,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[pc]:`${u}px`}),...t},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:uc,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:sc,cx:c/2,cy:c/2,r:d}),r==="active"&&jsx("circle",{role:"presentation",className:lc,cx:c/2,cy:c/2,r:d})]}),r==="success"&&jsx(m,{className:fc,size:c}),r==="error"&&jsx(m,{className:cc,size:c})]}),i.label?jsx("span",{...p,className:dc,children:i.label}):null]})});Kt.displayName="ProgressSpinner";var Ur=z({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kpa"],[{isSelected:!0,isDisabled:!0},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),yc=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z6114"},isSelected:{true:"_1yep5z6116"}},defaultVariants:{},compoundVariants:[]});var b5={sm:16,md:20,lg:24},Kr=nt.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=useToggleState(i),{buttonProps:l,isPressed:c,ref:d,isFocusVisible:u,isFocused:m,isHovered:y,uiStateOptions:f}=Cr(i,p),b=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":m,"data-focus-visible":u,"data-disabled":i.isDisabled,"data-hovered":y,"data-pressed":c,"data-selected":p.isSelected});return jsxs(a,{...mergeProps(l,b),className:classNames(Ur({isHovered:y,isFocusVisible:u,isSelected:p.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(f):e),style:typeof t=="function"?t(f):t,ref:M(d,s),children:[o?jsx(o,{size:b5[r],className:yc({isDisabled:i.isDisabled,isSelected:p.isSelected})}):null,i.label]})});Kr.displayName="ToggleButton";var qr=z({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),bc=z({defaultClassName:"_16vugd02 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{labelPosition:{end:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vf _1yep5z6vg _1yep5z6vh",start:"_1yep5z614y _1yep5z614z _1yep5z6150 _1yep5z616a _1yep5z616b _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),gc=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 zc=nt.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=nt.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:d,focusProps:u}=useFocusRing(),{inputProps:m,isPressed:y,isDisabled:f,isSelected:b,isReadOnly:g}=useCheckbox({...i,children:o},l,p),{hoverProps:_,isHovered:v}=useHover({isDisabled:f}),h=filterTruthyValues({"data-disabled":f,"data-readonly":g,"data-hovered":v,"data-selected":b,"data-pressed":y,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":d,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(bc({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,u),ref:p})}),jsxs("div",{..._,className:gc({isSelected:b&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:f,isReadOnly:g,hasError:i.isInvalid,isHovered:v}),children:[b&&!i.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:qr({isDisabled:f}),children:o}):null]})});zc.displayName="Checkbox";var hc={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 xc=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),Cc="_1nsi9h1f _1yep5z6ls _1yep5z6lk _1yep5z6eu",Pc=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6g1 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z6zs",sm:"_1nsi9h12 _1yep5z6zv",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6z4 _1yep5z617s _1yep5z617q _1yep5z6130",pinned:"_1yep5z617e"}},defaultVariants:{},compoundVariants:[]}),kc=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]});var K5={style:"decimal"},q5={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},Sc=nt.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...d},u)=>{let{locale:m}=useLocale(),y=F(hc),f={...d,formatOptions:K5,minValue:o,incrementAriaLabel:a||y.formatMessage("nextPage"),decrementAriaLabel:n||y.formatMessage("prevPage"),defaultValue:r,"aria-label":i||y.formatMessage("goToPage")},b=nt.useRef(null),g=useNumberFieldState({...f,locale:m}),{inputProps:_,decrementButtonProps:v,incrementButtonProps:h,groupProps:I}=useNumberField({...f,onKeyDown:D=>{D.key==="Enter"&&b.current?.blur(),d.onKeyDown?.(D);},isDisabled:c},g,b),{hoverProps:P,isHovered:C}=useHover({}),{focusProps:x,isFocused:T,isFocusVisible:N}=useFocusRing(),R=p==="floating",[S,k]=q5[s],w=filterTruthyValues({"data-focus-visible":N,"data-focused":T,"data-hovered":C,"data-block-id":d["data-block-id"],"data-block-class":d["data-block-class"]}),H=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(I,P,w),className:classNames(Pc({size:s,variant:p}),"BaselineUI-Pagination",e),style:t,ref:u,children:[l?null:jsxs(Fragment,{children:[jsx(E,{icon:S,...v,elementType:"div",size:s,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||v.isDisabled}),p==="floating"&&jsx(A,{orientation:"vertical"})]}),jsxs("div",{className:xc({isFocused:T,variant:p,size:s}),"aria-label":y.formatMessage("pageXofY",{arg0:_.value,arg1:g.maxValue}),children:[jsx("input",{...mergeProps(_,x),ref:b,className:classNames("BaselineUI-Pagination-Input",Cc),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:kc({isDisabled:c}),children:["/ ",jsx($t,{value:g.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(A,{orientation:"vertical"}),jsx(E,{icon:k,...h,elementType:"div",size:s,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||h.isDisabled})]})]})});Sc.displayName="Pagination";var Nc=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};Nc.displayName="DateFormat";var No=z({defaultClassName:"_1f789qjm",variantClassNames:{variant:{neutral:"_1yep5z6112",red:"_1yep5z610c",green:"_1yep5z610g",blue:"_1yep5z610o","high-contrast":"_1yep5z6115"},isDisabled:{true:"_1yep5z61n1"},isSelected:{true:"_1yep5z6116"}},defaultVariants:{},compoundVariants:[]}),Gr=z({defaultClassName:"_1f789qj0 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ax _1yep5z6ay _1yep5z6az _1yep5z6bl _1yep5z6bm _1yep5z6bn _1yep5z6c9 _1yep5z6ca _1yep5z6cb _1yep5z6cx _1yep5z6cy _1yep5z6cz _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6l4 _1yep5z6lk _1yep5z6l7",variantClassNames:{isFocusVisible:{true:"_1f789qj1"},variant:{neutral:"_1yep5z6122",red:"_1yep5z611h",green:"_1yep5z611l",blue:"_1yep5z611t","high-contrast":"_1yep5z6126"},isDisabled:{true:"_1f789qj7 _1yep5z6121"},allowsRemoving:{true:"_1f789qj8"},isSelected:{true:"_1yep5z612c"},allowsSelection:{true:"_1f789qja"},isHovered:{true:"_1f789qjb"},size:{md:"_1f789qjc",sm:"_1f789qjd"}},defaultVariants:{},compoundVariants:[[{allowsSelection:!0,isHovered:!0,variant:"neutral"},"_1yep5z61ny"],[{allowsSelection:!0,isHovered:!0,variant:"red"},"_1yep5z61nd"],[{allowsSelection:!0,isHovered:!0,variant:"blue"},"_1yep5z61np"],[{allowsSelection:!0,isHovered:!0,variant:"green"},"_1yep5z61nh"],[{allowsSelection:!0,isHovered:!0,variant:"high-contrast"},"_1yep5z61o2"],[{allowsSelection:!0,isSelected:!0,isHovered:!0},"_1yep5z61oa"],[{variant:"high-contrast",isDisabled:!0},"_1yep5z61ny"],[{allowsRemoving:!0,size:"md"},"_1yep5z6190 _1yep5z6191 _1yep5z6192"],[{allowsRemoving:!0,size:"sm"},"_1yep5z61a3 _1yep5z61a4 _1yep5z61a5"]]}),Lc="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69f _1yep5z69g _1yep5z69h",Mc="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z69i _1yep5z69j _1yep5z69k",Dc=z({defaultClassName:"_1f789qju",variantClassNames:{variant:{neutral:"_1f789qjv",red:"_1f789qjw",green:"_1f789qjx",blue:"_1f789qjy","high-contrast":"_1f789qjz"},isHovered:{true:"_1f789qj10"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qj11"],[{isHovered:!0,variant:"red"},"_1f789qj12"],[{isHovered:!0,variant:"blue"},"_1f789qj13"],[{isHovered:!0,variant:"green"},"_1f789qj14"],[{isHovered:!0,variant:"high-contrast"},"_1f789qj15"]]}),Wr=z({defaultClassName:"_1f789qje",variantClassNames:{variant:{neutral:"_1yep5z610r",red:"_1yep5z610c",green:"_1yep5z610g",blue:"_1yep5z610o","high-contrast":"_1yep5z610w"},isDisabled:{true:"_1yep5z61ms"},isSelected:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]});var Hc=({item:e,state:t,variant:o="neutral",size:r="md"})=>{let a=nt.useRef(null),{focusProps:n,isFocusVisible:i}=useFocusRing({within:!0}),{rowProps:s,gridCellProps:p,removeButtonProps:l,allowsRemoving:c,isDisabled:d,isSelected:u,allowsSelection:m}=useTag({item:e},t,a),y=nt.useRef(null),{buttonProps:f}=useButton(l,y),{hoverProps:b,isHovered:g}=useHover({isDisabled:d}),{hoverProps:_,isHovered:v}=useHover({isDisabled:d}),h=e.value?.icon,I=e.value?.data?.variant??o,P=r==="md"?XIcon$2:XIcon$1,C=r==="md"?CheckmarkIcon$3:CheckmarkIcon$1;return jsx("div",{...mergeProps(s,n,_),ref:a,className:classNames(Gr({isFocusVisible:i,variant:I,isDisabled:d,allowsRemoving:c,isSelected:u,allowsSelection:m,isHovered:v,size:r}),Wr({variant:I,isDisabled:d,isSelected:u}),"BaselineUI-Tag"),children:jsxs("div",{...p,className:Lc,children:[u?jsx(C,{size:r==="md"?16:12,className:classNames(No({variant:I,isDisabled:d,isSelected:u}),"BaselineUI-Tag-Icon")}):null,!u&&h?jsx(h,{size:r==="md"?16:12,className:classNames(No({variant:I,isDisabled:d,isSelected:u}),"BaselineUI-Tag-Icon")}):null,jsx(L,{paddingY:r==="md"?"sm":"none",typography:r==="sm"?"label.sm.medium":"label.md.medium",children:e.rendered}),c?jsx("button",{...mergeProps(f,b),className:Dc({variant:I,isHovered:g}),children:jsx(P,{size:r==="md"?12:8})}):null]})})};var Ac=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,size:n="md",...i},s)=>{let p=useMemo(()=>a.map(m=>({...m,data:{variant:m.variant}})),[a]),l=ae(),c=nt.useRef(null),d=useListState({...i,items:p,children:l}),{gridProps:u}=useTagGroup(i,d,c);return jsx("div",{...u,className:classNames(Mc,"BaselineUI-TagGroup",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,c),children:[...d.collection].map(m=>jsx(Hc,{state:d,item:m,variant:i.variant,size:n},m.key))})});Ac.displayName="TagGroup";var jc="_1yep5z6lh",$c=z({defaultClassName:"_1kvz17db _1yep5z6l4 _1yep5z6l6",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Uc=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6l4 _1yep5z6l5",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Kc="_1yep5z6ev _1yep5z6dy",qc=z({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6l4 _1yep5z6l7",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6g2",false:"_1yep5z6g3"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Gc="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Wc=z({defaultClassName:"_1kvz17d7 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Mn=nt.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext(Ye),{disabledKeys:n}=useContext(Ye),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=Ve(s.target),l=[...a?.keys()||[]].findIndex(y=>a?.get(y)?.current===p?.activeElement),c=a?.get(l||0),d=a?.size||0,u=y=>{let f=a.get(y-1<0?d-1:y-1);n?.has(f?.current?.getAttribute("data-key")||"")?u(y-1):f?.current?.focus();},m=y=>{let f=a.get((y+1)%d);n?.has(f?.current?.getAttribute("data-key")||"")?m(y+1):f?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),m(-1);break}case"End":{s.preventDefault(),u(d);break}case"ArrowDown":{s.preventDefault(),m(l);break}case"ArrowUp":{s.preventDefault(),u(l);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:o,className:classNames(jc,t),ref:r,children:nt.Children.map(e,(s,p)=>nt.cloneElement(s,{index:p}))})});Mn.displayName="AccordionBase";var Ye=nt.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Zc=nt.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=nt.useState(o),d=nt.useRef(new Map).current,[u,m]=nt.useState(a);useEffect(()=>{m(u);},[u]),useEffect(()=>{n?.(l);},[l,n]);let y=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:t,headers:d,expansionMode:u}),[r,l,t,d,u]);return jsx(Ye.Provider,{value:y,children:jsx(FocusScope,{children:jsx(Mn,{className:i,style:s,ref:p,children:e})})})});Zc.displayName="Accordion";var En=nt.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=nt.useRef(null),{expandedKeys:c,setExpandedKeys:d,expansionMode:u,disabledKeys:m,headers:y}=useContext(Ye),f=m?.has(r),b=useFocusManager();invariant(b);let{focusNext:g,focusPrevious:_}=b,{keyboardProps:v}=useKeyboard({onKeyDown:w=>{w.key==="ArrowRight"?g({wrap:!0}):w.key==="ArrowLeft"?_({wrap:!0}):w.continuePropagation();},isDisabled:f});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),y?.set(n,l);},[n,y]);let h=()=>{d(w=>{let B=new Set(w);return B.has(r)?B.delete(r):(u==="single"&&B.clear(),B.add(r)),B});},{buttonProps:I}=useButton({"aria-expanded":c.has(r),"aria-controls":o,onPress:h,isDisabled:f},l),{pressProps:P}=usePress({onPress:h,isDisabled:f}),{focusProps:C,isFocusVisible:x}=useFocusRing(),{hoverProps:T,isHovered:N}=useHover({isDisabled:f}),{focusProps:R,isFocusVisible:S}=useFocusRing({within:!0}),k=c.has(r);return jsxs("h3",{...mergeProps(v,P,T,R),className:qc({isFocusVisible:x,isHovered:N,isDisabled:f}),ref:p,children:[jsxs("div",{className:Wc({isDisabled:!!f}),children:[jsx(ChevronRightIcon,{className:Uc({isExpanded:k}),size:8}),jsx("button",{...mergeProps(I,C),id:a,"data-key":r,className:Gc,ref:l,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:$c({showActionsOnTriggerOnly:s,isTriggered:S||N}),children:t.map((w,B)=>jsx(E,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:f,...w},B))}):null,i?jsx("div",{className:Kc,children:i}):null]})});En.displayName="AccordionHeader";var nd=nt.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),d=useId(),{expandedKeys:u}=useContext(Ye),m=nt.useRef(null),y=u.has(r),f=St(),b=useReducedMotion(),g=useTransition(y?[r]:[],{from:!f&&!b&&{height:0,opacity:0},enter:()=>async _=>{await _({height:m.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:_=>_.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(En,{value:r,actions:t,id:d,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),g(_=>jsx(animated.div,{role:"region","aria-labelledby":d,id:c,style:{..._,overflow:"hidden"},children:jsx("div",{ref:m,className:s,style:i,children:o})}))]})});nd.displayName="AccordionItem";var Do=nt.forwardRef(({variant:e,isOpen:t,selectedIcon:o,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":p,"data-block-class":l,...c},d)=>{let u=nt.useRef(null),{buttonProps:m,isPressed:y}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},u),{hoverProps:f,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:g,isFocused:_,isFocusVisible:v}=useFocusRing(),h=jt({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(m.disabled=!1);let I=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":_,"data-focus-visible":v,"data-hovered":b,"data-pressed":y,"data-open":t,"data-block-id":p,"data-block-class":l});return jsxs("button",{...mergeProps(m,f,g,I),ref:M(d,u),className:classNames(ip({isFocused:v,isDisabled:c.isDisabled,isOpen:t,isHovered:b,variant:e}),wt({variant:e,isHovered:b,isFocused:v,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:lp,children:[o?jsx(o,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(Rt({validationState:r,isReadOnly:!!c.isReadOnly}),sp),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:np({isOpen:t})})})]})});Do.displayName="SelectButton";var Yr=nt.createContext({state:null,popoverAnchorRef:null}),Hn=nt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:d,renderTrigger:u=({buttonProps:f,selectedValue:b,valueProps:g,isOpen:_,ref:v})=>{let h=b&&"icon"in b&&b.icon;return jsx(Do,{...f,className:l,style:c,isOpen:_,isReadOnly:m.isReadOnly,ref:v,variant:r,validationState:m.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:m.placeholder,valueProps:g})},...m},y)=>{let{popoverAnchorRef:f}=useContext(Yr),b=nt.useRef(null),g=ve(m.portalContainer),{labelProps:_,triggerProps:v,valueProps:h,menuProps:I,descriptionProps:P,errorMessageProps:C}=useSelect({...m,validationState:m.validationState==="error"?"invalid":"valid"},d,b),x=ke({...m,descriptionProps:P,errorMessageProps:C,labelPosition:o}),T=d.selectedItem?.value??null;return jsxs(it.Provider,{value:d,children:[jsxs("div",{style:t,className:classNames(Ue({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:y,children:[m.label||x?jsxs("div",{className:$e({labelPosition:o,hasMessage:!!x}),children:[m.label?jsx("div",{..._,className:classNames(je,"BaselineUI-Select-Label"),children:m.label}):null,o==="start"&&x]}):null,jsx(HiddenSelect,{state:d,triggerRef:b,isDisabled:m.isDisabled,label:m.label,name:m.name}),u({buttonProps:v,selectedValue:T,valueProps:h,isOpen:d.isOpen,ref:b}),o==="top"&&x]}),d?jsx(be,{placement:p,portalContainer:g,offset:m.offset||2,state:d,triggerRef:f||b,style:t,className:classNames(We,"BaselineUI-Select-Popover"),...m,children:jsx(le,{...I,label:m.label,items:m.items,showSelectedIcon:m.showSelectedIcon,className:Hr,optionStyle:i,optionClassName:s})}):null]})});Hn.displayName="SelectCore";var cd=nt.forwardRef((e,t)=>{let o=ae(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:o});return jsx(Hn,{...e,ref:t,state:r})});cd.displayName="SelectStandalone";var Qe=nt.forwardRef((e,t)=>{let{state:o}=useContext(Yr);return useEffect(()=>{invariant(o||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,o]),o?jsx(Hn,{state:o,...e,ref:t}):jsx(cd,{...e,ref:t})});Qe.displayName="Select";var md=nt.forwardRef(({className:e,style:t,variant:o,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=nt.useRef(null),l=useCallback(({buttonProps:c,selectedValue:d,valueProps:u,isOpen:m,ref:y})=>{let f=d&&"icon"in d&&d.icon;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(Do,{...c,isOpen:m,isReadOnly:i.isReadOnly,ref:y,variant:o,validationState:i.validationState,selectedIcon:f||void 0,label:d?"label"in d&&d?.label:i.placeholder,valueProps:u})})},[i,n,o]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:t,ref:M(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(Qe,{...i,renderTrigger:l})]})});md.displayName="IconSelect";var ud="_1017q4c5",fd=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),yd="_1017q4c4";var Gz={sm:AvatarIcon,md:AvatarIcon$1},Xt=nt.forwardRef(({className:e,style:t,size:o="md",icon:r=Gz[o],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":d},u)=>{let{imgProps:m}=Tt({src:n,alt:a}),y=a?.split(" ").map(f=>f[0]).join("");return jsxs("span",{className:classNames(fd({size:o,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:u,style:t,"aria-disabled":s,"data-block-id":c,"data-block-class":d,children:[n?jsx("img",{...m,loading:l,className:yd}):null,!i&&!n&&jsx(r,{size:o==="sm"?16:24}),i&&!n?o==="sm"?y[0]:y:null,p?jsx("div",{"data-testid":"notification",className:ud}):null]})});Xt.displayName="Avatar";var bd="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",gd=z({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6l4 _1yep5z6l7 _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z610r"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z610v"},variant:{primary:"_1x62fhbb _1yep5z6zs",ghost:"_1yep5z6zv"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mo"],[{variant:"primary",isSelected:!0},"_1yep5z61nv"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61mv"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61nw"]]}),vd=z({defaultClassName:"_1x62fhb3 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6vf _1yep5z6vg _1yep5z6vh"}},defaultVariants:{},compoundVariants:[]}),_d="_1x62fhbl",On=z({defaultClassName:"_1x62fhbf _1yep5z6f6",variantClassNames:{isHovered:{true:"_1yep5z6112"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z6114"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mz"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61n4"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1yep5z61n1"]]}),zd="_1yep5z6lo _1yep5z6ll _1yep5z6hu _1yep5z6ln",hd=z({defaultClassName:"_1x62fhb0 _1yep5z6lh _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{variant:{primary:"_1yep5z6120",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var xd=({state:e,...t})=>{let o=nt.useRef(null),{tabPanelProps:r}=useTabPanel(t,e,o),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[zd]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var $n=nt.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),d=nt.useRef(null),{tabListProps:u}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,d);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:t,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(hd({variant:a}),r),style:o,children:[jsx("div",{...u,className:vd({variant:a}),ref:d,children:[...c.collection].map(m=>(invariant(m.value,"TabItem requires a value prop"),jsx(Pd,{item:m,state:c,onRemove:i,variant:a},m.key)))}),n?.map((m,y)=>jsx("div",{className:bd,children:jsx(E,{...m,variant:"secondary",size:"sm",className:classNames(_d,m.className)})},y))]}),jsx(xd,{state:c},c.selectedItem?.key)]})});$n.displayName="TabsBase";var Pd=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,i=nt.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},o,i),{hoverProps:c,isHovered:d}=useHover({});invariant(n,"TabButton requires a value prop");let{title:u,icon:m,titleStyle:y,titleClassName:f}=n,{focusProps:b,isFocusVisible:g,isFocused:_}=useFocusRing(),{keyboardProps:v}=useKeyboard({onKeyDown:I=>{I.key==="Backspace"&&t?t(a):I.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":d,"data-focus-visible":g});return jsxs("div",{...mergeProps(v,s,c,b,h),className:classNames(gd({isHovered:d,isSelected:p,isFocusVisible:g,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",f),style:y,ref:i,children:[m?jsx(m,{size:20,className:On({isHovered:d,isSelected:p,isDisabled:l,variant:r})}):null,u,t?jsx(E,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:p||_||d?1:0},className:On({isHovered:d,isSelected:p,isDisabled:l,variant:r})}):null]})};Pd.displayName="TabButton";var Id=nt.forwardRef(function({children:t,...o},r){let a=useMemo(()=>nt.Children.map(t,n=>!n||!nt.isValidElement(n)||typeof n.type=="string"?null:{...n.props,id:n.props.value}).filter(Boolean),[t]);return jsx($n,{...o,ref:r,items:a,children:n=>jsx(Item,{title:n.title,children:n.children},n.key)})});Id.displayName="Tabs";var Rd=({children:e,title:t,value:o})=>(invariant(o,"TabItem requires a value prop"),invariant(t,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);Rd.displayName="TabItem";var wd={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 Td=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"]]}),Nd=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),Ld=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Md=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:[]}),Ed=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var Ph={error:{sm:ErrorAltCircleFilledIcon,md:ErrorAltCircleFilledIcon$1},info:{sm:InfoCircleFilledIcon,md:InfoCircleFilledIcon$1},success:{sm:CheckmarkCircleFilledIcon,md:CheckCircleFilledIcon},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Bd=nt.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":d},u)=>{let m=F(wd),y=o&&jsx(G,{variant:s==="compact"?"tertiary":"ghost",label:o,onPress:r}),f=Ph[n][l];return jsxs("div",{className:classNames(Sd({variant:n,arrangement:s,hasButton:!!o||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":d,style:a,role:"alert",ref:u,children:[jsxs("div",{className:Ed({arrangement:s}),children:[jsx(f,{className:Md({variant:n}),size:16}),jsxs("div",{className:Td({arrangement:s}),children:[jsx("h3",{className:Dd({size:l}),children:i}),jsx("section",{className:Nd({size:l}),children:t})]}),s==="compact"&&y]}),jsxs("div",{className:Ld({arrangement:s}),children:[s!=="compact"&&y,p?jsx(E,{variant:"secondary",icon:XCircleFilledIcon,size:"sm",onPress:p,"aria-label":m.formatMessage("close")}):null]})]})});Bd.displayName="InlineAlert";var Je={ar:{add:"\u0625\u0636\u0627\u0641\u0629",addColor:"\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",cancel:"\u0625\u0644\u063A\u0627\u0621",colorFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",colorPresets:"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",customColors:"\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",newColor:"\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",noColor:"\u0644\u0627 \u064A\u0648\u062C\u062F",removeColor:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",transparent:"\u0634\u0641\u0627\u0641"},cs:{add:"P\u0159idat",addColor:"P\u0159idat barvu",cancel:"Zru\u0161it",colorFormat:"Form\xE1t barvy",colorPresets:"P\u0159edvolby barev",customColors:"Vlastn\xED barvy",newColor:"Vlastn\xED barva",noColor:"Nen\xED",removeColor:"Odebrat barvu",transparent:"Pr\u016Fhledn\xE1"},cy:{add:"Ychwanegu",addColor:"Ychwanegu Lliw",cancel:"Canslo",colorFormat:"Fformat Lliw",colorPresets:"Rhagosodiadau Lliw",customColors:"Lliwiau Custom",newColor:"Lliw Personol Newydd",noColor:"Dim",removeColor:"Tynnu Lliw",transparent:"Tryloyw"},da:{add:"Tilf\xF8j",addColor:"Tilf\xF8j Farve",cancel:"Annuller",colorFormat:"Farveformat",colorPresets:"Farvevalg",customColors:"Brugerdefinerede farver",newColor:"Ny tilpasset farve",noColor:"Ingen",removeColor:"Fjern Farve",transparent:"Transparent"},de:{add:"Hinzuf\xFCgen",addColor:"Farbe hinzuf\xFCgen",cancel:"Abbrechen",colorFormat:"Farbformat",colorPresets:"Farbvorlagen",customColors:"Benutzerdefinierte Farben",newColor:"Neue benutzerdefinierte Farbe",noColor:"Kein",removeColor:"Farbe entfernen",transparent:"Transparent"},el:{add:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",addColor:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",colorFormat:"\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",colorPresets:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",customColors:"\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",newColor:"\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",noColor:"\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",removeColor:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",transparent:"\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2"},"en-GB":{add:"Add",addColor:"Add Colour",cancel:"Cancel",colorFormat:"Colour Format",colorPresets:"Colour Presets",customColors:"Custom Colours",newColor:"New Custom Colour",noColor:"None",removeColor:"Remove Colour",transparent:"Transparent"},en:{add:"Add",addColor:"Add Color",cancel:"Cancel",colorFormat:"Color Format",colorPresets:"Color Presets",customColors:"Custom Colors",newColor:"New Custom Color",noColor:"None",removeColor:"Remove Color",transparent:"Transparent"},es:{add:"A\xF1adir",addColor:"A\xF1adir color",cancel:"Cancelar",colorFormat:"Formato de color",colorPresets:"Preajustes de color",customColors:"Colores personalizados",newColor:"Nuevo color personalizado",noColor:"Ninguna",removeColor:"Eliminar color",transparent:"Transparente"},fi:{add:"Lis\xE4\xE4",addColor:"Lis\xE4\xE4 v\xE4ri",cancel:"Kumoa",colorFormat:"V\xE4rimuoto",colorPresets:"V\xE4rin esiasetukset",customColors:"Mukautetut v\xE4rit",newColor:"Uusi muokattu v\xE4ri",noColor:"Ei mit\xE4\xE4n",removeColor:"Poista v\xE4ri",transparent:"L\xE4pin\xE4kyv\xE4"},"fr-CA":{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},fr:{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},he:{add:"\u05D4\u05D5\u05E1\u05E4\u05D4",addColor:"\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC",colorFormat:"\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",colorPresets:"\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",customColors:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",newColor:"\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",noColor:"\u05DC\u05DC\u05D0",removeColor:"\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3"},hr:{add:"Dodati",addColor:"Dodaj boju",cancel:"Otka\u017Ei",colorFormat:"Format boje",colorPresets:"Prijedlozi boja",customColors:"Prilago\u0111ene boje",newColor:"Nova prilago\u0111ena boja",noColor:"Prazno",removeColor:"Ukloni boju",transparent:"Prozirna"},id:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batalkan",colorFormat:"Format Warna",colorPresets:"Preset Warna",customColors:"Warna Kustom",newColor:"Warna Khusus Baru",noColor:"Tidak ada",removeColor:"Hapus Warna",transparent:"Transparan"},it:{add:"Aggiungi",addColor:"Aggiungi colore",cancel:"Annulla",colorFormat:"Formato del colore",colorPresets:"Colori predefiniti",customColors:"Colori personalizzati",newColor:"Nuovo colore personalizzato",noColor:"Nessuno",removeColor:"Rimuovi colore",transparent:"Trasparente"},ja:{add:"\u8FFD\u52A0",addColor:"\u8272\u3092\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorFormat:"\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",colorPresets:"\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",customColors:"\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",newColor:"\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",noColor:"\u306A\u3057",removeColor:"\u8272\u3092\u524A\u9664",transparent:"\u900F\u660E"},ko:{add:"\uCD94\uAC00",addColor:"\uC0C9\uC0C1 \uCD94\uAC00",cancel:"\uCDE8\uC18C",colorFormat:"\uC0C9\uC0C1 \uD615\uC2DD",colorPresets:"\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",customColors:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",newColor:"\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",noColor:"\uC5C6\uC74C",removeColor:"\uC0C9\uC0C1 \uC81C\uAC70",transparent:"\uD22C\uBA85"},ms:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batal",colorFormat:"Format Warna",colorPresets:"Praset Warna",customColors:"Warna Kustom",newColor:"Warna Tersuai Baharu",noColor:"Tiada",removeColor:"Buang Warna",transparent:"Lut Sinar"},"nb-NO":{add:"Legg til",addColor:"Legg til farge",cancel:"Avbryt",colorFormat:"Fargeformat",colorPresets:"Fargeinnstillinger",customColors:"Egendefinerte farger",newColor:"Ny tilpasset farge",noColor:"Ingen",removeColor:"Fjern farge",transparent:"Gjennomsiktig"},nl:{add:"Voeg toe",addColor:"Kleur toevoegen",cancel:"Annuleer",colorFormat:"Kleurformaat",colorPresets:"Kleurvoorinstellingen",customColors:"Aangepaste kleuren",newColor:"Nieuwe aangepaste kleur",noColor:"Geen",removeColor:"Kleur verwijderen",transparent:"Doorzichtig"},pl:{add:"Dodaj",addColor:"Dodaj kolor",cancel:"Anuluj",colorFormat:"Format koloru",colorPresets:"Wst\u0119pnie ustawione kolory",customColors:"Niestandardowe kolory",newColor:"Nowy kolor niestandardowy",noColor:"Brak",removeColor:"Usu\u0144 kolor",transparent:"Prze\u015Bwiecaj\u0105ce"},"pt-PT":{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Predefini\xE7\xF5es de cor",customColors:"Cores personalizadas",newColor:"Nova cor personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},pt:{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Pr\xE9-ajustes de Cores",customColors:"Cores personalizadas",newColor:"Nova Cor Personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},ru:{add:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",addColor:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",colorPresets:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",customColors:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",newColor:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",noColor:"\u041D\u0435\u0442",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",transparent:"\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439"},sk:{add:"Prida\u0165",addColor:"Prida\u0165 farbu",cancel:"Zru\u0161i\u0165",colorFormat:"Form\xE1t farby",colorPresets:"Predvo\u013Eby farieb",customColors:"Vlastn\xE9 farby",newColor:"Vlastn\xE1 farba",noColor:"\u017Diadny",removeColor:"Odstr\xE1ni\u0165 farbu",transparent:"Prieh\u013Eadn\xE1"},sl:{add:"Dodaj",addColor:"Dodaj barvo",cancel:"Prekli\u010Di",colorFormat:"Barvni format",colorPresets:"Barvne predloge",customColors:"Prilagojene barve",newColor:"Nova barva po meri",noColor:"Prazna stran",removeColor:"Odstrani barvo",transparent:"Prosojna"},sv:{add:"L\xE4gg till",addColor:"L\xE4gg till f\xE4rg",cancel:"Avbryt",colorFormat:"F\xE4rgformat",colorPresets:"F\xF6rval f\xF6r f\xE4rger",customColors:"Anpassade f\xE4rger",newColor:"Ny anpassad f\xE4rg",noColor:"Ingen",removeColor:"Ta bort f\xE4rg",transparent:"Genomskinligt"},th:{add:"\u0E40\u0E1E\u0E34\u0E48\u0E21",addColor:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",colorFormat:"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",colorPresets:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",customColors:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",newColor:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",noColor:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",removeColor:"\u0E25\u0E1A\u0E2A\u0E35",transparent:"\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A"},tr:{add:"Ekle",addColor:"Renk Ekle",cancel:"Vazge\xE7",colorFormat:"Renk Format\u0131",colorPresets:"Renk \xD6nayarlar\u0131",customColors:"\xD6zel Renkler",newColor:"Yeni \xF6zel renk",noColor:"Hi\xE7biri",removeColor:"Rengi Kald\u0131r",transparent:"\u015Eeffaf"},uk:{add:"\u0414\u043E\u0434\u0430\u0442\u0438",addColor:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",cancel:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",colorPresets:"\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",customColors:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",newColor:"\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",noColor:"\u041D\u0435\u043C\u0430\u0454",removeColor:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",transparent:"\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439"},"zh-Hans":{add:"\u6DFB\u52A0",addColor:"\u6DFB\u52A0\u989C\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u989C\u8272\u683C\u5F0F",colorPresets:"\u989C\u8272\u9884\u8BBE",customColors:"\u81EA\u5B9A\u4E49\u989C\u8272",newColor:"\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",noColor:"\u65E0",removeColor:"\u79FB\u9664\u989C\u8272",transparent:"\u900F\u660E"},"zh-Hant":{add:"\u52A0\u5165",addColor:"\u6DFB\u52A0\u984F\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u984F\u8272\u683C\u5F0F",colorPresets:"\u984F\u8272\u9810\u8A2D\u9805",customColors:"\u81EA\u8A02\u984F\u8272",newColor:"\u65B0\u81EA\u8A02\u984F\u8272",noColor:"\u7121",removeColor:"\u79FB\u9664\u984F\u8272",transparent:"\u900F\u660E"}};var ea=({children:e})=>{let{triggerProps:t}=nt.useContext(Ge);return jsx(PressResponder,{...t,children:e})};ea.displayName="ModalTrigger";var Nh=({children:e})=>{let{state:t}=nt.useContext(Ge);return jsx(PressResponder,{onPress:()=>{t?.close();},children:e})};var Fd="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lh",Hd="_1dbkl5e",Vd=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 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6ls _1yep5z6lk _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6lj _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z610v"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Od="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf",Ad=z({defaultClassName:"_1dbkl50 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6oc _1yep5z6od _1yep5z6oe",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),ta="_1dbkl5l _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z69f _1yep5z69g _1yep5z69h",jd="_1dbkl5f z9nup87",oa="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",$d="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lk",Ud="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jd _1yep5z6je _1yep5z6jf",ra=z({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6n0 _1yep5z6n1 _1yep5z6n2"}},defaultVariants:{},compoundVariants:[]}),qn="_1dbkl5v _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix",Kd=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 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lt _1yep5z6h4 _1yep5z6lk _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z612y"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z617e"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61oz"]]}),qd=z({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f5 _1yep5z6lj _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6l4 _1yep5z6l7",variantClassNames:{isHovered:{true:"_1yep5z6120"},isFocusVisible:{true:"_1yep5z617k _1yep5z617i _1yep5z617l _1yep5z613r"},isDisabled:{true:"_1yep5z6114"}},defaultVariants:{},compoundVariants:[]}),Fo="_1dbkl5u",aa="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",na="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69f _1yep5z69g _1yep5z69h",Gn="_1dbkl5x",Gd="_1dbkl5w",Wn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69l _1yep5z69m _1yep5z69n",ia=z({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lo _1yep5z6ia _1yep5z6ib _1yep5z6ic _1yep5z6lt _1yep5z6lw",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z617i _1yep5z613r _1yep5z617k"}},defaultVariants:{},compoundVariants:[]}),Xn="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6ia _1yep5z6ib _1yep5z6ic";var Wd=z({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6le _1yep5z6i6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617n"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61th _1yep5z61tf _1yep5z61po _1yep5z61tk"],[{isSelected:!0,isDisabled:!0},"_1yep5z61th _1yep5z61tf _1yep5z61po _1yep5z61tk _1yep5z61py"],[{isHovered:!0,isSelected:!1},"_1yep5z61tk _1yep5z61th _1yep5z61tf _1yep5z61ps"]]}),Xd="_1344e9q9 _1yep5z6fl";var et=nt.forwardRef(({color:e,isFocusVisible:t,isSelected:o,isInteractive:r,isDisabled:a,style:n,className:i,id:s,tooltip:p,"data-block-id":l,"data-block-class":c,...d},u)=>{let m=e&&e!==we&&(typeof e=="string"?parseColor(e):e),{formatMessage:y}=F(),f=!m,{colorSwatchProps:b}=useColorSwatch({color:f?"#000000":e}),{hoverProps:g,isHovered:_}=useHover({isDisabled:a||!r}),v=filterTruthyValues({"data-focus-visible":t,"data-selected":o,"data-hovered":_,"data-block-id":l,"data-block-class":c,"data-disabled":a,"data-interactive":r}),h=f?y(Yd.none):b["aria-label"],I=d["aria-label"]??h,{tooltipProps:P}=zr({tooltip:p,label:I}),C=jsx("div",{...mergeProps(g,v,f?{}:b),style:n,"aria-label":f?y(Yd.none):b["aria-label"],role:"img",className:classNames(Wd({removeBlendMode:f,isFocusVisible:t,isDisabled:!!a,isSelected:!!o,isHovered:_}),"BaselineUI-ColorSwatch",i),ref:u,id:s,...d,children:jsx(L,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:m?Zd(m,4):void 0,children:f?jsx("div",{className:Xd}):null})});return P&&!a?jsx(re,{...P,children:jsx(Lr,{children:C})}):C});et.displayName="ColorSwatch";var Yd=K({none:{id:"none",defaultMessage:"None"}});var Jd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Oo=parseColor("#000000").toFormat("hsla"),ie="hsla",Vo="hexa";function pt(e){return typeof e=="string"?parseColor(e).toFormat(ie):e?e.toFormat(ie):null}function em(e,t){return e?.getChannelValue("alpha")?t?.toString(Vo)===e.toString(Vo):!t?.getChannelValue("alpha")}function tm(e,t,o){return t?.label?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var we="NONE";function om(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString(Vo),label:a.label}))||[],r={id:we,label:e};return [...o,r]}var sa=(e,{optionProps:t,isFocusVisible:o,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...t,ref:a,className:$d,children:jsx(et,{color:e.value.id,isFocusVisible:o,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),Zd=(e,t=4)=>{let o=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:o?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${t}px ${t}px`}};var am=({value:e,...t})=>{let o=nt.useRef(null),r=nt.useRef(null),a=nt.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...t,value:e,inputXRef:o,inputYRef:r,containerRef:a},n);useEffect(()=>{o.current?.focus();},[]);let{focusProps:c,isFocusVisible:d}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(Fd,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(ia({isFocusVisible:d}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:pt(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var sm=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:d=>{t(pt(d)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Oo);}}),n=nt.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(qn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:Kd({isFocused:p,isHovered:c,allowAlpha:o})}),o?jsx(pm,{color:e,setColor:t}):null]})},lm=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(qn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(Me,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("red",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("green",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),o?jsx(pm,{color:e,setColor:t}):null]})},ex={style:"percent",maximumFractionDigits:0},pm=({color:e,setColor:t})=>{let{locale:o}=useLocale(),r=useCallback(a=>{t(e.withChannelValue("alpha",a));},[e,t]);return jsx(Me,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:ex,className:Fo,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var Jn=({channel:e,...t})=>{let{locale:o}=useLocale(),r=useColorSliderState({...t,channel:e,locale:o}),a=nt.useRef(null),n=nt.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...t,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(oa,{[kl({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:Xn}),jsx("div",{className:oa,style:i.style}),jsxs("div",{className:classNames(ia({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:Xn,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:oa}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var la=({color:e,setColor:t,allowAlpha:o,onChangeEnd:r})=>{let[a,n]=nt.useState("hex"),{formatMessage:i}=F(Je);return jsxs(Fragment,{children:[jsx(am,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:t,onChangeEnd:r}),jsxs("div",{className:Wn,children:[jsx(Jn,{channel:"hue",value:e,onChange:t,onChangeEnd:r}),o?jsx(Jn,{channel:"alpha",value:e,onChange:t,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(Wn,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Qe,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Jd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(sm,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o}),a==="rgb"&&jsx(lm,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o})]})]})};var bm=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Je),c=nt.useRef(null),d=Nt(c.current),[u,m]=xl(o,[]),y=nt.useRef(null),[f,b]=nt.useState(e),g=nt.useMemo(()=>u.map(C=>({id:C,label:parseColor(C).getColorName(p),description:C})),[u,p]),_=useCallback(()=>{let C=i==="active"?e:f;if(u.includes(C.toString(ie))){y.current?.querySelector(`[data-key='${C.toString(ie)}']`)?.classList.add(Gn);return}m([...u,C.toString(ie)]);},[u,e,m,f,i]);useEffect(()=>{let C=y.current;function x(T){T.animationName===Gd&&T.target?.classList.remove(Gn);}return C?.addEventListener("animationend",x),()=>{C?.removeEventListener("animationend",x);}},[]);let v=useId(),h=jsx(E,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),I=useCallback(C=>jsxs(ue,{size:"content",className:ra({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(la,{color:f,setColor:b,allowAlpha:s}),jsx(A,{}),jsx(L,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(L,{display:"inline-flex",gap:"lg",children:[jsx(G,{label:l("cancel"),size:"sm",variant:"secondary",onPress:C}),jsx(G,{label:l("add"),variant:"primary",onPress:()=>{_(),C();},size:"sm"})]})})]}),[f,_,l,s]),P=useCallback(C=>{invariant(C instanceof Set,"Key must be a set");let x=[...C][0];x&&t(parseColor(x).toFormat(ie));},[t]);return jsxs(Fragment,{children:[jsx(A,{}),jsxs("div",{className:classNames(Ud,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:v,children:n}),jsxs(L,{display:"flex",children:[!!u.length&&u.includes(e.toString(ie))&&jsx(E,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{m(u.filter(C=>C!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(d==="mobile"?jsxs(Ie,{children:[jsx(ea,{children:h}),jsx(De,{style:{zIndex:1e5},children:({close:C})=>I(C)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:h}),jsx(Re,{placement:"right top",className:aa,offset:6,children:({close:C})=>I(C)})]}))]})]}),!!u.length&&jsx(le,{items:g,layout:"grid","aria-labelledby":v,className:classNames(ta,na,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:sa,ref:y,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:P})]})};var oi=nt.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Je),p=useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],d=a.find(u=>u.id===c);invariant(d,"Preset not found"),e(d.id===we?null:parseColor(d.id).toFormat(ie)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(na,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:i,children:jsx(le,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:ta,renderOption:sa,selectionMode:"single",selectedKeys:[t?.toString(Vo)||we],onSelectionChange:p})})});oi.displayName="ColorPresetList";var jo=nt.forwardRef(({color:e,colorLabel:t,colorName:o,...r},a)=>{let n=nt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:d}=useFocusRing(),u=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}),m=pr(),y=pr();return jsxs("button",{...mergeProps(p,i,d,u),style:r.style,className:classNames(Vd({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:M(a,n),id:m,"aria-labelledby":r["aria-labelledby"]||`${m} ${y}`,children:[jsx(et,{color:e?.toString("hexa")}),t?jsx("div",{className:jd,id:y,"aria-hidden":"true",children:o}):typeof o=="string"&&jsx(VisuallyHidden,{children:o})]})});jo.displayName="ColorInputButton";var da=nt.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=nt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:d}=useFocusRing(),u=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,d,u),ref:M(a,n),style:t,className:classNames(qd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(o,{size:16}),jsx("div",{className:Hd,style:{backgroundColor:r.color||void 0}})]})});da.displayName="IconColorInputButton";function km({colorLabel:e,color:t,presets:o}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>o.find(p=>p.id===we?!t:t?em(t,parseColor(p.id)):!1),[o,t]),i=useMemo(()=>typeof e=="function"?e?.(t):e?tm(t,n,r(Ix.transparent)):!1,[t,e,r,n]),s=useMemo(()=>{if(n?.label)return n.label;t?.getColorName(a);},[t,a,n?.label]);return {colorName:i,humanReadableName:s}}var Ix=K({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Qt=nt.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,onChangeEnd:l,defaultValue:c,storePickedColorKey:d="baselinePickedColor",value:u,addColorButtonLabel:m,removeColorButtonLabel:y,customColorsLabel:f,renderTriggerButton:b=({isOpen:x,color:T,ref:N,colorName:R,triggerProps:S,labelId:k})=>jsx(jo,{...mergeProps(S,{...P.label?{"aria-labelledby":k}:{"aria-label":P["aria-label"]}}),ref:N,isOpen:x,isDisabled:P.isDisabled,labelPosition:n,color:T,colorLabel:i,colorName:R}),pickerMode:g="active",offset:_=2,placement:v=n==="start"?"bottom end":"bottom start","data-block-id":h,"data-block-class":I,...P},C)=>{let x=nt.useRef(null),T=nt.useRef(null),N=useOverlayTriggerState(P),{triggerProps:R,overlayProps:S}=useOverlayTrigger({type:"listbox"},N,x),k=ve(P.portalContainer),[w,B]=useControlledState(u===void 0?void 0:pt(u),pt(c),X=>p?.(X?.toFormat("rgba")||null)),{formatMessage:H}=F(Je),D=useMemo(()=>om(H(ma.noColor),a),[a,H]),q=useId(),{colorName:j}=km({colorLabel:i,color:w,presets:D}),$=useMemo(()=>D.filter(X=>o||X.id!==we),[D,o]),V=m||H(ma.addColor),J=y||H(ma.removeColor),O=f||H(ma.customColors),Z=jsx(bm,{color:w||Oo,setColor:X=>{B(X),l?.(X?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:V,removeColorButtonLabel:J,customColorsLabel:O,pickerMode:g,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Od]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":I,style:t,ref:C,children:[P.label?jsx("label",{id:q,className:Ad({labelPosition:n}),children:P.label}):null,b({isOpen:N.isOpen,color:w,ref:x,colorName:j,triggerProps:R,labelId:q})]}),jsx(be,{...P,portalContainer:k,placement:v,state:N,offset:_,className:classNames(aa,"BaselineUI-ColorInput-Popover"),triggerRef:x,overlayProps:S,children:jsxs(ue,{size:"content",className:ra({includesCustomColorPicker:s}),ref:T,"aria-labelledby":q,"aria-label":P["aria-label"],children:[s&&g==="active"?jsxs(Fragment,{children:[jsx(la,{color:w||Oo,setColor:B,allowAlpha:r,onChangeEnd:X=>{l?.(X?.toFormat("rgba")||null);}}),Z]}):null,!!$.length&&jsxs(Fragment,{children:[s&&g==="active"?jsx(A,{}):null,jsx(oi,{autoFocus:s&&g==="active"?!1:"first",state:N,triggerRef:x,presets:$,color:w,setColor:X=>{B(X),l?.(X?.toFormat("rgba")||null);}})]}),s&&g==="lazy"?Z:null]})})]})});Qt.displayName="ColorInput";var ma=K({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 Tm=nt.forwardRef(({className:e,style:t,icon:o,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=nt.useRef(null),l=useCallback(({isOpen:c,color:d,ref:u,colorName:m,triggerProps:y})=>jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(jo,{...y,"aria-label":i["aria-label"],ref:u,isOpen:c,isDisabled:i.isDisabled,color:d,colorLabel:!1,colorName:m}):jsx(da,{...y,isOpen:c,icon:TextIcon,color:d?.toString("hexa"),ref:u,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:t,ref:M(s,p),children:[r==="standard"&&o?jsx(o,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Qt,{...i,colorLabel:!1,renderTriggerButton:l})]})});Tm.displayName="IconColorInput";var Sm={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 ua=z({defaultClassName:"mnnh5s1 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6l4 _1yep5z6l7 _1yep5z6lj _1yep5z6li _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6lh",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6wi _1yep5z6wj _1yep5z6wk _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6132 _1yep5z617r _1yep5z617s",false:"_1yep5z617e _1yep5z6121"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6120"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z613a _1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"mnnh5s8 _1yep5z6z7"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61o5"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61oz"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61nx"]]}),Nm="_1yep5z6d8",fa=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Lm=z({defaultClassName:"_1i0ytqa3 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6lh _1yep5z6li _1yep5z6lk",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z6129",false:"_1yep5z612b"},isDisabled:{true:"_1i0ytqa7 _1yep5z6z7",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61ov _1yep5z61tn _1yep5z61tp"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61o6"],[{isInline:!1,isDisabled:!0},"_1yep5z61o8"]]}),Mm="_1i0ytqa0",ya=z({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6lh",variantClassNames:{isInline:{false:"_1yep5z6120"},isDisabled:{true:"_1i0ytqad _1yep5z6z7"}},defaultVariants:{},compoundVariants:[]}),Dm=z({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lh",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function Em({line:e,options:t}){let o=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/Jt),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!o.current[i])){let l=e.slice(i*Jt-(i>0?1:0),i*Jt+Jt);n=getSvgPathFromStroke(getStroke(l.map(([c,d,u])=>({x:c,y:d,pressure:u})),t)),l.length>=(i>0?Jt+1:Jt)&&(o.current[i]=n);}return n},[e,t]);return [...o.current,r]}var Jt=60*3;var oC={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},Fm=nt.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:d=!0,isDisabled:u,placeholder:m,clearLabel:y,undoLabel:f,redoLabel:b,footerClassName:g,canvasRef:_,value:v,footerStyle:h,"data-block-id":I,"data-block-class":P,"aria-label":C="Drawing canvas",description:x="This is a canvas for drawing using a mouse or touch input.",...T},N)=>{let R=F(Sm),S=nt.useRef(null),[k,w]=nt.useState(v||p||[]),B=nt.useMemo(()=>({...oC,...T}),[T]),[H,D]=nt.useState(),q=useId(),{labelProps:j,fieldProps:$}=useLabel({...T,"aria-label":C,labelElementType:"span"}),{isFocusVisible:V,focusProps:J}=useFocusRing({within:!0}),{hoverProps:O,isHovered:Z}=useHover({isDisabled:u}),{undo:X,redo:Ce,canRedo:Pe,canUndo:ye,push:Te}=yl(k,{onAction:Y=>{Y&&(w(Y),l?.(Y));},isDisabled:!c}),{keyboardProps:He}=useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?ht():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Pe&&Ce():ye&&X());}}),[te,de]=useState(!1),_t=useCallback(Y=>{let U=Y.currentTarget.getBoundingClientRect();D(U),Y.target.setPointerCapture(Y.pointerId);let ne=[Y.clientX-U.x,Y.clientY-U.y,Y.pressure];w(W=>[...W,[ne]]),de(!0);},[]),zt=useCallback(Y=>{if(Y.buttons!==1||!H)return;let ne=Om(Y.nativeEvent).map(W=>[a?clamp(W.clientX-H.left,0,H.width):W.clientX-H.left,a?clamp(W.clientY-H.top,0,H.height):W.clientY-H.top,W.pressure]);w(W=>{let he=[...W];return he[W.length-1]=[...he[W.length-1],...ne],he});},[H,a]),uo=()=>{H&&(l?.(k),Te(k),de(!1));};useEffect(()=>{s?.(k);},[k,s]);let ht=()=>{w([]),s?.([]),Te([]);};return jsxs("div",{ref:M(S,N),className:classNames(Mm,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":u,"data-block-id":I,"data-block-class":P,children:[T.label||c?jsxs("div",{className:Dm({isInline:d}),children:[T.label?jsx(Q,{type:"label",size:"sm",...j,children:T.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(E,{variant:"secondary",size:"sm",isDisabled:!ye||u,icon:UndoIcon,onPress:X,"aria-label":f||R.formatMessage("undo")}),jsx(E,{variant:"secondary",size:"sm",isDisabled:!Pe||u,icon:RedoIcon,onPress:Ce,"aria-label":b||R.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(J,He,O,$),tabIndex:u?void 0:0,className:classNames(ua({isInline:d,isHovered:Z}),Lm({isFocusVisible:V,isInline:d,isDisabled:!!u}),o),"aria-describedby":T["aria-describedby"]||q,style:r,ref:_,children:[jsx(VisuallyHidden,{children:jsx("div",{id:q,children:x})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:_t,onPointerMove:zt,onPointerUp:uo,children:(v||k).map((Y,U,ne)=>U<ne.length-1||!te?jsx(Hm,{line:Y,options:B,strokeColor:i,strokeWidth:n},U):jsx(Vm,{line:Y,options:B,strokeColor:i,strokeWidth:n},U))})]}),m||y?jsx("div",{style:h,className:classNames(ya({isInline:d,isDisabled:u}),g),children:(k.length||!m)&&y?jsx(G,{size:"sm",variant:"ghost",label:y,isDisabled:u,onPress:ht}):jsx(G,{size:"sm",variant:"ghost",label:m,isDisabled:!0})}):null]})});Fm.displayName="FreehandCanvas";var Hm=nt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),t)),[e,t]);return jsx("path",{d:a,stroke:o,strokeWidth:r})});Hm.displayName="Stroke";var Vm=nt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=Em({line:e,options:t});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:o,strokeWidth:r},i))})});Vm.displayName="SplitStroke";function Om(e){if(typeof e.getCoalescedEvents=="function"){let t=e.getCoalescedEvents();return t.length>0?t.flatMap(o=>Om(o)):[e]}return [e]}var Am="_1vac7ws0",jm=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Um(e,t){let[o,r]=useState([]),a=()=>e?.flatMap(n=>[...t.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),o}function Km(e){let{scrollable:t,ownerDocument:o,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(t,o);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",r),()=>{a.removeEventListener("scroll",r);}},[t,r,o]);}var _C=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Gm=nt.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:d,onDrag:u,onResizeStart:m,onResizeEnd:y,onResize:f,onRotateStart:b,onRotateEnd:g,onRotate:_,onSnap:v,isSnappable:h,elementGuidelines:I,hideAnchorOnDrag:P=!0,title:C,rotationPosition:x,autoUpdate:T,bound:N,snapRotationDegrees:R,snapRotationThreshold:S,scrollableAncestor:k,renderDirections:w,stopPropagation:B,transformOrigin:H,preventDefault:D},q)=>{let j=useRef(null),$=useRef(null),[V,J]=useState(document),O=useRef(V.createElement("div")),[Z,X]=useState({}),[Ce,Pe]=useState(!1),[ye,Te]=useState(!1),[He,te]=useState(),de=Um(I,V);useLayoutEffect(()=>{let U=O.current;return O.current=V.createElement("div"),()=>{U.remove();}},[V]);let{keyboardProps:_t}=useKeyboard({onKeyDown:U=>{let ne=U.shiftKey?10:1,W=U.metaKey||U.ctrlKey;W&&U.shiftKey&&(ne=45);function he(fo,Ky="x"){W?$.current?.request("rotatable",{deltaRotate:fo*ne},!0):$.current?.request("draggable",Ky==="x"?{deltaX:fo*ne}:{deltaY:fo*ne},!0);}switch(U.key){case"ArrowRight":{he(1);break}case"ArrowLeft":{he(-1);break}case"ArrowUp":{he(-1,"y");break}case"ArrowDown":he(1,"y");}requestAnimationFrame(()=>{$.current?.updateRect();});}});useEffect(()=>{let U=me(j.current);J(U);let ne=O.current;U.body.append(O.current);function W(fo){Te(fo.shiftKey);}function he(){Te(!1);}return U.addEventListener("keydown",W),U.addEventListener("keyup",he),()=>{U.removeEventListener("keydown",W),U.removeEventListener("keyup",he),ne.remove();}},[]),Km({scrollable:k,onScroll:()=>{$.current?.updateRect();},ownerDocument:V});let zt=useCallback(U=>{X(ne=>({...ne,...U.style})),i?.(U);},[i]),uo=useCallback(U=>{if(Pe(!0),j.current?.focus(),N){let W=getHTMLElement(N,V)?.getBoundingClientRect();te({position:"client",left:W?.left??0,top:W?.top??0,right:W?.right??0,bottom:W?.bottom??0});}c?.(U);},[N,V,c]),ht=useCallback(U=>{Pe(!1),d?.(U);},[d]),Y=t({style:{...Z.width&&{width:Z.width},...Z.height&&{height:Z.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",..._t,ref:M(j,q),style:{display:"inline-block",...n,...Z},className:classNames(Am,e),onDoubleClick:l,tabIndex:0,title:C,children:Y}),createPortal(jsx(_C,{ref:$,target:j,draggable:a,resizable:r,rotatable:o,keepRatio:ye,throttleDrag:1,snappable:h||!!N,elementGuidelines:de,snapRenderThreshold:.9,className:jm({isDragging:Ce&&P}),onRender:zt,onDragStart:uo,onDragEnd:ht,useResizeObserver:T,useMutationObserver:T,onRenderEnd:p,onDrag:u,onResizeStart:m,onResizeEnd:y,onResize:f,onRotateStart:b,onRotateEnd:g,onRotate:_,onRenderStart:s,onSnap:v,rotationPosition:x,bounds:He,snapRotationDegrees:R,snapRotationThreshold:S,renderDirections:w,stopPropagation:B,preventDefault:D,transformOrigin:H}),O.current)]})});Gm.displayName="Transform";var Wm={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 Zm=nt.forwardRef(({className:e,style:t,isInline:o=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:d=!0,"data-block-id":u,"data-block-class":m,pickerButtonStyle:y,pickerButtonClassName:f,footerClassName:b,footerStyle:g,clearLabel:_,placeholder:v,labelStyle:h,labelClassName:I,...P},C)=>{let x=nt.useRef(null),T=nt.useRef(null),{formatMessage:N}=F(Wm),[R,S]=useControlledState(n,a||null,te=>{invariant(typeof te!="string"),P.onValueChange?.(te?[te]:[]);}),k=useMemo(()=>MC(R||void 0),[R]),{fieldProps:w,labelProps:B}=useField(P),{dropProps:H,isDropTarget:D}=useDrop({ref:x,onDrop:async te=>{if(p)return;let de=await Rn({items:te.items});de.length&&S(de[0]),l?.(te);},...P}),{clipboardProps:q}=useClipboard({onPaste:async te=>{if(p)return;let de=await Rn({items:te});de.length&&S(de[0]),c?.(te);},...P}),j=()=>{S(null),T.current&&(T.current.value="");},$={type:"file",onChange:te=>{let de=[...te.target.files];S(de[0]),P.onChange?.(te);},accept:r,disabled:p},{focusProps:V,isFocused:J,isFocusVisible:O}=useFocusRing({within:!0}),{hoverProps:Z,isHovered:X}=useHover({isDisabled:p}),{imgProps:Ce,isLoading:Pe,isLoaded:ye}=Tt({src:k,alt:i||""}),Te={label:s||N("selectImage"),onPress:()=>x.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(Pr({isFocusVisible:O}),{[Nm]:D&&!p},f),style:y},He=filterTruthyValues({"data-loaded":ye,"data-block-id":u,"data-block-class":m,"data-hovered":X,"data-focused":J,"data-drop-target":D,"data-disabled":p,"data-focus-visible":O});return jsxs(L,{...He,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:t,ref:C,children:[jsxs("label",{...mergeProps(H,Z,V,B),className:classNames(ua({isInline:o,isHovered:X,isDisabled:p,hasLoadedImage:!!k&&ye,showFocusRing:D||!!k&&O}),I),style:h,ref:x,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(w,q,$),ref:T})}),!k&&jsx(G,{...Te}),!!k&&(Pe?jsx(Kt,{}):jsx("img",{className:fa({isInline:o,isDisabled:p,hasLoadedImage:!!k&&ye&&d}),...Ce}))]}),v||_?jsx("div",{style:g,className:classNames(ya({isInline:o,isDisabled:p}),b),children:(k||!v)&&_?jsx(G,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:j}):jsx(G,{size:"sm",variant:"ghost",label:v,isDisabled:!0})}):null]})});Zm.displayName="ImageDropZone";function MC(e){return e instanceof File?URL.createObjectURL(e):e}var Qm="_1vm2oh49 _1yep5z6ia _1yep5z6ib _1yep5z6ic _1yep5z6g4",ci="_1vm2oh48 _1yep5z6li _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6jy _1yep5z6jz _1yep5z6k0",Jm=z({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6ln _1yep5z6ll _1yep5z6i6 _1yep5z6lo _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6l4 _1yep5z6lj _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z6131 _1yep5z617q _1yep5z617s",false:"_1yep5z612b"},isFocusVisible:{true:"_1yep5z613a _1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6z7"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61o6"],[{accent:"theme",isInline:!0},"_1yep5z61nv"],[{accent:"positive",isInline:!1},"_1yep5z61o8"],[{accent:"theme",isInline:!1},"_1yep5z61nx"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61po _1yep5z61tf _1yep5z61th _1yep5z61ti"],[{isHovered:!0,isInline:!0},"_1yep5z61ti _1yep5z61po _1yep5z61tf _1yep5z61th"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61o7"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61nz"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61nw"]]});var ou=nt.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:d,addAriaLabel:u,accent:m="positive","data-block-id":y,"data-block-class":f,...b},g)=>{let{focusProps:_,isFocused:v,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:I,hoverProps:P}=useHover({isDisabled:o}),{pressProps:C}=usePress({isDisabled:o,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let x=filterTruthyValues({"data-hovered":I,"data-focus-visible":h,"data-focused":v,"data-disabled":o});return jsxs("div",{...b,className:classNames(Jm({isInline:r,isFocusVisible:h,isDisabled:o,isHovered:I,accent:m}),"BaselineUI-Preview",e),"data-block-id":y,"data-block-class":f,"aria-label":b["aria-label"]||a||s,style:t,ref:g,children:[typeof i=="string"?jsx("button",{disabled:o,...mergeProps(P,_,C,x),className:ci,"aria-label":u,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(P,_,C,x),disabled:o,style:p,"aria-label":u,className:ci,children:[n?jsx("img",{src:n,alt:a,className:fa({isInline:r,isDisabled:o})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(E,{isDisabled:o,className:Qm,"aria-label":d,size:"xs",icon:TrashIcon,onPress:c}):null]})});ou.displayName="Preview";var ru="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69c _1yep5z69d _1yep5z69e",au=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),nu="cw3m0n7",iu=z({defaultClassName:"cw3m0n0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{labelPosition:{end:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vf _1yep5z6vg _1yep5z6vh",start:"_1yep5z614y _1yep5z614z _1yep5z6150 _1yep5z616a _1yep5z616b _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),su="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6le",lu=z({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var YC=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:iu({labelPosition:n}),children:[jsx("div",{className:lu({isSelected:o,isFocusVisible:r,isDisabled:a}),children:o?jsx("div",{className:nu}):null}),e?jsxs("div",{className:ru,children:[jsx("span",{className:qr({isDisabled:a}),children:e}),t?jsx("span",{className:au({isDisabled:a}),children:t}):null]}):null]}),pu=({state:e,renderOption:t=YC,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(o.id),l=nt.useRef(null),{inputProps:c,isPressed:d,isSelected:u}=useRadio({...s,isDisabled:p,children:o.label,value:o.id},e,l),{focusProps:m,isFocusVisible:y,isFocused:f}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),g=filterTruthyValues({"data-selected":u,"data-focused":f,"data-focus-visible":y,"data-hovered":b,"data-disabled":p,"data-pressed":d,"data-read-only":i});return jsxs("label",{...g,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,m),ref:l})}),t(o,{isFocusVisible:y,isSelected:u,isFocused:f,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var du=nt.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":d,"data-block-class":u,...m},y)=>{let f=useRadioGroupState(m),{radioGroupProps:b,labelProps:g,descriptionProps:_,errorMessageProps:v}=useRadioGroup({...m,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},f),h=ke({...m,descriptionProps:_,errorMessageProps:v,labelPosition:n}),I=filterTruthyValues({"data-orientation":m.orientation,"data-block-id":d,"data-block-class":u,"data-disabled":m.isDisabled,"data-readonly":m.isReadOnly});return jsxs("div",{...mergeProps(b,I),className:classNames(Ue({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:y,children:[m.label||h?jsxs("div",{className:$e({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...g,className:classNames(je,"BaselineUI-RadioGroup-Label"),children:m.label}),n==="start"&&h]}):null,jsx("div",{className:classNames(su,{[Lt]:m.isDisabled},o),style:r,children:a.map(P=>jsx(pu,{state:f,renderOption:i,item:P,...m,value:P.id},P.id))}),n==="top"&&h]})});du.displayName="RadioGroup";var mu=({id:e,defaultMessage:t,elementType:o=Fragment$1})=>{invariant(e||t,"`id` or `defaultMessage` is required.");let r=F();return jsx(o,{children:r.formatMessage(e)||t})};mu.displayName="MessageFormat";var uu=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:t,...s,ref:p,children:o})});uu.displayName="Group";var yi="UNSUPPORTED_IN_MENU";function bu(e){return useMemo(()=>nt.Children.toArray(e).map(t=>{let o=t,r=uniqueId("item"),a=Go(o,Ne),n=yu(o),i,s;if(a){let g=Go(a,Le);invariant(g),i=yu(g),s=Go(a,Re).props.children;}else n?i=n:i=o;let{onPress:p,label:l,"aria-label":c,iconStart:d,isDisabled:u,icon:m}=i.props,y=l||c||yi;invariant(typeof y=="string","ActionGroup children must have a string label");let f=`${r}-${y}`;return createElement(Item,{...{key:f,onPress:p,textValue:y,"aria-label":c,icon:d||m,dialogContent:s,isDisabled:u},key:f},o)}),[e])}function Go(e,t){return t?flatMapDeep(nt.Children.toArray(e),r=>nt.isValidElement(r)&&r.props.children?[r,...nt.Children.toArray(r.props.children)]:[r]).find(r=>nt.isValidElement(r)&&r.type===t):void 0}function yu(e){return Go(e,G)||Go(e,E)}var gu="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6lh _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6l9",vu={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var gi=nt.forwardRef(({className:e,style:t,children:o,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=F(),[d,u]=useState(),m=bu(o),y=useListState({...p,children:m}),f=oe(l),b=useRef(null),[{visibleItems:g,isMeasuring:_},v]=Ha({visibleItems:y.collection.size,isMeasuring:!1}),h=useCallback(()=>{let S=k=>{if(b.current&&f.current){let w=[...b.current.children],B=f.current.getBoundingClientRect().width,H=k<y.collection.size,D=0,q=0;if(H){let j=w.pop();j&&(D+=xu(j,!1,!0));}for(let[j,$]of w.entries())if(D+=xu($,j===0,j===w.length-1),Math.round(D)<=Math.round(B))q++;else break;return q}return k};v(function*(){yield {visibleItems:y.collection.size,isMeasuring:!0};let k=S(y.collection.size),w=k<y.collection.size&&k>0;yield {visibleItems:k,isMeasuring:w},w&&(yield {visibleItems:S(k),isMeasuring:!1});});},[v,f,y.collection.size]),I=useMemo(()=>({get current(){return f.current?.parentElement}}),[f]);qa({ref:I,onResize:h}),xe(h,[y.collection,h]);let{toolbarProps:P}=useToolbar(p,f),C=[...y.collection],x=C.slice(0,g),T=C.slice(g).filter(S=>S.textValue!==yi),N=T.length>0;useEffect(()=>{u(void 0);},[T.length]),useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:R}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(P,R),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...t,flexBasis:_?"100%":void 0},ref:f,children:jsxs("div",{ref:b,className:gu,children:[x.map(S=>S.rendered),N?jsxs(Fragment,{children:[!_&&i?jsx(L,{flexGrow:1}):null,jsx(Or,{placement:"bottom end",renderTrigger:({buttonProps:S,ref:k})=>jsx(E,{...S,size:"md",icon:MoreIcon,"aria-label":c(CP.more),variant:"toolbar",ref:k}),...r,disabledKeys:T.filter(S=>S.props?.isDisabled).map(S=>S.key),items:T.map(S=>{let k=S.textValue||S["aria-label"];return invariant(k,"ActionItem must have a label"),{id:S.key,label:k,icon:S.props.icon}}),onAction:S=>{let k=y.collection.getItem(S);invariant(k,"Item not found");let{onPress:w,dialogContent:B}=k.props;w?.(),u(B);}})]}):null]})}),jsx(Ie,{isOpen:!!d,onOpenChange:S=>{S||u(void 0);},children:jsx(De,{enableDrawer:"auto",style:{zIndex:1e5},children:d?nt.cloneElement(d,{inheritDrawer:!0}):null})})]})});gi.displayName="CollapsibleToolbar";function xu(e,t,o){let a=pe(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:Cu(a.marginLeft))+(o?0:Cu(a.marginRight))}function Cu(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var CP=K({more:{id:"more",defaultMessage:"More"}});var vi=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=nt.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(vu[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,p),children:i.children})});vi.displayName="WrappedToolbar";var va=nt.forwardRef((e,t)=>{let o=e.isCollapsible?gi:vi;return jsx(o,{...e,ref:t})});va.displayName="Toolbar";var ku=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),Iu=z({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z6114"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61ti _1yep5z61th _1yep5z61tf _1yep5z61py _1yep5z61n1"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6g3"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61ti _1yep5z61th _1yep5z61po _1yep5z61tf"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61tg _1yep5z61tf _1yep5z61pp _1yep5z61n2"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61tf _1yep5z61th _1yep5z61po _1yep5z61ti"]]}),Ru=z({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617l _1yep5z617k _1yep5z613r _1yep5z617i"},isSelected:{true:"_1yep5z6113"},isDisabled:{true:"z9nup83 _1yep5z6114"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61n0"]]}),wu=z({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617l _1yep5z617k _1yep5z613r _1yep5z617i"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z6114"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61nx"],[{isSelected:!0,isDisabled:!1},"_1yep5z61nx _1yep5z61n4"],[{isSelected:!0,isDisabled:!0},"_1yep5z61nx _1yep5z61n1"]]}),Tu=z({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z6116"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61n3"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61n1"],[{isSelected:!1,isHovered:!0},"_1yep5z61nx"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61ti _1yep5z61th _1yep5z61po _1yep5z61tf"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61tg _1yep5z61tf _1yep5z61pp"]]});var FP={xxs:8,xs:12,sm:16,md:20,lg:24},ge=nt.forwardRef((e,t)=>{let o=oe(t),{tooltipProps:r}=hr(e,o);return r?jsx(re,{...r,children:jsx(_i,{...e,ref:t})}):jsx(_i,{...e,ref:t})});ge.displayName="ToggleIconButton";var _i=nt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:d,ref:u,isFocusVisible:m,isFocused:y,isHovered:f,uiStateOptions:b}=Cr(s,l),g=useMemo(()=>typeof o=="function"?o:l.isSelected?o.selected:o.unselected,[o,l.isSelected]),_={isSelected:l.isSelected,isHovered:f,isFocusVisible:m,isDisabled:!!s.isDisabled},v=filterTruthyValues({"data-hovered":f,"data-selected":l.isSelected,"data-focus-visible":m,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":y,"data-pressed":d});return jsx("button",{...mergeProps(c,v),className:classNames(a==="toolbar"&&Tu(_),a==="primary"&&Iu(_),a==="secondary"&&Ru(_),a==="tertiary"&&wu(_),ku({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof t=="function"?t(b):t,ref:M(u,p),children:jsx(g,{size:FP[r]})})});_i.displayName="ToggleIconButtonCore";var Nu="f6jv6bm",Lu="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jm _1yep5z6jn _1yep5z6jo",oo="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Mu=z({defaultClassName:"f6jv6b0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6g1",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vi _1yep5z6vj _1yep5z6vk _1yep5z615a _1yep5z615b _1yep5z615c",false:"_1yep5z614v _1yep5z614w _1yep5z614x"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61if _1yep5z61ig _1yep5z61ih _1yep5z61j3 _1yep5z61j4 _1yep5z61j5 _1yep5z61jr _1yep5z61js _1yep5z61jt _1yep5z61kf _1yep5z61kg _1yep5z61kh _1yep5z61tp _1yep5z61tn _1yep5z61oy"]]}),_a=z({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6lk",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),Du="f6jv6bj _1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn",Eu="f6jv6bk";var Bu="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6ls _1yep5z6ln _1yep5z6ll _1yep5z6hu _1yep5z6eu",Fu=z({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lk _1yep5z6l4 _1yep5z6l7 _1yep5z6lj",variantClassNames:{isHovered:{true:"_1yep5z6120"},isDisabled:{true:"_1yep5z6z7"}},defaultVariants:{},compoundVariants:[]}),Hu="f6jv6bi _1mdhlqvb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1 _1yep5z6lm _1yep5z6ll _1yep5z6hx _1yep5z6lp",Vu="_1yep5z6js _1yep5z6jt _1yep5z6ju",Ou="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6eu _1yep5z6e3 _1yep5z6lh",Au=z({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jy _1yep5z6jz _1yep5z6k0",variantClassNames:{isInline:{true:"_1yep5z6pl _1yep5z6pm _1yep5z6pn _1yep5z617s _1yep5z617q _1yep5z6131",false:"_1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6x0 _1yep5z6x1 _1yep5z6x2 _1yep5z6xo _1yep5z6xp _1yep5z6xq _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),ju="f6jv6bl",$u="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6eu",za=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),ha="f6jv6b9 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf",Xo="f6jv6bo";var Ku=[["Toolbar Focus","Alt+F10"],["Bold","Ctrl+B"],["Italic","Ctrl+I"],["Underline","Ctrl+U"],["Select All","Ctrl+A"],["Cut","Ctrl+X"],["Copy","Ctrl+C"],["Paste","Ctrl+V"],["Undo","Ctrl+Z"],["Redo","Ctrl+Shift+Z"],["Submit","Ctrl+Enter"],["Open Help Dialog","Ctrl+Shift+H"]],{dialog:{row:Yo}}=layoutSprinkleValues,qu=({isOpen:e,onClose:t})=>{let{formatMessage:o}=F(),r=useId();return jsx(Ie,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(De,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(ue,{"aria-labelledby":r,className:Du,drawerBackground:"subtle",children:[jsxs(L,{paddingLeft:Yo.padding.horizontal.lg,paddingRight:Yo.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:Eu,children:[jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:o(Zo.help)}),jsx(E,{icon:XIcon,size:"md",variant:"secondary","aria-label":o(Zo.close),onPress:t})]}),jsx(A,{className:ju}),jsxs(L,{paddingX:Yo.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Yo.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(Zo.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(Zo.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Ku.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Yo.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:o(Zo[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==Ku.length-1&&jsx(A,{})]},a))})]})]})})})},Zo=K({toolbarFocus:{id:"toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"help",defaultMessage:"Help"},close:{id:"close",defaultMessage:"Close"},action:{id:"action",defaultMessage:"Action"},shortcut:{id:"shortcut",defaultMessage:"Shortcut"},bold:{id:"bold",defaultMessage:"Bold"},italic:{id:"italic",defaultMessage:"Italic"},underline:{id:"underline",defaultMessage:"Underline"},selectAll:{id:"selectAll",defaultMessage:"Select All"},cut:{id:"cut",defaultMessage:"Cut"},copy:{id:"copy",defaultMessage:"Copy"},paste:{id:"paste",defaultMessage:"Paste"},undo:{id:"undo",defaultMessage:"Undo"},redo:{id:"redo",defaultMessage:"Redo"},openHelpDialog:{id:"openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"submit",defaultMessage:"Submit"}});var xa=nt.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:d,saveOnEnter:u,onSave:m},y)=>{let f=nt.useRef(null),[b,g]=useControlledState(e,t||"",o),_=useCallback(R=>{g(R.currentTarget.value||"");},[g]),v=useCallback(R=>{(u&&R.key==="Enter"&&!R.shiftKey||(R.ctrlKey||R.metaKey)&&R.key==="Enter")&&(R.preventDefault(),m());},[u,m]);useImperativeHandle(y,()=>({clear:()=>{g("");}}));let h=useCallback(R=>{R.currentTarget.style.height="16px",R.currentTarget.style.height=R.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let R=f.current;R&&(R.style.height="16px",R.style.height=R.scrollHeight+"px");},[s],[b]),useImperativeHandle(c,()=>({setCaretPosition:R=>{f.current&&(f.current.focus(),f.current.setSelectionRange(R,R));},focus:()=>{f.current&&f.current.focus();}}));let{focusProps:I,isFocused:P,isFocusVisible:C}=useFocusRing(),{hoverProps:x,isHovered:T}=useHover({}),N=filterTruthyValues({"data-focus-visible":C,"data-hovered":T,"data-focused":P});return jsx("textarea",{...mergeProps(I,x,N),ref:M(f,n),className:classNames(s?Ou:[_a(),za({isInline:i}),$u]),autoFocus:d,onChange:_,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:v})});xa.displayName="PlainEditor";var er="mention",Ca="mention_input",af=nt.forwardRef(({onCancel:e,editor:t,element:o,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ka),p=useSelected(),[l,c]=useState(""),{contains:d}=useFilter({sensitivity:"base"}),{formatMessage:u}=F(),m=useMemo(()=>{let w=i.filter(B=>l===""||d(B.displayName,l)).map(B=>({id:B.id,label:B.displayName,data:B}));return s?take(w,s):w},[i,s,l,d]),y=useCallback(w=>jsx(Item,{children:w.label},w.id),[]),f=useCallback((w=!1)=>{let B=findNodePath(t,o);B&&(removeNodes(t,{at:B}),w&&focusEditor(t));},[t,o]),b=useComboBoxState({items:m,children:y,menuTrigger:"focus",onSelectionChange:w=>{f(!0),r?.(w);}}),g=nt.useRef(null),_=nt.useRef(null),v=nt.useRef(null),h=nt.useRef(null),I=useHTMLInputCursorState(_);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:P,listBoxProps:C}=useComboBox({defaultItems:m,inputRef:_,buttonRef:g,listBoxRef:v,popoverRef:h,menuTrigger:"focus","aria-label":u(vk.mention)},b);useEffect(()=>{_.current?.focus();},[]);let x=useCallback((w="manual",B=!1)=>{f(B),e?.(w,b.inputValue);},[e,f,b.inputValue]),T=useRef(p);useEffect(()=>{T.current&&!p&&x("deselect"),T.current=p;},[p,x]);let N=I?.atStart??!1,R=I?.atEnd??!1,S=useCallback(w=>{w.key==="Backspace"&&N?x("backspace",!0):w.key==="Escape"?x("escape",!0):w.key==="ArrowLeft"&&N?x("arrowLeft",!0):w.key==="ArrowRight"&&R&&x("arrowRight",!0);let B=Hotkeys.isUndo(w)&&t.history.undos.length>0,H=Hotkeys.isRedo(w)&&t.history.redos.length>0;(B||H)&&(w.preventDefault(),t[B?"undo":"redo"](),focusEditor(t));},[N,R,x,t]),k=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let w=pe(_.current),B=_.current?w?.getComputedStyle(_.current).font:void 0;return {width:B?getTextDimensions({text:b.inputValue,font:B}).width+10:"4ch"}}},[b.inputValue]);return jsxs(it.Provider,{value:b,children:[jsx("input",{...mergeProps(P,{onKeyDown:S,onBlur:()=>{x("blur",!0);},onChange:w=>{c(w.target.value);}}),style:k,className:Bu,ref:M(a,_)}),jsx(be,{triggerRef:n,className:Hu,isNonModal:!0,ref:h,state:b,children:jsx(le,{...C,items:void 0,autoFocus:"first",ref:v,className:sprinkles({width:"full"}),renderOption:sf})})]})});af.displayName="MentionInputContentElement";var Pi=withRef(({className:e,...t},o)=>{let{children:r,editor:a,element:n}=t,{items:i}=useContext(ka),s=useRef(null),[p,l]=useState(null);useEffect(()=>{let u=findNodePath(a,n);if(!u)return;let m=getPointBefore(a,u);if(!m)return;let y=createPointRef(a,m);return l(y),()=>{y.unref();}},[a,n]);let c=useCallback(()=>{let u=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),yo()&&u&&focusEditor(a);},[a]),d=useCallback(u=>{if(!u)return;let m=s.current?.getRootNode()instanceof ShadowRoot,y=i.find(b=>b.id===u);invariant(y,"User not found");let f={type:er,value:y.id,displayName:y.displayName,children:[{text:""}]};insertNodes(a,[f,{text:" "}]),m?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:o,...t,children:[jsx(af,{onCancel:(u,m)=>{u!=="backspace"&&insertText(a,"@"+m,{at:p?.current??void 0}),(u==="arrowLeft"||u==="arrowRight")&&moveSelection(a,{distance:1,reverse:u==="arrowLeft"});},onSelectionChange:d,ref:s,element:n,editor:a}),r]})});Pi.displayName="MentionInputElement";var ki=withRef(({className:e,onClick:t,children:o,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:getHandler(t,n),ref:a,...r,children:["@",n.displayName,o]})});ki.displayName="MentionElement";var nf=(e,{options:{trigger:t,triggerPreviousCharPattern:o,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===t;return e.insertText=i=>{if(!e.selection||!n(i)||r&&!r(e)){a(i);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(o?.test(s)){Pa(e);return}a(i);},e},vk=K({mention:{defaultMessage:"Mention",id:"mention"}});function pf({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("p",{children:t})})}function Dk(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}function Ek(e){return "text"in e}function Bk(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}function tr(e){if(!e)return "";function t(o){if(Ek(o)){let a=Bk(o.text);return o.bold&&(a=`<b>${a}</b>`),o.italic&&(a=`<i>${a}</i>`),o.underline&&(a=`<u>${a}</u>`),(o.color||o.backgroundColor)&&(a=`<span style="${Dk(filterTruthyValues({color:o.color||void 0,backgroundColor:o.backgroundColor||void 0}))}">${a}</span>`),a}let r=o.children?.map(tr).join("");switch(o.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${o.url}">${r}</a>`;case er:return `<span data-user-id="${o.value}">${o.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(o=>t(o)).join(""):t(e)}function Fk(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(t=>t.split(":").map(o=>o.trim())).map(([t,o])=>[camelCase(t),o]))):{}}function Si(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let t=new DOMParser().parseFromString(cf.default.sanitize(e),"text/html"),o=t.querySelectorAll("[style]");for(let a of o)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=t.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
53
- `:"<p>";return mf(t.body)}function mf(e,t){if(e.nodeType===Node.TEXT_NODE)return jsx$1("text",t,e.textContent);if(e.nodeType!==Node.ELEMENT_NODE)return null;let o={...t};switch(e.nodeName.toUpperCase()){case"B":{o.bold=!0;break}case"I":{o.italic=!0;break}case"EM":{o.italic=!0;break}case"U":{o.underline=!0;break}case"SPAN":{let a=Fk(e.getAttribute("style")||"");a["text-decoration"]==="underline"&&(o.underline=!0),a.color&&(o.color=a.color),a.backgroundColor&&(o.backgroundColor=a.backgroundColor);break}}let r=[...e.childNodes].flatMap(a=>mf(a,o));switch(r.length===0&&r.push(jsx$1("text",o,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",t,`
54
- `);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:er,value:a,displayName:e.textContent},{text:""}):r}case"P":return jsx$1("element",{type:ELEMENT_PARAGRAPH},r);case"A":return jsx$1("element",{type:ELEMENT_LINK,url:e.getAttribute("href")},r);default:return r}}function uf(e){let t=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[o]=t||[{url:""}];return o?.url}function Pa(e){let t={children:[{text:" "}],type:Ca};e.insertNode(t);}var Hk=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:er,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:Ca}],withOverrides:nf}),ff=createPlugins([createParagraphPlugin({component:pf}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:yf}),Hk({component:ki})],{components:{[Ca]:Pi}});var _f=({isDisabled:e})=>{let{formatMessage:t}=F(),o=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:jsx(E,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(ft.addLink),className:oo,preventFocusOnPress:!0})}),jsx(Re,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(ue,{size:"content",style:{minWidth:240},children:jsx(qk,{close:()=>{r(),setTimeout(()=>{focusEditor(o,o.selection);},0);}})})})]})},qk=({close:e})=>{let t=useEditorRef(),{formatMessage:o}=F(),r=useEditorSelector(l=>uf(l),[]),[a,n]=nt.useState(r?"show":"add"),[i,s]=nt.useState(r||""),p=jsx(L,{padding:"lg",children:jsx(Xe,{label:o(ft.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(L,{display:"flex",justifyContent:"flex-end",padding:"lg",className:Nu,children:jsx(G,{isDisabled:!isUrl(i,!0),label:o(ft.addLink),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(L,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(G,{label:o(ft.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(G,{label:o(ft.removeLink),size:"sm",onPress:()=>{unwrapLink(t),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(G,{label:o(ft.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(G,{label:o(ft.save),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function yf({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("a",{className:Ar({size:"sm"}),children:t})})}var ft=K({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 Wk=parseColor("#ffffff00").toString("hexa"),Ni=[{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"}];[...Ni,{label:"Transparent",color:Wk}];var Ra=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(ge,{variant:"tertiary",isSelected:a,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},Mi=({nodeType:e,"aria-label":t,isDisabled:o})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:p,triggerProps:l})=>jsx(E,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":t,size:"md",variant:"popover",isDisabled:o,className:oo,preventFocusOnPress:!0,...l,ref:p}),[e,t,o]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Qt,{presets:Ni,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:o})};var P0=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ka=nt.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Bi=nt.forwardRef(({value:e,defaultValue:t,onChange:o,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:d,editorHandle:u,maxMentionableUsersSuggestions:m,autoFocus:y,editorRef:f,saveOnEnter:b,onSave:g},_)=>{let v=useRef(null),h=useId(),{formatMessage:I}=F(),P=useRef(null),C=P.current,x=useRef(null),T=useMemo(()=>C?.getRootNode()instanceof ShadowRoot,[C]),[N,R]=useControlledState(e?Si(e):void 0,Si(t||"<p></p>"),w=>{o&&o(tr(w));}),{keyboardProps:S}=useKeyboard({onKeyDown:w=>{(b&&w.key==="Enter"&&!w.shiftKey||(w.ctrlKey||w.metaKey)&&w.key==="Enter")&&(w.preventDefault(),g()),w.altKey&&w.key==="F10"?(w.preventDefault(),v.current&&v.current.querySelector("button")?.focus()):w.continuePropagation(),yo()&&T&&x.current&&focusEditor(x.current);}});useEffect(()=>{s&&x.current&&deselect(x.current);},[s]),useImperativeHandle(_,()=>({startMention:()=>{x.current&&!P.current?.querySelector("input[role='combobox']")&&Pa(x.current);}})),useImperativeHandle(u,()=>({setCaretPosition:w=>{x.current&&(focusEditor(x.current),moveSelection(x.current,{distance:w,unit:"character"}));},focus:()=>{x.current&&focusEditor(x.current);}}));let k=useMemo(()=>({items:d||[],containerRef:l,maxMentionableUsersSuggestions:m}),[d,l,m]);return jsx(ka.Provider,{value:k,children:jsxs(Plate,{initialValue:N||P0,plugins:ff,editorRef:M(x,f||null),onChange:w=>{R(w);},children:[jsxs(va,{className:ha,"aria-controls":h,ref:v,children:[jsxs(L,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(Ra,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:I(io.bold),isDisabled:s}),jsx(Ra,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:I(io.italic),isDisabled:s}),jsx(Ra,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:I(io.underline),isDisabled:s})]}),jsx(A,{orientation:"vertical",className:Xo}),jsx(Mi,{nodeType:MARK_COLOR,"aria-label":I(io.fontColor),isDisabled:s}),jsx(A,{orientation:"vertical",className:Xo}),jsx(Mi,{nodeType:MARK_BG_COLOR,"aria-label":I(io.backgroundColor),isDisabled:s}),jsx(A,{orientation:"vertical",className:Xo}),jsx(_f,{isDisabled:s}),jsx(A,{orientation:"vertical",className:Xo}),jsx(E,{className:oo,icon:QuestionmarkCircleIcon,size:"sm","aria-label":I(io.help),onPress:c})]}),jsx(A,{variant:"secondary"}),jsx("div",{...S,ref:P,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:y,spellCheck:a,"aria-label":p,className:classNames(_a({isDisabled:s}),za({isInline:i})),renderPlaceholder:({attributes:w,children:B})=>jsx("span",{...w,className:sprinkles({paddingY:"lg"}),children:B})})})]})})});Bi.displayName="RichEditor";var sf=({key:e,value:t},{isDisabled:o,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:o}),{label:p,data:l}=t;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:Fu({isDisabled:o,isHovered:a}),"data-active":a,ref:i,children:[jsx(Xt,{name:p,...l?.avatar}),jsxs(L,{display:"flex",flexDirection:"column",children:[jsx(Q,{type:"subtitle",size:"sm",children:p}),jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(A,{})]})},io=K({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 kf=nt.memo(nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":d,"aria-describedby":u,"aria-labelledby":m,"aria-details":y,editableContentAriaLabel:f="Editing Area",footerButtons:b,clearOnCancel:g,clearOnSave:_,...v},h)=>{let I=useRef(null),{formatMessage:P}=F(),C=useRef(null),x=useRef(null),T=useRef(null),N=!a&&v.variant==="minimal",R=useRef(null),[S,k]=nt.useState(v.value||v.defaultValue),w=v.isDisabled||v.isSaveDisabled||!getPlainText(S||""),{fieldProps:B}=useLabel({"aria-label":d,"aria-labelledby":m,"aria-describedby":u,"aria-details":y,labelElementType:"div"});N&&!v.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let H=useCallback(()=>{k(""),a?I.current?.reset():x.current?.clear();},[a]),D=useCallback(()=>{w||(i?.(a?tr(I.current?.children):C.current.value),_&&H());},[H,_,a,i,w]),q=jsx(E,{variant:"ghost","aria-label":l||P(Hi.save),icon:p,isDisabled:w,size:"md",excludeFromTabOrder:N,className:N?Vu:void 0,onPress:D,preventFocusOnPress:!0}),[j,$]=nt.useState(!1),{keyboardProps:V}=useKeyboard({onKeyDown:O=>{(O.metaKey||O.ctrlKey)&&O.shiftKey&&O.key==="h"&&(O.preventDefault(),$(!0));}}),J=useCallback(O=>{k(O),v.onChange?.(O);},[v]);return jsxs("div",{...mergeProps(B,a?V:{}),role:"application",ref:M(T,h),style:t,"data-block-id":o,"data-block-class":r,className:classNames(Mu({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":v.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx(Xt,{className:Lu,name:v.avatarName||""}):null,jsxs("div",{className:Au({isInline:s}),children:[jsx(xa,{isMinimal:N,textBoxRef:C,isInline:s,editableContentAriaLabel:f,...v,onChange:J,onSave:D}),q]})]}):jsxs(Fragment,{children:[a?jsx(Bi,{containerRef:T,ref:R,editorRef:I,isInline:s,editableContentAriaLabel:f,onHelpDialogOpenRequest:()=>{$(!0);},...v,onChange:J,onSave:D}):jsxs(Fragment,{children:[!s&&jsx(A,{variant:"secondary"}),jsx(xa,{onCancel:n,textBoxRef:C,ref:x,isInline:s,editableContentAriaLabel:f,...v,onChange:O=>{k(O),v.onChange?.(O);},onSave:D})]}),jsx(A,{variant:"secondary"}),jsxs("div",{className:classNames(ha,sprinkles({justifyContent:"space-between"})),children:[jsxs(L,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&v.mentionableUsers?jsx(E,{icon:AtIcon,size:"sm","aria-label":P(Hi.mention),onPress:()=>R.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:O,props:Z},X)=>O==="action"?jsx(E,{...Z,size:"sm",isDisabled:v.isDisabled||Z.isDisabled},X):jsx(ge,{...Z,size:"sm",variant:"tertiary",isDisabled:v.isDisabled||Z.isDisabled},X))]}),jsxs(L,{children:[!!n&&jsx(E,{variant:"secondary",icon:XCircleFilledIcon$1,isDisabled:v.isDisabled,size:"md",onPress:()=>{n(),g&&H();},"aria-label":c||P(Hi.cancel)}),q]})]})]}),jsx(qu,{isOpen:j,onClose:()=>{$(!1);}})]})}));kf.displayName="Editor";var Hi=K({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var Ta=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),d=animated[s];return c((u,m)=>m&&jsx(d,{className:e,"data-block-id":o,"data-block-class":r,style:{...t,...u},...p,ref:l,children:n}))});Ta.displayName="Transition";var If="_8kqf970 _1yep5z6pi _1yep5z6pj _1yep5z6pk _1yep5z614j _1yep5z614k _1yep5z614l _1yep5z614s _1yep5z614t _1yep5z614u _1yep5z615a _1yep5z615b _1yep5z615c _1yep5z6z3 _1yep5z6vc _1yep5z6vd _1yep5z6ve _1yep5z617g";var wf=2,Tf=nt.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=nt.useRef(null),d=useInteractionModality(),[u,m]=nt.useState(!1),y=useCallback(()=>{let N=r?.current||me(c.current).body;return pe(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+wf>=0:N.scrollTop+N.clientHeight+wf>=N.scrollHeight},[r]),[f,b]=nt.useState(y),g=St(),{buttonProps:_,isPressed:v}=useButton({onPress:()=>{let N=r?.current||me(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:h,isFocused:I,isFocusVisible:P}=useFocusRing(),{hoverProps:C,isHovered:x}=useHover({}),T=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":v,"data-focus-visible":P,"data-hovered":x,"data-focused":I});return useEffect(()=>{b(y());},[y]),useEffect(()=>{let N=r?.current||me(c.current).body,R="onscrollend"in pe(N),S=()=>{setTimeout(()=>{m(!1),b(y());},n);},k=()=>{m(!0),R||S();};return N.addEventListener("scroll",k),N.addEventListener("scrollend",S),()=>{N.removeEventListener("scroll",k),N.removeEventListener("scrollend",S);}},[r,n,y]),jsxs(Ta,{isMounted:(o?d!=="keyboard":!0)&&!u&&!f,elementType:"button",transitions:{from:{opacity:0,transform:"translateX(-50%) translateY(10px)"},enter:{opacity:1,transform:"translateX(-50%) translateY(0)"},leave:{opacity:0,transform:"translateX(-50%) translateY(10px)"},immediate:g},...mergeProps(_,h,C,T),className:classNames(If,Gr({isFocusVisible:P,variant:"high-contrast",isHovered:x}),Wr({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:t,ref:M(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:No({variant:"high-contrast"})}),a]})});Tf.displayName="ScrollControlButton";var Oi="_1yep5z6jy _1yep5z6jz _1yep5z6k0 _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",Sf=z({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6m0 _1yep5z6m1 _1yep5z6m2 _1yep5z6oi _1yep5z6oj _1yep5z6ok"},hasNoCloseBtn:{true:"_1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oi _1yep5z6oj _1yep5z6ok _1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6nc _1yep5z6nd _1yep5z6ne"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61hf _1yep5z61hg _1yep5z61hh"]]}),Nf="_1v0p2z10";var Na=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:d=!0,onPrimaryAction:u,onCancel:m,autoFocusButton:y,isPrimaryActionDisabled:f},b)=>{let g=useId(),{formatMessage:_}=F(),v=n&&jsx(Q,{id:g,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(ue,{className:e,style:t,"data-block-id":o,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":g,children:[jsxs("div",{className:Sf({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!d}),children:[jsxs(L,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&v,d?jsx(E,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(Q0.close),onPress:m}):null]}),l?v:null]}),a?jsx(L,{elementType:"section",className:Nf,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(L,{paddingX:"lg",paddingBottom:"lg",children:jsx(Xe,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(A,{}),jsxs(L,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(G,{variant:"secondary",className:Oi,label:s,onPress:m,autoFocus:y==="cancel"}):null,i?jsx(G,{className:Oi,label:i,onPress:u,autoFocus:y==="primary",isDisabled:f}):null]})]}):null]})});Na.displayName="AlertDialog";var Q0=K({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var Lf="_1t55bp71",Mf="_1yep5z6e3 _1yep5z6eu _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z69i _1yep5z69j _1yep5z69k",Df="_1t55bp70";var aI=rI(),Ef=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=o;return (!o||Array.isArray(o)&&o.length===0)&&(p=""),aI.render(p)},[o]);return jsx("div",{className:classNames(Mf,Df,{[Lf]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:t,ref:i,dangerouslySetInnerHTML:{__html:s}})});Ef.displayName="Markdown";function Vf(e){let{formatMessage:t,locale:o}=F(),[r,a]=nt.useState(!1),[n,i]=nt.useState(0),[s,p]=nt.useState(0),[l,c]=nt.useState(!1);useEffect(()=>{if(!e.current)return;let m=e.current,y=()=>{a(!1),i(0);},f=()=>{l||i(m.currentTime*100/m.duration);},b=()=>{p(m.duration);};return m.addEventListener("ended",y),m.addEventListener("timeupdate",f),m.addEventListener("loadedmetadata",b),()=>{m.removeEventListener("ended",y),m.removeEventListener("timeupdate",f),m.removeEventListener("loadedmetadata",b);}},[l,e]);let d=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(t(Ff.playing),"polite")):(e.current.pause(),a(!1),announce(t(Ff.paused),"polite"))))();},[t,e]),u=useCallback(m=>{e.current&&(e.current.currentTime=m*e.current.duration/100,announce(sI(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:d,seek:u,setProgress:i,formattedCurrentTime:e.current?.currentTime?Hf(e.current?.currentTime):"00:00",formattedDuration:s?Hf(s):"00:00",setIsSliderDragging:c}}var Ff=K({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function sI(e,t){let o=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...o&&{hours:o},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(t,{style:"long"}).format(n)}function Hf(e){let t=Math.floor(e%3600/60),o=Math.floor(e%60);return [t,o].map(r=>r.toString().padStart(2,"0")).join(":")}var Of="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q",Af="rta2n91 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6zv _1yep5z6vf _1yep5z6vg _1yep5z6vh _1yep5z617e _1yep5z610s",jf="rta2n90";var Kf=nt.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=nt.useRef(null),{isPlaying:l,progress:c,duration:d,togglePlay:u,seek:m,formattedDuration:y,formattedCurrentTime:f,setProgress:b,setIsSliderDragging:g}=Vf(p),{formatMessage:_}=F(),v=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":d>0});return jsxs("div",{...v,...i,className:classNames(Of,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:I})=>jsx("source",{src:h,type:I},h))})}),jsx(ge,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:o,"aria-label":_(l?ji.pause:ji.play),style:{borderRadius:"50%"},onPress:u}),jsxs("div",{className:Af,children:[jsx("span",{"aria-hidden":!0,children:f}),jsx(Ft,{"aria-label":_(ji.audioTimeline),value:c,minValue:0,maxValue:100,className:jf,onChange:h=>{b(h),g(!0);},onChangeEnd:h=>{m(h),g(!1);}}),jsx("span",{"aria-hidden":!0,children:y})]})]})});Kf.displayName="AudioPlayer";var ji=K({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var qf="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6ia _1yep5z6ib _1yep5z6ic",Gf="_1w920rn1 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69i _1yep5z69j _1yep5z69k",Wf="_1w920rn0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6l8",Ma=z({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{isFocusVisible:{true:"_1yep5z6ln _1yep5z6ll _1yep5z6hu"},isSelected:{true:"_1yep5z6ln _1yep5z6ll _1yep5z6hu"},isLoading:{true:"_1yep5z6164 _1yep5z6165 _1yep5z6166"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn6 _1yep5z6ln _1yep5z6ll _1yep5z6hu"]]}),Xf="_1w920rnb _1yep5z6li",Yf=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 _1yep5z6ln _1yep5z6ll _1yep5z6hu"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rna _1yep5z61tg _1yep5z61tf _1yep5z61pp"]]}),Zf="_1w920rnc";var Da=({items:e,ulRef:t,containerClassName:o,previewClassName:r,itemDataAttribute:a,showCount:n=!1})=>{let{length:i}=e,s=nt.useRef(null);return useLayoutEffect(()=>{if(!s.current)return;let p=s.current.closest(o)?.querySelector(`[${a}='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(p,"Node is not defined."),s.current?.prepend(p);},[e,t,o,a]),jsx("div",{className:r,ref:s,children:n&&i>1?jsx(L,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:Zf,children:i}):null})};function Jf(e,t){return e.find(o=>o.id===t)}function ey(e,t,o){let r=e.findIndex(i=>i.id===t),a=[...o].map(i=>e.findIndex(s=>s.id===i)),n=[...e];for(let i of a){let[s]=n.splice(i,1);n.splice(r,0,s);}return n}function ty(e,t,o){let r=e.findIndex(s=>s.id===t),a=[...o].map(s=>e.findIndex(p=>p.id===s)),n=[...e],i=0;for(let s of a){let[p]=n.splice(s-i,1);n.splice(r,0,p),i++;}return n}function $i(e){return e.map(t=>({id:t.id,label:t.label,data:{src:t.src,alt:t.alt}}))}function Ea(e){return e.map(t=>({id:t.id,label:t.label,src:t.data?.src,alt:t.data?.alt}))}var CI=({fit:e,item:t,deleteElement:o})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:n,isLoaded:i}=Tt({src:t.data?.src,alt:t.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(Kt,{"aria-label":r(ar.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Xf,children:o}))},oy=({item:e,options:{optionProps:t,isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i},liRef:s,fit:p="contain",onDelete:l,className:c,imageClassName:d,imageLabelClassName:u,imageDimensions:m,style:y,renderImage:f=(b,{deleteElement:g})=>jsx(CI,{item:b,deleteElement:g,fit:p})})=>{let b=useId(),{formatMessage:g}=F(),{value:_}=e;invariant(_&&Oe(_),"Expected value to be a list option");let v=l?jsx("div",{className:qf,children:jsx(E,{"aria-label":g(ar.delete),size:"xs",icon:XIcon$2,onPress:()=>{l(_.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,h=Ea([_])[0],I=useCallback(C=>{let x={},T=typeof C=="function"?C(h,{isSelected:r}):C;return T&&(x.width=typeof T.width=="string"?Ki[T.width]:T.width,x.aspectRatio="height"in T?`${x.width} / ${T.height}`:T?.aspectRatio?.toString()),x},[h,r]),P=useMemo(()=>({isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i}),[o,r,a,n,i]);return jsxs("li",{...t,ref:s,className:classNames(Gf,Ae(c,h,P)),"aria-labelledby":b,style:ur(y,h,P),children:[jsx(L,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(Ma({isFocusVisible:o,isSelected:r,isLoading:!0}),Ae(d,h,P)),style:I(m),"data-image-key":_.id,children:f(_,{deleteElement:v??void 0,onDelete:l})})}),jsx("span",{id:b,className:classNames(Yf({isFocusVisible:o,isSelected:r}),Ae(u,h,P)),children:_.label})]})};var SI={width:0,display:"block"};var Ki=(o=>(o[o.sm=102]="sm",o[o.md=170]="md",o))(Ki||{}),ny=nt.forwardRef(({className:e,style:t,fit:o="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:d,imageContainerClassName:u,imageClassName:m,labelClassName:y,onListChange:f,renderImage:b,imageDimensions:g={width:s,aspectRatio:p},imageContainerStyle:_,...v},h)=>{let I=nt.useRef(null),[P,C]=useState([]),{formatMessage:x}=F();useEffect(()=>{(p||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,p]);let[T,N]=useControlledState(v.selectedKeys,v.defaultSelectedKeys??[],v.onSelectionChange),[R,S]=useControlledState(l?$i(l):void 0,$i(c),f?D=>{f?.(Ea(D));}:void 0),k=useCallback(D=>{let q=D.target.key,j=D.keys;if(D.target.dropPosition==="before"){let $=ey(R,q,j);S($);}else if(D.target.dropPosition==="after"){let $=ty(R,q,j);S($);}r?.(D);},[R,r,S]),w=useCallback(()=>{i&&P.length&&(S(R.filter(D=>!P.includes(D.id))),i(new Set(P)),C([]));},[P,R,i,S]),B=useCallback((D,q,j)=>{let{value:$}=D;invariant(Oe($));let V={id:$.id,label:$.label,src:$.data?.src,alt:$.data?.alt};return jsx(oy,{item:D,options:q,liRef:j,fit:o,onDelete:i?J=>{C([J]);}:void 0,renderImage:b,className:Ae(u,V,q),imageClassName:m,imageLabelClassName:y,imageDimensions:g,style:_})},[o,i,b,u,m,y,g,_]),{keyboardProps:H}=useKeyboard({onKeyDown(D){if(d?.(D),D.key==="Backspace"||D.key==="Delete"){if(!i)return;if([...T].length)C([...T]);else {let j=D.target.dataset.key;C([j]);}}}});return jsxs("div",{...H,ref:h,style:t,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(le,{...v,selectedKeys:T,items:R,onReorder:k,layout:"grid",orientation:"vertical",className:Wf,ref:I,dropIndicatorStyle:SI,renderOption:B,renderDragPreview:D=>jsx(Da,{items:D,ulRef:I,containerClassName:".BaselineUI-ImageGallery",previewClassName:Ma(),itemDataAttribute:"data-image-key",showCount:!0}),onSelectionChange:N,getItems:D=>[...D].map(q=>{let j=Jf(R,q);return {src:j?.src||"",alt:j?.alt||"",key:q}})}),jsx(Ie,{isOpen:!![...P].length,onOpenChange:D=>{D||C([]);},children:jsx(De,{isDismissable:!0,children:jsx(Na,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:x(ar.delete),cancelLabel:x(ar.cancel),onCancel:()=>{C([]);},onPrimaryAction:w,autoFocusButton:"cancel"})})})]})});ny.displayName="ImageGallery";var ar=K({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var iy="_1sexph00",sy="_1sexph01 _1yep5z617x _1yep5z617y _1yep5z617z _1yep5z61a9 _1yep5z61aa _1yep5z61ab _1yep5z61bf _1yep5z61bg _1yep5z61bh _1yep5z6193 _1yep5z6194 _1yep5z6195 _1yep5z61ry _1yep5z61rz _1yep5z61s0";var cy=nt.forwardRef(({className:e,style:t,items:o,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:d,defaultSelected:u,onButtonSelectionChange:m,moreAriaLabel:y,optionStyle:f,optionClassName:b,triggerClassName:g,triggerStyle:_,tooltipProps:v,...h},I)=>{let{formatMessage:P}=F(),C=ae(),x=useSelectState({items:o,...h,defaultSelectedKey:h.defaultSelectedKey||o?.[0]?.id,children:C,validationState:h.validationState==="error"?"invalid":"valid"}),[T,N]=useControlledState(d,!!u,V=>{m?.({isSelected:V,selectedKey:x.selectedKey});}),{hoverProps:R,isHovered:S}=useHover({isDisabled:s}),k=useMemo(()=>{let V=x.collection.getItem(x.selectedKey),J=V?.textValue||V?.["aria-label"],O=V?.value,Z=O?.icon,X={size:i,isSelected:T,onPress:Ce=>{N(!T),c?.(Ce);},isDisabled:s,excludeFromTabOrder:l,className:typeof b=="function"?b(O,{isButton:!0,isSelected:T}):b,style:typeof f=="function"?f(O,{isButton:!0,isSelected:T}):f};return n&&Z?jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:J,placement:"bottom start",offset:4,...typeof v=="function"?v("button"):v,children:jsx(ge,{icon:Z,"aria-label":J,variant:"toolbar",...X})}):jsx(Kr,{iconStart:Z,label:J,variant:"toolbar",...X})},[l,n,T,s,c,b,f,N,i,x.collection,x.selectedKey,v]),w=h["aria-label"],B=useCallback(({buttonProps:V,ref:J})=>{delete V["aria-labelledby"];let O=y||`${P(VI.more)} ${w}`;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:O,placement:"bottom start",offset:4,...v,children:jsx(PressResponder,{...V,children:jsx(E,{"aria-label":O,ref:J,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:Z})=>classNames(Ur({isSelected:T,isFocusVisible:Z}),sy,g),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[w,l,P,T,s,y,i,v,g,_]),H=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":S,"data-selected":T,"data-disabled":s,"data-expanded":x.isOpen}),D=oe(I),q=useMemo(()=>({state:x,popoverAnchorRef:D}),[x,D]),j=useCallback(V=>typeof b=="function"?b(V,{isButton:!1,isSelected:x.selectionManager.isSelected(V.id)}):b,[b,x.selectionManager]),$=useCallback(V=>typeof f=="function"?f(V,{isButton:!1,isSelected:x.selectionManager.isSelected(V.id)}):f,[f,x.selectionManager]);return jsx(Yr.Provider,{value:q,children:jsxs(L,{...R,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(iy,"BaselineUI-ButtonSelect",e),"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],"aria-describedby":h["aria-describedby"],"aria-details":h["aria-details"],style:t,ref:D,...H,children:[k,jsx(Qe,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:o,...h,style:{width:20},optionClassName:j,optionStyle:$,variant:"ghost",renderTrigger:B})]})})});cy.displayName="ButtonSelect";var VI=K({more:{id:"more",defaultMessage:"More"}});var dy=z({defaultClassName:"_18v88n10 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6lh",variantClassNames:{labelPosition:{top:"_1yep5z614v _1yep5z614w _1yep5z614x",start:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z616a _1yep5z616b _1yep5z616c _1yep5z6vf _1yep5z6vg _1yep5z6vh"}},defaultVariants:{},compoundVariants:[]}),my=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6lh _1yep5z6ls _1yep5z6lk _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z610v"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),uy=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6le",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z610b",warning:"_1yep5z610j"},isReadOnly:{true:"_1yep5z6112"}},defaultVariants:{},compoundVariants:[]}),fy=z({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6lv _1yep5z6lt _1yep5z6h4 _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z612k",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z617s _1yep5z617q _1yep5z612y _1yep5z617j _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z613r"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61tp _1yep5z61tn _1yep5z61oy"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61oz"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61oz"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),yy=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),by=z({defaultClassName:"_18v88n19 _1yep5z6ip _1yep5z6iq _1yep5z6ir",variantClassNames:{labelPosition:{top:"_1yep5z6t3 _1yep5z6t4 _1yep5z6t5",start:"_1yep5z6n0 _1yep5z6n1 _1yep5z6n2 _1yep5z614v _1yep5z614w _1yep5z614x"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61s1 _1yep5z61s2 _1yep5z61s3"]]}),gy=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lk",variantClassNames:{isFocusVisible:{true:"_1yep5z6121 _1yep5z6143 _1yep5z617h"},isHovered:{true:"_1yep5z6121 _1yep5z6143 _1yep5z617h"},isOpen:{true:"_1yep5z6143 _1yep5z617h"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61ny _1yep5z61q0 _1yep5z61te"],[{isHovered:!0},"_1yep5z61ny _1yep5z61q0 _1yep5z61te"],[{isOpen:!0},"_1yep5z61q0 _1yep5z61te"]]});function vy({allowsCustomValue:e,onValueChange:t,inputValue:o},r,a,n,i){let[s,p]=useState(null),l=useRef(!1);useEffect(()=>{if(!t)return;let d=a.current,u=m=>{p(m.target);};return d?.addEventListener("focusin",u),()=>{d?.removeEventListener("focusin",u);}},[t,a,r.selectedKey]),useGranularEffect(()=>{r.selectedKey&&(t?.({value:r.selectedItem?.textValue,key:r.selectedKey}),l.current=!1);},[r.selectedKey],[t,r.selectedItem]),useInteractOutside({ref:n,isDisabled:!t,onInteractOutside:d=>{!i.current?.contains(d.target)&&s===n.current&&e&&l.current&&(t?.({value:n.current?.value,key:null}),l.current=!1);}}),useEffect(()=>{if(!t)return;let d=n.current,u=()=>{l.current=!0;};return d?.addEventListener("input",u),()=>{d?.removeEventListener("input",u);}},[n,t]),useEffect(()=>{l.current=!1;},[o]);let{keyboardProps:c}=useKeyboard({isDisabled:!t,onKeyDown:d=>{e&&d.key==="Enter"&&l.current?(t?.({value:n.current?.value,key:null}),l.current=!1):d.key==="Escape"&&r.close(),d.continuePropagation();}});return {inputProps:c}}var hy=nt.forwardRef(({className:e,style:t,inputStyle:o,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:d=!1,labelPosition:u="top",validationState:m="valid",variant:y="primary",toggleLabel:f,renderOption:b,showIcon:g=!0,filter:_,minValue:v,maxValue:h,inputType:I="text",onInputSubmit:P,onValueChange:C,...x},T)=>{let N=useObjectRef(T),{contains:R}=useFilter({sensitivity:"base"}),S=ae(),k=useComboBoxState({...x,defaultFilter:_||R,defaultItems:s,onSelectionChange:l,onInputChange:c,children:S,validationState:d?"invalid":"valid"}),w=nt.useRef(null),B=nt.useRef(null),H=nt.useRef(null),D=nt.useRef(null),q=nt.useRef(null),{inputProps:j}=vy({onValueChange:C,allowsCustomValue:x.allowsCustomValue,inputValue:x.inputValue},k,N,B,D),{buttonProps:$,inputProps:V,listBoxProps:J,labelProps:O,errorMessageProps:Z,descriptionProps:X,validationErrors:Ce}=useComboBox({...x,inputRef:B,defaultItems:s,buttonRef:w,listBoxRef:H,popoverRef:D,validationState:m==="error"?"invalid":"valid"},k),Pe=x.errorMessage||Ce.join(" "),ye=ke({...x,errorMessage:Pe,descriptionProps:X,errorMessageProps:Z,labelPosition:u});Pe&&(m="error");let{hoverProps:Te,isHovered:He}=useHover({isDisabled:x.isDisabled}),{isFocused:te,focusProps:de,isFocusVisible:_t}=useFocusRing(),zt=jt({isReadOnly:x.isReadOnly,validationState:m}),uo=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":m,"data-focused":te,"data-focus-visible":_t}),{labelProps:ht,fieldProps:Y}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]}),{keyboardProps:U}=useKeyboard({onKeyDown:W=>{x.allowsCustomValue&&W.key==="Enter"&&P?.(V.value?.toString()??"");}}),{focusProps:ne}=useFocus({onBlur:()=>{x.allowsCustomValue&&V.value&&P?.(V.value?.toString()??"");}});return jsx(it.Provider,{value:k,children:jsxs("div",{className:classNames(dy({labelPosition:u}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:t,ref:N,children:[i||u==="start"&&ye?jsxs("div",{className:by({labelPosition:u,hasMessage:!!ye}),children:[jsx("label",{...mergeProps(O,ht),className:yy({isDisabled:x.isDisabled}),children:i}),u==="start"&&ye]}):null,jsxs("div",{...Te,className:fy({validationState:m,isHovered:He,isFocused:te,variant:y,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:q,children:[jsx("input",{...mergeProps(V,j,de,uo,Y,ne,U,I==="number"?{type:"number",min:v,max:h,onKeyDown:W=>{(W.key==="ArrowUp"||W.key==="ArrowDown")&&W.preventDefault();}}:null),ref:B,className:classNames(my({isDisabled:x.isDisabled,labelPosition:u}),"BaselineUI-ComboBox-Input",r),style:o}),zt&&g?jsx(zt,{className:uy({validationState:m,isReadOnly:x.isReadOnly}),size:16}):null,jsx(G,{...$,ref:w,variant:"popover",label:f,className:gy({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&_t,isHovered:!x.isDisabled&&!x.isReadOnly&&He,isOpen:k.isOpen})})]}),jsx(be,{className:We,ref:D,triggerRef:q,state:k,children:jsx(le,{...J,items:s,ref:H,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:Hr})}),u==="top"&&ye]})})});hy.displayName="ComboBox";var xy=z({defaultClassName:"byycd01 _1yep5z6d6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{},defaultVariants:{},compoundVariants:[]});var Zi=nt.forwardRef(({enableReorder:e,...t},o)=>e?jsx(Cy,{ref:o,...t}):jsx(Qi,{ref:o,...t}));Zi.displayName="GridListItem";var Qi=nt.forwardRef(({item:e,state:t,dropState:o,renderGridItem:r,dragHandleProps:a},n)=>{let i=oe(n),s=useGridListItem({node:e},t,i),p=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:l}=useGridListSelectionCheckbox({key:e.key},t),c={...s,checkBoxProps:p?l:void 0,dragHandleProps:a};return jsxs("div",{"data-grid-list-item-key":e.key,children:[o?jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"before"},dropState:o}):null,r?r(e,c,i):null,o&&t.collection.getKeyAfter(e.key)==null?jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"after"},dropState:o}):null]},e.key)});Qi.displayName="BaseGridListItem";var Cy=nt.forwardRef(({dragState:e,item:t,...o},r)=>{let a=useDraggableItem({key:t.key,hasDragButton:!0},e);return jsx(Qi,{item:t,dragHandleProps:a,ref:r,...o})});Cy.displayName="DraggableGridListItem";var mR=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},ky=nt.forwardRef(({className:e,style:t,isEditing:o=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,onReorder:i,enableReorder:s=!1,layout:p="stack",orientation:l="vertical",renderGridItem:c,...d},u)=>{let m=ae(),y=useListState({...d,children:m}),f=nt.useRef(null),b=oe(u),{gridProps:g}=useGridList(d,y,b);gr({handle:n,type:"gridlist"},y,b);let{collectionProps:_,dragState:v,dropState:h}=mr({...d,onReorder:i,enableReorder:s,layout:p,orientation:l,preview:f,getItems:C=>[...C].map(x=>{let T=y.collection.getItem(x);return invariant(T,"Expected item to be defined."),{key:T.key.toString()}})},y,b),I=o?mR:g.onKeyDownCapture,P={state:y,dragState:v,dropState:h,enableReorder:s,renderGridItem:c};return jsxs("ul",{...mergeProps(g,_),className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:t,ref:b,"aria-rowcount":y.collection.size,onKeyDownCapture:I,children:[[...y.collection].map(C=>jsx(Zi,{item:C,...P},C.key)),s?jsx(DragPreview,{ref:f,children:C=>jsx(Da,{items:C,ulRef:b,containerClassName:".BaselineUI-GridList",previewClassName:xy(),itemDataAttribute:"data-grid-list-item-key"})}):null]})});ky.displayName="GridList";var Iy="_1yep5z6f5",Ry="_1dc3b8m0";var wy=nt.forwardRef(({className:e,selectionMode:t,style:o,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...p},l)=>{let c=oe(l),d=ae(),u=useListState({...p,selectionMode:t,suppressTextValueWarning:!0,children:d}),{actionGroupProps:m}=useActionGroup({...p,selectionMode:t,children:d},u,c),y=[...u.collection].map(f=>(invariant(f.value),jsx(hR,{item:f,state:u,isDisabled:p.isDisabled,onAction:p.onAction,tooltipProps:n,renderActionItem:s},f.key)));return i?jsxs(L,{...m,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:[jsx(i,{size:24,className:Iy}),jsx(L,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:y})]}):jsx(L,{...m,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:y})});wy.displayName="ActionGroup";var hR=({item:e,state:t,tooltipProps:o,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},t),s=n||t.selectionManager.isDisabled(e.key),p=t.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof o=="function"?o(e.value):o),[o,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(re,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(E,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[Ry]:p},"BaselineUI-ActionGroup-Item")})})})};var Ty="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",Sy="_1yep5z61qp _1yep5z61qq _1yep5z61qr _1yep5z61h9 _1yep5z61ha _1yep5z61hb";var Ly=nt.forwardRef(({className:e,style:t,items:o,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:d,labelPosition:u="top","data-block-id":m,"data-block-class":y,shouldFocusWrap:f,tooltip:b=!0,...g},_)=>{let v=useMemo(()=>o.map(I=>({id:I.color,label:I.label})),[o]),h=useId();return useEffect(()=>{!a&&!g["aria-label"]&&!g["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,g]),jsxs(L,{...$a(g),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":m,"data-block-class":y,display:"flex",flexDirection:u==="top"?"column":"row",alignItems:u==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:t,ref:_,children:[n||a?jsxs(L,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Q,{id:h,type:"label",size:"sm",children:a}):null]}):null,jsx(le,{className:classNames(Sy,r),selectionMode:"single",items:v,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?v.map(I=>I.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:I=>{p?.([...I][0]);},optionClassName:c,optionStyle:d,renderOption:({key:I,textValue:P},{isSelected:C,isFocusVisible:x,isDisabled:T,optionProps:N},R)=>jsx("li",{...N,"data-disabled":T,className:classNames(Ty,N.className),ref:R,children:jsx(et,{isFocusVisible:x,color:I,isSelected:C,"aria-label":P,isInteractive:!0,isDisabled:T,tooltip:b})}),shouldFocusWrap:f,...g,"aria-labelledby":a?h:g["aria-labelledby"]})]})});Ly.displayName="ColorSwatchPicker";var My="_10dw1p96",Dy="_10dw1p95",Ey=z({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lk _1yep5z6l7 _1yep5z6l4",variantClassNames:{isSelected:{true:"_1yep5z6120"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z613r _1yep5z617k _1yep5z617i"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isSelected:!1,isRenaming:!1},"_1yep5z61nw _1yep5z61pu _1yep5z61tg _1yep5z61tf"]]});function Hy(e,t){if(typeof e=="function"&&!e.prototype?.isReactComponent){let o=e(t);return isValidElement(o)?e:o}return e}var Vy=({context:e,depth:t,children:o,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:p,primaryActionAriaLabel:l,secondaryActionAriaLabel:c,onRename:d,onAction:u,renderItemTitle:m=y=>y.data.label})=>{let{formatMessage:y}=F(),{hoverProps:f,isHovered:b}=useHover({}),g=useRef(null),{onKeyDown:_,...v}=e.interactiveElementProps;delete v.onFocus,delete v.onClick;let h=createFocusManager(g),I=useCallback(k=>{if(k.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))g.current?.setAttribute("tabindex","-1"),k.preventDefault(),k.stopPropagation(),h.focusNext();else switch(k.key){case"ArrowLeft":{h.focusPrevious()?(k.preventDefault(),k.stopPropagation()):(_?.(k),e.focusItem(!0));break}case"Enter":{e.toggleExpandedState();break}default:_?.(k);}},[e,h,_,r,g]),P=useMemo(()=>{let k=Hy(s,r.index),w=Hy(p,r.index),B=typeof l=="function"?l(r.index):l,H=typeof c=="function"?c(r.index):c;return k||w?jsxs(L,{display:"flex",flexDirection:"row",children:[k?jsx(ge,{icon:k,"aria-label":B,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,w?jsx(ge,{icon:w,"aria-label":H,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{n?.(r.index);},tooltip:!0}):null]}):null},[s,r.index,p,l,c,a,n]),C=useCallback(k=>{k.key==="Enter"?(d?.({key:r.index,value:k.target.value}),e.stopRenamingItem()):k.key==="Escape"?(e.stopRenamingItem(),g.current?.setAttribute("tabindex","0"),g.current?.focus()):k.key!=="ArrowRight"&&k.key!=="ArrowLeft"&&k.key!=="ArrowUp"&&k.key!=="ArrowDown"&&!k.metaKey&&k.continuePropagation();},[r.index,e,d,g]),x=r.data.icon,T=!!d,{pressProps:N}=usePress({onPress:()=>{u?.(r.index);}}),{isFocusVisible:R,focusProps:S}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:I,onFocus:()=>{e.focusItem(!1);}},N,S,f,e.itemContainerWithoutChildrenProps,v),className:classNames(Dy,Ey({isHovered:b,isSelected:e.isSelected,isFocusVisible:R,isRenaming:e.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":r.index,"data-expanded":r.isFolder?e.isExpanded:void 0,"aria-expanded":r.isFolder?e.isExpanded:void 0,"data-selected":e.isSelected,"aria-selected":e.isSelected,"data-depth":t,"aria-level":t+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:g,children:jsxs(L,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?P:null,jsxs(L,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(L,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${t*2} * ${themeVars.spacing.lg})`},children:[jsx(E,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":y(e.isExpanded?rs.collapse:rs.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(My,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),x?jsx(x,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(L,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:k=>{T&&(k.stopPropagation(),k.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:k=>{k.stopPropagation();},children:jsx(Xe,{defaultValue:r.data.label,autoFocus:!0,onBlur:k=>{d?.({key:r.index,value:k.target.value}),e.stopRenamingItem();},"aria-label":y(rs.rename),onKeyDown:C,className:"BaselineUI-TreeView-RenameInput"})}):jsx(Q,{type:"label",size:"sm",className:classNames(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:m(r)}),r.data.description?jsx(Q,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.data.description}):null]})]}),i==="end"?P:null]})}),o]})},rs=K({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function qR(e,{posInset:t,setSize:o}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:t,setSize:o},isFolder:!!e.children?.length}}function GR(e,t){let o={};function r(a,n,i){if(o[a.id]=t(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),o}var $y=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,actionsPosition:u="start",onRename:m,onAction:y,renderItemTitle:f,...b},g)=>{let _=ae(),v=useRef(null),h=useTreeState({...b,selectionMode:"multiple",items:a.children,children:_}),I=useMemo(()=>Object.fromEntries(Object.entries(GR(a,qR)).map(([R,S])=>[R,{...S,canRename:!!m}])),[a,m]),P=useId(),[C,x]=nt.useState(a.children?.[0]?.id??""),T=useRef(C),N=useMemo(()=>({[`tree-${P}`]:{focusedItem:C,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[C,h.expandedKeys,h.selectionManager.selectedKeys,P]);return useEffect(()=>{if(!v.current)return;let R=Ve(v.current),S=R instanceof ShadowRoot,k=v.current?.contains(R?.activeElement??null);S&&k&&Ve(v.current)?.querySelector(`[data-rct-item-id="${C}"]`)?.focus();},[C]),jsx(ControlledTreeEnvironment,{items:I,getItemTitle:R=>R.data?.label,viewState:N,onExpandItem:R=>{h.setExpandedKeys(new Set([...h.expandedKeys,R.index])),b.onExpand?.(R.index.toString());},onFocusItem:R=>{x(R.index),R.index&&(T.current=R.index);},onCollapseItem:R=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(S=>S!==R.index))),b.onCollapse?.(R.index.toString());},onSelectItems:R=>{h.selectionManager.setSelectedKeys(new Set(R));},renderItem:R=>jsx(Vy,{...R,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:u,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,onRename:m,onAction:y,renderItemTitle:f}),renderLiveDescriptorContainer:({children:R})=>jsx(Ke,{children:jsx(VisuallyHidden,{children:R})}),renderTreeContainer:({containerProps:R,children:S})=>jsx("div",{...xt(R,{onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||k.currentTarget.querySelector(`[data-key="${T.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":o,"data-block-class":r,style:{...t,...R.style},className:classNames(e,"BaselineUI-TreeView"),ref:M(g,R.ref,v),role:"treegrid",children:S}),renderItemsContainer:({children:R})=>R,children:jsx(Tree,{treeId:`tree-${P}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});$y.displayName="TreeView";var ew=forwardRef(({className:e,isCollapsible:t=!1,...o},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:t,ref:a,id:n,...o})});ew.displayName="Panel";var sw=forwardRef(({className:e,...t},o)=>{let r=useRef(null);return useImperativeHandle(o,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...t})});sw.displayName="PanelGroup";var Uy="_6abhjk0";var dw=({className:e,isDisabled:t=!1,...o})=>jsx(PanelResizeHandle,{disabled:t,className:classNames(Uy,"BaselineUI-PanelResizeHandle",e),...o});dw.displayName="PanelResizeHandle";
52
+ var xe=typeof document<"u"?nt.useLayoutEffect:()=>{};function Fa(e){let t=useRef(null);return xe(()=>{t.current=e;},[e]),useCallback((...o)=>{let r=t.current;return r?.(...o)},[])}function Ha(e){let[t,o]=useState(e),r=useRef(null),a=Fa(()=>{if(!r.current)return;let i=r.current.next();if(i.done){r.current=null;return}t===i.value?a():o(i.value);});xe(()=>{r.current&&a();});let n=Fa(i=>{r.current=i(t),a();});return [t,n]}var sr={prefix:String(Math.round(Math.random()*1e10)),current:0},as=nt.createContext(sr),Jy=nt.createContext(!1);var e1=!!(typeof window<"u"&&window.document&&window.document.createElement),Oa=new WeakMap;function t1(e=!1){let t=useContext(as),o=useRef(null);if(o.current===null&&!e){var r,a;let n=(a=nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(n){let i=Oa.get(n);i==null?Oa.set(n,{id:t.current,state:n.memoizedState}):n.memoizedState!==i.state&&(t.current=i.id,Oa.delete(n));}o.current=++t.current;}return o.current}function o1(e){let t=useContext(as);t===sr&&!e1&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let o=t1(!!e),r=t===sr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${o}`}function r1(e){let t=nt.useId(),[o]=useState(ns()),r=o||process.env.NODE_ENV==="test"?"react-aria":`react-aria${sr.prefix}`;return e||`${r}-${t}`}var Aa=typeof nt.useId=="function"?r1:o1;function a1(){return !1}function n1(){return !0}function i1(e){return ()=>{}}function ns(){return typeof nt.useSyncExternalStore=="function"?nt.useSyncExternalStore(i1,a1,n1):useContext(Jy)}var d1=!!(typeof window<"u"&&window.document&&window.document.createElement),lr=new Map;function pr(e){let[t,o]=useState(e),r=useRef(null),a=Aa(t),n=useCallback(i=>{r.current=i;},[]);return d1&&lr.set(a,n),xe(()=>{let i=a;return ()=>{lr.delete(i);}},[a]),useEffect(()=>{let i=r.current;i&&(r.current=null,o(i));}),a}function ja(e,t){if(e===t)return e;let o=lr.get(e);if(o)return o(t),t;let r=lr.get(t);return r?(r(e),e):t}function is(...e){return (...t)=>{for(let o of e)typeof o=="function"&&o(...t);}}var ue=e=>{var t;return (t=e?.ownerDocument)!==null&&t!==void 0?t:document},pe=e=>e&&"window"in e&&e.window===e?e:ue(e).defaultView||window,Oe=e=>{if(!e)return document;if(!e.isConnected)return null;let t=e.getRootNode?e.getRootNode():document;return ls(t)||ps(t)?t:null};function ss(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function ls(e){return ss(e)&&e.nodeType===Node.DOCUMENT_NODE}function ps(e){return ss(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}function cs(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=cs(e[t]))&&(r&&(r+=" "),r+=o);}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function u1(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=cs(e))&&(r&&(r+=" "),r+=t);return r}var ds=u1;function xt(...e){let t={...e[0]};for(let o=1;o<e.length;o++){let r=e[o];for(let a in r){let n=t[a],i=r[a];typeof n=="function"&&typeof i=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=is(n,i):(a==="className"||a==="UNSAFE_className")&&typeof n=="string"&&typeof i=="string"?t[a]=ds(n,i):a==="id"&&n&&i?t.id=ja(n,i):t[a]=i!==void 0?i:n;}}return t}function M(...e){return e.length===1&&e[0]?e[0]:t=>{for(let o of e)typeof o=="function"?o(t):o!=null&&(o.current=t);}}var m1=new Set(["id"]),f1=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),y1=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),b1=/^(data-.*)$/;function $a(e,t={}){let{labelable:o,isLink:r,propNames:a}=t,n={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(m1.has(i)||o&&f1.has(i)||r&&y1.has(i)||a?.has(i)||b1.test(i))&&(n[i]=e[i]);return n}function cr(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(o=>e.test(o.brand)))||e.test(window.navigator.userAgent)}function Se(e){let t=null;return ()=>(t==null&&(t=e()),t)}var yo=Se(function(){return cr(/Firefox/i)});function oe(e){let t=useRef(null);return useMemo(()=>({get current(){return t.current},set current(o){t.current=o,typeof e=="function"?e(o):e&&(e.current=o);}}),[e])}function C1(){return typeof window.ResizeObserver<"u"}function qa(e){let{ref:t,box:o,onResize:r}=e;useEffect(()=>{let a=t?.current;if(a)if(C1()){let n=new window.ResizeObserver(i=>{i.length&&r();});return n.observe(a,{box:o}),()=>{a&&n.unobserve(a);}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1);}},[r,t,o]);}function Ve(e){return !!e&&"label"in e&&!!e.label}function dr(e){return !!e&&"children"in e&&!!e.children&&"title"in e}function I1(e){return dr(e)?jsx(Section,{items:e.children,title:e.title,"aria-label":e.title,children:t=>jsx(Item,{textValue:t.label,children:t.label},t.id)},e.id):jsx(Item,{textValue:e.label,children:e.label},e.id)}function ae(){return useCallback(e=>I1(e),[])}function ur(e,t,o){let{direction:r}=useLocale(),a=useDraggableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager,isDisabled:!e.enableReorder,getItems:e.getItems||(s=>[...s].map(p=>{let l=t.collection.getItem(p);return invariant(l,"Expected item to be defined."),{"text/plain":l.textValue}}))});useDraggableCollection(e,a,o);let n=useDroppableCollectionState({...e,collection:t.collection,selectionManager:t.selectionManager}),{collectionProps:i}=useDroppableCollection({...e,keyboardDelegate:new ListKeyboardDelegate({collection:t.collection,disabledKeys:t.disabledKeys,ref:o,orientation:e.orientation,layout:e.layout,direction:r}),dropTargetDelegate:new ListDropTargetDelegate(t.collection,o)},n,o);return {collectionProps:i,dragState:a,dropState:n}}function E1(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return (t==="string"?String:Number)(e)}function B1(e){var t=E1(e,"string");return typeof t=="symbol"?t:String(t)}function F1(e,t,o){return t=B1(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function gs(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),o.push.apply(o,r);}return o}function vs(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?gs(Object(o),!0).forEach(function(r){F1(e,r,o[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):gs(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r));});}return e}function _s(e,t){var o={};for(var r in e)o[r]=t(e[r],r);return o}var H1=(e,t,o)=>{for(var r of Object.keys(e)){var a;if(e[r]!==((a=t[r])!==null&&a!==void 0?a:o[r]))return !1}return !0},z=e=>{var t=o=>{var r=e.defaultClassName,a=vs(vs({},e.defaultVariants),o);for(var n in a){var i,s=(i=a[n])!==null&&i!==void 0?i:e.defaultVariants[n];if(s!=null){var p=s;typeof p=="boolean"&&(p=p===!0?"true":"false");var l=e.variantClassNames[n][p];l&&(r+=" "+l);}}for(var[c,d]of e.compoundVariants)H1(c,a,e.defaultVariants)&&(r+=" "+d);return r};return t.variants=()=>Object.keys(e.variantClassNames),t.classNames={get base(){return e.defaultClassName.split(" ")[0]},get variants(){return _s(e.variantClassNames,o=>_s(o,r=>r.split(" ")[0]))}},t};var zs=z({defaultClassName:"_6n12k9b _1yep5z6lm _1yep5z6ll _1yep5z6i6 _1yep5z6l4",variantClassNames:{isDropTarget:{true:"_1yep5z613r"},orientation:{vertical:"_1yep5z617e",horizontal:"_1yep5z617f"}},defaultVariants:{},compoundVariants:[]}),hs="_6n12k98 _1yep5z6lk _1yep5z6im _1yep5z6in _1yep5z6io",xs=z({defaultClassName:"_6n12k99 _1yep5z6ev _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6ey"}},defaultVariants:{},compoundVariants:[]}),Cs=z({defaultClassName:"_6n12k91 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6eu _1yep5z6l4 _1yep5z6l7 _1yep5z6lk _1yep5z6lj _1yep5z6lh _1yep5z6le",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z613r _1yep5z617k _1yep5z617i _1yep5z617l _1yep5z6144 _1yep5z6145 _1yep5z6146"},isHovered:{true:"_1yep5z611z",false:"_1yep5z611y"},isFirstChild:{true:"_6n12k95"},isLastChild:{true:"_6n12k96"},isDisabled:{true:"z9nup83 _1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),Ps="_6n12k9f _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",ks="_6n12k90";var Is=z({defaultClassName:"gukncs0",variantClassNames:{isVertical:{true:"gukncs1"},isSecondary:{true:"gukncs2"}},defaultVariants:{},compoundVariants:[]});var A=nt.forwardRef(({className:e,style:t,variant:o="primary",orientation:r="horizontal",UNSAFE_omitRole:a,elementType:n="div","data-block-id":i,"data-block-class":s,...p},l)=>{let{separatorProps:c}=useSeparator({...p,orientation:r,elementType:n});return jsx(n,{...c,className:classNames(Is({isVertical:r==="vertical",isSecondary:o==="secondary"}),"BaselineUI-Separator",e),"data-orientation":r,"data-block-id":i,"data-block-class":s,style:t,role:a?void 0:c.role,ref:l})});A.displayName="Separator";function q1(e){return sprinkles.properties.has(e)}var L=nt.forwardRef(({elementType:e="div",children:t,...o},r)=>{let a=e,{sprinkleProps:n,domProps:i}=useMemo(()=>{let s={},p={};for(let l in o)q1(l)?s[l]=o[l]:p[l]=o[l];return {sprinkleProps:s,domProps:p}},[o]);return jsx(a,{...i,className:classNames(sprinkles(n),"BaselineUI-Box",i.className),ref:r,children:t})});L.displayName="Box";var go=nt.forwardRef(({item:e,isDisabled:t,isFocusVisible:o,isSelected:r,liProps:a,showSelectedIcon:n,description:i,descriptionProps:s,labelProps:p,isFocused:l,isPressed:c,_state:d},m)=>{invariant(e.value&&Ve(e.value),"Item cannot be a section");let{icon:u,label:y}=e.value,{hoverProps:f,isHovered:b}=useHover({isDisabled:t}),g=filterTruthyValues({"data-selected":r,"data-disabled":t,"data-focused":l,"data-hovered":b,"data-pressed":c,"data-focus-visible":o,"data-selection-mode":d.selectionManager.selectionMode});return jsxs("li",{...mergeProps(a,f,g),className:classNames(Cs({isHovered:b,isFocused:o,isFirstChild:d.collection.getFirstKey()===e.key,isLastChild:d.collection.getLastKey()===e.key,isDisabled:t}),a.className,"BaselineUI-ListBox-Option"),style:a.style,ref:m,children:[jsxs(L,{display:"flex",alignItems:"center",gap:"lg",children:[n?jsx("span",{"aria-hidden":!0,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,u?jsx(u,{size:24}):null,jsx("span",{...p,children:y})]}),i?jsx("span",{className:xs({isDisabled:t}),...s,children:i}):null]})});go.displayName="DefaultRenderOption";var Ct=({dropState:e,orientation:t="vertical",dropIndicatorStyle:o,dropIndicatorClassName:r,renderDropIndicator:a=({isDropTarget:i,isHidden:s,dropIndicatorProps:p,orientation:l},c)=>s?null:jsx("li",{...p,ref:c,"data-drop-target":i,className:classNames(zs({isDropTarget:i,orientation:l}),"BaselineUI-DropIndicator",r),style:o}),...n})=>{let i=nt.useRef(null),{dropIndicatorProps:s,isHidden:p,isDropTarget:l}=useDropIndicator(n,e,i);return a({dropIndicatorProps:{...s,role:"option"},isHidden:p,isDropTarget:l,orientation:t},i)};function Ae(e,t,o){return typeof e=="function"?e(t,o):e}function mr(e,t,o){return typeof e=="function"?e(t,o):e}function fr(e,t){return typeof e=="function"?e(t):e}function Xa(e,t){return typeof e=="function"?e(t):e}var Ss=({item:e,children:t,state:o,dragState:r,...a})=>{let{dragProps:n}=useDraggableItem({key:e.key},r);return jsxs(Fragment,{children:[jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"before"},...a}),t(n),o.collection.getKeyAfter(e.key)==null&&jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"after"},...a})]})};Ss.displayName="DraggableListOption";var vo=nt.forwardRef(({item:e,renderOption:t=(m,u,y)=>jsx(go,{item:m,liProps:u.optionProps,...u,ref:y}),showSelectedIcon:o,state:r,dragState:a,dropState:n,orientation:i,dropIndicatorStyle:s,dropIndicatorClassName:p,optionStyle:l,optionClassName:c},d)=>{let m=nt.useRef(null),u=useOption({key:e.key},r,m),{value:y}=e;invariant(y&&Ve(y),"ListSection should not be passed to ListOption");let f={isFocusVisible:u.isFocusVisible,isSelected:u.isSelected,isFocused:u.isFocused,isDisabled:u.isDisabled,isPressed:u.isPressed},b={style:mr(l,y,f),className:Ae(c,y,f)};return a&&n?jsx(Ss,{orientation:i,state:r,item:e,dropState:n,dragState:a,dropIndicatorStyle:s,dropIndicatorClassName:p,children:g=>t(e,{...u,showSelectedIcon:o,_state:r,optionProps:{...mergeProps(u.optionProps,g),...b}},M(m,d))}):t(e,{...u,showSelectedIcon:o,_state:r,optionProps:{...u.optionProps,...b}},M(m,d))});vo.displayName="Option";var Ds=({section:e,state:t,sectionClassName:o,sectionStyle:r,showSectionHeader:a,renderSectionHeader:n,withSectionHeaderPadding:i=!1,...s})=>{let p=nt.useRef(null),{itemProps:l,groupProps:c,headingProps:d}=useListBoxSection({heading:a?n?.(e,p)||e.rendered:void 0,"aria-label":e["aria-label"]}),m=t.collection.getChildren?.(e.key);invariant(m,"children must be defined");let{value:u}=e;invariant(u&&dr(u),"section must be a ListSection");let y=typeof r=="function"?r(u):r,f=typeof o=="function"?o(u):o;return jsxs(Fragment,{children:[e.key===t.collection.getFirstKey()?null:jsx(A,{UNSAFE_omitRole:!0}),jsxs("li",{...l,style:{...l.style,...y},className:classNames(ks,f,"BaselineUI-ListBox-Section"),children:[e.rendered&&a?n?.(e,p)||jsx(L,{...d,className:classNames("BaselineUI-ListBox-SectionHeader",Ps),ref:p,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:i?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...c,children:[...m].map(b=>jsx(vo,{item:b,state:t,...s},b.key))})]})]})};function gr({type:e="listbox",handle:t},o,r){let a=useCallback(i=>e==="listbox"?r.current?.querySelector(`[data-key="${i}"][role="option"]`):r.current?.querySelector(`[data-key="${i}"][role="row"]`),[e,r]),n=useCallback((i,s)=>{let p=a(i);p&&p?.scrollIntoView({block:"nearest",inline:"nearest",...s});},[a]);useImperativeHandle(t,()=>({scrollIntoView:n,setFocusedKey:i=>{o.selectionManager.setFocused(!0),o.selectionManager.setFocusedKey(i),n(i),a(i)?.focus();}}),[n,o.selectionManager,a]),useGranularEffect(()=>{let i=Oe(r.current)instanceof ShadowRoot,s=o.selectionManager.focusedKey;i&&s&&n(s);},[o.selectionManager.focusedKey],[n,r]);}var it=nt.createContext(null),Ya=nt.forwardRef(({className:e,layout:t="stack",orientation:o="vertical",showSelectedIcon:r=!0,style:a,renderOption:n,enableReorder:i=!1,"data-block-id":s,"data-block-class":p,renderDragPreview:l,onReorder:c,state:d,listBoxHandle:m,...u},y)=>{let f=nt.useRef(null),{direction:b}=useLocale(),g=nt.useRef(null),{listBoxProps:_}=useListBox({...u,shouldSelectOnPressUp:i,keyboardDelegate:new ListKeyboardDelegate({collection:d.collection,ref:g,layout:t,orientation:o,direction:b,disabledKeys:d.disabledKeys})},d,g);gr({handle:m},d,g);let v=useReducedMotion(),h=useCallback(S=>{let k=ue(g.current);c&&(!v&&"startViewTransition"in k?k.startViewTransition(()=>{c(S);}):c(S));},[c,v]),{collectionProps:I,dragState:P,dropState:C}=ur({...u,onReorder:h,layout:t,orientation:o,enableReorder:i,preview:f},d,g),{isFocusVisible:x,isFocused:T,focusProps:N}=useFocusRing(),R=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-layout":t,"data-empty":d.collection.size===0,"data-focused":T,"data-focus-visible":x,"data-orientation":o});return jsxs("ul",{...mergeProps(_,N,R,I),className:classNames(hs,"BaselineUI-ListBox",e),style:a,ref:M(y,g),children:[[...d.collection].map(S=>{let k={key:S.key,state:d,dragState:P,dropState:C,renderOption:n,renderDropIndicator:u.renderDropIndicator,renderSectionHeader:u.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:u.dropIndicatorStyle,dropIndicatorClassName:u.dropIndicatorClassName,optionStyle:u.optionStyle,optionClassName:u.optionClassName,sectionClassName:u.sectionClassName,sectionStyle:u.sectionStyle,showSectionHeader:u.showSectionHeader,withSectionHeaderPadding:u.withSectionHeaderPadding};return S.type==="section"?jsx(Ds,{...k,section:S}):jsx(vo,{...k,item:S})}),l?jsx(DragPreview,{ref:f,children:l}):null]})});Ya.displayName="ListBoxCore";var Bs=nt.forwardRef((e,t)=>{let o=ae(),r=useListState({...e,children:o});return jsx(Ya,{...e,ref:t,state:r})});Bs.displayName="ListBoxStandalone";var le=nt.forwardRef((e,t)=>{let o=useContext(it);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx(Ya,{...e,ref:t,state:o}):jsx(Bs,{...e,ref:t})});le.displayName="ListBox";var vr="uf19bsf _1yep5z6l4",Fs=z({defaultClassName:"uf19bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5 _1yep5z6lj _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6le",variantClassNames:{size:{xxs:"uf19bs1",xs:"uf19bs2",sm:"uf19bs3",md:"uf19bs4",lg:"uf19bs5 _1yep5z6wi _1yep5z6wj _1yep5z6wk _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk"},isHovered:{true:"uf19bs6"},isDisabled:{true:"uf19bs7 _1yep5z6114"},isFocusVisible:{true:"uf19bs8"},variant:{primary:"uf19bs9",secondary:"uf19bsa",tertiary:"uf19bsb",ghost:"uf19bsc",toolbar:"uf19bsd _1yep5z6x0 _1yep5z6x1 _1yep5z6x2 _1yep5z6xo _1yep5z6xp _1yep5z6xq _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2",popover:"uf19bse _1yep5z6pl _1yep5z6pm _1yep5z6pn _1yep5z6n9 _1yep5z6na _1yep5z6nb _1yep5z6m0 _1yep5z6m1 _1yep5z6m2 _1yep5z6oc _1yep5z6od _1yep5z6oe _1yep5z6vl _1yep5z6vm _1yep5z6vn"}},defaultVariants:{},compoundVariants:[[{variant:"toolbar",isHovered:!0,isFocusVisible:!1},"_1yep5z61nx"],[{variant:"primary",isHovered:!0,isFocusVisible:!1},"_1yep5z61nx"],[{variant:"secondary",isHovered:!0,isFocusVisible:!1},"_1yep5z61n0"],[{variant:"tertiary",isHovered:!0,isFocusVisible:!1},"_1yep5z61mz _1yep5z61nx"],[{variant:"ghost",isHovered:!0,isFocusVisible:!1},"_1yep5z61n5"],[{variant:"popover",isHovered:!0,isFocusVisible:!1},"_1yep5z61pr _1yep5z61tf _1yep5z61tj _1yep5z61tg"],[{variant:"ghost",isDisabled:!1},"_1yep5z61n4"],[{variant:"popover",size:"lg"},"_1yep5z61ic _1yep5z61id _1yep5z61ie _1yep5z61j0 _1yep5z61j1 _1yep5z61j2 _1yep5z61jo _1yep5z61jp _1yep5z61jq _1yep5z61kc _1yep5z61kd _1yep5z61ke"]]});var _o=nt.createContext({state:null,overlayTriggerAria:{triggerProps:{},overlayProps:{}},triggerRef:void 0}),Ne=({children:e,...t})=>{let o=nt.useRef(null),r=useOverlayTriggerState(t),a=useOverlayTrigger(t,r),n=useMemo(()=>({state:r,overlayTriggerAria:a,triggerRef:o}),[r,a]);return jsx(_o.Provider,{value:n,children:e})};var Os={bottom:"_1gzftth2",top:"_1gzftth3",right:"_1gzftth4",left:"_1gzftth5"},Vs="_1gzftth1 _1yep5z6im _1yep5z6in _1yep5z6io",As="_1gzftth6",js="_1gzftth8",$s="_1gzftth7",Us="var(--_1gzftth0)";function fN(e){return e.closest(".BaselineUI-Portal")||e.closest(".BaselineUI-Popover-Content")}function Ks(e){return typeof e=="object"&&typeof e.left=="number"&&typeof e.top=="number"&&(typeof e.width=="number"||e.width===void 0)&&(typeof e.height=="number"||e.height===void 0)}var _r=nt.createContext({isSelected:!1,ref:void 0}),Le=({children:e,anchorRect:t})=>{let{state:o,overlayTriggerAria:r,triggerRef:a}=useContext(_o);invariant(o,"PopoverTrigger must be used within a Popover");let{triggerProps:n}=r,i=useMemo(()=>({...n,isSelected:o.isOpen,ref:a}),[n,o.isOpen,a]);return invariant(!t&&e||t&&!e,"Either one of anchorRect or children has to be provided."),invariant(!t||Ks(t),"If provided, the anchorRect prop must be an object with left and top number values, and optionally width and height."),jsx(_r.Provider,{value:i,children:t?jsx("div",{className:classNames(js,"BaselineUI-PopoverTrigger-Hidden"),style:t,ref:a,tabIndex:-1},JSON.stringify(t)):e})};var zr=({label:e,tooltip:t})=>({tooltipProps:useMemo(()=>{let r={size:"sm",variant:"inverse",text:e,includeArrow:!1,placement:"bottom start",offset:4};if(typeof t=="object")return {...r,...t};if(t)return r},[e,t])});function hr({tooltip:e,"aria-label":t,"aria-labelledby":o},r){let[a,n]=useState(t||"");useEffect(()=>{if(o){let p=ue(r.current).querySelector(`#${o}`);p&&n(p.textContent||"");}else t&&n(t);},[o,r,t]);let{tooltipProps:i}=zr({label:a,tooltip:e});return {tooltipProps:i}}var xr=e=>{let t=nt.useRef(null),{ref:o,...r}=useContext(_r)||{},{buttonProps:a,isPressed:n}=useButton({...e,...r},t),{isFocusVisible:i,isFocused:s,focusProps:p}=useFocusRing(),{hoverProps:l,isHovered:c}=useHover({isDisabled:e.isDisabled});return {buttonProps:xt(a,p,l),isPressed:n,ref:M(t,o||null),isFocusVisible:i,isFocused:s,isHovered:c,uiStateOptions:{isHovered:c,isFocused:s,isPressed:n,isDisabled:e.isDisabled,isFocusVisible:i}}},Cr=(e,t)=>{let o=nt.useRef(null),{ref:r,...a}=useContext(_r)||{},{buttonProps:n,isPressed:i}=useToggleButton({...e,...a},t,o);(n.role==="radio"||n.role==="checkbox")&&(n["aria-pressed"]=void 0);let{isFocusVisible:s,isFocused:p,focusProps:l}=useFocusRing(),{hoverProps:c,isHovered:d}=useHover({isDisabled:e.isDisabled});return {buttonProps:xt(n,l,c),isPressed:i,ref:M(o,r||null),isFocusVisible:s,isFocused:p,isHovered:d,uiStateOptions:{isHovered:d,isFocused:p,isPressed:i,isDisabled:e.isDisabled,isFocusVisible:s,isSelected:t.isSelected}}};var Pr=z({defaultClassName:"oom8bs0 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6dy _1yep5z6l4",variantClassNames:{variant:{primary:"oom8bs1",secondary:"oom8bs2",tertiary:"oom8bs3",ghost:"oom8bs4",popover:"oom8bs5",toolbar:"oom8bs6",success:"oom8bs7",warning:"oom8bs8",error:"oom8bs9"},isDisabled:{true:"oom8bsa"},isFocusVisible:{true:"oom8bsb"},isHovered:{true:"oom8bsc"},size:{sm:"oom8bsd",md:"oom8bse",lg:"oom8bsf"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"oom8bsg"],[{variant:"secondary",isHovered:!0},"oom8bsh"],[{variant:"tertiary",isHovered:!0},"oom8bsi"],[{variant:"popover",isHovered:!0},"oom8bsj"],[{variant:"ghost",isHovered:!0},"oom8bsk"],[{variant:"success",isHovered:!0},"oom8bsl"],[{variant:"warning",isHovered:!0},"oom8bsm"],[{variant:"error",isHovered:!0},"oom8bsn"],[{variant:"primary",isFocusVisible:!0},"oom8bso"],[{variant:"tertiary",isFocusVisible:!0},"oom8bsp"],[{variant:"success",isFocusVisible:!0},"oom8bsq"],[{variant:"warning",isFocusVisible:!0},"oom8bsr"],[{variant:"error",isFocusVisible:!0},"oom8bss"]]}),Qa=z({defaultClassName:"oom8bst _1yep5z6l4",variantClassNames:{isDisabled:{true:"oom8bsu"},isFocusVisible:{true:"oom8bsv"},isHovered:{true:"_1yep5z610z"},variant:{primary:"_1yep5z6116",secondary:"_1yep5z6112",tertiary:"_1yep5z6117",ghost:"_1yep5z6117",popover:"_1yep5z6112",toolbar:"_1yep5z6112",success:"_1yep5z6115",warning:"_1yep5z6115",error:"_1yep5z6115"}},defaultVariants:{},compoundVariants:[[{variant:"tertiary",isHovered:!0},"_1yep5z61n3"],[{variant:"ghost",isHovered:!0},"_1yep5z61n5"],[{variant:"tertiary",isFocusVisible:!0},"_1yep5z61n3"],[{variant:"secondary",isDisabled:!0},"_1yep5z61n1"],[{variant:"tertiary",isDisabled:!0},"_1yep5z61n1"],[{variant:"ghost",isDisabled:!0},"_1yep5z61n1"],[{variant:"popover",isDisabled:!0},"_1yep5z61n1"],[{variant:"toolbar",isDisabled:!0},"_1yep5z61n1"]]});var Wb={sm:16,md:20,lg:24},G=nt.forwardRef(({label:e,style:t,className:o,iconStart:r,iconEnd:a,variant:n="primary",elementType:i="button",isDisabled:s,size:p="sm","data-block-id":l,"data-block-class":c,...d},m)=>{let{buttonProps:u,isPressed:y,ref:f,isFocusVisible:b,isFocused:g,isHovered:_,uiStateOptions:v}=xr({...d,elementType:i,isDisabled:s}),h=Wb[p],I=filterTruthyValues({"data-block-id":l,"data-block-class":c,"data-disabled":s,"data-focused":g,"data-focus-visible":b,"data-hovered":_,"data-pressed":y});return jsxs(i,{...mergeProps(u,I),className:classNames(Pr({isDisabled:!!s,isFocusVisible:b,isHovered:_,variant:n,size:p}),"BaselineUI-ActionButton",typeof o=="function"?o(v):o),style:typeof t=="function"?t(v):t,ref:M(m,f),children:[!!r&&jsx(r,{size:h,className:Qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),e,!!a&&jsx(a,{size:h,className:Qa({variant:n,isDisabled:s,isFocusVisible:b,isHovered:_})}),n==="popover"&&jsx(CaretDownIcon,{size:8,className:vr})]})});G.displayName="ActionButton";var Zs=nt.forwardRef(({className:e,style:t,node:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let s=nt.useRef(null);nt.useEffect(()=>{let c=s.current;return c?.append(o),()=>{c?.contains(o)&&o.remove();}},[o]);let{pressProps:p,isPressed:l}=usePress(n);return jsx("div",{...p,className:e,style:t,"data-block-id":r,"data-block-class":a,"data-pressed":l,"data-testid":"dom-node-renderer",ref:M(i,s)})});Zs.displayName="DomNodeRenderer";var Qs="_14uvjig0 z9nup81",Js="_14uvjig7",el="_14uvjig3",tl=z({defaultClassName:"_14uvjig4",variantClassNames:{isDisabled:{true:"_14uvjig5"},hasNumberInput:{false:"_14uvjig6"}},defaultVariants:{},compoundVariants:[]}),ol=z({defaultClassName:"_14uvjigf _14uvjig1",variantClassNames:{active:{true:"_14uvjigg _14uvjig2"},isDisabled:{true:"_14uvjigh"},isReadOnly:{true:"_14uvjigi"},isFocusVisible:{true:"_14uvjigj _14uvjig2"},isHovered:{true:"_14uvjigk _14uvjig2"}},defaultVariants:{},compoundVariants:[]}),rl="_14uvjige _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",al="_14uvjig8",nl=z({defaultClassName:"_14uvjig9 _14uvjig1",variantClassNames:{active:{true:"_14uvjig2"},isFocusVisible:{true:"_14uvjig2"},isDisabled:{true:"_14uvjigc"},isHovered:{true:"_14uvjig2"}},defaultVariants:{},compoundVariants:[]});var It=z({defaultClassName:"nrh1ehx",variantClassNames:{isDisabled:{true:"nrh1ehy"},hasError:{true:"nrh1ehz"},labelPosition:{start:"nrh1eh10",top:"nrh1eh11"}},defaultVariants:{},compoundVariants:[]}),kr=z({defaultClassName:"nrh1eho",variantClassNames:{isDisabled:{true:"nrh1ehp"},labelPosition:{top:"nrh1ehq",start:"nrh1ehr"}},defaultVariants:{},compoundVariants:[]}),Rt=z({defaultClassName:"nrh1ehs",variantClassNames:{validationState:{valid:"nrh1eht",error:"nrh1ehu",warning:"nrh1ehv"},isReadOnly:{true:"nrh1ehw"}},defaultVariants:{},compoundVariants:[]}),je="nrh1eh3",$e=z({defaultClassName:"nrh1eh4",variantClassNames:{labelPosition:{top:"nrh1eh5",start:"nrh1eh6"},hasMessage:{true:"nrh1eh7"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"nrh1eh8"]]}),Ue=z({defaultClassName:"nrh1eh0",variantClassNames:{labelPosition:{top:"z9nup81",start:"nrh1eh2 z9nup82"}},defaultVariants:{},compoundVariants:[]}),wt=z({defaultClassName:"nrh1eh9 z9nup82",variantClassNames:{validationState:{valid:"nrh1eha",error:"nrh1ehb",warning:"nrh1ehc"},isHovered:{true:"nrh1ehd"},isFocused:{true:"nrh1ehe"},isDisabled:{true:"nrh1ehf"},variant:{primary:"nrh1ehg",ghost:"nrh1ehh"},isReadOnly:{true:"nrh1ehi"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"nrh1ehj"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"nrh1ehk"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"nrh1ehl"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"nrh1ehm"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"nrh1ehn"]]});function ke({description:e,errorMessageProps:t,descriptionProps:o,warningMessage:r,errorMessage:a,labelPosition:n,isDisabled:i}){return e?jsx("div",{...o,className:It({isDisabled:i,labelPosition:n}),children:e}):a?jsx("div",{...t,className:It({hasError:!0,labelPosition:n}),children:a}):r?jsx("div",{className:It({isDisabled:i,labelPosition:n}),children:r}):null}var il=z({defaultClassName:"_1lnwne1 z9nup82",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup83"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:!0,isInteractive:!0},"_1lnwne4"]]}),sl="_1lnwne0";var ll=z({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),pl=z({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6g9 _1yep5z6ez",inverse:"_1yep5z6d7 _1yep5z6g1 _1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var on=nt.forwardRef(({children:e,state:t,overlayProps:o,arrowProps:r,placement:a,variant:n,size:i,tooltipProps:s,includeArrow:p},l)=>{let{tooltipProps:c}=useTooltip({isOpen:t.isOpen},t),d=useMemo(()=>{switch(a){case"top":return {x:0,y:4};case"bottom":return {x:0,y:-4};case"left":return {x:4,y:0};case"right":return {x:-4,y:0};default:return {x:0,y:0}}},[a]),m=useReducedMotion(),[u]=useSpring(()=>({from:{opacity:0,transform:`translate(${d.x}px, ${d.y}px)`},to:{opacity:1,transform:"translate(0, 0)"},immediate:!!m})),y=a==="center"?"bottom":a;return jsxs(animated.span,{...o,style:{...u,...o.style},ref:l,"data-placement":y,children:[p?jsx("div",{className:ll({placement:y,variant:n}),...r}):null,jsx("div",{...mergeProps(c,s),className:pl({variant:n,size:i}),children:e})]})});on.displayName="TooltipContent";function ul({ref:e,onIntersect:t,isDisabled:o,threshold:r,rootMargin:a,root:n}){let i=nt.useRef(null);useEffect(()=>{if(o){i.current?.disconnect(),i.current=null;return}i.current=new IntersectionObserver(([s])=>{t(s);},{root:n?.current,rootMargin:a,threshold:r});},[t,o,n,a,r]),useEffect(()=>{let{current:s}=i;return e.current&&s?.observe(e.current),()=>s?.disconnect()},[e]);}function ml({ref:e,onResize:t,isDisabled:o}){let r=nt.useRef(null),[a,n]=nt.useState();return nt.useEffect(()=>{if(o){r.current?.disconnect(),r.current=null;return}r.current=new ResizeObserver(([i])=>{n(i.contentRect),t?.(i);});},[t,o,n]),nt.useEffect(()=>{let{current:i}=r;return e.current&&i?.observe(e.current),()=>i?.disconnect()},[e]),{size:a}}function Tt({src:e,alt:t}){let[o,r]=useState(!1),[a,n]=useState(!1),[i,s]=useState(!1),p=()=>{r(!0),s(!1);},l=()=>{n(!0),s(!1);};return useEffect(()=>{if(!e)return;s(!0);let c=new Image;return c.src=e,c.addEventListener("load",p),c.addEventListener("error",l),()=>{c.removeEventListener("load",p),c.removeEventListener("error",l);}},[e]),{isLoaded:o,hasError:a,isLoading:i,imgProps:{src:o?e:void 0,alt:t}}}function St(){let e=useRef(!0);return useEffect(()=>{e.current=!1;},[]),e.current}var fl="SET_STATE",Rr="UNDO",wr="REDO",mg=(e,t)=>{let{past:o,present:r,future:a}=e;switch(t.type){case fl:return {past:[...o,r],present:t.data,future:[]};case Rr:return {past:o.slice(0,o?.length-1),present:o[o?.length-1],future:[r,...a]};case wr:return {past:[...o,r],present:a[0],future:a.slice(1)};default:throw new Error("Invalid action type")}},yl=(e={},{isDisabled:t,onAction:o})=>{let r=St(),[a,n]=useReducer(mg,{past:[],present:e,future:[]}),{past:i,present:s,future:p}=a,l=f=>{n({type:fl,data:f});},c=useRef(),d=()=>{c.current=Rr,n({type:Rr});},m=()=>{c.current=wr,n({type:wr});},u=!!i?.length,y=!!p?.length;return useGranularEffect(()=>{(c.current===Rr||c.current===wr)&&(o?.(s,c.current),c.current=void 0);},[s],[o,r]),{state:s,push:t?()=>{}:l,undo:t?()=>{}:d,redo:t?()=>{}:m,pastStates:i,futureStates:p,canUndo:u,canRedo:y}};var an=nt.createContext({messages:{},shouldLogMissingMessages:!0,hasMissingErrorLoggedFor:{current:new Set},setLang:()=>{}}),vl=({children:e,messages:t={},shouldLogMissingMessages:o=!0,...r})=>{let a=useRef(new Set),[n,i]=useState("");useEffect(()=>{a.current.clear();},[n,r.locale]);let s=nt.useMemo(()=>({messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:a,setLang:i}),[t,o,a,i]);return jsx(I18nProvider,{...r,children:jsx(an.Provider,{value:s,children:e})})};vl.displayName="I18nProvider";function F(e){let{messages:t,shouldLogMissingMessages:o,hasMissingErrorLoggedFor:r}=useContext(an);useEffect(()=>{!e&&_g(t)&&console.warn("BUI \u{1F30D}: No messages object provided and no messages found in the `I18nProvider`. Please provide a messages object to the `useI18n` hook.");},[e,t]);let a=useMemo(()=>e?cleanKeyFromGlobImport(e):t,[e,t]),n=useMessageFormatter(a),i=useLocale(),s=useCallback(l=>{o&&!r.current.has(l)&&(console.log(`BUI \u{1F30D}: Translation not found for key: \`${l}\` for locale: \`${i.locale}\`. The default message, i.e. \`${l}\`, will be used instead.`),r.current.add(l));},[r,i.locale,o]),p=useCallback((l,c)=>{if(typeof l=="object")try{return n(l.id,c)}catch{return s(l.id),l.defaultMessage||l.id}else try{return n(l,c)}catch{return s(l),l}},[n,s]);return useMemo(()=>({formatMessage:p,locale:i}),[p,i])}var K=e=>e;function lM(e,t,o){let r=nt.useRef(null);return nt.useEffect(()=>{if(e)return r.current=new MutationObserver(o),r.current.observe(e,t),()=>{r.current&&r.current.disconnect();}},[e,t,o]),r.current}function xl(e,t){let[o,r]=useState(()=>{try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(n){return console.log(n),t}});return [o,n=>{try{let i=n instanceof Function?n(o):n;r(i),window.localStorage.setItem(e,JSON.stringify(i));}catch(i){console.log(i);}}]}function yM({ref:e,onSelectionChange:t,onSelectionEnd:o,isDisabled:r}){let a=nt.useRef(null);usePress({ref:e,isDisabled:r,onPressEnd(){let i=pe(e.current).getSelection();i&&e.current?.contains(i.anchorNode)&&o?.(i);},onPressStart(){let n=pe(e.current);a.current=n.getSelection(),a.current&&a.current.removeAllRanges();}}),useEffect(()=>{let n=e.current;if(!n||r)return;function i(){let l=pe(n).getSelection();l&&e.current?.contains(l.anchorNode)&&t(l);}let s=ue(n);return s.addEventListener("selectionchange",i),()=>{s.removeEventListener("selectionchange",i);}},[e,t,r]);}function Nt(e){let t=useCallback(()=>{let a=pe(e??document.body),n=a.matchMedia(queries.tablet);return a.matchMedia(queries.desktop).matches?"desktop":n.matches?"tablet":"mobile"},[e]),[o,r]=nt.useState(t);return xe(()=>{let a=pe(e),n=()=>{r(t());};return a.addEventListener("resize",n),n(),()=>{a.removeEventListener("resize",n);}},[e,t]),o}var nn=nt.createContext(void 0),Pl=({portalContainer:e,children:t})=>jsx(nn.Provider,{value:e,children:t});Pl.displayName="PortalContainerProvider";function ve(e){let t=useContext(nn);return e||t}var kl=z({defaultClassName:"z9nup84",variantClassNames:{size:{xs:"z9nup85",sm:"z9nup86"}},defaultVariants:{},compoundVariants:[]});var Il="z9nup80",Lt="z9nup83",Rl="z9nup87";function sn(e=window){let[t,o]=useState("light"),[r,a]=useState(!1),[n,i]=useState(!1),[s,p]=useState(!1);return useEffect(()=>{let l=e.matchMedia("(prefers-color-scheme: dark)"),c=d=>{o(d.matches?"dark":"light");};return l.matches&&o("dark"),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-contrast: more)"),c=d=>{a(d.matches);};return a(l.matches),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-motion: reduce)"),c=d=>{i(d.matches);};return l.matches&&i(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),useEffect(()=>{let l=e.matchMedia("(prefers-reduced-transparency: reduce)"),c=d=>{p(d.matches);};return l.matches&&p(!0),l.addEventListener("change",c),()=>{l.addEventListener("change",c);}},[e]),{colorScheme:t,highContrast:r,reducedMotion:n,transparency:s}}var Mt=createContext({theme:lightTheme,setTheme:()=>{}});var wl="var(--hj25q10)";var Nr={LIGHT:{name:"light",theme:lightTheme},DARK:{name:"dark",theme:darkTheme}},Dt=nt.forwardRef(({theme:e="system",children:t,setTheme:o,className:r,style:a,UNSAFE_domProps:n,"data-block-id":i,"data-block-class":s},p)=>{let{direction:l}=useLocale(),{colorScheme:c,reducedMotion:d,highContrast:m,transparency:u}=sn(),{name:y,theme:f}=useMemo(()=>{switch(e){case"system":return c==="light"?Nr.LIGHT:Nr.DARK;case"light":return Nr.LIGHT;case"dark":return Nr.DARK;default:return {name:"custom",theme:e}}},[c,e]),b=Nt(),g={"data-theme":y,"data-block-id":i,"data-block-class":s,"data-reduced-motion":d,"data-high-contrast":m,"data-transparency":u,"data-device":b},_=useMemo(()=>({theme:f,setTheme:o}),[f,o]);return jsx(Mt.Provider,{value:_,children:jsx("div",{...mergeProps(n,g),className:classNames(Il,"BaselineUI-ThemeProvider",r),style:{...assignInlineVars(themeVars,f),...assignInlineVars({[wl]:l==="rtl"?"-1":"1"}),...a},ref:p,children:t})})});Dt.displayName="ThemeProvider";var Ke=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,...n},i)=>{let{theme:s}=useContext(Mt);return jsx(Overlay,{...n,children:jsx(Dt,{ref:i,theme:s,style:t,className:classNames("BaselineUI-Portal",e),"data-block-id":r,"data-block-class":a,children:o})})});Ke.displayName="Portal";var re=nt.forwardRef(({children:e,placement:t="bottom",delay:o=1e3,closeDelay:r=500,variant:a="default",size:n="md",includeArrow:i=!0,portalContainer:s,className:p,style:l,"data-block-id":c,"data-block-class":d,...m},u)=>{let y=nt.useRef(null),f=nt.useRef(null),b=!m.text||m.isDisabled,g=useTooltipTriggerState({...m,delay:o,closeDelay:r,isDisabled:b}),{triggerProps:_,tooltipProps:v}=useTooltipTrigger({...m,isDisabled:b,delay:o,closeDelay:r},g,y),h=ve(s),{overlayProps:I,arrowProps:P,placement:C,updatePosition:x}=useOverlayPosition({arrowSize:i?13:0,targetRef:y,arrowBoundaryOffset:i?8:0,offset:i?12:2,overlayRef:f,placement:t,isOpen:g.isOpen,...m});return ul({ref:f,threshold:1,onIntersect:x,isDisabled:!g.isOpen}),ml({ref:y,onResize:x,isDisabled:!g.isOpen}),jsxs(FocusableProvider,{..._,ref:y,children:[e,g.isOpen?jsx(Ke,{disableFocusManagement:!0,portalContainer:h,className:p,style:l,"data-block-id":c,"data-block-class":d,children:jsx(on,{ref:M(u,f),state:g,arrowProps:P,overlayProps:I,placement:C,tooltipProps:v,variant:a,size:n,includeArrow:i,children:m.text})}):null]})});re.displayName="Tooltip";var Lr=nt.forwardRef(({elementType:e,children:t,...o},r)=>{let a=oe(r),{focusableProps:n}=useFocusable(o,a);return jsx(e??"div",{ref:a,...n,children:t})});Lr.displayName="Focusable";var nv={xxs:8,xs:12,sm:16,md:20,lg:24},E=nt.forwardRef((e,t)=>{let o=oe(t),{tooltipProps:r}=hr(e,o);return r?jsx(re,{...r,children:jsx(pn,{...e,ref:o})}):jsx(pn,{...e,ref:o})});E.displayName="ActionIconButton";var pn=nt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary",UNSAFE_NON_INTERACTIVE:n,elementType:i=n?"div":"button",...s},p)=>{let l=s["aria-label"],c=s["aria-labelledby"];useEffect(()=>{!l&&!c&&console.warn("An `ActionIconButton` requires an aria-label or aria-labelledby prop.");},[l,c]);let{buttonProps:d,isPressed:m,ref:u,isFocusVisible:y,isFocused:f,isHovered:b,uiStateOptions:g}=xr({...s,elementType:i}),_=filterTruthyValues({"data-block-id":s["data-block-id"],"data-block-class":s["data-block-class"],"data-focused":f,"data-focus-visible":y,"data-disabled":s.isDisabled,"data-hovered":b,"data-pressed":m});return jsxs(i,{...mergeProps(d,_),className:classNames(Fs({variant:a,size:r,isDisabled:!!s.isDisabled,isFocusVisible:y,isHovered:b}),"BaselineUI-ActionIconButton",typeof e=="function"?e(g):e),ref:M(p,u),style:typeof t=="function"?t(g):t,...n&&{tabIndex:void 0,role:void 0,"aria-label":void 0,"aria-labelledby":void 0,"aria-disabled":void 0},children:[jsx(o,{role:"presentation",size:nv[r]}),a==="popover"&&jsx(CaretDownIcon,{size:8,className:vr})]})});pn.displayName="ActionIconButtonCore";var Me=nt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary",showStepper:a=!0,...n},i)=>{let s=nt.useRef(null),{locale:p}=useLocale(),l=useNumberFieldState({...n,locale:p}),{hoverProps:c,isHovered:d}=useHover({isDisabled:n.isDisabled}),{focusProps:m,isFocusVisible:u,isFocused:y}=useFocusRing(),{labelProps:f,decrementButtonProps:b,inputProps:g,incrementButtonProps:_,groupProps:v,descriptionProps:h,errorMessageProps:I}=useNumberField(n,l,s),P=useMemo(()=>n.isReadOnly?ReadOnlyIcon:n.isInvalid?ErrorCircleFilledIcon:null,[n.isInvalid,n.isReadOnly]),C=ke({description:n.description,errorMessageProps:I,descriptionProps:h,errorMessage:n.errorMessage,labelPosition:o,isDisabled:n.isDisabled}),x=filterTruthyValues({"data-disabled":n.isDisabled,"data-readonly":n.isReadOnly,"data-hovered":d,"data-focused":y,"data-focus-visible":u,"data-invalid":n.isInvalid,"data-block-id":n["data-block-id"],"data-block-class":n["data-block-class"]});return jsxs("div",{style:t,className:classNames(Ue({labelPosition:o}),"BaselineUI-NumberInput",e),...x,ref:i,children:[n.label?jsxs("div",{className:$e({labelPosition:o,hasMessage:!!C}),children:[jsx("label",{...f,className:je,children:n.label}),o==="start"&&C]}):null,jsxs("div",{className:classNames({[Lt]:n.isDisabled}),children:[jsxs("div",{...mergeProps(v,c),className:classNames(wt({isHovered:d,isDisabled:!!n.isDisabled,isReadOnly:!!n.isReadOnly,validationState:n.isInvalid?"error":"valid",isFocused:y,variant:r}),{[sl]:o==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...mergeProps(g,m),ref:s,className:classNames("BaselineUI-NumberInput-Input",kr({isDisabled:n.isDisabled,labelPosition:o}))}),P?jsx(P,{className:Rt({validationState:"error",isReadOnly:n.isReadOnly}),size:16}):null,a?jsxs("div",{className:il({isHoveredOrFocused:d||y,isInteractive:!n.isReadOnly&&!n.isDisabled}),children:[jsx(E,{variant:"secondary",size:"xxs",icon:MinusIcon,...b,className:"BaselineUI-NumberInput-DecrementButton"}),jsx(A,{style:{height:16},orientation:"vertical"}),jsx(E,{variant:"secondary",size:"xxs",icon:PlusIcon,..._,className:"BaselineUI-NumberInput-DecrementButton"})]}):null]}),o==="top"&&C]})]})});Me.displayName="NumberInput";var Ft=nt.forwardRef(({className:e,style:t,onChange:o,onChangeEnd:r,numberFormatOptions:a,isDisabled:n,step:i,minValue:s,maxValue:p,value:l,"aria-label":c,"aria-labelledby":d,"aria-details":m,"aria-describedby":u,"data-block-id":y,"data-block-class":f,defaultValue:b,isReadOnly:g,label:_,id:v,includeNumberInput:h},I)=>{let P=nt.useRef(null),C={onChange:o===void 0?void 0:w=>{o(w[0]);},isDisabled:n||g,step:i,minValue:s,maxValue:p,onChangeEnd:r===void 0?void 0:w=>{r(w[0]);},value:l===void 0?void 0:[l],defaultValue:b===void 0?void 0:[b],"aria-label":c,"aria-labelledby":d,"aria-details":m,"aria-describedby":u,id:v,label:_},x=useNumberFormatter(a),T=useSliderState({...C,numberFormatter:x}),{trackProps:N,groupProps:R,labelProps:S}=useSlider(C,T,P),k=jsx(Me,{variant:"ghost",showStepper:!1,"aria-label":c,"aria-labelledby":S.id,value:T.getThumbValue(0),formatOptions:a,onChange:w=>{T.setThumbValue(0,w);},style:{width:55,textAlign:"right",flexShrink:0}});return jsxs("div",{...R,style:t,"data-block-id":y,"data-block-class":f,className:classNames(Qs,"BaselineUI-Slider",e),children:[_?jsxs("div",{className:el,children:[jsx("label",{...S,className:classNames(tl({isDisabled:n,hasNumberInput:!!h}),"BaselineUI-Slider-Label"),children:_}),h?k:null]}):null,jsxs("div",{className:Js,children:[jsx("div",{...N,className:classNames(al,"BaselineUI-Slider-Track"),ref:M(P,I),"data-testid":"track",children:jsx(Iv,{state:T,trackRef:P,isDisabled:n,isReadOnly:g})}),h&&!_?k:null]})]})});Ft.displayName="Slider";function Iv({state:e,trackRef:t,isDisabled:o,isReadOnly:r}){let a=nt.useRef(null),{thumbProps:n,inputProps:i,isDragging:s}=useSliderThumb({trackRef:t,inputRef:a},e),{focusProps:p,isFocused:l,isFocusVisible:c}=useFocusRing(),{hoverProps:d,isHovered:m}=useHover({isDisabled:o}),u=filterTruthyValues({"data-disabled":o,"data-readonly":r,"data-hovered":m,"data-focus-visible":c,"data-dragging":s,"data-focused":l});return jsxs(Fragment,{children:[jsx("div",{className:classNames(nl({isDisabled:o,isFocusVisible:c,active:s,isHovered:m}),"BaselineUI-Slider-TrackHighlight"),style:{width:n.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...mergeProps(n,d,u),className:classNames(rl,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:classNames(ol({isDisabled:o,isFocusVisible:c,active:s,isReadOnly:r,isHovered:m}),"BaselineUI-Slider-Thumb")}),jsx(VisuallyHidden,{children:jsx("input",{ref:a,...mergeProps(i,p)})})]})]})}var Hl=z({defaultClassName:"_1tkzayn0 _1yep5z6dy",variantClassNames:{size:{sm:"_1tkzayn1",md:"_1tkzayn2",lg:"_1tkzayn3"},type:{subtitle:"_1yep5z610r",title:"_1yep5z610r",label:"_1yep5z610s",value:"_1yep5z610s",helper:"_1yep5z610t",body:"_1yep5z610r"}},defaultVariants:{},compoundVariants:[[{type:"title",size:"sm"},"_1yep5z61l7"],[{type:"title",size:"md"},"_1yep5z61la"],[{type:"title",size:"lg"},"_1yep5z61ld"],[{type:"body",size:"sm"},"_1yep5z61lx"],[{type:"body",size:"md"},"_1yep5z61m0"],[{type:"body",size:"lg"},"_1yep5z61m0"],[{type:"subtitle",size:"sm"},"_1yep5z61lt"],[{type:"subtitle",size:"md"},"_1yep5z61lw"],[{type:"subtitle",size:"lg"},"_1yep5z61lw"],[{type:"label",size:"md"},"_1yep5z61lv"],[{type:"label",size:"lg"},"_1yep5z61lv"],[{type:"value",size:"md"},"_1yep5z61lv"],[{type:"value",size:"lg"},"_1yep5z61lv"],[{type:"helper",size:"sm"},"_1yep5z61lp"]]});var Q=nt.forwardRef(({elementType:e="span",type:t="title",children:o,size:r="md",...a},n)=>jsx(e,{...a,className:classNames(Hl({size:r,type:t}),"BaselineUI-Text",a.className),ref:n,children:o}));Q.displayName="Text";var Ol=z({defaultClassName:"siobe21 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6lv _1yep5z6lt _1yep5z6h4 _1yep5z6lk _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0",variantClassNames:{background:{subtle:"_1yep5z611y",medium:"_1yep5z611z"},isFocusVisible:{true:"_1yep5z617i _1yep5z617k _1yep5z617l _1yep5z613r"}},defaultVariants:{},compoundVariants:[]}),Vl="siobe25";var Dr=nt.forwardRef(({className:e,style:t,children:o,background:r="medium",title:a,action:n,"data-block-id":i,"data-block-class":s,onCloseRequest:p,contentStyle:l,contentClassName:c,...d},m)=>{let{formatMessage:u}=F(),y=nt.useRef(null),{dialogProps:f,titleProps:b}=useDialog(d,y),{focusProps:g,isFocusVisible:_}=useFocusRing();return jsxs("div",{...mergeProps(f,g),className:classNames(Ol({background:r,isFocusVisible:_}),"BaselineUI-Drawer",e),"data-block-id":i,"data-block-class":s,style:t,ref:M(m,y),children:[jsxs(L,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:Vl,children:[jsx(Q,{type:"title",size:"sm",...b,className:Rl,children:a}),jsxs(L,{children:[n?jsx(E,{...n,variant:"secondary"}):null,jsx(E,{variant:"secondary",size:"md",icon:XIcon,onPress:p,"aria-label":u(Ev.close)})]})]}),jsx(A,{variant:r==="subtle"?"primary":"secondary"}),jsx(L,{display:"flex",flexDirection:"column",flex:1,style:{overflow:"auto",...l},className:classNames(c,"BaselineUI-Drawer-Content"),children:o})]})});Dr.displayName="Drawer";var Ev=K({close:{id:"close",defaultMessage:"Close"}});function Ul(e,t,o){let{isDisabled:r}=e,a=useReducedMotion(),[{y:n},i]=useSpring(()=>({y:0,immediate:a,config:{easing:easings.easeOutCubic}})),s=useRef(0),p=useCallback(()=>{i.start({y:s.current,onRest:()=>{t.close();}});},[i,t]),l=useCallback(d=>{d.target.closest("[data-drawer]")||p();},[p]);useGranularLayoutEffect(()=>{s.current=o.current?.offsetHeight||0,i.set({y:s.current}),i.start({y:0,immediate:!!a});},[],[i,a]);let c=n.to({range:[0,s.current/2,s.current],output:[.5,.2,0],extrapolate:"clamp"}).to(d=>`rgba(0,0,0,${d})`);return {overlayProps:{style:r?void 0:{transform:n.to(d=>`translateY(${d}px)`)}},underlayProps:{style:r?void 0:{backgroundColor:c},onPointerDown:r||!e.isDismissable?void 0:l},close:p}}var Kl="aml2vl3 _1yep5z6im _1yep5z6in _1yep5z6io",ql=z({defaultClassName:"aml2vl0 _1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6id _1yep5z6ie _1yep5z6if",variantClassNames:{enableDrawer:{false:"_1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",true:"aml2vl2"}},defaultVariants:{},compoundVariants:[]}),Gl="_1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6gb _1yep5z6id _1yep5z6ie _1yep5z6if";var Ge=nt.createContext({state:null,triggerProps:{},overlayProps:{}}),Ie=({children:e,...t})=>{let o=useOverlayTriggerState(t),{triggerProps:r,overlayProps:a}=useOverlayTrigger({type:"dialog"},o),n=useMemo(()=>({state:o,triggerProps:r,overlayProps:a}),[o,r,a]);return jsx(Ge.Provider,{value:n,children:e})};Ie.displayName="Modal";var fn=nt.createContext({isDrawer:!1,closeDrawer:()=>{}}),yn=nt.createContext({setIsPopoverSafelyClosed:()=>{}}),Qv=animated(Dt),Jv=({children:e,className:t,style:o,isDismissable:r=!0,isKeyboardDismissDisabled:a=!1,portalContainer:n,disableAnimation:i,enableDrawer:s=!1,"data-block-id":p,"data-block-class":l})=>{let{state:c}=nt.useContext(Ge),[d,m]=nt.useState(!0),u=Nt(n),y=ve(n),f=typeof s=="boolean"&&s||s==="auto"&&u==="mobile";invariant(c,"ModalContent must be a child of Modal");let b=nt.useRef(null),g=typeof r=="function"?r(f):r,_=typeof a=="function"?a(f):a,{underlayProps:v,overlayProps:h,close:I}=Ul({isDisabled:!f,isDismissable:g&&d},c,b),{modalProps:P,underlayProps:C}=useModalOverlay({isDismissable:!f&&d,isKeyboardDismissDisabled:_},c,b),{theme:x}=useContext(Mt),T=useReducedMotion(),N=useSpring({from:{opacity:0,transform:"scale(0.95)"},to:{opacity:1,transform:"scale(1)"},immediate:!!T||i,config:{easing:easings.easeInBounce}}),R=useMemo(()=>({...P.style,...f?{...h.style,width:"100%"}:N}),[h.style,P.style,f,N]),S=useMemo(()=>({isDrawer:f,closeDrawer:I}),[f,I]),k=useMemo(()=>({setIsPopoverSafelyClosed:m}),[m]);return jsx(Overlay,{portalContainer:y,children:jsx(fn.Provider,{value:S,children:jsx(yn.Provider,{value:k,children:jsxs(Qv,{className:classNames(ql({enableDrawer:f}),t),theme:x,"data-block-id":p,"data-block-class":l,style:o,children:[jsx(animated.div,{...mergeProps(C,v,{onPointerDown:f?v.onPointerDown:C.onPointerDown}),"data-testid":"underlay",style:v.style,className:classNames(Gl,"BaselineUI-Modal-Underlay")}),jsx(animated.div,{...mergeProps(P,h),style:R,ref:b,"data-drawer":f,className:classNames(f?Kl:void 0,"BaselineUI-Modal-Content"),children:typeof e=="function"?e(c):e})]})})})})},e_=animated(Jv),De=({children:e,style:t,...o})=>{let{state:r}=nt.useContext(Ge);invariant(r,"ModalContent must be a child of Modal");let a=useReducedMotion();return useTransition(r.isOpen,{from:{opacity:0},enter:{opacity:1},immediate:!!a||o.disableAnimation})((i,s)=>s&&jsx(e_,{...o,style:{...t,...i},children:typeof e=="function"?e(r):e}))};var Zl=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:"_1yep5z6131 _1yep5z617q _1yep5z617s",ghost:"cjv3et6"},isDrawer:{true:"cjv3et7 _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2 _1yep5z617e"},isFocusVisible:{true:"_1yep5z613r _1yep5z617l _1yep5z617k _1yep5z617i"}},defaultVariants:{},compoundVariants:[]});var gn=nt.createContext({titleProps:{}}),me=nt.forwardRef(({children:e,className:t,style:o,inheritDrawer:r,size:a="md",variant:n="primary","data-block-id":i,"data-block-class":s,drawerBackground:p,...l},c)=>{let d=nt.useRef(null),m=nt.useRef(null),{isDrawer:u,closeDrawer:y}=useContext(fn),[f,b]=nt.useState(""),{focusProps:g,isFocusVisible:_}=useFocusRing();useLayoutEffect(()=>{let P=m.current?.getRootNode(),C=l["aria-label"]||"";l["aria-labelledby"]&&(C=P?.querySelector(`#${l["aria-labelledby"].replaceAll(":","\\:")}`)?.textContent||""),b(C);},[l]);let{dialogProps:v,titleProps:h}=useDialog(l,d),I=useMemo(()=>({titleProps:h}),[h]);return u&&r?jsx(Dr,{title:f,onCloseRequest:y,className:t,...l,"data-drawer":!0,"data-block-id":i,"data-block-class":s,ref:M(m,c),background:p,children:e}):jsx(gn.Provider,{value:I,children:jsx("section",{...mergeProps(v,g),"data-block-id":i,"data-block-class":s,ref:M(d,c),style:o,className:classNames(Zl({size:u?"content":a,variant:n,isDrawer:u,isFocusVisible:_}),"BaselineUI-Dialog",t),children:e})})});me.displayName="Dialog";var Ql=nt.forwardRef(({children:e,className:t,style:o},r)=>{let{titleProps:a}=useContext(gn);return nt.isValidElement(e)?nt.cloneElement(e,{...a,ref:r,className:classNames(e.props.className,t),style:{...e.props.style,...o}}):jsx("h3",{...a,ref:r,className:t,style:o,children:e})});Ql.displayName="DialogTitle";function Jl({placement:e,isOpen:t}){let o=useReducedMotion();return useTransition(t,{from:{opacity:0,transform:`translate3d(${e==="bottom"?"0, 4px, 0":"0, -4px, 0"})`},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},immediate:!!o,config:config.stiff})}var tp=({children:e,isOpen:t,popoverContentRef:o,portalContainer:r=document.body,style:a})=>{let[n,i]=useState(!1),[s,p]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:c}=useContext(yn);useEffect(()=>{t?(i(!0),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{i(!1);},300);},[t]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let d=o.current;return useEffect(()=>{d&&p(d.getBoundingClientRect());},[d]),useEffect(()=>{c(!n);},[n,c]),jsxs(Fragment,{children:[n?g_.createPortal(jsx("div",{style:{position:"absolute",left:a?.left,top:a?.top,width:s?.width,height:s?.height,zIndex:a?.zIndex?+a.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer"}),r):null,e]})};var{color:_n}=themeVars,be=nt.forwardRef(({portalClassName:e,portalStyle:t,className:o,style:r,state:a,overlayProps:n,underlayClassName:i,children:s,includeArrow:p=!1,offset:l=2,portalContainer:c,contentContainerClassName:d,contentContainerStyle:m,"data-block-id":u,"data-block-class":y,...f},b)=>{let g=nt.useRef(null),_=ve(c),v=p?8:0,{underlayProps:h,popoverProps:I,placement:P,arrowProps:C}=usePopover({...f,offset:l+v,popoverRef:g,containerPadding:f.containerPadding||0},a);delete I.style?.position;let x=Jl({placement:P,isOpen:a.isOpen}),T=P==="center"?"bottom":P,N=useMemo(()=>({isOpen:a.isOpen}),[a.isOpen]),R=useMemo(()=>({...I.style,...assignInlineVars({[Us]:`${f.triggerRef?.current?.offsetWidth}px`}),...Xa(r,N)}),[I.style,f.triggerRef,r,N]);return jsx(tp,{isOpen:a.isOpen,popoverContentRef:g,portalContainer:_,style:I.style,children:x((S,k)=>k&&jsxs(Ke,{portalContainer:_,style:t,className:e,ref:b,"data-block-id":u,"data-block-class":y,children:[!f.isNonModal&&jsx("div",{...h,className:classNames($s,fr(i,N),"BaselineUI-Popover-Underlay")}),jsxs(animated.div,{...I,style:{...R,...S},ref:M(g,b),className:classNames(Vs,"BaselineUI-Popover-Content",fr(o,N)),"data-placement":["top","bottom","left","right"].filter(w=>P?.includes(w)),children:[p?jsxs("svg",{className:classNames(Os[T],"BaselineUI-PopoverContent-Arrow"),...C,style:{...C.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:_n.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:_n.background.primary.subtle,stroke:_n.background.primary.subtle})]}):null,jsx(DismissButton,{onDismiss:a.close}),jsx("div",{...n,style:Xa(m,N),className:classNames(As,fr(d,N)),children:typeof s=="function"?s(a):s}),jsx(DismissButton,{onDismiss:a.close})]})]}))})});be.displayName="PopoverContentCore";var Re=nt.forwardRef((e,t)=>{let{state:o,overlayTriggerAria:{overlayProps:r},triggerRef:a}=useContext(_o);return invariant(a),o?jsx(be,{ref:t,...e,triggerRef:e.triggerRef||a,overlayProps:r,state:o}):null});Re.displayName="PopoverContent";var np=z({defaultClassName:"_1mdhlqv8",variantClassNames:{isOpen:{true:"_1mdhlqv9"}},defaultVariants:{},compoundVariants:[]}),We="_1mdhlqvb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",ip=z({defaultClassName:"_1mdhlqv0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6eu _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6dy",variantClassNames:{isFocused:{false:"_1mdhlqv1"},isOpen:{true:"_1mdhlqv2"},isDisabled:{true:"z9nup83 _1yep5z6ey"},isHovered:{true:"_1mdhlqv4"},variant:{primary:"_1mdhlqv5",ghost:"_1mdhlqv6"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isHovered:!0},"_1mdhlqv7"]]}),Hr="_1mdhlqvc _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g1",sp="_1yep5z66x _1yep5z66y _1yep5z66z",lp="_1mdhlqva _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69i _1yep5z69j _1yep5z69k";var up=nt.forwardRef(({className:e,style:t,onChange:o,"data-block-id":r,icon:a,formatValue:n=d=>d,tooltipProps:i,popoverContentProps:s,isDisabled:p,...l},c)=>{let d=oe(c),[m,u]=useControlledState(l.value,l.defaultValue||0,o),[y,f]=nt.useState(!1),{keyboardProps:b}=useKeyboard({onKeyDown:v=>{(v.key==="Enter"||v.key==="Escape")&&f(!1);}}),g=n(m||0),_=i?.isDisabled||l["aria-label"]?`${l["aria-label"]}, ${g}`:g.toString();return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSlider",e),"data-block-id":r,style:t,ref:d,children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsxs(Ne,{type:"dialog",isOpen:y,onOpenChange:f,children:[jsx(Le,{children:jsx(re,{text:l["aria-label"],size:"sm",variant:"inverse",includeArrow:!1,isDisabled:p,...i,children:jsx(G,{label:g,variant:"popover","aria-label":_,isDisabled:p,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"}})})}),jsx(Re,{placement:"bottom start",...s,className:classNames(We,s?.className),children:jsx(me,{size:"content","aria-label":_,children:jsx(FocusScope,{autoFocus:!0,children:jsx(L,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...b,children:jsx(Ft,{...l,onChange:v=>{u(v),o?.(v);},value:m})})})})})]})]})});up.displayName="IconSlider";var mp=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"]]}),fp=z({defaultClassName:"bpklwae",variantClassNames:{isDisabled:{true:"bpklwaf"},isSelected:{true:"bpklwag"},isReadOnly:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),yp="bpklwad",bp=z({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"}},defaultVariants:{},compoundVariants:[]}),gp="bpklwa6",vp=z({defaultClassName:"bpklwa3",variantClassNames:{labelPosition:{top:"bpklwa4",left:"bpklwa5"}},defaultVariants:{},compoundVariants:[]});var xp=nt.forwardRef(({className:e,label:t,labelPosition:o="top",statusLabel:r,style:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l=nt.useRef(null),c=useToggleState(s),{inputProps:d,isPressed:m}=useSwitch(s,c,l),{isFocusVisible:u,focusProps:y}=useFocusRing(),{hoverProps:f,isHovered:b}=useHover({isDisabled:s.isDisabled}),g=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":u,"data-disabled":s.isDisabled,"data-focus-visible":u,"data-selected":c.isSelected,"data-readonly":s.isReadOnly,"data-hovered":b,"data-pressed":m}),_=jsx("div",{className:classNames(mp({isSelected:c.isSelected,isDisabled:!!s.isDisabled,isFocused:u,isReadOnly:!!s.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:classNames(fp({isSelected:c.isSelected,isDisabled:s.isDisabled,isReadOnly:s.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})});return jsxs("label",{...mergeProps(g,f),className:classNames(bp({labelPosition:o}),"BaselineUI-Switch",e),style:a,ref:p,children:[t?jsx("span",{className:classNames(yp,"BaselineUI-Switch-Label"),children:t}):null,jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(d,y),ref:l})}),r?jsxs("div",{className:vp({labelPosition:o}),children:[jsx("span",{className:classNames("BaselineUI-Switch-Status-Label",gp),children:c.isSelected?r.on:r.off}),_]}):_]})});xp.displayName="Switch";var Cp="_19n40yy9",Pp=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 W_={sm:SearchIcon,md:SearchIcon$1,lg:SearchIcon$1},Rp=nt.forwardRef(({className:e,size:t="md",variant:o="primary","data-block-id":r,"data-block-class":a,style:n,...i},s)=>{let p=nt.useRef(null),l=useSearchFieldState(i),{inputProps:c,clearButtonProps:d}=useSearchField({...i,"aria-haspopup":!1,"aria-autocomplete":"none",type:"search"},l,p),{focusProps:m,isFocusVisible:u,isFocused:y}=useFocusRing({within:!0,isTextInput:!0}),f=W_[t],b=t==="sm"?XIcon$2:XIcon$3,g=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-focused":y,"data-disabled":i.isDisabled,"data-focus-visible":u});return jsxs("div",{...g,className:classNames(Pp({size:t,isFocused:y,variant:o,hasText:!!l.value,isDisabled:i.isDisabled}),"BaselineUI-SearchInput",e),style:n,ref:s,children:[jsx(f,{size:t==="sm"?20:24}),jsx("input",{...mergeProps(c,m),className:Cp,ref:p}),l.value!==""&&jsx(E,{icon:b,...d,size:t==="sm"?"xs":"sm",variant:"secondary"})]})});Rp.displayName="SearchInput";var wp="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 _1yep5z6lm _1yep5z6ll _1yep5z6hx _1yep5z6lp _1yep5z6g1",Tp="xyd2ss0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b";var xn=({section:e,showSelectedIcon:t,state:o})=>{let{itemProps:r,groupProps:a,headingProps:n}=useMenuSection({heading:e.value?.title,"aria-label":e["aria-label"]});return jsxs(Fragment,{children:[e.key!==o.collection.getFirstKey()&&jsx(A,{elementType:"li"}),jsxs("li",{...r,children:[e.value?.title?jsx(VisuallyHidden,{children:jsx("span",{...n,children:e.value.title})}):null,jsx("ul",{...a,className:Tp,children:[...e.childNodes].map(i=>(invariant(i.type==="item"),jsx(Or,{item:i,state:o,showSelectedIcon:t},i.key)))})]})]})};xn.displayName="MenuSection";var Or=({item:e,state:t,className:o,showSelectedIcon:r})=>{let a=nt.useRef(null),n=useMenuItem({key:e.key},t,a),{isFocusVisible:i,focusProps:s}=useFocusRing();return jsx(go,{item:e,liProps:mergeProps(n.menuItemProps,s,{className:o}),...n,isFocusVisible:i,ref:a,description:e.value?.keyboardShortcut,descriptionProps:n.keyboardShortcutProps,_state:t,showSelectedIcon:r})};Or.displayName="MenuItem";var Pn=nt.forwardRef(({className:e,itemClassName:t,onContentKeyDown:o,...r},a)=>{let n=useTreeState(r),i=nt.useRef(null),{menuProps:s}=useMenu(r,n,i),{keyboardProps:p}=useKeyboard({onKeyDown:o});return jsx("ul",{...mergeProps(s,p),className:classNames(wp,e),ref:M(i,a),children:[...n.collection].map(l=>l.type==="section"?jsx(xn,{section:l,state:n,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key):jsx(Or,{item:l,state:n,className:t,showSelectedIcon:r.selectionMode==="multiple"||r.selectionMode==="single"},l.key))})});Pn.displayName="MenuContent";var Vr=nt.forwardRef(({defaultOpen:e,onOpenChange:t,isOpen:o,isDisabled:r,contentClassName:a,placement:n="bottom start",isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:d,triggerLabel:m,renderTrigger:u=({buttonProps:g,ref:_})=>jsx(G,{...g,variant:"popover",ref:_}),portalContainer:y,...f},b)=>{let g=nt.useRef(null),_=ve(y),v=useMenuTriggerState({defaultOpen:e,isOpen:o,onOpenChange:t}),{menuTriggerProps:h,menuProps:I}=useMenuTrigger({isDisabled:r,type:"menu"},v,g),P=ae(),C=useMemo(()=>mergeProps(h,{isDisabled:r,isSelected:v.isOpen,className:"BaselineUI-Menu-Trigger",label:typeof m=="function"?m(v.isOpen):m}),[h,r,v.isOpen,m]);return useEffect(()=>{!m&&!u&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[u,m]),jsxs(Fragment,{children:[u({buttonProps:C,ref:g}),jsx(be,{triggerRef:g,state:v,placement:n,isNonModal:i,shouldFlip:s,shouldUpdatePosition:p,boundaryElement:l,crossOffset:c,offset:d||2,className:classNames(We,"BaselineUI-Menu-Popover"),portalContainer:_,children:jsx(Pn,{className:a,...I,...f,ref:b,autoFocus:v.focusStrategy||"first",children:P})})]})});Vr.displayName="Menu";var Ar=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=nt.forwardRef(({className:e,style:t,children:o,variant:r="default",size:a="md",elementType:n="a",type:i="body","data-block-id":s,"data-block-class":p,title:l,role:c,...d},m)=>{let u=nt.useRef(null),{linkProps:y,isPressed:f}=useLink({...d,elementType:d.onPress?"span":n},u),{isFocusVisible:b,isFocused:g,focusProps:_}=useFocusRing(),{hoverProps:v,isHovered:h}=useHover({isDisabled:d.isDisabled}),I=n,P=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-disabled":d.isDisabled,"data-focused":g,"data-pressed":f,"data-focus-visible":b,"data-hovered":h,role:c,title:l});return jsx(I,{...mergeProps(y,_,v,P),className:classNames(Ar({variant:r,isFocusVisible:b,isHovered:h,isDisabled:d.isDisabled,size:a,isActive:f,type:i}),"BaselineUI-Link",e),ref:M(u,m),style:t,children:o})});Dp.displayName="Link";function Ep({isDisabled:e,onValueChange:t,onChange:o,name:r,"aria-describedby":a,"aria-label":n,accept:i,multiple:s}){let p=useId(),l=useId(),c=useId();return {inputProps:{type:"file",id:l,disabled:!!e,"aria-labelledby":n?void 0:p,"aria-describedby":a||c,"aria-label":n,onChange:m=>{let u=[...m.target.files||[]];t?.(u),o?.(m);},name:r,accept:i,multiple:s},labelProps:{htmlFor:l,id:p},descriptionProps:{id:c}}}async function Rn({items:e}){let t=e.filter(o=>o.kind==="file").map(async o=>(invariant(o.kind==="file"),o.getFile()));return await Promise.all(t)}var Bp=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:[]}),Hp=z({defaultClassName:"_180w5ed9",variantClassNames:{disabled:{true:"_180w5eda"}},defaultVariants:{},compoundVariants:[]}),Op=z({defaultClassName:"_180w5edb",variantClassNames:{disabled:{true:"_180w5edc"},hovered:{true:"_180w5edd"}},defaultVariants:{},compoundVariants:[]});var $p=nt.forwardRef(({className:e,label:t,description:o,icon:r,variant:a="default",...n},i)=>{let s=nt.useRef(null),{inputProps:p,descriptionProps:l,labelProps:c}=Ep(n),{dropProps:d}=useDrop({ref:s,onDrop:async({items:b})=>{let g=b.filter(v=>v.kind==="file").map(async v=>(invariant(v.kind==="file"),v.getFile())),_=await Promise.all(g);n.onValueChange?.(_);}}),{focusProps:m,isFocusVisible:u}=useFocusRing(),{hoverProps:y,isHovered:f}=useHover({isDisabled:n.isDisabled});return jsxs("label",{...mergeProps(d,y,c),className:classNames(Bp({variant:a,disabled:n.isDisabled,hoveredOrFocusedOrActive:f||u}),e),ref:M(i,s),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(m,p)})}),r?jsx(r,{size:20,className:Hp({disabled:n.isDisabled})}):null,jsxs("div",{children:[jsx("div",{className:Op({disabled:n.isDisabled,hovered:f}),children:t}),o?jsx("div",{...l,className:Fp({disabled:n.isDisabled}),children:o}):null]})]})});$p.displayName="FileUpload";var Up="_12vfhl40 z9nup81",Kp="_12vfhl41 z9nup82",qp=z({defaultClassName:"_12vfhl48",variantClassNames:{variant:{success:"_12vfhl49",error:"_12vfhl4a",active:"_12vfhl4b"}},defaultVariants:{},compoundVariants:[]}),Gp="_12vfhl42",Wp="_12vfhl47",Xp="_12vfhl46 z9nup82",Yp="_12vfhl45",Zp=z({defaultClassName:"_12vfhl43 _12vfhl42",variantClassNames:{hasLabel:{false:"_12vfhl44"}},defaultVariants:{},compoundVariants:[]});var Qp=nt.forwardRef(({className:e,style:t,variant:o="active",showValue:r,description:a,errorMessage:n,"data-block-id":i,"data-block-class":s,...p},l)=>{let c=useId(),{labelProps:d,progressBarProps:m}=useProgressBar({...p,"aria-describedby":a?c:p["aria-describedby"]}),{minValue:u=0,maxValue:y=100,value:f=0,label:b}=p,g=(f-u)/(y-u),_=`${Math.round(g*100)}%`,v=jsx("output",{className:Zp({hasLabel:!!b}),children:m["aria-valuetext"]}),h=o==="error"?n:a;return jsxs("div",{...m,style:t,className:classNames(Up,"BaselineUI-ProgressBar",e),"data-block-id":i,"data-block-class":s,ref:l,children:[b?jsxs("div",{className:Kp,children:[jsx("label",{...d,className:Gp,children:b}),r?v:null]}):null,jsxs("div",{className:Yp,children:[jsxs("div",{className:Xp,children:[jsx("div",{className:Wp,children:jsx("div",{style:{width:_},className:qp({variant:o})})}),!b&&r?v:null]}),h?jsx("div",{className:It({hasError:o==="error"}),id:c,children:h}):null]})]})});Qp.displayName="ProgressBar";function jt({isReadOnly:e,validationState:t}){return e?ReadOnlyIcon:t==="error"?ErrorCircleFilledIcon:t==="warning"?WarningFilledIcon:null}var Xe=nt.forwardRef(({className:e,validationState:t,variant:o="primary",style:r,labelPosition:a="top",inputStyle:n,inputClassName:i,"data-block-id":s,"data-block-class":p,...l},c)=>{let d=nt.useRef(null),{inputProps:m,labelProps:u,descriptionProps:y,errorMessageProps:f,validationErrors:b}=useTextField({...l,validationState:t?t==="error"?"invalid":"valid":void 0},d),g=l.errorMessage||b.join(" "),_=ke({...l,errorMessage:g,descriptionProps:y,errorMessageProps:f,labelPosition:a});g&&(t="error");let{hoverProps:v,isHovered:h}=useHover({isDisabled:l.isDisabled}),{isFocused:I,focusProps:P,isFocusVisible:C}=useFocusRing(),x=jt({isReadOnly:l.isReadOnly,validationState:t??"valid"}),T=filterTruthyValues({"data-readonly":l.isReadOnly,"data-disabled":l.isDisabled,"data-validation-state":t,"data-focused":I,"data-focus-visible":C});return jsxs("div",{className:classNames(Ue({labelPosition:a}),"BaselineUI-TextInput",e),"data-block-id":s,"data-block-class":p,style:r,ref:c,children:[l.label||a==="start"&&_?jsxs("div",{className:$e({labelPosition:a,hasMessage:!!_}),children:[jsx("label",{...u,className:je,children:l.label}),a==="start"&&_]}):null,jsxs("div",{className:classNames({[Lt]:l.isDisabled}),children:[jsxs("div",{...v,className:wt({validationState:t??"valid",isHovered:h,isFocused:I,variant:o,isReadOnly:!!l.isReadOnly,isDisabled:!!l.isDisabled}),children:[jsx("input",{...mergeProps(m,P,T),className:classNames(kr({isDisabled:l.isDisabled,labelPosition:a}),"BaselineUI-TextInput-Input",i),style:n,ref:d}),x?jsx(x,{className:Rt({validationState:t??"valid",isReadOnly:l.isReadOnly}),size:16}):null]}),a==="top"&&_]})]})});Xe.displayName="TextInput";var $t=({value:e,...t})=>{let o=useNumberFormatter(t);return jsx(Fragment,{children:o.format(e)})};$t.displayName="NumberFormat";var ec="_1yep5z6ip _1yep5z6iq _1yep5z6ir",tc=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"]]}),oc=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"]]}),rc=z({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var ic=nt.forwardRef(({className:e,count:t,style:o,size:r="md",icon:a,"data-block-id":n,"data-block-class":i,...s},p)=>{let l={isRequired:!1},c=a||(r==="md"?CheckmarkIcon$2:CheckmarkIcon$3);!s["aria-label"]&&!s["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let d=nt.useRef(null),m=useToggleState({...s,...l}),{inputProps:u,isPressed:y,isDisabled:f,isReadOnly:b,isSelected:g}=useSwitch({...s,...l},m,d),{focusProps:_,isFocused:v,isFocusVisible:h}=useFocusRing(),{hoverProps:I,isHovered:P}=useHover({}),C=filterTruthyValues({"data-block-id":n,"data-block-class":i,"data-focused":v,"data-focus-visible":h,"data-disabled":f,"data-hovered":P,"data-pressed":y,"data-selected":g});return jsxs("label",{ref:p,style:o,className:classNames(ec,"BaselineUI-Reaction",e),...C,children:[jsx(VisuallyHidden,{children:jsx("input",{...u,..._,ref:d})}),jsxs("div",{...I,className:tc({isSelected:g,isFocusVisible:h,isHovered:P,isReadOnly:b,isDisabled:f}),children:[jsx("div",{className:rc({isDisabled:f,isReadOnly:b}),children:jsx(c,{size:r==="md"?20:16})}),jsx("div",{className:oc({isSelected:m.isSelected,isDisabled:f,isReadOnly:b,size:r}),children:jsx($t,{value:t})})]})]})});ic.displayName="Reaction";var sc="_1azy5686",lc="_1azy5685",pc="var(--_1azy5680)",cc="_1azy5688",dc="_1azy5689",uc="_1azy5681 z9nup82",mc="_1azy5682";var fc="_1azy5687";var p5={sm:16,md:20},c5={sm:[CheckmarkCircleFilledIcon,ErrorAltCircleFilledIcon],md:[CheckCircleFilledIcon,ErrorAltCircleFilledIcon$1]},Kt=nt.forwardRef(({className:e,style:t,size:o="md",variant:r="active","data-block-id":a,"data-block-class":n,...i},s)=>{let{labelProps:p,progressBarProps:l}=useProgressBar({...i,isIndeterminate:!0}),c=p5[o],d=c/2-2,m=2*d*Math.PI,u=c5[o][r==="success"?0:1];return jsxs("div",{className:classNames(uc,"BaselineUI-ProgressSpinner",e),ref:s,style:{...assignInlineVars({[pc]:`${m}px`}),...t},"data-block-id":a,"data-block-class":n,children:[jsxs("div",{...l,className:mc,children:[(r==="active"||r==="inactive")&&jsxs("svg",{height:c,width:c,viewBox:`0 0 ${c} ${c}`,children:[jsx("circle",{role:"presentation",className:sc,cx:c/2,cy:c/2,r:d}),r==="active"&&jsx("circle",{role:"presentation",className:lc,cx:c/2,cy:c/2,r:d})]}),r==="success"&&jsx(u,{className:fc,size:c}),r==="error"&&jsx(u,{className:cc,size:c})]}),i.label?jsx("span",{...p,className:dc,children:i.label}):null]})});Kt.displayName="ProgressSpinner";var Ur=z({defaultClassName:"_5uw3kp0 oom8bs0 z9nup82",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isFocusVisible:!0},"_5uw3kpa"],[{isSelected:!0,isDisabled:!0},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),yc=z({defaultClassName:"_5uw3kpd _1yep5z6f5",variantClassNames:{isDisabled:{true:"_1yep5z6114"},isSelected:{true:"_1yep5z6116"}},defaultVariants:{},compoundVariants:[]});var b5={sm:16,md:20,lg:24},Kr=nt.forwardRef(({className:e,style:t,iconStart:o,size:r="md",elementType:a="button",variant:n="toolbar",...i},s)=>{let p=useToggleState(i),{buttonProps:l,isPressed:c,ref:d,isFocusVisible:m,isFocused:u,isHovered:y,uiStateOptions:f}=Cr(i,p),b=filterTruthyValues({"data-block-id":i["data-block-id"],"data-block-class":i["data-block-class"],"data-focused":u,"data-focus-visible":m,"data-disabled":i.isDisabled,"data-hovered":y,"data-pressed":c,"data-selected":p.isSelected});return jsxs(a,{...mergeProps(l,b),className:classNames(Ur({isHovered:y,isFocusVisible:m,isSelected:p.isSelected,size:r,isDisabled:i.isDisabled,variant:n}),"BaselineUI-ToggleButton",typeof e=="function"?e(f):e),style:typeof t=="function"?t(f):t,ref:M(d,s),children:[o?jsx(o,{size:b5[r],className:yc({isDisabled:i.isDisabled,isSelected:p.isSelected})}):null,i.label]})});Kr.displayName="ToggleButton";var qr=z({defaultClassName:"_16vugd0f",variantClassNames:{isDisabled:{true:"_16vugd0g"}},defaultVariants:{},compoundVariants:[]}),bc=z({defaultClassName:"_16vugd02 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{labelPosition:{end:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vf _1yep5z6vg _1yep5z6vh",start:"_1yep5z614y _1yep5z614z _1yep5z6150 _1yep5z616a _1yep5z616b _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),gc=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 zc=nt.forwardRef(({className:e,style:t,label:o,labelPosition:r="end","data-block-id":a,"data-block-class":n,...i},s)=>{let p=nt.useRef(null),l=useToggleState(i),{isFocusVisible:c,isFocused:d,focusProps:m}=useFocusRing(),{inputProps:u,isPressed:y,isDisabled:f,isSelected:b,isReadOnly:g}=useCheckbox({...i,children:o},l,p),{hoverProps:_,isHovered:v}=useHover({isDisabled:f}),h=filterTruthyValues({"data-disabled":f,"data-readonly":g,"data-hovered":v,"data-selected":b,"data-pressed":y,"data-indeterminate":i.isIndeterminate,"data-invalid":i.isInvalid,"data-focus-visible":c,"data-focused":d,"data-block-id":a,"data-block-class":n});return jsxs("label",{...h,className:classNames(bc({labelPosition:r}),"BaselineUI-Checkbox",e),style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(u,m),ref:p})}),jsxs("div",{..._,className:gc({isSelected:b&&!i.isIndeterminate,isIndeterminate:i.isIndeterminate,isFocusVisible:c,isDisabled:f,isReadOnly:g,hasError:i.isInvalid,isHovered:v}),children:[b&&!i.isIndeterminate?jsx(CheckmarkIcon$1,{size:12}):null,i.isIndeterminate?jsx(MinusIcon$1,{size:12}):null]}),o?jsx("span",{className:qr({isDisabled:f}),children:o}):null]})});zc.displayName="Checkbox";var hc={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 xc=z({defaultClassName:"_1nsi9h17",variantClassNames:{isFocused:{true:"_1nsi9h18"},variant:{pinned:"_1nsi9h19",floating:"_1nsi9h1a"},size:{xs:"_1nsi9h1b",sm:"_1nsi9h1c",md:"_1nsi9h1d",lg:"_1nsi9h1e"}},defaultVariants:{},compoundVariants:[]}),Cc="_1nsi9h1f _1yep5z6ls _1yep5z6lk _1yep5z6eu",Pc=z({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6g1 _1yep5z6e1",variantClassNames:{size:{xs:"_1nsi9h11 _1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z6zs",sm:"_1nsi9h12 _1yep5z6zv",md:"_1nsi9h13",lg:"_1nsi9h14"},variant:{floating:"_1yep5z6z4 _1yep5z617s _1yep5z617q _1yep5z6130",pinned:"_1yep5z617e"}},defaultVariants:{},compoundVariants:[]}),kc=z({defaultClassName:"_1nsi9h1g _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]});var K5={style:"decimal"},q5={xs:[CaretLeftIcon,CaretRightIcon],sm:[CaretLeftIcon$1,CaretRightIcon$1],md:[CaretLeftIcon$2,CaretRightIcon$2],lg:[CaretLeftIcon$3,CaretRightIcon$3]},Sc=nt.forwardRef(({className:e,style:t,minValue:o=1,defaultValue:r=1,incrementAriaLabel:a,decrementAriaLabel:n,"aria-label":i,size:s="md",variant:p="floating",hideActions:l,isDisabled:c,...d},m)=>{let{locale:u}=useLocale(),y=F(hc),f={...d,formatOptions:K5,minValue:o,incrementAriaLabel:a||y.formatMessage("nextPage"),decrementAriaLabel:n||y.formatMessage("prevPage"),defaultValue:r,"aria-label":i||y.formatMessage("goToPage")},b=nt.useRef(null),g=useNumberFieldState({...f,locale:u}),{inputProps:_,decrementButtonProps:v,incrementButtonProps:h,groupProps:I}=useNumberField({...f,onKeyDown:D=>{D.key==="Enter"&&b.current?.blur(),d.onKeyDown?.(D);},isDisabled:c},g,b),{hoverProps:P,isHovered:C}=useHover({}),{focusProps:x,isFocused:T,isFocusVisible:N}=useFocusRing(),R=p==="floating",[S,k]=q5[s],w=filterTruthyValues({"data-focus-visible":N,"data-focused":T,"data-hovered":C,"data-block-id":d["data-block-id"],"data-block-class":d["data-block-class"]}),H=useInteractionModality()==="keyboard";return jsxs("div",{...mergeProps(I,P,w),className:classNames(Pc({size:s,variant:p}),"BaselineUI-Pagination",e),style:t,ref:m,children:[l?null:jsxs(Fragment,{children:[jsx(E,{icon:S,...v,elementType:"div",size:s,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-DecrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||v.isDisabled}),p==="floating"&&jsx(A,{orientation:"vertical"})]}),jsxs("div",{className:xc({isFocused:T,variant:p,size:s}),"aria-label":y.formatMessage("pageXofY",{arg0:_.value,arg1:g.maxValue}),children:[jsx("input",{...mergeProps(_,x),ref:b,className:classNames("BaselineUI-Pagination-Input",Cc),style:{width:`${_.value?.toString().length||1}ch`}}),jsxs("span",{className:kc({isDisabled:c}),children:["/ ",jsx($t,{value:g.maxValue})]})]}),l?null:jsxs(Fragment,{children:[p==="floating"&&jsx(A,{orientation:"vertical"}),jsx(E,{icon:k,...h,elementType:"div",size:s,style:{height:"100%",...R&&{borderRadius:0}},className:"BaselineUI-Pagination-IncrementButton",UNSAFE_NON_INTERACTIVE:H,isDisabled:c||h.isDisabled})]})]})});Sc.displayName="Pagination";var Nc=({date:e,...t})=>{let o=useDateFormatter(t);return jsx(Fragment,{children:o.format(e)})};Nc.displayName="DateFormat";var No=z({defaultClassName:"_1f789qjm",variantClassNames:{variant:{neutral:"_1yep5z6112",red:"_1yep5z610c",green:"_1yep5z610g",blue:"_1yep5z610o","high-contrast":"_1yep5z6115"},isDisabled:{true:"_1yep5z61n1"},isSelected:{true:"_1yep5z6116"}},defaultVariants:{},compoundVariants:[]}),Gr=z({defaultClassName:"_1f789qj0 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ax _1yep5z6ay _1yep5z6az _1yep5z6bl _1yep5z6bm _1yep5z6bn _1yep5z6c9 _1yep5z6ca _1yep5z6cb _1yep5z6cx _1yep5z6cy _1yep5z6cz _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6l4 _1yep5z6lk _1yep5z6l7",variantClassNames:{isFocusVisible:{true:"_1f789qj1"},variant:{neutral:"_1yep5z6122",red:"_1yep5z611h",green:"_1yep5z611l",blue:"_1yep5z611t","high-contrast":"_1yep5z6126"},isDisabled:{true:"_1f789qj7 _1yep5z6121"},allowsRemoving:{true:"_1f789qj8"},isSelected:{true:"_1yep5z612c"},allowsSelection:{true:"_1f789qja"},isHovered:{true:"_1f789qjb"},size:{md:"_1f789qjc",sm:"_1f789qjd"}},defaultVariants:{},compoundVariants:[[{allowsSelection:!0,isHovered:!0,variant:"neutral"},"_1yep5z61ny"],[{allowsSelection:!0,isHovered:!0,variant:"red"},"_1yep5z61nd"],[{allowsSelection:!0,isHovered:!0,variant:"blue"},"_1yep5z61np"],[{allowsSelection:!0,isHovered:!0,variant:"green"},"_1yep5z61nh"],[{allowsSelection:!0,isHovered:!0,variant:"high-contrast"},"_1yep5z61o2"],[{allowsSelection:!0,isSelected:!0,isHovered:!0},"_1yep5z61oa"],[{variant:"high-contrast",isDisabled:!0},"_1yep5z61ny"],[{allowsRemoving:!0,size:"md"},"_1yep5z6190 _1yep5z6191 _1yep5z6192"],[{allowsRemoving:!0,size:"sm"},"_1yep5z61a3 _1yep5z61a4 _1yep5z61a5"]]}),Lc="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69f _1yep5z69g _1yep5z69h",Mc="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z69i _1yep5z69j _1yep5z69k",Dc=z({defaultClassName:"_1f789qju",variantClassNames:{variant:{neutral:"_1f789qjv",red:"_1f789qjw",green:"_1f789qjx",blue:"_1f789qjy","high-contrast":"_1f789qjz"},isHovered:{true:"_1f789qj10"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,variant:"neutral"},"_1f789qj11"],[{isHovered:!0,variant:"red"},"_1f789qj12"],[{isHovered:!0,variant:"blue"},"_1f789qj13"],[{isHovered:!0,variant:"green"},"_1f789qj14"],[{isHovered:!0,variant:"high-contrast"},"_1f789qj15"]]}),Wr=z({defaultClassName:"_1f789qje",variantClassNames:{variant:{neutral:"_1yep5z610r",red:"_1yep5z610c",green:"_1yep5z610g",blue:"_1yep5z610o","high-contrast":"_1yep5z610w"},isDisabled:{true:"_1yep5z61ms"},isSelected:{true:"_1yep5z610x"}},defaultVariants:{},compoundVariants:[]});var Hc=({item:e,state:t,variant:o="neutral",size:r="md"})=>{let a=nt.useRef(null),{focusProps:n,isFocusVisible:i}=useFocusRing({within:!0}),{rowProps:s,gridCellProps:p,removeButtonProps:l,allowsRemoving:c,isDisabled:d,isSelected:m,allowsSelection:u}=useTag({item:e},t,a),y=nt.useRef(null),{buttonProps:f}=useButton(l,y),{hoverProps:b,isHovered:g}=useHover({isDisabled:d}),{hoverProps:_,isHovered:v}=useHover({isDisabled:d}),h=e.value?.icon,I=e.value?.data?.variant??o,P=r==="md"?XIcon$2:XIcon$1,C=r==="md"?CheckmarkIcon$3:CheckmarkIcon$1;return jsx("div",{...mergeProps(s,n,_),ref:a,className:classNames(Gr({isFocusVisible:i,variant:I,isDisabled:d,allowsRemoving:c,isSelected:m,allowsSelection:u,isHovered:v,size:r}),Wr({variant:I,isDisabled:d,isSelected:m}),"BaselineUI-Tag"),children:jsxs("div",{...p,className:Lc,children:[m?jsx(C,{size:r==="md"?16:12,className:classNames(No({variant:I,isDisabled:d,isSelected:m}),"BaselineUI-Tag-Icon")}):null,!m&&h?jsx(h,{size:r==="md"?16:12,className:classNames(No({variant:I,isDisabled:d,isSelected:m}),"BaselineUI-Tag-Icon")}):null,jsx(L,{paddingY:r==="md"?"sm":"none",typography:r==="sm"?"label.sm.medium":"label.md.medium",children:e.rendered}),c?jsx("button",{...mergeProps(f,b),className:Dc({variant:I,isHovered:g}),children:jsx(P,{size:r==="md"?12:8})}):null]})})};var Ac=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,size:n="md",...i},s)=>{let p=useMemo(()=>a.map(u=>({...u,data:{variant:u.variant}})),[a]),l=ae(),c=nt.useRef(null),d=useListState({...i,items:p,children:l}),{gridProps:m}=useTagGroup(i,d,c);return jsx("div",{...m,className:classNames(Mc,"BaselineUI-TagGroup",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,c),children:[...d.collection].map(u=>jsx(Hc,{state:d,item:u,variant:i.variant,size:n},u.key))})});Ac.displayName="TagGroup";var jc="_1yep5z6lh",$c=z({defaultClassName:"_1kvz17db _1yep5z6l4 _1yep5z6l6",variantClassNames:{showActionsOnTriggerOnly:{true:"_1kvz17dc"},isTriggered:{true:"_1kvz17dd"}},defaultVariants:{},compoundVariants:[]}),Uc=z({defaultClassName:"_1kvz17d0 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6l4 _1yep5z6l5",variantClassNames:{isExpanded:{true:"_1kvz17d1"}},defaultVariants:{},compoundVariants:[]}),Kc="_1yep5z6ev _1yep5z6dy",qc=z({defaultClassName:"_1kvz17d2 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6l4 _1yep5z6l7",variantClassNames:{isFocusVisible:{true:"_1kvz17d3"},isHovered:{true:"_1yep5z6g2",false:"_1yep5z6g3"},isDisabled:{true:"z9nup83"}},defaultVariants:{},compoundVariants:[]}),Gc="_1kvz17da _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6dz",Wc=z({defaultClassName:"_1kvz17d7 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{isDisabled:{true:"_1yep5z6ey",false:"_1yep5z6eu"}},defaultVariants:{},compoundVariants:[]});var Mn=nt.forwardRef(({children:e,className:t,style:o},r)=>{let{headers:a}=useContext(Ye),{disabledKeys:n}=useContext(Ye),{keyboardProps:i}=useKeyboard({onKeyDown:s=>{let p=Oe(s.target),l=[...a?.keys()||[]].findIndex(y=>a?.get(y)?.current===p?.activeElement),c=a?.get(l||0),d=a?.size||0,m=y=>{let f=a.get(y-1<0?d-1:y-1);n?.has(f?.current?.getAttribute("data-key")||"")?m(y-1):f?.current?.focus();},u=y=>{let f=a.get((y+1)%d);n?.has(f?.current?.getAttribute("data-key")||"")?u(y+1):f?.current?.focus();};if(c)switch(s.key){case"Home":{s.preventDefault(),u(-1);break}case"End":{s.preventDefault(),m(d);break}case"ArrowDown":{s.preventDefault(),u(l);break}case"ArrowUp":{s.preventDefault(),m(l);break}default:s.continuePropagation();}}});return jsx("div",{...i,style:o,className:classNames(jc,t),ref:r,children:nt.Children.map(e,(s,p)=>nt.cloneElement(s,{index:p}))})});Mn.displayName="AccordionBase";var Ye=nt.createContext({expandedKeys:new Set,setExpandedKeys:()=>{},disabledKeys:new Set,headers:new Map,expansionMode:"multiple"}),Zc=nt.forwardRef(({children:e,disabledKeys:t,defaultExpandedKeys:o=new Set,expandedKeys:r,expansionMode:a="multiple",onChange:n,className:i,style:s},p)=>{let[l,c]=nt.useState(o),d=nt.useRef(new Map).current,[m,u]=nt.useState(a);useEffect(()=>{u(m);},[m]),useEffect(()=>{n?.(l);},[l,n]);let y=useMemo(()=>({expandedKeys:r||l,setExpandedKeys:r?()=>{}:c,disabledKeys:t,headers:d,expansionMode:m}),[r,l,t,d,m]);return jsx(Ye.Provider,{value:y,children:jsx(FocusScope,{children:jsx(Mn,{className:i,style:s,ref:p,children:e})})})});Zc.displayName="Accordion";var En=nt.forwardRef(({title:e,actions:t,controlId:o,value:r,id:a,index:n,subLabel:i,showActionsOnTriggerOnly:s},p)=>{let l=nt.useRef(null),{expandedKeys:c,setExpandedKeys:d,expansionMode:m,disabledKeys:u,headers:y}=useContext(Ye),f=u?.has(r),b=useFocusManager();invariant(b);let{focusNext:g,focusPrevious:_}=b,{keyboardProps:v}=useKeyboard({onKeyDown:w=>{w.key==="ArrowRight"?g({wrap:!0}):w.key==="ArrowLeft"?_({wrap:!0}):w.continuePropagation();},isDisabled:f});useEffect(()=>{invariant(typeof n=="number","AccordionItem must have an index"),y?.set(n,l);},[n,y]);let h=()=>{d(w=>{let B=new Set(w);return B.has(r)?B.delete(r):(m==="single"&&B.clear(),B.add(r)),B});},{buttonProps:I}=useButton({"aria-expanded":c.has(r),"aria-controls":o,onPress:h,isDisabled:f},l),{pressProps:P}=usePress({onPress:h,isDisabled:f}),{focusProps:C,isFocusVisible:x}=useFocusRing(),{hoverProps:T,isHovered:N}=useHover({isDisabled:f}),{focusProps:R,isFocusVisible:S}=useFocusRing({within:!0}),k=c.has(r);return jsxs("h3",{...mergeProps(v,P,T,R),className:qc({isFocusVisible:x,isHovered:N,isDisabled:f}),ref:p,children:[jsxs("div",{className:Wc({isDisabled:!!f}),children:[jsx(ChevronRightIcon,{className:Uc({isExpanded:k}),size:8}),jsx("button",{...mergeProps(I,C),id:a,"data-key":r,className:Gc,ref:l,children:e})]}),t?.length?jsx("div",{"data-testid":"action-buttons",className:$c({showActionsOnTriggerOnly:s,isTriggered:S||N}),children:t.map((w,B)=>jsx(E,{variant:"secondary",size:"sm",excludeFromTabOrder:!0,isDisabled:f,...w},B))}):null,i?jsx("div",{className:Kc,children:i}):null]})});En.displayName="AccordionHeader";var nd=nt.forwardRef(({title:e,actions:t,children:o,value:r,index:a,subLabel:n,style:i,className:s,showActionsOnTriggerOnly:p},l)=>{let c=useId(),d=useId(),{expandedKeys:m}=useContext(Ye),u=nt.useRef(null),y=m.has(r),f=St(),b=useReducedMotion(),g=useTransition(y?[r]:[],{from:!f&&!b&&{height:0,opacity:0},enter:()=>async _=>{await _({height:u.current?.scrollHeight,opacity:1});},leave:{height:0,opacity:0},keys:_=>_.toString()});return jsxs(Fragment,{children:[jsx(FocusScope,{children:jsx(En,{value:r,actions:t,id:d,title:e,controlId:c,ref:l,index:a,subLabel:n,showActionsOnTriggerOnly:p})}),g(_=>jsx(animated.div,{role:"region","aria-labelledby":d,id:c,style:{..._,overflow:"hidden"},children:jsx("div",{ref:u,className:s,style:i,children:o})}))]})});nd.displayName="AccordionItem";var Do=nt.forwardRef(({variant:e,isOpen:t,selectedIcon:o,validationState:r="valid",valueProps:a,label:n,className:i,style:s,"data-block-id":p,"data-block-class":l,...c},d)=>{let m=nt.useRef(null),{buttonProps:u,isPressed:y}=useButton({...c,isDisabled:c.isDisabled||c.isReadOnly},m),{hoverProps:f,isHovered:b}=useHover({isDisabled:c.isDisabled}),{focusProps:g,isFocused:_,isFocusVisible:v}=useFocusRing(),h=jt({isReadOnly:c.isReadOnly,validationState:r});c.isReadOnly&&(u.disabled=!1);let I=filterTruthyValues({"data-disabled":c.isDisabled,"data-readonly":c.isReadOnly,"data-focused":_,"data-focus-visible":v,"data-hovered":b,"data-pressed":y,"data-open":t,"data-block-id":p,"data-block-class":l});return jsxs("button",{...mergeProps(u,f,g,I),ref:M(d,m),className:classNames(ip({isFocused:v,isDisabled:c.isDisabled,isOpen:t,isHovered:b,variant:e}),wt({variant:e,isHovered:b,isFocused:v,validationState:r,isDisabled:!!c.isDisabled,isReadOnly:c.isReadOnly}),i,"BaselineUI-Select-Button"),style:s,children:[jsxs("span",{className:lp,children:[o?jsx(o,{size:24}):null,jsx("span",{...a,children:n})]}),h?jsx("span",{"aria-hidden":!0,className:classNames(Rt({validationState:r,isReadOnly:!!c.isReadOnly}),sp),children:jsx(h,{size:16})}):null,jsx("span",{"aria-hidden":!0,children:jsx(CaretDownIcon,{size:8,className:np({isOpen:t})})})]})});Do.displayName="SelectButton";var Yr=nt.createContext({state:null,popoverAnchorRef:null}),Hn=nt.forwardRef(({className:e,style:t,labelPosition:o="top",variant:r="primary","data-block-id":a,"data-block-class":n,optionStyle:i,optionClassName:s,placement:p="bottom start",triggerClassName:l,triggerStyle:c,state:d,renderTrigger:m=({buttonProps:f,selectedValue:b,valueProps:g,isOpen:_,ref:v})=>{let h=b&&"icon"in b&&b.icon;return jsx(Do,{...f,className:l,style:c,isOpen:_,isReadOnly:u.isReadOnly,ref:v,variant:r,validationState:u.validationState,selectedIcon:h||void 0,label:b?"label"in b&&b?.label:u.placeholder,valueProps:g})},...u},y)=>{let{popoverAnchorRef:f}=useContext(Yr),b=nt.useRef(null),g=ve(u.portalContainer),{labelProps:_,triggerProps:v,valueProps:h,menuProps:I,descriptionProps:P,errorMessageProps:C}=useSelect({...u,validationState:u.validationState==="error"?"invalid":"valid"},d,b),x=ke({...u,descriptionProps:P,errorMessageProps:C,labelPosition:o}),T=d.selectedItem?.value??null;return jsxs(it.Provider,{value:d,children:[jsxs("div",{style:t,className:classNames(Ue({labelPosition:o}),"BaselineUI-Select",e),"data-block-id":a,"data-block-class":n,ref:y,children:[u.label||x?jsxs("div",{className:$e({labelPosition:o,hasMessage:!!x}),children:[u.label?jsx("div",{..._,className:classNames(je,"BaselineUI-Select-Label"),children:u.label}):null,o==="start"&&x]}):null,jsx(HiddenSelect,{state:d,triggerRef:b,isDisabled:u.isDisabled,label:u.label,name:u.name}),m({buttonProps:v,selectedValue:T,valueProps:h,isOpen:d.isOpen,ref:b}),o==="top"&&x]}),d?jsx(be,{placement:p,portalContainer:g,offset:u.offset||2,state:d,triggerRef:f||b,style:t,className:classNames(We,"BaselineUI-Select-Popover"),...u,children:jsx(le,{...I,label:u.label,items:u.items,showSelectedIcon:u.showSelectedIcon,className:Hr,optionStyle:i,optionClassName:s})}):null]})});Hn.displayName="SelectCore";var cd=nt.forwardRef((e,t)=>{let o=ae(),r=useSelectState({...e,validationState:e.validationState==="error"?"invalid":"valid",children:o});return jsx(Hn,{...e,ref:t,state:r})});cd.displayName="SelectStandalone";var Qe=nt.forwardRef((e,t)=>{let{state:o}=useContext(Yr);return useEffect(()=>{invariant(o||e.items,"Select: A `state` that can be passed via context or `items` are required.");},[e.items,o]),o?jsx(Hn,{state:o,...e,ref:t}):jsx(cd,{...e,ref:t})});Qe.displayName="Select";var ud=nt.forwardRef(({className:e,style:t,variant:o,"data-block-id":r,icon:a,tooltipProps:n,...i},s)=>{let p=nt.useRef(null),l=useCallback(({buttonProps:c,selectedValue:d,valueProps:m,isOpen:u,ref:y})=>{let f=d&&"icon"in d&&d.icon;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],offset:4,...n,children:jsx(Do,{...c,isOpen:u,isReadOnly:i.isReadOnly,ref:y,variant:o,validationState:i.validationState,selectedIcon:f||void 0,label:d?"label"in d&&d?.label:i.placeholder,valueProps:m})})},[i,n,o]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:classNames("BaselineUI-IconSelect",e),"data-block-id":r,style:t,ref:M(s,p),children:[a?jsx(a,{size:24,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(Qe,{...i,renderTrigger:l})]})});ud.displayName="IconSelect";var md="_1017q4c5",fd=z({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),yd="_1017q4c4";var Gz={sm:AvatarIcon,md:AvatarIcon$1},Xt=nt.forwardRef(({className:e,style:t,size:o="md",icon:r=Gz[o],name:a,imgSrc:n,showInitials:i,isDisabled:s,hasNotifications:p,imgLoading:l,"data-block-id":c,"data-block-class":d},m)=>{let{imgProps:u}=Tt({src:n,alt:a}),y=a?.split(" ").map(f=>f[0]).join("");return jsxs("span",{className:classNames(fd({size:o,isDisabled:s}),"BaselineUI-Avatar",e),"data-disabled":s,ref:m,style:t,"aria-disabled":s,"data-block-id":c,"data-block-class":d,children:[n?jsx("img",{...u,loading:l,className:yd}):null,!i&&!n&&jsx(r,{size:o==="sm"?16:24}),i&&!n?o==="sm"?y[0]:y:null,p?jsx("div",{"data-testid":"notification",className:md}):null]})});Xt.displayName="Avatar";var bd="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf",gd=z({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6l4 _1yep5z6l7 _1yep5z6ev _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z610r"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z610v"},variant:{primary:"_1x62fhbb _1yep5z6zs",ghost:"_1yep5z6zv"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mo"],[{variant:"primary",isSelected:!0},"_1yep5z61nv"],[{variant:"ghost",isSelected:!0,isFocusVisible:!1},"_1x62fhbd"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61mv"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1x62fhbe _1yep5z6ey"],[{variant:"primary",isHovered:!0},"_1yep5z61nw"]]}),vd=z({defaultClassName:"_1x62fhb3 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6vf _1yep5z6vg _1yep5z6vh"}},defaultVariants:{},compoundVariants:[]}),_d="_1x62fhbl",Vn=z({defaultClassName:"_1x62fhbf _1yep5z6f6",variantClassNames:{isHovered:{true:"_1yep5z6112"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z6114"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:!0,isDisabled:!1},"_1yep5z61mz"],[{variant:"ghost",isSelected:!0,isDisabled:!1},"_1yep5z61n4"],[{variant:"ghost",isDisabled:!0,isSelected:!0},"_1yep5z61n1"]]}),zd="_1yep5z6lo _1yep5z6ll _1yep5z6hu _1yep5z6ln",hd=z({defaultClassName:"_1x62fhb0 _1yep5z6lh _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{variant:{primary:"_1yep5z6120",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var xd=({state:e,...t})=>{let o=nt.useRef(null),{tabPanelProps:r}=useTabPanel(t,e,o),{selectedItem:a}=e,{focusProps:n,isFocusVisible:i}=useFocusRing();if(!a?.value)return null;let{className:s,style:p,"data-block-id":l}=a.value;return jsx("div",{...mergeProps(r,n),ref:o,className:classNames({[zd]:i},"Baseline-Tabs-TabPanel",s),"data-block-id":l,style:p,children:a?.props.children})};var $n=nt.forwardRef(({className:e,style:t,tabHeaderStyle:o,tabHeaderClassName:r,variant:a="primary",actions:n,onRemove:i,"data-block-id":s,...p},l)=>{let c=useTabListState({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues}),d=nt.useRef(null),{tabListProps:m}=useTabList({...p,selectedKey:p.selectedValue,defaultSelectedKey:p.defaultSelectedValue,disabledKeys:p.disabledValues},c,d);return jsxs("div",{className:classNames("BaselineUI-Tabs",e),style:t,ref:l,"data-block-id":s,children:[jsxs("div",{className:classNames(hd({variant:a}),r),style:o,children:[jsx("div",{...m,className:vd({variant:a}),ref:d,children:[...c.collection].map(u=>(invariant(u.value,"TabItem requires a value prop"),jsx(Pd,{item:u,state:c,onRemove:i,variant:a},u.key)))}),n?.map((u,y)=>jsx("div",{className:bd,children:jsx(E,{...u,variant:"secondary",size:"sm",className:classNames(_d,u.className)})},y))]}),jsx(xd,{state:c},c.selectedItem?.key)]})});$n.displayName="TabsBase";var Pd=({item:e,onRemove:t,state:o,variant:r})=>{let{key:a,value:n}=e,i=nt.useRef(null),{tabProps:s,isSelected:p,isDisabled:l}=useTab({key:a},o,i),{hoverProps:c,isHovered:d}=useHover({});invariant(n,"TabButton requires a value prop");let{title:m,icon:u,titleStyle:y,titleClassName:f}=n,{focusProps:b,isFocusVisible:g,isFocused:_}=useFocusRing(),{keyboardProps:v}=useKeyboard({onKeyDown:I=>{I.key==="Backspace"&&t?t(a):I.continuePropagation();}}),h=filterTruthyValues({"data-selected":p,"data-disabled":l,"data-focused":_,"data-hovered":d,"data-focus-visible":g});return jsxs("div",{...mergeProps(v,s,c,b,h),className:classNames(gd({isHovered:d,isSelected:p,isFocusVisible:g,isDisabled:l,variant:r}),"BaselineUI-Tabs-TabButton",f),style:y,ref:i,children:[u?jsx(u,{size:20,className:Vn({isHovered:d,isSelected:p,isDisabled:l,variant:r})}):null,m,t?jsx(E,{variant:"secondary",elementType:"div",icon:XIcon$1,size:"xxs",onPress:()=>{t(a);},excludeFromTabOrder:!0,UNSAFE_NON_INTERACTIVE:!0,style:{display:"inline-flex",opacity:p||_||d?1:0},className:Vn({isHovered:d,isSelected:p,isDisabled:l,variant:r})}):null]})};Pd.displayName="TabButton";var Id=nt.forwardRef(function({children:t,...o},r){let a=useMemo(()=>nt.Children.map(t,n=>!n||!nt.isValidElement(n)||typeof n.type=="string"?null:{...n.props,id:n.props.value}).filter(Boolean),[t]);return jsx($n,{...o,ref:r,items:a,children:n=>jsx(Item,{title:n.title,children:n.children},n.key)})});Id.displayName="Tabs";var Rd=({children:e,title:t,value:o})=>(invariant(o,"TabItem requires a value prop"),invariant(t,"TabItem requires a title prop"),invariant(e,"TabItem requires children"),e);Rd.displayName="TabItem";var wd={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 Td=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"]]}),Nd=z({defaultClassName:"kfun6yt",variantClassNames:{size:{sm:"kfun6yu",md:"kfun6yv"}},defaultVariants:{},compoundVariants:[]}),Ld=z({defaultClassName:"kfun6yp",variantClassNames:{arrangement:{single:"kfun6yq",multi:"kfun6yr",compact:"kfun6ys"}},defaultVariants:{},compoundVariants:[]}),Md=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:[]}),Ed=z({defaultClassName:"kfun6yd z9nup82",variantClassNames:{arrangement:{single:"kfun6ye",multi:"kfun6yf",compact:"kfun6yg"}},defaultVariants:{},compoundVariants:[]});var Ph={error:{sm:ErrorAltCircleFilledIcon,md:ErrorAltCircleFilledIcon$1},info:{sm:InfoCircleFilledIcon,md:InfoCircleFilledIcon$1},success:{sm:CheckmarkCircleFilledIcon,md:CheckCircleFilledIcon},warning:{sm:WarningFilledIcon,md:WarningFilledIcon$1}},Bd=nt.forwardRef(({className:e,description:t,actionLabel:o,onAction:r,style:a,variant:n="info",title:i,arrangement:s="single",onClose:p,size:l="sm","data-block-id":c,"data-block-class":d},m)=>{let u=F(wd),y=o&&jsx(G,{variant:s==="compact"?"tertiary":"ghost",label:o,onPress:r}),f=Ph[n][l];return jsxs("div",{className:classNames(Sd({variant:n,arrangement:s,hasButton:!!o||!!p,hasCloseButton:!!p}),"BaselineUI-InlineAlert",e),"data-block-id":c,"data-block-class":d,style:a,role:"alert",ref:m,children:[jsxs("div",{className:Ed({arrangement:s}),children:[jsx(f,{className:Md({variant:n}),size:16}),jsxs("div",{className:Td({arrangement:s}),children:[jsx("h3",{className:Dd({size:l}),children:i}),jsx("section",{className:Nd({size:l}),children:t})]}),s==="compact"&&y]}),jsxs("div",{className:Ld({arrangement:s}),children:[s!=="compact"&&y,p?jsx(E,{variant:"secondary",icon:XCircleFilledIcon,size:"sm",onPress:p,"aria-label":u.formatMessage("close")}):null]})]})});Bd.displayName="InlineAlert";var Je={ar:{add:"\u0625\u0636\u0627\u0641\u0629",addColor:"\u0625\u0636\u0627\u0641\u0629 \u0644\u0648\u0646",cancel:"\u0625\u0644\u063A\u0627\u0621",colorFormat:"\u062A\u0646\u0633\u064A\u0642 \u0627\u0644\u0644\u0648\u0646",colorPresets:"\u0627\u0644\u0623\u0644\u0648\u0627\u0646 \u0627\u0644\u0645\u0633\u0628\u0642\u0629",customColors:"\u0623\u0644\u0648\u0627\u0646 \u0645\u062E\u0635\u0635\u0629",newColor:"\u0644\u0648\u0646 \u0645\u062E\u0635\u0635 \u062C\u062F\u064A\u062F",noColor:"\u0644\u0627 \u064A\u0648\u062C\u062F",removeColor:"\u0625\u0632\u0627\u0644\u0629 \u0627\u0644\u0644\u0648\u0646",transparent:"\u0634\u0641\u0627\u0641"},cs:{add:"P\u0159idat",addColor:"P\u0159idat barvu",cancel:"Zru\u0161it",colorFormat:"Form\xE1t barvy",colorPresets:"P\u0159edvolby barev",customColors:"Vlastn\xED barvy",newColor:"Vlastn\xED barva",noColor:"Nen\xED",removeColor:"Odebrat barvu",transparent:"Pr\u016Fhledn\xE1"},cy:{add:"Ychwanegu",addColor:"Ychwanegu Lliw",cancel:"Canslo",colorFormat:"Fformat Lliw",colorPresets:"Rhagosodiadau Lliw",customColors:"Lliwiau Custom",newColor:"Lliw Personol Newydd",noColor:"Dim",removeColor:"Tynnu Lliw",transparent:"Tryloyw"},da:{add:"Tilf\xF8j",addColor:"Tilf\xF8j Farve",cancel:"Annuller",colorFormat:"Farveformat",colorPresets:"Farvevalg",customColors:"Brugerdefinerede farver",newColor:"Ny tilpasset farve",noColor:"Ingen",removeColor:"Fjern Farve",transparent:"Transparent"},de:{add:"Hinzuf\xFCgen",addColor:"Farbe hinzuf\xFCgen",cancel:"Abbrechen",colorFormat:"Farbformat",colorPresets:"Farbvorlagen",customColors:"Benutzerdefinierte Farben",newColor:"Neue benutzerdefinierte Farbe",noColor:"Kein",removeColor:"Farbe entfernen",transparent:"Transparent"},el:{add:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7",addColor:"\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",cancel:"\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7",colorFormat:"\u039C\u03BF\u03C1\u03C6\u03AE \u03C7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",colorPresets:"\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",customColors:"\u03A0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03B1 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03B1",newColor:"\u039D\u03AD\u03BF \u03C0\u03C1\u03BF\u03C3\u03B1\u03C1\u03BC\u03BF\u03C3\u03BC\u03AD\u03BD\u03BF \u03C7\u03C1\u03CE\u03BC\u03B1",noColor:"\u039A\u03B1\u03BD\u03AD\u03BD\u03B1\u03C2",removeColor:"\u0391\u03C6\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7 \u03A7\u03C1\u03CE\u03BC\u03B1\u03C4\u03BF\u03C2",transparent:"\u0397\u03BC\u03B9\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AE\u03C2"},"en-GB":{add:"Add",addColor:"Add Colour",cancel:"Cancel",colorFormat:"Colour Format",colorPresets:"Colour Presets",customColors:"Custom Colours",newColor:"New Custom Colour",noColor:"None",removeColor:"Remove Colour",transparent:"Transparent"},en:{add:"Add",addColor:"Add Color",cancel:"Cancel",colorFormat:"Color Format",colorPresets:"Color Presets",customColors:"Custom Colors",newColor:"New Custom Color",noColor:"None",removeColor:"Remove Color",transparent:"Transparent"},es:{add:"A\xF1adir",addColor:"A\xF1adir color",cancel:"Cancelar",colorFormat:"Formato de color",colorPresets:"Preajustes de color",customColors:"Colores personalizados",newColor:"Nuevo color personalizado",noColor:"Ninguna",removeColor:"Eliminar color",transparent:"Transparente"},fi:{add:"Lis\xE4\xE4",addColor:"Lis\xE4\xE4 v\xE4ri",cancel:"Kumoa",colorFormat:"V\xE4rimuoto",colorPresets:"V\xE4rin esiasetukset",customColors:"Mukautetut v\xE4rit",newColor:"Uusi muokattu v\xE4ri",noColor:"Ei mit\xE4\xE4n",removeColor:"Poista v\xE4ri",transparent:"L\xE4pin\xE4kyv\xE4"},"fr-CA":{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},fr:{add:"Ajouter",addColor:"Ajouter une couleur",cancel:"Annuler",colorFormat:"Format de couleur",colorPresets:"Pr\xE9r\xE9glages de couleur",customColors:"Couleurs personnalis\xE9es",newColor:"Nouvelle couleur personnalis\xE9e",noColor:"Aucune",removeColor:"Supprimer la couleur",transparent:"Transparent"},he:{add:"\u05D4\u05D5\u05E1\u05E4\u05D4",addColor:"\u05D4\u05D5\u05E1\u05E3 \u05E6\u05D1\u05E2",cancel:"\u05D1\u05D9\u05D8\u05D5\u05DC",colorFormat:"\u05E4\u05D5\u05E8\u05DE\u05D8 \u05E6\u05D1\u05E2",colorPresets:"\u05DE\u05E6\u05D1\u05D9 \u05E6\u05D1\u05E2 \u05DE\u05EA\u05D5\u05DB\u05E0\u05EA\u05D9\u05DD",customColors:"\u05E6\u05D1\u05E2\u05D9\u05DD \u05DE\u05D5\u05EA\u05D0\u05DE\u05D9\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA",newColor:"\u05E6\u05D1\u05E2 \u05DE\u05D5\u05EA\u05D0\u05DD \u05D0\u05D9\u05E9\u05D9\u05EA \u05D7\u05D3\u05E9",noColor:"\u05DC\u05DC\u05D0",removeColor:"\u05D4\u05E1\u05E8 \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3"},hr:{add:"Dodati",addColor:"Dodaj boju",cancel:"Otka\u017Ei",colorFormat:"Format boje",colorPresets:"Prijedlozi boja",customColors:"Prilago\u0111ene boje",newColor:"Nova prilago\u0111ena boja",noColor:"Prazno",removeColor:"Ukloni boju",transparent:"Prozirna"},id:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batalkan",colorFormat:"Format Warna",colorPresets:"Preset Warna",customColors:"Warna Kustom",newColor:"Warna Khusus Baru",noColor:"Tidak ada",removeColor:"Hapus Warna",transparent:"Transparan"},it:{add:"Aggiungi",addColor:"Aggiungi colore",cancel:"Annulla",colorFormat:"Formato del colore",colorPresets:"Colori predefiniti",customColors:"Colori personalizzati",newColor:"Nuovo colore personalizzato",noColor:"Nessuno",removeColor:"Rimuovi colore",transparent:"Trasparente"},ja:{add:"\u8FFD\u52A0",addColor:"\u8272\u3092\u8FFD\u52A0",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorFormat:"\u30AB\u30E9\u30FC\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8",colorPresets:"\u30AB\u30E9\u30FC\u30D7\u30EA\u30BB\u30C3\u30C8",customColors:"\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",newColor:"\u65B0\u898F\u30AB\u30B9\u30BF\u30E0\u30AB\u30E9\u30FC",noColor:"\u306A\u3057",removeColor:"\u8272\u3092\u524A\u9664",transparent:"\u900F\u660E"},ko:{add:"\uCD94\uAC00",addColor:"\uC0C9\uC0C1 \uCD94\uAC00",cancel:"\uCDE8\uC18C",colorFormat:"\uC0C9\uC0C1 \uD615\uC2DD",colorPresets:"\uC0C9\uC0C1 \uBBF8\uB9AC\uC124\uC815",customColors:"\uC0AC\uC6A9\uC790 \uC815\uC758 \uC0C9\uC0C1",newColor:"\uC0C8\uB85C\uC6B4 \uC0AC\uC6A9\uC790\uC9C0\uC815 \uC0C9\uC0C1",noColor:"\uC5C6\uC74C",removeColor:"\uC0C9\uC0C1 \uC81C\uAC70",transparent:"\uD22C\uBA85"},ms:{add:"Tambah",addColor:"Tambah Warna",cancel:"Batal",colorFormat:"Format Warna",colorPresets:"Praset Warna",customColors:"Warna Kustom",newColor:"Warna Tersuai Baharu",noColor:"Tiada",removeColor:"Buang Warna",transparent:"Lut Sinar"},"nb-NO":{add:"Legg til",addColor:"Legg til farge",cancel:"Avbryt",colorFormat:"Fargeformat",colorPresets:"Fargeinnstillinger",customColors:"Egendefinerte farger",newColor:"Ny tilpasset farge",noColor:"Ingen",removeColor:"Fjern farge",transparent:"Gjennomsiktig"},nl:{add:"Voeg toe",addColor:"Kleur toevoegen",cancel:"Annuleer",colorFormat:"Kleurformaat",colorPresets:"Kleurvoorinstellingen",customColors:"Aangepaste kleuren",newColor:"Nieuwe aangepaste kleur",noColor:"Geen",removeColor:"Kleur verwijderen",transparent:"Doorzichtig"},pl:{add:"Dodaj",addColor:"Dodaj kolor",cancel:"Anuluj",colorFormat:"Format koloru",colorPresets:"Wst\u0119pnie ustawione kolory",customColors:"Niestandardowe kolory",newColor:"Nowy kolor niestandardowy",noColor:"Brak",removeColor:"Usu\u0144 kolor",transparent:"Prze\u015Bwiecaj\u0105ce"},"pt-PT":{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Predefini\xE7\xF5es de cor",customColors:"Cores personalizadas",newColor:"Nova cor personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},pt:{add:"Adicionar",addColor:"Adicionar cor",cancel:"Cancelar",colorFormat:"Formato de cor",colorPresets:"Pr\xE9-ajustes de Cores",customColors:"Cores personalizadas",newColor:"Nova Cor Personalizada",noColor:"Nenhum",removeColor:"Remover cor",transparent:"Transparente"},ru:{add:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C",addColor:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0446\u0432\u0435\u0442",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0446\u0432\u0435\u0442\u0430",colorPresets:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",customColors:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0446\u0432\u0435\u0442\u0430",newColor:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442",noColor:"\u041D\u0435\u0442",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",transparent:"\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439"},sk:{add:"Prida\u0165",addColor:"Prida\u0165 farbu",cancel:"Zru\u0161i\u0165",colorFormat:"Form\xE1t farby",colorPresets:"Predvo\u013Eby farieb",customColors:"Vlastn\xE9 farby",newColor:"Vlastn\xE1 farba",noColor:"\u017Diadny",removeColor:"Odstr\xE1ni\u0165 farbu",transparent:"Prieh\u013Eadn\xE1"},sl:{add:"Dodaj",addColor:"Dodaj barvo",cancel:"Prekli\u010Di",colorFormat:"Barvni format",colorPresets:"Barvne predloge",customColors:"Prilagojene barve",newColor:"Nova barva po meri",noColor:"Prazna stran",removeColor:"Odstrani barvo",transparent:"Prosojna"},sv:{add:"L\xE4gg till",addColor:"L\xE4gg till f\xE4rg",cancel:"Avbryt",colorFormat:"F\xE4rgformat",colorPresets:"F\xF6rval f\xF6r f\xE4rger",customColors:"Anpassade f\xE4rger",newColor:"Ny anpassad f\xE4rg",noColor:"Ingen",removeColor:"Ta bort f\xE4rg",transparent:"Genomskinligt"},th:{add:"\u0E40\u0E1E\u0E34\u0E48\u0E21",addColor:"\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2A\u0E35",cancel:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",colorFormat:"\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E2A\u0E35",colorPresets:"\u0E04\u0E48\u0E32\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E31\u0E49\u0E07\u0E44\u0E27\u0E49\u0E25\u0E48\u0E27\u0E07\u0E2B\u0E19\u0E49\u0E32",customColors:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07",newColor:"\u0E2A\u0E35\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48",noColor:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E40\u0E25\u0E22",removeColor:"\u0E25\u0E1A\u0E2A\u0E35",transparent:"\u0E42\u0E1B\u0E23\u0E48\u0E07\u0E43\u0E2A"},tr:{add:"Ekle",addColor:"Renk Ekle",cancel:"Vazge\xE7",colorFormat:"Renk Format\u0131",colorPresets:"Renk \xD6nayarlar\u0131",customColors:"\xD6zel Renkler",newColor:"Yeni \xF6zel renk",noColor:"Hi\xE7biri",removeColor:"Rengi Kald\u0131r",transparent:"\u015Eeffaf"},uk:{add:"\u0414\u043E\u0434\u0430\u0442\u0438",addColor:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",cancel:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438",colorFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u043A\u043E\u043B\u044C\u043E\u0440\u0443",colorPresets:"\u0411\u0456\u0431\u043B\u0456\u043E\u0442\u0435\u043A\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",customColors:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u043A\u043E\u043B\u044C\u043E\u0440\u0438",newColor:"\u041D\u043E\u0432\u0438\u0439 \u0432\u043B\u0430\u0441\u043D\u0438\u0439 \u043A\u043E\u043B\u0456\u0440",noColor:"\u041D\u0435\u043C\u0430\u0454",removeColor:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u043A\u043E\u043B\u0456\u0440",transparent:"\u041F\u0440\u043E\u0437\u043E\u0440\u0438\u0439"},"zh-Hans":{add:"\u6DFB\u52A0",addColor:"\u6DFB\u52A0\u989C\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u989C\u8272\u683C\u5F0F",colorPresets:"\u989C\u8272\u9884\u8BBE",customColors:"\u81EA\u5B9A\u4E49\u989C\u8272",newColor:"\u65B0\u81EA\u5B9A\u4E49\u989C\u8272",noColor:"\u65E0",removeColor:"\u79FB\u9664\u989C\u8272",transparent:"\u900F\u660E"},"zh-Hant":{add:"\u52A0\u5165",addColor:"\u6DFB\u52A0\u984F\u8272",cancel:"\u53D6\u6D88",colorFormat:"\u984F\u8272\u683C\u5F0F",colorPresets:"\u984F\u8272\u9810\u8A2D\u9805",customColors:"\u81EA\u8A02\u984F\u8272",newColor:"\u65B0\u81EA\u8A02\u984F\u8272",noColor:"\u7121",removeColor:"\u79FB\u9664\u984F\u8272",transparent:"\u900F\u660E"}};var ea=({children:e})=>{let{triggerProps:t}=nt.useContext(Ge);return jsx(PressResponder,{...t,children:e})};ea.displayName="ModalTrigger";var Nh=({children:e})=>{let{state:t}=nt.useContext(Ge);return jsx(PressResponder,{onPress:()=>{t?.close();},children:e})};var Fd="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6lh",Hd="_1dbkl5e",Od=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 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6ls _1yep5z6lk _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6eu _1yep5z6lj _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup83 _1yep5z610v"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),Vd="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6kd _1yep5z6ke _1yep5z6kf",Ad=z({defaultClassName:"_1dbkl50 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6dy _1yep5z6ev",variantClassNames:{labelPosition:{top:"_1yep5z6oc _1yep5z6od _1yep5z6oe",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),ta="_1dbkl5l _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z69f _1yep5z69g _1yep5z69h",jd="_1dbkl5f z9nup87",oa="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",$d="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6lk",Ud="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6dy _1yep5z6ev _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jd _1yep5z6je _1yep5z6jf",ra=z({defaultClassName:"_1dbkl5h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6n0 _1yep5z6n1 _1yep5z6n2"}},defaultVariants:{},compoundVariants:[]}),qn="_1dbkl5v _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix",Kd=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 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lt _1yep5z6h4 _1yep5z6lk _1yep5z6eu _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z612y"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z617e"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isFocused:!1},"_1yep5z61oz"]]}),qd=z({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f5 _1yep5z6lj _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6l4 _1yep5z6l7",variantClassNames:{isHovered:{true:"_1yep5z6120"},isFocusVisible:{true:"_1yep5z617k _1yep5z617i _1yep5z617l _1yep5z613r"},isDisabled:{true:"_1yep5z6114"}},defaultVariants:{},compoundVariants:[]}),Fo="_1dbkl5u",aa="_1dbkl5g _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7",na="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69f _1yep5z69g _1yep5z69h",Gn="_1dbkl5x",Gd="_1dbkl5w",Wn="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69l _1yep5z69m _1yep5z69n",ia=z({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lo _1yep5z6ia _1yep5z6ib _1yep5z6ic _1yep5z6lt _1yep5z6lw",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z617i _1yep5z613r _1yep5z617k"}},defaultVariants:{},compoundVariants:[]}),Xn="z9nup84 z9nup86 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6la _1yep5z6lb _1yep5z6ld _1yep5z6lc _1yep5z6ia _1yep5z6ib _1yep5z6ic";var Wd=z({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6le _1yep5z6i6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617n"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isFocusVisible:!0},"_1344e9q6"],[{isSelected:!0,isFocusVisible:!0},"_1344e9q7 _1yep5z61th _1yep5z61tf _1yep5z61po _1yep5z61tk"],[{isSelected:!0,isDisabled:!0},"_1yep5z61th _1yep5z61tf _1yep5z61po _1yep5z61tk _1yep5z61py"],[{isHovered:!0,isSelected:!1},"_1yep5z61tk _1yep5z61th _1yep5z61tf _1yep5z61ps"]]}),Xd="_1344e9q9 _1yep5z6fl";var et=nt.forwardRef(({color:e,isFocusVisible:t,isSelected:o,isInteractive:r,isDisabled:a,style:n,className:i,id:s,tooltip:p,"data-block-id":l,"data-block-class":c,...d},m)=>{let u=e&&e!==we&&(typeof e=="string"?parseColor(e):e),{formatMessage:y}=F(),f=!u,{colorSwatchProps:b}=useColorSwatch({color:f?"#000000":e}),{hoverProps:g,isHovered:_}=useHover({isDisabled:a||!r}),v=filterTruthyValues({"data-focus-visible":t,"data-selected":o,"data-hovered":_,"data-block-id":l,"data-block-class":c,"data-disabled":a,"data-interactive":r}),h=f?y(Yd.none):b["aria-label"],I=d["aria-label"]??h,{tooltipProps:P}=zr({tooltip:p,label:I}),C=jsx("div",{...mergeProps(g,v,f?{}:b),style:n,"aria-label":f?y(Yd.none):b["aria-label"],role:"img",className:classNames(Wd({removeBlendMode:f,isFocusVisible:t,isDisabled:!!a,isSelected:!!o,isHovered:_}),"BaselineUI-ColorSwatch",i),ref:m,id:s,...d,children:jsx(L,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:u?Zd(u,4):void 0,children:f?jsx("div",{className:Xd}):null})});return P&&!a?jsx(re,{...P,children:jsx(Lr,{children:C})}):C});et.displayName="ColorSwatch";var Yd=K({none:{id:"none",defaultMessage:"None"}});var Jd=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Vo=parseColor("#000000").toFormat("hsla"),ie="hsla",Oo="hexa";function pt(e){return typeof e=="string"?parseColor(e).toFormat(ie):e?e.toFormat(ie):null}function eu(e,t){return e?.getChannelValue("alpha")?t?.toString(Oo)===e.toString(Oo):!t?.getChannelValue("alpha")}function tu(e,t,o){return t?.label?t.label:e?.getChannelValue("alpha")===0?o:e?.toString("rgba")}var we="NONE";function ou(e,t){let o=t?.map(a=>({id:parseColor(a.color).toString(Oo),label:a.label}))||[],r={id:we,label:e};return [...o,r]}var sa=(e,{optionProps:t,isFocusVisible:o,isSelected:r},a)=>(invariant(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...t,ref:a,className:$d,children:jsx(et,{color:e.value.id,isFocusVisible:o,isSelected:r,"aria-label":e.value.label,isInteractive:!0})})),Zd=(e,t=4)=>{let o=e.getChannelValue("alpha")===0,r=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:o?r:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${r}`,backgroundSize:`${t}px ${t}px`}};var au=({value:e,...t})=>{let o=nt.useRef(null),r=nt.useRef(null),a=nt.useRef(null),n=useColorAreaState({...t,value:e}),{colorAreaProps:i,xInputProps:s,yInputProps:p,thumbProps:l}=useColorArea({...t,value:e,inputXRef:o,inputYRef:r,containerRef:a},n);useEffect(()=>{o.current?.focus();},[]);let{focusProps:c,isFocusVisible:d}=useFocusRing();return jsx("div",{ref:a,...i,className:classNames(Fd,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...l,className:classNames(ia({isFocusVisible:d}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...l.style,transform:"translate(-50%, -50%)",backgroundColor:pt(e)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:o,...s,...c}),jsx("input",{ref:r,...p,...c})]})})};var su=({color:e,setColor:t,allowAlpha:o,...r})=>{let a=useColorFieldState({value:e,onChange:d=>{t(pt(d)?.toFormat(ie).withChannelValue("alpha",e.getChannelValue("alpha")??1)||Vo);}}),n=nt.useRef(null),{inputProps:i}=useColorField({...r,"aria-label":"Hex"},a,n),{focusProps:s,isFocused:p}=useFocusRing({isTextInput:!0}),{hoverProps:l,isHovered:c}=useHover({});return jsxs("div",{className:classNames(qn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"hexa":"hex",children:[jsx("input",{...mergeProps(i,s,l),ref:n,className:Kd({isFocused:p,isHovered:c,allowAlpha:o})}),o?jsx(pu,{color:e,setColor:t}):null]})},lu=({color:e,setColor:t,allowAlpha:o})=>{let r=e.toFormat("rgba"),{locale:a}=useLocale();return jsxs("div",{className:classNames(qn,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":o?"rgba":"rgb",children:[jsx(Me,{"aria-label":e.getChannelName("red",a),value:r.getChannelValue("red"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("red",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("green",a),value:r.getChannelValue("green"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("green",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),jsx(Me,{"aria-label":e.getChannelName("blue",a),value:r.getChannelValue("blue"),showStepper:!1,className:Fo,onChange:n=>{t(r.withChannelValue("blue",n).toFormat(ie));},step:1,minValue:0,maxValue:255}),o?jsx(pu,{color:e,setColor:t}):null]})},ex={style:"percent",maximumFractionDigits:0},pu=({color:e,setColor:t})=>{let{locale:o}=useLocale(),r=useCallback(a=>{t(e.withChannelValue("alpha",a));},[e,t]);return jsx(Me,{"aria-label":e.getChannelName("alpha",o),value:e.getChannelValue("alpha"),formatOptions:ex,className:Fo,showStepper:!1,onChange:r,minValue:0,maxValue:1})};var Jn=({channel:e,...t})=>{let{locale:o}=useLocale(),r=useColorSliderState({...t,channel:e,locale:o}),a=nt.useRef(null),n=nt.useRef(null),{trackProps:i,thumbProps:s,inputProps:p}=useColorSlider({...t,channel:e,trackRef:a,inputRef:n,"aria-label":r.value.getChannelName(e,o)},r),{focusProps:l,isFocusVisible:c}=useFocusRing();return jsxs("div",{className:classNames(oa,{[kl({size:"xs"})]:e==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":e,...i,ref:a,children:[e==="alpha"&&jsx("div",{className:Xn}),jsx("div",{className:oa,style:i.style}),jsxs("div",{className:classNames(ia({isFocusVisible:c}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:Xn,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:oa}),jsx(VisuallyHidden,{children:jsx("input",{ref:n,...p,...l})})]})]})};var la=({color:e,setColor:t,allowAlpha:o,onChangeEnd:r})=>{let[a,n]=nt.useState("hex"),{formatMessage:i}=F(Je);return jsxs(Fragment,{children:[jsx(au,{value:e,xChannel:"saturation",yChannel:"lightness",onChange:t,onChangeEnd:r}),jsxs("div",{className:Wn,children:[jsx(Jn,{channel:"hue",value:e,onChange:t,onChangeEnd:r}),o?jsx(Jn,{channel:"alpha",value:e,onChange:t,onChangeEnd:r}):null]}),jsxs("div",{className:classNames(Wn,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(Qe,{label:i("colorFormat"),labelPosition:"start",variant:"ghost",items:Jd,selectedKey:a,onSelectionChange:s=>{n(s);}}),a==="hex"&&jsx(su,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o}),a==="rgb"&&jsx(lu,{color:e,setColor:s=>{t(s),r?.(s);},allowAlpha:o})]})]})};var bu=({color:e,setColor:t,storePickedColorKey:o,addColorButtonLabel:r,removeColorButtonLabel:a,customColorsLabel:n,pickerMode:i,allowAlpha:s})=>{let{locale:p}=useLocale(),{formatMessage:l}=F(Je),c=nt.useRef(null),d=Nt(c.current),[m,u]=xl(o,[]),y=nt.useRef(null),[f,b]=nt.useState(e),g=nt.useMemo(()=>m.map(C=>({id:C,label:parseColor(C).getColorName(p),description:C})),[m,p]),_=useCallback(()=>{let C=i==="active"?e:f;if(m.includes(C.toString(ie))){y.current?.querySelector(`[data-key='${C.toString(ie)}']`)?.classList.add(Gn);return}u([...m,C.toString(ie)]);},[m,e,u,f,i]);useEffect(()=>{let C=y.current;function x(T){T.animationName===Gd&&T.target?.classList.remove(Gn);}return C?.addEventListener("animationend",x),()=>{C?.removeEventListener("animationend",x);}},[]);let v=useId(),h=jsx(E,{ref:c,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon$1,onPress:i==="active"?_:void 0}),I=useCallback(C=>jsxs(me,{size:"content",className:ra({includesCustomColorPicker:!0}),style:{paddingBlockEnd:0},"aria-label":l("newColor"),children:[jsx(la,{color:f,setColor:b,allowAlpha:s}),jsx(A,{}),jsx(L,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(L,{display:"inline-flex",gap:"lg",children:[jsx(G,{label:l("cancel"),size:"sm",variant:"secondary",onPress:C}),jsx(G,{label:l("add"),variant:"primary",onPress:()=>{_(),C();},size:"sm"})]})})]}),[f,_,l,s]),P=useCallback(C=>{invariant(C instanceof Set,"Key must be a set");let x=[...C][0];x&&t(parseColor(x).toFormat(ie));},[t]);return jsxs(Fragment,{children:[jsx(A,{}),jsxs("div",{className:classNames(Ud,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:v,children:n}),jsxs(L,{display:"flex",children:[!!m.length&&m.includes(e.toString(ie))&&jsx(E,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon$2,"aria-label":a,onPress:()=>{u(m.filter(C=>C!==e.toString(ie)));}}),i==="active"&&h,i==="lazy"&&(d==="mobile"?jsxs(Ie,{children:[jsx(ea,{children:h}),jsx(De,{style:{zIndex:1e5},children:({close:C})=>I(C)})]}):jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:h}),jsx(Re,{placement:"right top",className:aa,offset:6,children:({close:C})=>I(C)})]}))]})]}),!!m.length&&jsx(le,{items:g,layout:"grid","aria-labelledby":v,className:classNames(ta,na,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:sa,ref:y,autoFocus:!1,selectionMode:"single",selectedKeys:[e.toString(ie)],onSelectionChange:P})]})};var oi=nt.forwardRef(({setColor:e,color:t,triggerRef:o,autoFocus:r,presets:a,state:n},i)=>{let{formatMessage:s}=F(Je),p=useCallback(l=>{if(l instanceof Set&&l.size){let c=[...l][0],d=a.find(m=>m.id===c);invariant(d,"Preset not found"),e(d.id===we?null:parseColor(d.id).toFormat(ie)),n.close();}},[n,a,e]);return jsx("div",{className:classNames(na,"BaselineUI-ColorInput-Presets"),style:{minWidth:o.current?.offsetWidth},ref:i,children:jsx(le,{autoFocus:r,items:a,layout:"grid","aria-label":s("colorPresets"),className:ta,renderOption:sa,selectionMode:"single",selectedKeys:[t?.toString(Oo)||we],onSelectionChange:p})})});oi.displayName="ColorPresetList";var jo=nt.forwardRef(({color:e,colorLabel:t,colorName:o,...r},a)=>{let n=nt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:d}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l}),u=pr(),y=pr();return jsxs("button",{...mergeProps(p,i,d,m),style:r.style,className:classNames(Od({isHovered:s,isFocusVisible:c||r.isOpen,isDisabled:r.isDisabled,labelPosition:r.labelPosition}),"BaselineUI-ColorInputButton",r.className),ref:M(a,n),id:u,"aria-labelledby":r["aria-labelledby"]||`${u} ${y}`,children:[jsx(et,{color:e?.toString("hexa")}),t?jsx("div",{className:jd,id:y,"aria-hidden":"true",children:o}):typeof o=="string"&&jsx(VisuallyHidden,{children:o})]})});jo.displayName="ColorInputButton";var da=nt.forwardRef(({className:e,style:t,icon:o,...r},a)=>{let n=nt.useRef(null),{hoverProps:i,isHovered:s}=useHover({isDisabled:r.isDisabled}),{buttonProps:p,isPressed:l}=useButton(r,n),{isFocusVisible:c,focusProps:d}=useFocusRing(),m=filterTruthyValues({"data-block-id":r["data-block-id"],"data-focused":c,"data-focus-visible":c,"data-disabled":r.isDisabled,"data-hovered":s,"data-pressed":l});return jsxs("button",{...mergeProps(p,i,d,m),ref:M(a,n),style:t,className:classNames(qd({isHovered:s||l||r.isOpen,isFocusVisible:c,isDisabled:r.isDisabled}),"BaselineUI-IconColorInputButton",e),children:[jsx(o,{size:16}),jsx("div",{className:Hd,style:{backgroundColor:r.color||void 0}})]})});da.displayName="IconColorInputButton";function ku({colorLabel:e,color:t,presets:o}){let{formatMessage:r}=F(),{locale:a}=useLocale(),n=useMemo(()=>o.find(p=>p.id===we?!t:t?eu(t,parseColor(p.id)):!1),[o,t]),i=useMemo(()=>typeof e=="function"?e?.(t):e?tu(t,n,r(Ix.transparent)):!1,[t,e,r,n]),s=useMemo(()=>{if(n?.label)return n.label;t?.getColorName(a);},[t,a,n?.label]);return {colorName:i,humanReadableName:s}}var Ix=K({transparent:{defaultMessage:"Transparent",id:"transparent"}});var Qt=nt.forwardRef(({className:e,style:t,allowRemoval:o,allowAlpha:r=!0,presets:a,labelPosition:n="top",colorLabel:i=!0,includePicker:s=!0,onChange:p,onChangeEnd:l,defaultValue:c,storePickedColorKey:d="baselinePickedColor",value:m,addColorButtonLabel:u,removeColorButtonLabel:y,customColorsLabel:f,renderTriggerButton:b=({isOpen:x,color:T,ref:N,colorName:R,triggerProps:S,labelId:k})=>jsx(jo,{...mergeProps(S,{...P.label?{"aria-labelledby":k}:{"aria-label":P["aria-label"]}}),ref:N,isOpen:x,isDisabled:P.isDisabled,labelPosition:n,color:T,colorLabel:i,colorName:R}),pickerMode:g="active",offset:_=2,placement:v=n==="start"?"bottom end":"bottom start","data-block-id":h,"data-block-class":I,...P},C)=>{let x=nt.useRef(null),T=nt.useRef(null),N=useOverlayTriggerState(P),{triggerProps:R,overlayProps:S}=useOverlayTrigger({type:"listbox"},N,x),k=ve(P.portalContainer),[w,B]=useControlledState(m===void 0?void 0:pt(m),pt(c),X=>p?.(X?.toFormat("rgba")||null)),{formatMessage:H}=F(Je),D=useMemo(()=>ou(H(ua.noColor),a),[a,H]),q=useId(),{colorName:j}=ku({colorLabel:i,color:w,presets:D}),$=useMemo(()=>D.filter(X=>o||X.id!==we),[D,o]),O=u||H(ua.addColor),J=y||H(ua.removeColor),V=f||H(ua.customColors),Z=jsx(bu,{color:w||Vo,setColor:X=>{B(X),l?.(X?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:O,removeColorButtonLabel:J,customColorsLabel:V,pickerMode:g,allowAlpha:r});return jsxs(Fragment,{children:[jsxs("div",{className:classNames({[Vd]:n==="start"},"BaselineUI-ColorInput-Trigger",e),"data-block-id":h,"data-block-class":I,style:t,ref:C,children:[P.label?jsx("label",{id:q,className:Ad({labelPosition:n}),children:P.label}):null,b({isOpen:N.isOpen,color:w,ref:x,colorName:j,triggerProps:R,labelId:q})]}),jsx(be,{...P,portalContainer:k,placement:v,state:N,offset:_,className:classNames(aa,"BaselineUI-ColorInput-Popover"),triggerRef:x,overlayProps:S,children:jsxs(me,{size:"content",className:ra({includesCustomColorPicker:s}),ref:T,"aria-labelledby":q,"aria-label":P["aria-label"],children:[s&&g==="active"?jsxs(Fragment,{children:[jsx(la,{color:w||Vo,setColor:B,allowAlpha:r,onChangeEnd:X=>{l?.(X?.toFormat("rgba")||null);}}),Z]}):null,!!$.length&&jsxs(Fragment,{children:[s&&g==="active"?jsx(A,{}):null,jsx(oi,{autoFocus:s&&g==="active"?!1:"first",state:N,triggerRef:x,presets:$,color:w,setColor:X=>{B(X),l?.(X?.toFormat("rgba")||null);}})]}),s&&g==="lazy"?Z:null]})})]})});Qt.displayName="ColorInput";var ua=K({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 Tu=nt.forwardRef(({className:e,style:t,icon:o,variant:r="standard","data-block-id":a,tooltipProps:n,...i},s)=>{let p=nt.useRef(null),l=useCallback(({isOpen:c,color:d,ref:m,colorName:u,triggerProps:y})=>jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:i["aria-label"],placement:"bottom start",offset:4,...n,children:r==="standard"?jsx(jo,{...y,"aria-label":i["aria-label"],ref:m,isOpen:c,isDisabled:i.isDisabled,color:d,colorLabel:!1,colorName:u}):jsx(da,{...y,isOpen:c,icon:TextIcon,color:d?.toString("hexa"),ref:m,isDisabled:i.isDisabled,"aria-label":i["aria-label"]})}),[i,n,r]);return jsxs(L,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:classNames("BaselineUI-IconColorInput",e),"data-block-id":a,style:t,ref:M(s,p),children:[r==="standard"&&o?jsx(o,{size:24,className:sprinkles({color:"icon.primary"})}):null,jsx(Qt,{...i,colorLabel:!1,renderTriggerButton:l})]})});Tu.displayName="IconColorInput";var Su={ar:{redo:"\u0625\u0639\u0627\u062F\u0629",undo:"\u062A\u0631\u0627\u062C\u0639"},cs:{redo:"Opakovat",undo:"Zru\u0161it"},cy:{redo:"Ail-wneud",undo:"Dad-wneud"},da:{redo:"Gentag",undo:"Fortryd"},de:{redo:"Wiederholen",undo:"R\xFCckg\xE4ngig machen"},el:{redo:"\u0395\u03C0\u03B1\u03BD\u03AC\u03BB\u03B7\u03C8\u03B7",undo:"\u0391\u03BD\u03B1\u03AF\u03C1\u03B5\u03C3\u03B7"},"en-GB":{redo:"Redo",undo:"Undo"},en:{redo:"Redo",undo:"Undo"},es:{redo:"Rehacer",undo:"Deshacer"},fi:{redo:"Tee sittenkin",undo:"Peru"},"fr-CA":{redo:"R\xE9tablir",undo:"Annuler"},fr:{redo:"R\xE9tablir",undo:"Annuler"},he:{redo:"\u05D1\u05D9\u05E6\u05D5\u05E2 \u05DE\u05D7\u05D3\u05E9",undo:"\u05D1\u05D9\u05D8\u05D5\u05DC \u05E4\u05E2\u05D5\u05DC\u05D4"},hr:{redo:"Ponovi",undo:"Vrati"},id:{redo:"Ulangi",undo:"Kembalikan"},it:{redo:"Ripristina",undo:"Annulla"},ja:{redo:"\u3084\u308A\u76F4\u3059",undo:"\u53D6\u308A\u6D88\u3059"},ko:{redo:"\uC2E4\uD589\uBCF5\uADC0",undo:"\uC2E4\uD589\uCDE8\uC18C"},ms:{redo:"Buat Semula",undo:"Buat Asal"},"nb-NO":{redo:"Gj\xF8r om igjen",undo:"Angre"},nl:{redo:"Opnieuw",undo:"Herstel"},pl:{redo:"Pon\xF3w",undo:"Cofnij"},"pt-PT":{redo:"Refazer",undo:"Desfazer"},pt:{redo:"Refazer",undo:"Desfazer"},ru:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",undo:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"},sk:{redo:"Opakova\u0165",undo:"Zru\u0161i\u0165"},sl:{redo:"Uveljavi",undo:"Razveljavi"},sv:{redo:"G\xF6r om",undo:"\xC5ngra"},th:{redo:"\u0E17\u0E33\u0E0B\u0E49\u0E33",undo:"\u0E16\u0E2D\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A"},tr:{redo:"Yinele",undo:"Geri Al"},uk:{redo:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0438",undo:"\u0421\u043A\u0430\u0441\u0443\u0432\u0430\u0442\u0438"},"zh-Hans":{redo:"\u91CD\u505A",undo:"\u64A4\u9500"},"zh-Hant":{redo:"\u91CD\u4F5C",undo:"\u5FA9\u539F"}};var ma=z({defaultClassName:"mnnh5s1 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6l4 _1yep5z6l7 _1yep5z6lj _1yep5z6li _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6lh",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6wi _1yep5z6wj _1yep5z6wk _1yep5z6x6 _1yep5z6x7 _1yep5z6x8 _1yep5z6xu _1yep5z6xv _1yep5z6xw _1yep5z6yi _1yep5z6yj _1yep5z6yk _1yep5z6132 _1yep5z617r _1yep5z617s",false:"_1yep5z617e _1yep5z6121"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z6120"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z613a _1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"mnnh5s8 _1yep5z6z7"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,hasLoadedImage:!1},"_1yep5z61o5"],[{isHovered:!0,hasLoadedImage:!0},"mnnh5s9"],[{isInline:!0,isDisabled:!0},"_1yep5z61oz"],[{hasLoadedImage:!0,includeCheckeredBackground:!0},"_1yep5z61nx"]]}),Nu="_1yep5z6d8",fa=z({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});var Lu=z({defaultClassName:"_1i0ytqa3 _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6lh _1yep5z6li _1yep5z6lk",variantClassNames:{isFocusVisible:{true:"_1i0ytqa4"},isInline:{true:"_1yep5z6129",false:"_1yep5z612b"},isDisabled:{true:"_1i0ytqa7 _1yep5z6z7",false:"_1i0ytqa8"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isFocusVisible:!0},"_1i0ytqa9 _1yep5z61ov _1yep5z61tn _1yep5z61tp"],[{isInline:!1,isFocusVisible:!0},"_1i0ytqaa"],[{isInline:!0,isDisabled:!0},"_1yep5z61o6"],[{isInline:!1,isDisabled:!0},"_1yep5z61o8"]]}),Mu="_1i0ytqa0",ya=z({defaultClassName:"_1i0ytqab _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6lh",variantClassNames:{isInline:{false:"_1yep5z6120"},isDisabled:{true:"_1i0ytqad _1yep5z6z7"}},defaultVariants:{},compoundVariants:[]}),Du=z({defaultClassName:"_1i0ytqa1 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6kd _1yep5z6ke _1yep5z6kf _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lh",variantClassNames:{isInline:{false:"_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b"}},defaultVariants:{},compoundVariants:[]});function Eu({line:e,options:t}){let o=useRef([]),r=useMemo(()=>{let a=Math.ceil(e.length/Jt),n;for(let i=0;i<a;i++)if(!(!(i===a-1)&&!!o.current[i])){let l=e.slice(i*Jt-(i>0?1:0),i*Jt+Jt);n=getSvgPathFromStroke(getStroke(l.map(([c,d,m])=>({x:c,y:d,pressure:m})),t)),l.length>=(i>0?Jt+1:Jt)&&(o.current[i]=n);}return n},[e,t]);return [...o.current,r]}var Jt=60*3;var oC={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},Fu=nt.forwardRef(({className:e,style:t,canvasClassName:o,canvasStyle:r,isBound:a=!0,strokeWidth:n=2,strokeColor:i="#3A87FD",onChange:s,defaultValue:p,onChangeEnd:l,enableHistory:c=!1,isInline:d=!0,isDisabled:m,placeholder:u,clearLabel:y,undoLabel:f,redoLabel:b,footerClassName:g,canvasRef:_,value:v,footerStyle:h,"data-block-id":I,"data-block-class":P,"aria-label":C="Drawing canvas",description:x="This is a canvas for drawing using a mouse or touch input.",...T},N)=>{let R=F(Su),S=nt.useRef(null),[k,w]=nt.useState(v||p||[]),B=nt.useMemo(()=>({...oC,...T}),[T]),[H,D]=nt.useState(),q=useId(),{labelProps:j,fieldProps:$}=useLabel({...T,"aria-label":C,labelElementType:"span"}),{isFocusVisible:O,focusProps:J}=useFocusRing({within:!0}),{hoverProps:V,isHovered:Z}=useHover({isDisabled:m}),{undo:X,redo:Ce,canRedo:Pe,canUndo:ye,push:Te}=yl(k,{onAction:Y=>{Y&&(w(Y),l?.(Y));},isDisabled:!c}),{keyboardProps:He}=useKeyboard({onKeyDown:Y=>{Y.key==="Backspace"?ht():Y.key==="z"&&(Y.metaKey||Y.ctrlKey)&&(Y.shiftKey?Pe&&Ce():ye&&X());}}),[te,de]=useState(!1),_t=useCallback(Y=>{let U=Y.currentTarget.getBoundingClientRect();D(U),Y.target.setPointerCapture(Y.pointerId);let ne=[Y.clientX-U.x,Y.clientY-U.y,Y.pressure];w(W=>[...W,[ne]]),de(!0);},[]),zt=useCallback(Y=>{if(Y.buttons!==1||!H)return;let ne=Vu(Y.nativeEvent).map(W=>[a?clamp(W.clientX-H.left,0,H.width):W.clientX-H.left,a?clamp(W.clientY-H.top,0,H.height):W.clientY-H.top,W.pressure]);w(W=>{let he=[...W];return he[W.length-1]=[...he[W.length-1],...ne],he});},[H,a]),mo=()=>{H&&(l?.(k),Te(k),de(!1));};useEffect(()=>{s?.(k);},[k,s]);let ht=()=>{w([]),s?.([]),Te([]);};return jsxs("div",{ref:M(S,N),className:classNames(Mu,"BaselineUI-FreehandCanvas",e),style:t,"aria-disabled":m,"data-block-id":I,"data-block-class":P,children:[T.label||c?jsxs("div",{className:Du({isInline:d}),children:[T.label?jsx(Q,{type:"label",size:"sm",...j,children:T.label}):jsx("span",{}),c?jsxs("div",{children:[jsx(E,{variant:"secondary",size:"sm",isDisabled:!ye||m,icon:UndoIcon,onPress:X,"aria-label":f||R.formatMessage("undo")}),jsx(E,{variant:"secondary",size:"sm",isDisabled:!Pe||m,icon:RedoIcon,onPress:Ce,"aria-label":b||R.formatMessage("redo")})]}):null]}):null,jsxs("div",{role:"application",...mergeProps(J,He,V,$),tabIndex:m?void 0:0,className:classNames(ma({isInline:d,isHovered:Z}),Lu({isFocusVisible:O,isInline:d,isDisabled:!!m}),o),"aria-describedby":T["aria-describedby"]||q,style:r,ref:_,children:[jsx(VisuallyHidden,{children:jsx("div",{id:q,children:x})}),jsx("svg",{width:r?.width||"100%",height:r?.height||"100%",onPointerDown:_t,onPointerMove:zt,onPointerUp:mo,children:(v||k).map((Y,U,ne)=>U<ne.length-1||!te?jsx(Hu,{line:Y,options:B,strokeColor:i,strokeWidth:n},U):jsx(Ou,{line:Y,options:B,strokeColor:i,strokeWidth:n},U))})]}),u||y?jsx("div",{style:h,className:classNames(ya({isInline:d,isDisabled:m}),g),children:(k.length||!u)&&y?jsx(G,{size:"sm",variant:"ghost",label:y,isDisabled:m,onPress:ht}):jsx(G,{size:"sm",variant:"ghost",label:u,isDisabled:!0})}):null]})});Fu.displayName="FreehandCanvas";var Hu=nt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=useMemo(()=>getSvgPathFromStroke(getStroke(e.map(([n,i,s])=>({x:n,y:i,pressure:s})),t)),[e,t]);return jsx("path",{d:a,stroke:o,strokeWidth:r})});Hu.displayName="Stroke";var Ou=nt.memo(({line:e,options:t,strokeColor:o,strokeWidth:r})=>{let a=Eu({line:e,options:t});return jsx(Fragment,{children:a.map((n,i)=>jsx("path",{d:n,stroke:o,strokeWidth:r},i))})});Ou.displayName="SplitStroke";function Vu(e){if(typeof e.getCoalescedEvents=="function"){let t=e.getCoalescedEvents();return t.length>0?t.flatMap(o=>Vu(o)):[e]}return [e]}var Au="_1vac7ws0",ju=z({defaultClassName:"_1vac7ws1",variantClassNames:{isDragging:{true:"_1vac7ws2"}},defaultVariants:{},compoundVariants:[]});function Uu(e,t){let[o,r]=useState([]),a=()=>e?.flatMap(n=>[...t.querySelectorAll(n)]).map(n=>({current:n}));return useGranularEffect(()=>{r(a());},[],[a]),useGranularEffect(()=>{let n=a();r(n);},[e],[a]),o}function Ku(e){let{scrollable:t,ownerDocument:o,onScroll:r}=e;useEffect(()=>{let a=getHTMLElement(t,o);if(a)return (a.style.position==="static"||!a.style.position)&&console.warn("Scrollable ancestor passed to `Transform` component should not be statically positioned."),a.addEventListener("scroll",r),()=>{a.removeEventListener("scroll",r);}},[t,r,o]);}var _C=makeMoveable([Draggable,Resizable,Rotatable,Snappable]),Gu=nt.forwardRef(({className:e,children:t,isRotatable:o,isResizable:r,isDraggable:a,style:n,onTransform:i,onTransformStart:s,onTransformEnd:p,onDoubleClick:l,onDragStart:c,onDragEnd:d,onDrag:m,onResizeStart:u,onResizeEnd:y,onResize:f,onRotateStart:b,onRotateEnd:g,onRotate:_,onSnap:v,isSnappable:h,elementGuidelines:I,hideAnchorOnDrag:P=!0,title:C,rotationPosition:x,autoUpdate:T,bound:N,snapRotationDegrees:R,snapRotationThreshold:S,scrollableAncestor:k,renderDirections:w,stopPropagation:B,transformOrigin:H,preventDefault:D},q)=>{let j=useRef(null),$=useRef(null),[O,J]=useState(document),V=useRef(O.createElement("div")),[Z,X]=useState({}),[Ce,Pe]=useState(!1),[ye,Te]=useState(!1),[He,te]=useState(),de=Uu(I,O);useLayoutEffect(()=>{let U=V.current;return V.current=O.createElement("div"),()=>{U.remove();}},[O]);let{keyboardProps:_t}=useKeyboard({onKeyDown:U=>{let ne=U.shiftKey?10:1,W=U.metaKey||U.ctrlKey;W&&U.shiftKey&&(ne=45);function he(fo,Ky="x"){W?$.current?.request("rotatable",{deltaRotate:fo*ne},!0):$.current?.request("draggable",Ky==="x"?{deltaX:fo*ne}:{deltaY:fo*ne},!0);}switch(U.key){case"ArrowRight":{he(1);break}case"ArrowLeft":{he(-1);break}case"ArrowUp":{he(-1,"y");break}case"ArrowDown":he(1,"y");}requestAnimationFrame(()=>{$.current?.updateRect();});}});useEffect(()=>{let U=ue(j.current);J(U);let ne=V.current;U.body.append(V.current);function W(fo){Te(fo.shiftKey);}function he(){Te(!1);}return U.addEventListener("keydown",W),U.addEventListener("keyup",he),()=>{U.removeEventListener("keydown",W),U.removeEventListener("keyup",he),ne.remove();}},[]),Ku({scrollable:k,onScroll:()=>{$.current?.updateRect();},ownerDocument:O});let zt=useCallback(U=>{X(ne=>({...ne,...U.style})),i?.(U);},[i]),mo=useCallback(U=>{if(Pe(!0),j.current?.focus(),N){let W=getHTMLElement(N,O)?.getBoundingClientRect();te({position:"client",left:W?.left??0,top:W?.top??0,right:W?.right??0,bottom:W?.bottom??0});}c?.(U);},[N,O,c]),ht=useCallback(U=>{Pe(!1),d?.(U);},[d]),Y=t({style:{...Z.width&&{width:Z.width},...Z.height&&{height:Z.height}}});return jsxs(Fragment,{children:[jsx("div",{role:"button",..._t,ref:M(j,q),style:{display:"inline-block",...n,...Z},className:classNames(Au,e),onDoubleClick:l,tabIndex:0,title:C,children:Y}),createPortal(jsx(_C,{ref:$,target:j,draggable:a,resizable:r,rotatable:o,keepRatio:ye,throttleDrag:1,snappable:h||!!N,elementGuidelines:de,snapRenderThreshold:.9,className:ju({isDragging:Ce&&P}),onRender:zt,onDragStart:mo,onDragEnd:ht,useResizeObserver:T,useMutationObserver:T,onRenderEnd:p,onDrag:m,onResizeStart:u,onResizeEnd:y,onResize:f,onRotateStart:b,onRotateEnd:g,onRotate:_,onRenderStart:s,onSnap:v,rotationPosition:x,bounds:He,snapRotationDegrees:R,snapRotationThreshold:S,renderDirections:w,stopPropagation:B,preventDefault:D,transformOrigin:H}),V.current)]})});Gu.displayName="Transform";var Wu={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 Zu=nt.forwardRef(({className:e,style:t,isInline:o=!0,accept:r="image/*",defaultImageSrc:a,imageSrc:n,imageAlt:i,pickerButtonLabel:s,isDisabled:p,onDrop:l,onPaste:c,includeCheckeredBackground:d=!0,"data-block-id":m,"data-block-class":u,pickerButtonStyle:y,pickerButtonClassName:f,footerClassName:b,footerStyle:g,clearLabel:_,placeholder:v,labelStyle:h,labelClassName:I,...P},C)=>{let x=nt.useRef(null),T=nt.useRef(null),{formatMessage:N}=F(Wu),[R,S]=useControlledState(n,a||null,te=>{invariant(typeof te!="string"),P.onValueChange?.(te?[te]:[]);}),k=useMemo(()=>MC(R||void 0),[R]),{fieldProps:w,labelProps:B}=useField(P),{dropProps:H,isDropTarget:D}=useDrop({ref:x,onDrop:async te=>{if(p)return;let de=await Rn({items:te.items});de.length&&S(de[0]),l?.(te);},...P}),{clipboardProps:q}=useClipboard({onPaste:async te=>{if(p)return;let de=await Rn({items:te});de.length&&S(de[0]),c?.(te);},...P}),j=()=>{S(null),T.current&&(T.current.value="");},$={type:"file",onChange:te=>{let de=[...te.target.files];S(de[0]),P.onChange?.(te);},accept:r,disabled:p},{focusProps:O,isFocused:J,isFocusVisible:V}=useFocusRing({within:!0}),{hoverProps:Z,isHovered:X}=useHover({isDisabled:p}),{imgProps:Ce,isLoading:Pe,isLoaded:ye}=Tt({src:k,alt:i||""}),Te={label:s||N("selectImage"),onPress:()=>x.current?.click(),variant:"secondary",isDisabled:p,excludeFromTabOrder:!0,className:classNames(Pr({isFocusVisible:V}),{[Nu]:D&&!p},f),style:y},He=filterTruthyValues({"data-loaded":ye,"data-block-id":m,"data-block-class":u,"data-hovered":X,"data-focused":J,"data-drop-target":D,"data-disabled":p,"data-focus-visible":V});return jsxs(L,{...He,className:classNames("BaselineUI-ImageDropZone",e),display:"flex",flexDirection:"column",alignItems:"center",style:t,ref:C,children:[jsxs("label",{...mergeProps(H,Z,O,B),className:classNames(ma({isInline:o,isHovered:X,isDisabled:p,hasLoadedImage:!!k&&ye,showFocusRing:D||!!k&&V}),I),style:h,ref:x,children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(w,q,$),ref:T})}),!k&&jsx(G,{...Te}),!!k&&(Pe?jsx(Kt,{}):jsx("img",{className:fa({isInline:o,isDisabled:p,hasLoadedImage:!!k&&ye&&d}),...Ce}))]}),v||_?jsx("div",{style:g,className:classNames(ya({isInline:o,isDisabled:p}),b),children:(k||!v)&&_?jsx(G,{size:"sm",variant:"ghost",label:_,isDisabled:p,onPress:j}):jsx(G,{size:"sm",variant:"ghost",label:v,isDisabled:!0})}):null]})});Zu.displayName="ImageDropZone";function MC(e){return e instanceof File?URL.createObjectURL(e):e}var Qu="_1vm2oh49 _1yep5z6ia _1yep5z6ib _1yep5z6ic _1yep5z6g4",ci="_1vm2oh48 _1yep5z6li _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6jy _1yep5z6jz _1yep5z6k0",Ju=z({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6ln _1yep5z6ll _1yep5z6i6 _1yep5z6lo _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6l4 _1yep5z6lj _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z6131 _1yep5z617q _1yep5z617s",false:"_1yep5z612b"},isFocusVisible:{true:"_1yep5z613a _1yep5z617k _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"mnnh5s8 z9nup83 _1yep5z6z7"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:!0},"_1yep5z61o6"],[{accent:"theme",isInline:!0},"_1yep5z61nv"],[{accent:"positive",isInline:!1},"_1yep5z61o8"],[{accent:"theme",isInline:!1},"_1yep5z61nx"],[{isFocusVisible:!0,isInline:!0},"_1yep5z61po _1yep5z61tf _1yep5z61th _1yep5z61ti"],[{isHovered:!0,isInline:!0},"_1yep5z61ti _1yep5z61po _1yep5z61tf _1yep5z61th"],[{isHovered:!0,isInline:!1,accent:"positive"},"_1yep5z61o7"],[{isHovered:!0,isInline:!1,accent:"theme"},"_1yep5z61nz"],[{isHovered:!0,isInline:!0,accent:"theme"},"_1yep5z61nw"]]});var om=nt.forwardRef(({className:e,style:t,isDisabled:o,isInline:r=!0,imageAlt:a,imageSrc:n,svgSrc:i,textValue:s,textStyle:p,onPress:l,onDelete:c,deleteAriaLabel:d,addAriaLabel:m,accent:u="positive","data-block-id":y,"data-block-class":f,...b},g)=>{let{focusProps:_,isFocused:v,isFocusVisible:h}=useFocusRing({within:!0}),{isHovered:I,hoverProps:P}=useHover({isDisabled:o}),{pressProps:C}=usePress({isDisabled:o,onPress:l});invariant(n||i||s,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let x=filterTruthyValues({"data-hovered":I,"data-focus-visible":h,"data-focused":v,"data-disabled":o});return jsxs("div",{...b,className:classNames(Ju({isInline:r,isFocusVisible:h,isDisabled:o,isHovered:I,accent:u}),"BaselineUI-Preview",e),"data-block-id":y,"data-block-class":f,"aria-label":b["aria-label"]||a||s,style:t,ref:g,children:[typeof i=="string"?jsx("button",{disabled:o,...mergeProps(P,_,C,x),className:ci,"aria-label":m,dangerouslySetInnerHTML:{__html:i}}):jsxs("button",{...mergeProps(P,_,C,x),disabled:o,style:p,"aria-label":m,className:ci,children:[n?jsx("img",{src:n,alt:a,className:fa({isInline:r,isDisabled:o})}):null,!!i&&typeof i=="object"&&i,s]}),c?jsx(E,{isDisabled:o,className:Qu,"aria-label":d,size:"xs",icon:TrashIcon,onPress:c}):null]})});om.displayName="Preview";var rm="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69c _1yep5z69d _1yep5z69e",am=z({defaultClassName:"cw3m0n8 _1yep5z6ew _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),nm="cw3m0n7",im=z({defaultClassName:"cw3m0n0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6iv _1yep5z6iw _1yep5z6ix",variantClassNames:{labelPosition:{end:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vf _1yep5z6vg _1yep5z6vh",start:"_1yep5z614y _1yep5z614z _1yep5z6150 _1yep5z616a _1yep5z616b _1yep5z616c"}},defaultVariants:{},compoundVariants:[]}),sm="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6le",lm=z({defaultClassName:"cw3m0n3 _16vugd06",variantClassNames:{isFocusVisible:{true:"_16vugd09"},isSelected:{true:"_16vugd08"},isDisabled:{true:"_16vugd0b"}},defaultVariants:{},compoundVariants:[]});var YC=({label:e,description:t},{isSelected:o,isFocusVisible:r,isDisabled:a,optionLabelPosition:n})=>jsxs("div",{className:im({labelPosition:n}),children:[jsx("div",{className:lm({isSelected:o,isFocusVisible:r,isDisabled:a}),children:o?jsx("div",{className:nm}):null}),e?jsxs("div",{className:rm,children:[jsx("span",{className:qr({isDisabled:a}),children:e}),t?jsx("span",{className:am({isDisabled:a}),children:t}):null]}):null]}),pm=({state:e,renderOption:t=YC,item:o,optionLabelPosition:r="end",optionStyle:a,optionClassName:n,isReadOnly:i,...s})=>{let p=!!s.isDisabled||!!s.disabledValues?.includes(o.id),l=nt.useRef(null),{inputProps:c,isPressed:d,isSelected:m}=useRadio({...s,isDisabled:p,children:o.label,value:o.id},e,l),{focusProps:u,isFocusVisible:y,isFocused:f}=useFocusRing(),{isHovered:b}=useHover({isDisabled:p}),g=filterTruthyValues({"data-selected":m,"data-focused":f,"data-focus-visible":y,"data-hovered":b,"data-disabled":p,"data-pressed":d,"data-read-only":i});return jsxs("label",{...g,style:a,className:classNames("BaselineUI-Radio-Item",n),children:[jsx(VisuallyHidden,{children:jsx("input",{...mergeProps(c,u),ref:l})}),t(o,{isFocusVisible:y,isSelected:m,isFocused:f,isHovered:b,isDisabled:p,optionLabelPosition:r,isReadOnly:i})]})};var dm=nt.forwardRef(({className:e,style:t,optionsContainerClassName:o,optionsContainerStyle:r,items:a,labelPosition:n="top",renderOption:i,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c,"data-block-id":d,"data-block-class":m,...u},y)=>{let f=useRadioGroupState(u),{radioGroupProps:b,labelProps:g,descriptionProps:_,errorMessageProps:v}=useRadioGroup({...u,"aria-label":s,"aria-labelledby":p,"aria-describedby":l,"aria-details":c},f),h=ke({...u,descriptionProps:_,errorMessageProps:v,labelPosition:n}),I=filterTruthyValues({"data-orientation":u.orientation,"data-block-id":d,"data-block-class":m,"data-disabled":u.isDisabled,"data-readonly":u.isReadOnly});return jsxs("div",{...mergeProps(b,I),className:classNames(Ue({labelPosition:n}),"BaselineUI-RadioGroup",e),style:t,ref:y,children:[u.label||h?jsxs("div",{className:$e({labelPosition:n,hasMessage:!!h}),children:[jsx("span",{...g,className:classNames(je,"BaselineUI-RadioGroup-Label"),children:u.label}),n==="start"&&h]}):null,jsx("div",{className:classNames(sm,{[Lt]:u.isDisabled},o),style:r,children:a.map(P=>jsx(pm,{state:f,renderOption:i,item:P,...u,value:P.id},P.id))}),n==="top"&&h]})});dm.displayName="RadioGroup";var um=({id:e,defaultMessage:t,elementType:o=Fragment$1})=>{invariant(e||t,"`id` or `defaultMessage` is required.");let r=F();return jsx(o,{children:r.formatMessage(e)||t})};um.displayName="MessageFormat";var mm=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,role:n="group",isDisabled:i,...s},p)=>{let{hoverProps:l,isHovered:c}=useHover({isDisabled:i});return jsx("div",{...l,role:n,"data-hovered":c,"data-disabled":i,"data-block-id":r,"data-block-class":a,className:e,style:t,...s,ref:p,children:o})});mm.displayName="Group";var yi="UNSUPPORTED_IN_MENU";function bm(e){return useMemo(()=>nt.Children.toArray(e).map(t=>{let o=t,r=uniqueId("item"),a=Go(o,Ne),n=ym(o),i,s;if(a){let g=Go(a,Le);invariant(g),i=ym(g),s=Go(a,Re).props.children;}else n?i=n:i=o;let{onPress:p,label:l,"aria-label":c,iconStart:d,isDisabled:m,icon:u}=i.props,y=l||c||yi;invariant(typeof y=="string","ActionGroup children must have a string label");let f=`${r}-${y}`;return createElement(Item,{...{key:f,onPress:p,textValue:y,"aria-label":c,icon:d||u,dialogContent:s,isDisabled:m},key:f},o)}),[e])}function Go(e,t){return t?flatMapDeep(nt.Children.toArray(e),r=>nt.isValidElement(r)&&r.props.children?[r,...nt.Children.toArray(r.props.children)]:[r]).find(r=>nt.isValidElement(r)&&r.type===t):void 0}function ym(e){return Go(e,G)||Go(e,E)}var gm="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6i7 _1yep5z6i8 _1yep5z6i9 _1yep5z6lh _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6l9",vm={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var gi=nt.forwardRef(({className:e,style:t,children:o,collapsibleMenuProps:r,"data-block-id":a,"data-block-class":n,renderSpacer:i,onKeyDown:s,...p},l)=>{let{formatMessage:c}=F(),[d,m]=useState(),u=bm(o),y=useListState({...p,children:u}),f=oe(l),b=useRef(null),[{visibleItems:g,isMeasuring:_},v]=Ha({visibleItems:y.collection.size,isMeasuring:!1}),h=useCallback(()=>{let S=k=>{if(b.current&&f.current){let w=[...b.current.children],B=f.current.getBoundingClientRect().width,H=k<y.collection.size,D=0,q=0;if(H){let j=w.pop();j&&(D+=xm(j,!1,!0));}for(let[j,$]of w.entries())if(D+=xm($,j===0,j===w.length-1),Math.round(D)<=Math.round(B))q++;else break;return q}return k};v(function*(){yield {visibleItems:y.collection.size,isMeasuring:!0};let k=S(y.collection.size),w=k<y.collection.size&&k>0;yield {visibleItems:k,isMeasuring:w},w&&(yield {visibleItems:S(k),isMeasuring:!1});});},[v,f,y.collection.size]),I=useMemo(()=>({get current(){return f.current?.parentElement}}),[f]);qa({ref:I,onResize:h}),xe(h,[y.collection,h]);let{toolbarProps:P}=useToolbar(p,f),C=[...y.collection],x=C.slice(0,g),T=C.slice(g).filter(S=>S.textValue!==yi),N=T.length>0;useEffect(()=>{m(void 0);},[T.length]),useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:R}=useKeyboard({onKeyDown:s});return jsxs(FocusScope,{children:[jsx("div",{...mergeProps(P,R),className:e,"data-block-id":a,"data-block-class":n,"data-collapse":!0,style:{...t,flexBasis:_?"100%":void 0},ref:f,children:jsxs("div",{ref:b,className:gm,children:[x.map(S=>S.rendered),N?jsxs(Fragment,{children:[!_&&i?jsx(L,{flexGrow:1}):null,jsx(Vr,{placement:"bottom end",renderTrigger:({buttonProps:S,ref:k})=>jsx(E,{...S,size:"md",icon:MoreIcon,"aria-label":c(CP.more),variant:"toolbar",ref:k}),...r,disabledKeys:T.filter(S=>S.props?.isDisabled).map(S=>S.key),items:T.map(S=>{let k=S.textValue||S["aria-label"];return invariant(k,"ActionItem must have a label"),{id:S.key,label:k,icon:S.props.icon}}),onAction:S=>{let k=y.collection.getItem(S);invariant(k,"Item not found");let{onPress:w,dialogContent:B}=k.props;w?.(),m(B);}})]}):null]})}),jsx(Ie,{isOpen:!!d,onOpenChange:S=>{S||m(void 0);},children:jsx(De,{enableDrawer:"auto",style:{zIndex:1e5},children:d?nt.cloneElement(d,{inheritDrawer:!0}):null})})]})});gi.displayName="CollapsibleToolbar";function xm(e,t,o){let a=pe(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:Cm(a.marginLeft))+(o?0:Cm(a.marginRight))}function Cm(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var CP=K({more:{id:"more",defaultMessage:"More"}});var vi=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,"aria-controls":a,onKeyDown:n,...i},s)=>{let p=nt.useRef(null),{toolbarProps:l}=useToolbar(i,p),{keyboardProps:c}=useKeyboard({onKeyDown:n});return jsx("div",{...mergeProps(l,c),"aria-controls":a,className:classNames(vm[i.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":o,"data-block-class":r,ref:M(s,p),children:i.children})});vi.displayName="WrappedToolbar";var va=nt.forwardRef((e,t)=>{let o=e.isCollapsible?gi:vi;return jsx(o,{...e,ref:t})});va.displayName="Toolbar";var km=z({defaultClassName:"_1j5skr71",variantClassNames:{size:{xxs:"_1j5skr72",xs:"_1j5skr73",sm:"_1j5skr74",md:"_1j5skr75",lg:"_1j5skr76"}},defaultVariants:{},compoundVariants:[]}),Im=z({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7g"},isFocusVisible:{true:"_1j5skr7h"},isDisabled:{true:"z9nup83 _1yep5z6114"},isSelected:{true:"_1j5skr7j"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!0},"_1yep5z61ti _1yep5z61th _1yep5z61tf _1yep5z61py _1yep5z61n1"],[{isSelected:!1,isHovered:!0,isDisabled:!1},"_1yep5z6g3"],[{isSelected:!1,isFocusVisible:!0,isDisabled:!1},"_1yep5z61ti _1yep5z61th _1yep5z61po _1yep5z61tf"],[{isSelected:!0,isFocusVisible:!0,isDisabled:!1},"_1j5skr7k _1yep5z61tg _1yep5z61tf _1yep5z61pp _1yep5z61n2"],[{isSelected:!0,isFocusVisible:!1,isDisabled:!1},"_1yep5z61tf _1yep5z61th _1yep5z61po _1yep5z61ti"]]}),Rm=z({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7m"},isFocusVisible:{true:"_1yep5z617l _1yep5z617k _1yep5z613r _1yep5z617i"},isSelected:{true:"_1yep5z6113"},isDisabled:{true:"z9nup83 _1yep5z6114"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61n0"]]}),wm=z({defaultClassName:"_1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr7r"},isFocusVisible:{true:"_1yep5z617l _1yep5z617k _1yep5z613r _1yep5z617i"},isSelected:{true:"_1j5skr7t"},isDisabled:{true:"z9nup83 _1yep5z6114"}},defaultVariants:{},compoundVariants:[[{isSelected:!1,isHovered:!0},"_1yep5z61nx"],[{isSelected:!0,isDisabled:!1},"_1yep5z61nx _1yep5z61n4"],[{isSelected:!0,isDisabled:!0},"_1yep5z61nx _1yep5z61n1"]]}),Tm=z({defaultClassName:"_1j5skr77 _1j5skr70 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lj _1yep5z6lk _1yep5z6le _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6k7 _1yep5z6k8 _1yep5z6k9 _1yep5z6f5",variantClassNames:{isHovered:{true:"_1j5skr78"},isFocusVisible:{true:"_1j5skr79"},isSelected:{true:"_1j5skr7a"},isDisabled:{true:"_1j5skr7b z9nup83 _1yep5z6116"}},defaultVariants:{},compoundVariants:[[{isSelected:!0,isDisabled:!1},"_1j5skr7c _1yep5z61n3"],[{isSelected:!1,isDisabled:!0},"_1j5skr7d _1yep5z61n1"],[{isSelected:!1,isHovered:!0},"_1yep5z61nx"],[{isSelected:!1,isFocusVisible:!0},"_1yep5z61ti _1yep5z61th _1yep5z61po _1yep5z61tf"],[{isSelected:!0,isFocusVisible:!0},"_1j5skr7e _1yep5z61tg _1yep5z61tf _1yep5z61pp"]]});var FP={xxs:8,xs:12,sm:16,md:20,lg:24},ge=nt.forwardRef((e,t)=>{let o=oe(t),{tooltipProps:r}=hr(e,o);return r?jsx(re,{...r,children:jsx(_i,{...e,ref:t})}):jsx(_i,{...e,ref:t})});ge.displayName="ToggleIconButton";var _i=nt.forwardRef(({className:e,style:t,icon:o,size:r="md",variant:a="primary","data-block-id":n,"data-block-class":i,...s},p)=>{let l=useToggleState(s),{buttonProps:c,isPressed:d,ref:m,isFocusVisible:u,isFocused:y,isHovered:f,uiStateOptions:b}=Cr(s,l),g=useMemo(()=>typeof o=="function"?o:l.isSelected?o.selected:o.unselected,[o,l.isSelected]),_={isSelected:l.isSelected,isHovered:f,isFocusVisible:u,isDisabled:!!s.isDisabled},v=filterTruthyValues({"data-hovered":f,"data-selected":l.isSelected,"data-focus-visible":u,"data-disabled":s.isDisabled,"data-block-id":n,"data-block-class":i,"data-focused":y,"data-pressed":d});return jsx("button",{...mergeProps(c,v),className:classNames(a==="toolbar"&&Tm(_),a==="primary"&&Im(_),a==="secondary"&&Rm(_),a==="tertiary"&&wm(_),km({size:r}),"BaselineUI-ToggleIconButton",typeof e=="function"?e(b):e),style:typeof t=="function"?t(b):t,ref:M(m,p),children:jsx(g,{size:FP[r]})})});_i.displayName="ToggleIconButtonCore";var Nm="f6jv6bm",Lm="_1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z6jm _1yep5z6jn _1yep5z6jo",oo="_1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",Mm=z({defaultClassName:"f6jv6b0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6g1",variantClassNames:{isInline:{true:"f6jv6b1"},isMinimal:{true:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z6vi _1yep5z6vj _1yep5z6vk _1yep5z615a _1yep5z615b _1yep5z615c",false:"_1yep5z614v _1yep5z614w _1yep5z614x"}},defaultVariants:{},compoundVariants:[[{isInline:!0,isMinimal:!1},"_1yep5z61if _1yep5z61ig _1yep5z61ih _1yep5z61j3 _1yep5z61j4 _1yep5z61j5 _1yep5z61jr _1yep5z61js _1yep5z61jt _1yep5z61kf _1yep5z61kg _1yep5z61kh _1yep5z61tp _1yep5z61tn _1yep5z61oy"]]}),_a=z({defaultClassName:"f6jv6b4 _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6e3 _1yep5z6eu _1yep5z6lk",variantClassNames:{isDisabled:{true:"f6jv6b5 _1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),Dm="f6jv6bj _1yep5z6wl _1yep5z6wm _1yep5z6wn _1yep5z6x9 _1yep5z6xa _1yep5z6xb _1yep5z6xx _1yep5z6xy _1yep5z6xz _1yep5z6yl _1yep5z6ym _1yep5z6yn",Em="f6jv6bk";var Bm="f6jv6bn _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6ls _1yep5z6ln _1yep5z6ll _1yep5z6hu _1yep5z6eu",Fm=z({defaultClassName:"f6jv6bf _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6lk _1yep5z6l4 _1yep5z6l7 _1yep5z6lj",variantClassNames:{isHovered:{true:"_1yep5z6120"},isDisabled:{true:"_1yep5z6z7"}},defaultVariants:{},compoundVariants:[]}),Hm="f6jv6bi _1mdhlqvb _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g1 _1yep5z6lm _1yep5z6ll _1yep5z6hx _1yep5z6lp",Om="_1yep5z6js _1yep5z6jt _1yep5z6ju",Vm="f6jv6be f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6eu _1yep5z6e3 _1yep5z6lh",Am=z({defaultClassName:"f6jv6bb _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jy _1yep5z6jz _1yep5z6k0",variantClassNames:{isInline:{true:"_1yep5z6pl _1yep5z6pm _1yep5z6pn _1yep5z617s _1yep5z617q _1yep5z6131",false:"_1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6x0 _1yep5z6x1 _1yep5z6x2 _1yep5z6xo _1yep5z6xp _1yep5z6xq _1yep5z6yc _1yep5z6yd _1yep5z6ye _1yep5z6z0 _1yep5z6z1 _1yep5z6z2"}},defaultVariants:{},compoundVariants:[]}),jm="f6jv6bl",$m="f6jv6ba _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6ij _1yep5z6ik _1yep5z6il _1yep5z6eu",za=z({defaultClassName:"f6jv6b6",variantClassNames:{isInline:{true:"f6jv6b7",false:"f6jv6b8"}},defaultVariants:{},compoundVariants:[]}),ha="f6jv6b9 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf",Xo="f6jv6bo";var Km=[["Toolbar Focus","Alt+F10"],["Bold","Ctrl+B"],["Italic","Ctrl+I"],["Underline","Ctrl+U"],["Select All","Ctrl+A"],["Cut","Ctrl+X"],["Copy","Ctrl+C"],["Paste","Ctrl+V"],["Undo","Ctrl+Z"],["Redo","Ctrl+Shift+Z"],["Submit","Ctrl+Enter"],["Open Help Dialog","Ctrl+Shift+H"]],{dialog:{row:Yo}}=layoutSprinkleValues,qm=({isOpen:e,onClose:t})=>{let{formatMessage:o}=F(),r=useId();return jsx(Ie,{isOpen:e,onOpenChange:a=>{a||t();},children:jsx(De,{enableDrawer:"auto",style:{zIndex:999999},children:jsxs(me,{"aria-labelledby":r,className:Dm,drawerBackground:"subtle",children:[jsxs(L,{paddingLeft:Yo.padding.horizontal.lg,paddingRight:Yo.padding.horizontal.sm,display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"background.primary.subtle",className:Em,children:[jsx(Q,{id:r,elementType:"h3",type:"title",size:"md",children:o(Zo.help)}),jsx(E,{icon:XIcon,size:"md",variant:"secondary","aria-label":o(Zo.close),onPress:t})]}),jsx(A,{className:jm}),jsxs(L,{paddingX:Yo.padding.horizontal.lg,role:"table","aria-labelledby":r,backgroundColor:"background.primary.subtle",children:[jsx("div",{role:"rowgroup",children:jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Yo.padding.vertical.md,color:"text.primary",children:[jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",children:o(Zo.action)}),jsx("h6",{className:sprinkles({typography:"heading.h6.semibold"}),role:"columnheader",style:{textTransform:"capitalize"},children:o(Zo.shortcut)})]})}),jsx("div",{role:"rowgroup",children:Km.map(([a,n],i)=>jsxs(Fragment$1,{children:[jsxs(L,{role:"row",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingY:Yo.padding.vertical.xs,style:{minHeight:40},children:[jsx(Q,{type:"subtitle",size:"sm",role:"cell",children:o(Zo[camelCase(a)])}),jsx(Q,{elementType:"kbd",type:"subtitle",size:"sm",role:"cell",children:getOsSpecificKeyboardShortcutLabel(n,!0)})]}),i!==Km.length-1&&jsx(A,{})]},a))})]})]})})})},Zo=K({toolbarFocus:{id:"toolbarFocus",defaultMessage:"Toolbar Focus"},help:{id:"help",defaultMessage:"Help"},close:{id:"close",defaultMessage:"Close"},action:{id:"action",defaultMessage:"Action"},shortcut:{id:"shortcut",defaultMessage:"Shortcut"},bold:{id:"bold",defaultMessage:"Bold"},italic:{id:"italic",defaultMessage:"Italic"},underline:{id:"underline",defaultMessage:"Underline"},selectAll:{id:"selectAll",defaultMessage:"Select All"},cut:{id:"cut",defaultMessage:"Cut"},copy:{id:"copy",defaultMessage:"Copy"},paste:{id:"paste",defaultMessage:"Paste"},undo:{id:"undo",defaultMessage:"Undo"},redo:{id:"redo",defaultMessage:"Redo"},openHelpDialog:{id:"openHelpDialog",defaultMessage:"Open Help Dialog"},submit:{id:"submit",defaultMessage:"Submit"}});var xa=nt.forwardRef(({value:e,defaultValue:t,onChange:o,placeholder:r,spellCheck:a,textBoxRef:n,isInline:i,isMinimal:s,isDisabled:p,editableContentAriaLabel:l,editorHandle:c,autoFocus:d,saveOnEnter:m,onSave:u},y)=>{let f=nt.useRef(null),[b,g]=useControlledState(e,t||"",o),_=useCallback(R=>{g(R.currentTarget.value||"");},[g]),v=useCallback(R=>{(m&&R.key==="Enter"&&!R.shiftKey||(R.ctrlKey||R.metaKey)&&R.key==="Enter")&&(R.preventDefault(),u());},[m,u]);useImperativeHandle(y,()=>({clear:()=>{g("");}}));let h=useCallback(R=>{R.currentTarget.style.height="16px",R.currentTarget.style.height=R.currentTarget.scrollHeight+"px";},[]);useGranularLayoutEffect(()=>{let R=f.current;R&&(R.style.height="16px",R.style.height=R.scrollHeight+"px");},[s],[b]),useImperativeHandle(c,()=>({setCaretPosition:R=>{f.current&&(f.current.focus(),f.current.setSelectionRange(R,R));},focus:()=>{f.current&&f.current.focus();}}));let{focusProps:I,isFocused:P,isFocusVisible:C}=useFocusRing(),{hoverProps:x,isHovered:T}=useHover({}),N=filterTruthyValues({"data-focus-visible":C,"data-hovered":T,"data-focused":P});return jsx("textarea",{...mergeProps(I,x,N),ref:M(f,n),className:classNames(s?Vm:[_a(),za({isInline:i}),$m]),autoFocus:d,onChange:_,disabled:p,onInput:h,value:b,placeholder:r,spellCheck:a,"aria-label":l,onKeyDown:v})});xa.displayName="PlainEditor";var er="mention",Ca="mention_input",af=nt.forwardRef(({onCancel:e,editor:t,element:o,onSelectionChange:r},a)=>{let{containerRef:n,items:i,maxMentionableUsersSuggestions:s}=useContext(ka),p=useSelected(),[l,c]=useState(""),{contains:d}=useFilter({sensitivity:"base"}),{formatMessage:m}=F(),u=useMemo(()=>{let w=i.filter(B=>l===""||d(B.displayName,l)).map(B=>({id:B.id,label:B.displayName,data:B}));return s?take(w,s):w},[i,s,l,d]),y=useCallback(w=>jsx(Item,{children:w.label},w.id),[]),f=useCallback((w=!1)=>{let B=findNodePath(t,o);B&&(removeNodes(t,{at:B}),w&&focusEditor(t));},[t,o]),b=useComboBoxState({items:u,children:y,menuTrigger:"focus",onSelectionChange:w=>{f(!0),r?.(w);}}),g=nt.useRef(null),_=nt.useRef(null),v=nt.useRef(null),h=nt.useRef(null),I=useHTMLInputCursorState(_);useInteractOutside({ref:h,onInteractOutside:()=>{b.close();}});let{inputProps:P,listBoxProps:C}=useComboBox({defaultItems:u,inputRef:_,buttonRef:g,listBoxRef:v,popoverRef:h,menuTrigger:"focus","aria-label":m(vk.mention)},b);useEffect(()=>{_.current?.focus();},[]);let x=useCallback((w="manual",B=!1)=>{f(B),e?.(w,b.inputValue);},[e,f,b.inputValue]),T=useRef(p);useEffect(()=>{T.current&&!p&&x("deselect"),T.current=p;},[p,x]);let N=I?.atStart??!1,R=I?.atEnd??!1,S=useCallback(w=>{w.key==="Backspace"&&N?x("backspace",!0):w.key==="Escape"?x("escape",!0):w.key==="ArrowLeft"&&N?x("arrowLeft",!0):w.key==="ArrowRight"&&R&&x("arrowRight",!0);let B=Hotkeys.isUndo(w)&&t.history.undos.length>0,H=Hotkeys.isRedo(w)&&t.history.redos.length>0;(B||H)&&(w.preventDefault(),t[B?"undo":"redo"](),focusEditor(t));},[N,R,x,t]),k=useMemo(()=>{if(!CSS.supports("field-sizing","content")){let w=pe(_.current),B=_.current?w?.getComputedStyle(_.current).font:void 0;return {width:B?getTextDimensions({text:b.inputValue,font:B}).width+10:"4ch"}}},[b.inputValue]);return jsxs(it.Provider,{value:b,children:[jsx("input",{...mergeProps(P,{onKeyDown:S,onBlur:()=>{x("blur",!0);},onChange:w=>{c(w.target.value);}}),style:k,className:Bm,ref:M(a,_)}),jsx(be,{triggerRef:n,className:Hm,isNonModal:!0,ref:h,state:b,children:jsx(le,{...C,items:void 0,autoFocus:"first",ref:v,className:sprinkles({width:"full"}),renderOption:sf})})]})});af.displayName="MentionInputContentElement";var Pi=withRef(({className:e,...t},o)=>{let{children:r,editor:a,element:n}=t,{items:i}=useContext(ka),s=useRef(null),[p,l]=useState(null);useEffect(()=>{let m=findNodePath(a,n);if(!m)return;let u=getPointBefore(a,m);if(!u)return;let y=createPointRef(a,u);return l(y),()=>{y.unref();}},[a,n]);let c=useCallback(()=>{let m=s.current?.getRootNode()instanceof ShadowRoot;moveSelection(a,{unit:"offset"}),moveSelection(a,{unit:"character",distance:1}),yo()&&m&&focusEditor(a);},[a]),d=useCallback(m=>{if(!m)return;let u=s.current?.getRootNode()instanceof ShadowRoot,y=i.find(b=>b.id===m);invariant(y,"User not found");let f={type:er,value:y.id,displayName:y.displayName,children:[{text:""}]};insertNodes(a,[f,{text:" "}]),u?setTimeout(()=>{c();},0):c();},[a,i,c]);return jsxs(PlateElement,{as:"span","data-slate-value":n.value,contentEditable:!1,className:e,ref:o,...t,children:[jsx(af,{onCancel:(m,u)=>{m!=="backspace"&&insertText(a,"@"+u,{at:p?.current??void 0}),(m==="arrowLeft"||m==="arrowRight")&&moveSelection(a,{distance:1,reverse:m==="arrowLeft"});},onSelectionChange:d,ref:s,element:n,editor:a}),r]})});Pi.displayName="MentionInputElement";var ki=withRef(({className:e,onClick:t,children:o,...r},a)=>{let n=useElement();return jsxs(PlateElement,{as:"span",className:e,contentEditable:!1,"data-user-id":n.value,onClick:getHandler(t,n),ref:a,...r,children:["@",n.displayName,o]})});ki.displayName="MentionElement";var nf=(e,{options:{trigger:t,triggerPreviousCharPattern:o,triggerQuery:r}})=>{let{insertText:a}=e,n=i=>i===t;return e.insertText=i=>{if(!e.selection||!n(i)||r&&!r(e)){a(i);return}let s=getEditorString(e,getRange(e,e.selection,getPointBefore(e,e.selection)));if(o?.test(s)){Pa(e);return}a(i);},e},vk=K({mention:{defaultMessage:"Mention",id:"mention"}});function pf({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("p",{children:t})})}function Dk(e){return Object.entries(e).map(([t,o])=>`${kebabCase(t)}:${o}`).filter(([,t])=>!!t).join(";")}function Ek(e){return "text"in e}function Bk(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}function tr(e){if(!e)return "";function t(o){if(Ek(o)){let a=Bk(o.text);return o.bold&&(a=`<b>${a}</b>`),o.italic&&(a=`<i>${a}</i>`),o.underline&&(a=`<u>${a}</u>`),(o.color||o.backgroundColor)&&(a=`<span style="${Dk(filterTruthyValues({color:o.color||void 0,backgroundColor:o.backgroundColor||void 0}))}">${a}</span>`),a}let r=o.children?.map(tr).join("");switch(o.type){case ELEMENT_PARAGRAPH:return `<p>${r}</p>`;case ELEMENT_LINK:return `<a href="${o.url}">${r}</a>`;case er:return `<span data-user-id="${o.value}">${o.displayName}</span>`;default:return r}}return Array.isArray(e)?e.map(o=>t(o)).join(""):t(e)}function Fk(e){return e?(e=e.trim(),e.endsWith(";")&&(e=e.slice(0,-1)),Object.fromEntries(e.split(";").map(t=>t.split(":").map(o=>o.trim())).map(([t,o])=>[camelCase(t),o]))):{}}function Si(e){e.startsWith("<p>")||(e=`<p>${e}</p>`);let t=new DOMParser().parseFromString(cf.default.sanitize(e),"text/html"),o=t.querySelectorAll("[style]");for(let a of o)a.style.textDecoration==="underline"&&(a.style.textDecoration="",a.style.cssText||a.removeAttribute("style"),a.hasAttributes()?a.innerHTML=`<u>${a.innerHTML}</u>`:a.outerHTML=`<u>${a.innerHTML}</u>`);let r=t.querySelectorAll("br");for(let a of r)a.outerHTML=a.closest("p")?`
53
+ `:"<p>";return uf(t.body)}function uf(e,t){if(e.nodeType===Node.TEXT_NODE)return jsx$1("text",t,e.textContent);if(e.nodeType!==Node.ELEMENT_NODE)return null;let o={...t};switch(e.nodeName.toUpperCase()){case"B":{o.bold=!0;break}case"I":{o.italic=!0;break}case"EM":{o.italic=!0;break}case"U":{o.underline=!0;break}case"SPAN":{let a=Fk(e.getAttribute("style")||"");a["text-decoration"]==="underline"&&(o.underline=!0),a.color&&(o.color=a.color),a.backgroundColor&&(o.backgroundColor=a.backgroundColor);break}}let r=[...e.childNodes].flatMap(a=>uf(a,o));switch(r.length===0&&r.push(jsx$1("text",o,"")),e.nodeName.toUpperCase()){case"BR":return jsx$1("text",t,`
54
+ `);case"SPAN":{let a=e.dataset.userId;return a?jsx$1("element",{type:er,value:a,displayName:e.textContent},{text:""}):r}case"P":return jsx$1("element",{type:ELEMENT_PARAGRAPH},r);case"A":return jsx$1("element",{type:ELEMENT_LINK,url:e.getAttribute("href")},r);default:return r}}function mf(e){let t=findNode(e,{match:{type:getPluginType(e,ELEMENT_LINK)}}),[o]=t||[{url:""}];return o?.url}function Pa(e){let t={children:[{text:" "}],type:Ca};e.insertNode(t);}var Hk=createPluginFactory({isElement:!0,isInline:!0,isMarkableVoid:!0,isVoid:!0,key:er,options:{trigger:"@",triggerPreviousCharPattern:/^$|^[\s"']$/},plugins:[{isElement:!0,isInline:!0,isVoid:!0,key:Ca}],withOverrides:nf}),ff=createPlugins([createParagraphPlugin({component:pf}),createBoldPlugin({component:withProps(PlateLeaf,{as:"b"})}),createItalicPlugin({component:withProps(PlateLeaf,{as:"i"})}),createUnderlinePlugin({component:withProps(PlateLeaf,{as:"u"})}),createFontColorPlugin(),createFontBackgroundColorPlugin(),createLinkPlugin({component:yf}),Hk({component:ki})],{components:{[Ca]:Pi}});var _f=({isDisabled:e})=>{let{formatMessage:t}=F(),o=useEditorRef();return jsxs(Ne,{type:"dialog",children:[jsx(Le,{children:jsx(E,{icon:LinkIcon,size:"sm",isDisabled:e,"aria-label":t(ft.addLink),className:oo,preventFocusOnPress:!0})}),jsx(Re,{className:sprinkles({boxShadow:"medium"}),placement:"top end",children:({close:r})=>jsx(me,{size:"content",style:{minWidth:240},children:jsx(qk,{close:()=>{r(),setTimeout(()=>{focusEditor(o,o.selection);},0);}})})})]})},qk=({close:e})=>{let t=useEditorRef(),{formatMessage:o}=F(),r=useEditorSelector(l=>mf(l),[]),[a,n]=nt.useState(r?"show":"add"),[i,s]=nt.useState(r||""),p=jsx(L,{padding:"lg",children:jsx(Xe,{label:o(ft.link),value:i,autoFocus:!0,onChange:s,placeholder:"https://yourdomain.com"})});return jsxs(Fragment,{children:[a==="add"&&jsxs(Fragment,{children:[p,jsx(L,{display:"flex",justifyContent:"flex-end",padding:"lg",className:Nm,children:jsx(G,{isDisabled:!isUrl(i,!0),label:o(ft.addLink),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();},preventFocusOnPress:!0})})]}),a==="show"&&jsxs(Fragment,{children:[jsx(L,{padding:"lg",children:jsx(Q,{type:"subtitle",size:"sm",children:r})}),jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(G,{label:o(ft.editLink),size:"sm",variant:"secondary",onPress:()=>{n("edit");},style:{flex:1,justifyContent:"center"}}),jsx(G,{label:o(ft.removeLink),size:"sm",onPress:()=>{unwrapLink(t),e?.();},preventFocusOnPress:!0,style:{flex:1,justifyContent:"center"}})]})]}),a==="edit"&&jsxs(Fragment,{children:[p,jsxs(L,{display:"flex",justifyContent:"flex-end",padding:"lg",gap:"lg",borderColor:"border.subtle",borderWidth:1,borderStyle:"solid",children:[jsx(G,{label:o(ft.cancel),size:"sm",variant:"secondary",onPress:()=>{n("show"),e?.();}}),jsx(G,{label:o(ft.save),size:"sm",onPress:()=>{upsertLink(t,{url:i,skipValidation:!0}),e?.();}})]})]})]})};function yf({className:e,children:t,...o}){return jsx(PlateElement,{asChild:!0,className:e,...o,children:jsx("a",{className:Ar({size:"sm"}),children:t})})}var ft=K({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 Wk=parseColor("#ffffff00").toString("hexa"),Ni=[{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"}];[...Ni,{label:"Transparent",color:Wk}];var Ra=({nodeType:e,icon:t,ariaLabel:o,isDisabled:r})=>{let a=useEditorSelector(i=>isMarkActive(i,e),[]),n=useEditorRef();return jsx(ge,{variant:"tertiary",isSelected:a,size:"sm",icon:t,"aria-label":o,isDisabled:r,onPress:()=>{toggleMark(n,{key:e});},preventFocusOnPress:!0})},Mi=({nodeType:e,"aria-label":t,isDisabled:o})=>{let{updateColor:r,clearColor:a,color:n}=useColorDropdownMenuState({customColors:[],colors:[],nodeType:e}),i=useCallback(({ref:p,triggerProps:l})=>jsx(E,{icon:e==="color"?TextIcon$1:HighlightTextIcon,"aria-label":t,size:"md",variant:"popover",isDisabled:o,className:oo,preventFocusOnPress:!0,...l,ref:p}),[e,t,o]),s=useCallback(p=>{p?r(p.toString("rgba")):a();},[a,r]);return jsx(Qt,{presets:Ni,allowRemoval:!0,pickerMode:"lazy",placement:"top end",colorLabel:!1,renderTriggerButton:i,value:n||"#000000",onChange:s,isDisabled:o})};var P0=[{type:ELEMENT_PARAGRAPH,children:[{text:""}]}],ka=nt.createContext({items:[],containerRef:{current:null},maxMentionableUsersSuggestions:10}),Bi=nt.forwardRef(({value:e,defaultValue:t,onChange:o,style:r,spellCheck:a,placeholder:n,isInline:i,isDisabled:s,editableContentAriaLabel:p,containerRef:l,onHelpDialogOpenRequest:c,mentionableUsers:d,editorHandle:m,maxMentionableUsersSuggestions:u,autoFocus:y,editorRef:f,saveOnEnter:b,onSave:g},_)=>{let v=useRef(null),h=useId(),{formatMessage:I}=F(),P=useRef(null),C=P.current,x=useRef(null),T=useMemo(()=>C?.getRootNode()instanceof ShadowRoot,[C]),[N,R]=useControlledState(e?Si(e):void 0,Si(t||"<p></p>"),w=>{o&&o(tr(w));}),{keyboardProps:S}=useKeyboard({onKeyDown:w=>{(b&&w.key==="Enter"&&!w.shiftKey||(w.ctrlKey||w.metaKey)&&w.key==="Enter")&&(w.preventDefault(),g()),w.altKey&&w.key==="F10"?(w.preventDefault(),v.current&&v.current.querySelector("button")?.focus()):w.continuePropagation(),yo()&&T&&x.current&&focusEditor(x.current);}});useEffect(()=>{s&&x.current&&deselect(x.current);},[s]),useImperativeHandle(_,()=>({startMention:()=>{x.current&&!P.current?.querySelector("input[role='combobox']")&&Pa(x.current);}})),useImperativeHandle(m,()=>({setCaretPosition:w=>{x.current&&(focusEditor(x.current),moveSelection(x.current,{distance:w,unit:"character"}));},focus:()=>{x.current&&focusEditor(x.current);}}));let k=useMemo(()=>({items:d||[],containerRef:l,maxMentionableUsersSuggestions:u}),[d,l,u]);return jsx(ka.Provider,{value:k,children:jsxs(Plate,{initialValue:N||P0,plugins:ff,editorRef:M(x,f||null),onChange:w=>{R(w);},children:[jsxs(va,{className:ha,"aria-controls":h,ref:v,children:[jsxs(L,{display:"flex",flexDirection:"row",role:"group",gap:"xs",paddingX:"sm",children:[jsx(Ra,{nodeType:MARK_BOLD,icon:BoldIcon,ariaLabel:I(io.bold),isDisabled:s}),jsx(Ra,{nodeType:MARK_ITALIC,icon:ItalicIcon,ariaLabel:I(io.italic),isDisabled:s}),jsx(Ra,{nodeType:MARK_UNDERLINE,icon:UnderlineIcon,ariaLabel:I(io.underline),isDisabled:s})]}),jsx(A,{orientation:"vertical",className:Xo}),jsx(Mi,{nodeType:MARK_COLOR,"aria-label":I(io.fontColor),isDisabled:s}),jsx(A,{orientation:"vertical",className:Xo}),jsx(Mi,{nodeType:MARK_BG_COLOR,"aria-label":I(io.backgroundColor),isDisabled:s}),jsx(A,{orientation:"vertical",className:Xo}),jsx(_f,{isDisabled:s}),jsx(A,{orientation:"vertical",className:Xo}),jsx(E,{className:oo,icon:QuestionmarkCircleIcon,size:"sm","aria-label":I(io.help),onPress:c})]}),jsx(A,{variant:"secondary"}),jsx("div",{...S,ref:P,children:jsx(PlateContent,{id:h,disabled:s,readOnly:s,style:r,placeholder:n,autoFocus:y,spellCheck:a,"aria-label":p,className:classNames(_a({isDisabled:s}),za({isInline:i})),renderPlaceholder:({attributes:w,children:B})=>jsx("span",{...w,className:sprinkles({paddingY:"lg"}),children:B})})})]})})});Bi.displayName="RichEditor";var sf=({key:e,value:t},{isDisabled:o,optionProps:r,isFocused:a,_state:n},i)=>{let{hoverProps:s}=useHover({isDisabled:o}),{label:p,data:l}=t;return jsxs(Fragment,{children:[jsxs("li",{...mergeProps(r,s),className:Fm({isDisabled:o,isHovered:a}),"data-active":a,ref:i,children:[jsx(Xt,{name:p,...l?.avatar}),jsxs(L,{display:"flex",flexDirection:"column",children:[jsx(Q,{type:"subtitle",size:"sm",children:p}),jsx(Q,{type:"helper",size:"sm",children:l?.description})]})]}),e===n.collection.getLastKey()?null:jsx(A,{})]})},io=K({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 kf=nt.memo(nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,enableRichText:a=!1,onCancel:n,onSave:i,isInline:s=!0,submitButtonIcon:p=ArrowUpCircleFilledIcon,submitButtonAriaLabel:l,cancelButtonAriaLabel:c,"aria-label":d,"aria-describedby":m,"aria-labelledby":u,"aria-details":y,editableContentAriaLabel:f="Editing Area",footerButtons:b,clearOnCancel:g,clearOnSave:_,...v},h)=>{let I=useRef(null),{formatMessage:P}=F(),C=useRef(null),x=useRef(null),T=useRef(null),N=!a&&v.variant==="minimal",R=useRef(null),[S,k]=nt.useState(v.value||v.defaultValue),w=v.isDisabled||v.isSaveDisabled||!getPlainText(S||""),{fieldProps:B}=useLabel({"aria-label":d,"aria-labelledby":u,"aria-describedby":m,"aria-details":y,labelElementType:"div"});N&&!v.avatarName&&console.warn("Editor: When using the minimal `variant` and `enableRichText` is `false`, you should provide an `avatarName`.");let H=useCallback(()=>{k(""),a?I.current?.reset():x.current?.clear();},[a]),D=useCallback(()=>{w||(i?.(a?tr(I.current?.children):C.current.value),_&&H());},[H,_,a,i,w]),q=jsx(E,{variant:"ghost","aria-label":l||P(Hi.save),icon:p,isDisabled:w,size:"md",excludeFromTabOrder:N,className:N?Om:void 0,onPress:D,preventFocusOnPress:!0}),[j,$]=nt.useState(!1),{keyboardProps:O}=useKeyboard({onKeyDown:V=>{(V.metaKey||V.ctrlKey)&&V.shiftKey&&V.key==="h"&&(V.preventDefault(),$(!0));}}),J=useCallback(V=>{k(V),v.onChange?.(V);},[v]);return jsxs("div",{...mergeProps(B,a?O:{}),role:"application",ref:M(T,h),style:t,"data-block-id":o,"data-block-class":r,className:classNames(Mm({isInline:s,isMinimal:N}),"BaselineUI-Editor",e),"aria-disabled":v.isDisabled,children:[N?jsxs(Fragment,{children:[s?jsx(Xt,{className:Lm,name:v.avatarName||""}):null,jsxs("div",{className:Am({isInline:s}),children:[jsx(xa,{isMinimal:N,textBoxRef:C,isInline:s,editableContentAriaLabel:f,...v,onChange:J,onSave:D}),q]})]}):jsxs(Fragment,{children:[a?jsx(Bi,{containerRef:T,ref:R,editorRef:I,isInline:s,editableContentAriaLabel:f,onHelpDialogOpenRequest:()=>{$(!0);},...v,onChange:J,onSave:D}):jsxs(Fragment,{children:[!s&&jsx(A,{variant:"secondary"}),jsx(xa,{onCancel:n,textBoxRef:C,ref:x,isInline:s,editableContentAriaLabel:f,...v,onChange:V=>{k(V),v.onChange?.(V);},onSave:D})]}),jsx(A,{variant:"secondary"}),jsxs("div",{className:classNames(ha,sprinkles({justifyContent:"space-between"})),children:[jsxs(L,{paddingX:"sm",gap:"sm",display:"flex",children:[a&&v.mentionableUsers?jsx(E,{icon:AtIcon,size:"sm","aria-label":P(Hi.mention),onPress:()=>R.current?.startMention(),preventFocusOnPress:!0}):null,b?.map(({type:V,props:Z},X)=>V==="action"?jsx(E,{...Z,size:"sm",isDisabled:v.isDisabled||Z.isDisabled},X):jsx(ge,{...Z,size:"sm",variant:"tertiary",isDisabled:v.isDisabled||Z.isDisabled},X))]}),jsxs(L,{children:[!!n&&jsx(E,{variant:"secondary",icon:XCircleFilledIcon$1,isDisabled:v.isDisabled,size:"md",onPress:()=>{n(),g&&H();},"aria-label":c||P(Hi.cancel)}),q]})]})]}),jsx(qm,{isOpen:j,onClose:()=>{$(!1);}})]})}));kf.displayName="Editor";var Hi=K({cancel:{defaultMessage:"Cancel",id:"cancel"},save:{defaultMessage:"Save",id:"save"},mention:{defaultMessage:"Mention",id:"mention"}});var Ta=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,isMounted:a,children:n,transitions:i,elementType:s="div",...p},l)=>{let c=useTransition(a,i),d=animated[s];return c((m,u)=>u&&jsx(d,{className:e,"data-block-id":o,"data-block-class":r,style:{...t,...m},...p,ref:l,children:n}))});Ta.displayName="Transition";var If="_8kqf970 _1yep5z6pi _1yep5z6pj _1yep5z6pk _1yep5z614j _1yep5z614k _1yep5z614l _1yep5z614s _1yep5z614t _1yep5z614u _1yep5z615a _1yep5z615b _1yep5z615c _1yep5z6z3 _1yep5z6vc _1yep5z6vd _1yep5z6ve _1yep5z617g";var wf=2,Tf=nt.forwardRef(({className:e,style:t,hideForKeyboard:o,scrollRef:r,label:a,delay:n=1500,smoothScroll:i=!0,"data-block-id":s,"data-block-class":p},l)=>{let c=nt.useRef(null),d=useInteractionModality(),[m,u]=nt.useState(!1),y=useCallback(()=>{let N=r?.current||ue(c.current).body;return pe(N).getComputedStyle(N).flexDirection==="column-reverse"?N.scrollTop+wf>=0:N.scrollTop+N.clientHeight+wf>=N.scrollHeight},[r]),[f,b]=nt.useState(y),g=St(),{buttonProps:_,isPressed:v}=useButton({onPress:()=>{let N=r?.current||ue(c.current).body;N.scrollTo({top:N.scrollHeight,behavior:i?"smooth":"auto"});}},c),{focusProps:h,isFocused:I,isFocusVisible:P}=useFocusRing(),{hoverProps:C,isHovered:x}=useHover({}),T=filterTruthyValues({"data-block-id":s,"data-block-class":p,"data-pressed":v,"data-focus-visible":P,"data-hovered":x,"data-focused":I});return useEffect(()=>{b(y());},[y]),useEffect(()=>{let N=r?.current||ue(c.current).body,R="onscrollend"in pe(N),S=()=>{setTimeout(()=>{u(!1),b(y());},n);},k=()=>{u(!0),R||S();};return N.addEventListener("scroll",k),N.addEventListener("scrollend",S),()=>{N.removeEventListener("scroll",k),N.removeEventListener("scrollend",S);}},[r,n,y]),jsxs(Ta,{isMounted:(o?d!=="keyboard":!0)&&!m&&!f,elementType:"button",transitions:{from:{opacity:0,transform:"translateX(-50%) translateY(10px)"},enter:{opacity:1,transform:"translateX(-50%) translateY(0)"},leave:{opacity:0,transform:"translateX(-50%) translateY(10px)"},immediate:g},...mergeProps(_,h,C,T),className:classNames(If,Gr({isFocusVisible:P,variant:"high-contrast",isHovered:x}),Wr({variant:"high-contrast"}),"BaselineUI-ScrollControlButton",e),style:t,ref:M(l,c),children:[jsx(ArrowDownCircleFilledIcon,{size:16,className:No({variant:"high-contrast"})}),a]})});Tf.displayName="ScrollControlButton";var Vi="_1yep5z6jy _1yep5z6jz _1yep5z6k0 _1yep5z6k7 _1yep5z6k8 _1yep5z6k9",Sf=z({defaultClassName:"_1v0p2z10 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z69f _1yep5z69g _1yep5z69h",variantClassNames:{hasTitleAndIcon:{true:"_1yep5z6m0 _1yep5z6m1 _1yep5z6m2 _1yep5z6oi _1yep5z6oj _1yep5z6ok"},hasNoCloseBtn:{true:"_1yep5z6m6 _1yep5z6m7 _1yep5z6m8 _1yep5z6oi _1yep5z6oj _1yep5z6ok _1yep5z6po _1yep5z6pp _1yep5z6pq _1yep5z6nc _1yep5z6nd _1yep5z6ne"}},defaultVariants:{},compoundVariants:[[{hasTitleAndIcon:!0,hasNoCloseBtn:!0},"_1yep5z61hf _1yep5z61hg _1yep5z61hh"]]}),Nf="_1v0p2z10";var Na=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,message:a,title:n,primaryActionLabel:i,cancelLabel:s,textInputProps:p,icon:l,iconColor:c,showCloseButton:d=!0,onPrimaryAction:m,onCancel:u,autoFocusButton:y,isPrimaryActionDisabled:f},b)=>{let g=useId(),{formatMessage:_}=F(),v=n&&jsx(Q,{id:g,type:"title",size:"sm",elementType:"h3",children:n});return jsxs(me,{className:e,style:t,"data-block-id":o,"data-block-class":r,size:"sm",variant:"primary",role:"alertdialog",ref:b,"aria-labelledby":g,children:[jsxs("div",{className:Sf({hasTitleAndIcon:!!(l&&n),hasNoCloseBtn:!d}),children:[jsxs(L,{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[l?jsx(l,{style:{color:c},size:24}):null,!l&&v,d?jsx(E,{icon:XIcon,variant:"secondary",size:"md","aria-label":_(Q0.close),onPress:u}):null]}),l?v:null]}),a?jsx(L,{elementType:"section",className:Nf,paddingX:"lg",paddingBottom:"lg",typography:"body.sm.regular",color:"text.primary",children:a}):null,p?jsx(L,{paddingX:"lg",paddingBottom:"lg",children:jsx(Xe,{...p})}):null,s||i?jsxs(Fragment,{children:[jsx(A,{}),jsxs(L,{padding:"lg",display:"flex",gap:"xl",children:[s?jsx(G,{variant:"secondary",className:Vi,label:s,onPress:u,autoFocus:y==="cancel"}):null,i?jsx(G,{className:Vi,label:i,onPress:m,autoFocus:y==="primary",isDisabled:f}):null]})]}):null]})});Na.displayName="AlertDialog";var Q0=K({close:{id:"close",defaultMessage:"Close",description:"Close button label"}});var Lf="_1t55bp71",Mf="_1yep5z6e3 _1yep5z6eu _1yep5z6is _1yep5z6it _1yep5z6iu _1yep5z69i _1yep5z69j _1yep5z69k",Df="_1t55bp70";var aI=rI(),Ef=nt.forwardRef(({className:e,style:t,children:o,"data-block-id":r,"data-block-class":a,showCaret:n},i)=>{let s=useMemo(()=>{let p=o;return (!o||Array.isArray(o)&&o.length===0)&&(p=""),aI.render(p)},[o]);return jsx("div",{className:classNames(Mf,Df,{[Lf]:n},"BaselineUI-Markdown",e),"data-block-id":r,"data-block-class":a,style:t,ref:i,dangerouslySetInnerHTML:{__html:s}})});Ef.displayName="Markdown";function Of(e){let{formatMessage:t,locale:o}=F(),[r,a]=nt.useState(!1),[n,i]=nt.useState(0),[s,p]=nt.useState(0),[l,c]=nt.useState(!1);useEffect(()=>{if(!e.current)return;let u=e.current,y=()=>{a(!1),i(0);},f=()=>{l||i(u.currentTime*100/u.duration);},b=()=>{p(u.duration);};return u.addEventListener("ended",y),u.addEventListener("timeupdate",f),u.addEventListener("loadedmetadata",b),()=>{u.removeEventListener("ended",y),u.removeEventListener("timeupdate",f),u.removeEventListener("loadedmetadata",b);}},[l,e]);let d=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),a(!0),announce(t(Ff.playing),"polite")):(e.current.pause(),a(!1),announce(t(Ff.paused),"polite"))))();},[t,e]),m=useCallback(u=>{e.current&&(e.current.currentTime=u*e.current.duration/100,announce(sI(e.current.currentTime,o.locale),"assertive"));},[o.locale,e]);return {isPlaying:r,progress:n,duration:s,togglePlay:d,seek:m,setProgress:i,formattedCurrentTime:e.current?.currentTime?Hf(e.current?.currentTime):"00:00",formattedDuration:s?Hf(s):"00:00",setIsSliderDragging:c}}var Ff=K({playing:{id:"playing",defaultMessage:"Playing"},paused:{id:"paused",defaultMessage:"Paused"}});function sI(e,t){let o=Math.floor(e/3600),r=Math.floor(e%3600/60),a=e%60,n={...o&&{hours:o},...r&&{minutes:r},seconds:Math.floor(a)};return new Intl.DurationFormat(t,{style:"long"}).format(n)}function Hf(e){let t=Math.floor(e%3600/60),o=Math.floor(e%60);return [t,o].map(r=>r.toString().padStart(2,"0")).join(":")}var Vf="_1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q",Af="rta2n91 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z6zv _1yep5z6vf _1yep5z6vg _1yep5z6vh _1yep5z617e _1yep5z610s",jf="rta2n90";var Kf=nt.forwardRef(({className:e,style:t,size:o="lg",sources:r,"data-block-id":a,"data-block-class":n,...i},s)=>{let p=nt.useRef(null),{isPlaying:l,progress:c,duration:d,togglePlay:m,seek:u,formattedDuration:y,formattedCurrentTime:f,setProgress:b,setIsSliderDragging:g}=Of(p),{formatMessage:_}=F(),v=filterTruthyValues({"data-block-id":a,"data-block-class":n,"data-state":l?"playing":"paused","data-loaded":d>0});return jsxs("div",{...v,...i,className:classNames(Vf,"BaselineUI-AudioPlayer",e),role:"group",style:t,ref:s,children:[jsx(VisuallyHidden,{children:jsx("audio",{ref:p,children:r.map(({url:h,type:I})=>jsx("source",{src:h,type:I},h))})}),jsx(ge,{icon:l?PauseIcon:PlayIcon,variant:"toolbar",isSelected:l,size:o,"aria-label":_(l?ji.pause:ji.play),style:{borderRadius:"50%"},onPress:m}),jsxs("div",{className:Af,children:[jsx("span",{"aria-hidden":!0,children:f}),jsx(Ft,{"aria-label":_(ji.audioTimeline),value:c,minValue:0,maxValue:100,className:jf,onChange:h=>{b(h),g(!0);},onChangeEnd:h=>{u(h),g(!1);}}),jsx("span",{"aria-hidden":!0,children:y})]})]})});Kf.displayName="AudioPlayer";var ji=K({play:{id:"play",defaultMessage:"Play"},pause:{id:"pause",defaultMessage:"Pause"},audioTimeline:{id:"audioTimeline",defaultMessage:"Audio timeline"}});var qf="_1w920rnd _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g1 _1yep5z6ia _1yep5z6ib _1yep5z6ic",Gf="_1w920rn1 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6iy _1yep5z6iz _1yep5z6j0 _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z69i _1yep5z69j _1yep5z69k",Wf="_1w920rn0 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6l8",Ma=z({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{isFocusVisible:{true:"_1yep5z6ln _1yep5z6ll _1yep5z6hu"},isSelected:{true:"_1yep5z6ln _1yep5z6ll _1yep5z6hu"},isLoading:{true:"_1yep5z6164 _1yep5z6165 _1yep5z6166"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rn6 _1yep5z6ln _1yep5z6ll _1yep5z6hu"]]}),Xf="_1w920rnb _1yep5z6li",Yf=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 _1yep5z6ln _1yep5z6ll _1yep5z6hu"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0,isSelected:!0},"_1w920rna _1yep5z61tg _1yep5z61tf _1yep5z61pp"]]}),Zf="_1w920rnc";var Da=({items:e,ulRef:t,containerClassName:o,previewClassName:r,itemDataAttribute:a,showCount:n=!1})=>{let{length:i}=e,s=nt.useRef(null);return useLayoutEffect(()=>{if(!s.current)return;let p=s.current.closest(o)?.querySelector(`[${a}='${e?.at(-1)?.key}']`)?.cloneNode(!0);invariant(p,"Node is not defined."),s.current?.prepend(p);},[e,t,o,a]),jsx("div",{className:r,ref:s,children:n&&i>1?jsx(L,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:Zf,children:i}):null})};function Jf(e,t){return e.find(o=>o.id===t)}function ey(e,t,o){let r=e.findIndex(i=>i.id===t),a=[...o].map(i=>e.findIndex(s=>s.id===i)),n=[...e];for(let i of a){let[s]=n.splice(i,1);n.splice(r,0,s);}return n}function ty(e,t,o){let r=e.findIndex(s=>s.id===t),a=[...o].map(s=>e.findIndex(p=>p.id===s)),n=[...e],i=0;for(let s of a){let[p]=n.splice(s-i,1);n.splice(r,0,p),i++;}return n}function $i(e){return e.map(t=>({id:t.id,label:t.label,data:{src:t.src,alt:t.alt}}))}function Ea(e){return e.map(t=>({id:t.id,label:t.label,src:t.data?.src,alt:t.data?.alt}))}var CI=({fit:e,item:t,deleteElement:o})=>{let{formatMessage:r}=F(),{imgProps:a,isLoading:n,isLoaded:i}=Tt({src:t.data?.src,alt:t.data?.alt??""}),s=useTransition(i,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}});return n?jsx(Kt,{"aria-label":r(ar.loading)}):s((p,l)=>l&&jsx(animated.div,{role:"img","aria-label":a.alt,style:{...p,backgroundImage:`url(${a.src})`,backgroundSize:e},className:Xf,children:o}))},oy=({item:e,options:{optionProps:t,isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i},liRef:s,fit:p="contain",onDelete:l,className:c,imageClassName:d,imageLabelClassName:m,imageDimensions:u,style:y,renderImage:f=(b,{deleteElement:g})=>jsx(CI,{item:b,deleteElement:g,fit:p})})=>{let b=useId(),{formatMessage:g}=F(),{value:_}=e;invariant(_&&Ve(_),"Expected value to be a list option");let v=l?jsx("div",{className:qf,children:jsx(E,{"aria-label":g(ar.delete),size:"xs",icon:XIcon$2,onPress:()=>{l(_.id);},UNSAFE_NON_INTERACTIVE:!0})}):null,h=Ea([_])[0],I=useCallback(C=>{let x={},T=typeof C=="function"?C(h,{isSelected:r}):C;return T&&(x.width=typeof T.width=="string"?Ki[T.width]:T.width,x.aspectRatio="height"in T?`${x.width} / ${T.height}`:T?.aspectRatio?.toString()),x},[h,r]),P=useMemo(()=>({isFocusVisible:o,isSelected:r,isFocused:a,isDisabled:n,isPressed:i}),[o,r,a,n,i]);return jsxs("li",{...t,ref:s,className:classNames(Gf,Ae(c,h,P)),"aria-labelledby":b,style:mr(y,h,P),children:[jsx(L,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",children:jsx("div",{className:classNames(Ma({isFocusVisible:o,isSelected:r,isLoading:!0}),Ae(d,h,P)),style:I(u),"data-image-key":_.id,children:f(_,{deleteElement:v??void 0,onDelete:l})})}),jsx("span",{id:b,className:classNames(Yf({isFocusVisible:o,isSelected:r}),Ae(m,h,P)),children:_.label})]})};var SI={width:0,display:"block"};var Ki=(o=>(o[o.sm=102]="sm",o[o.md=170]="md",o))(Ki||{}),ny=nt.forwardRef(({className:e,style:t,fit:o="cover",onReorder:r,"data-block-id":a,"data-block-class":n,onDelete:i,imageWidth:s="sm",aspectRatio:p=3/4,items:l,defaultItems:c=[],onKeyDown:d,imageContainerClassName:m,imageClassName:u,labelClassName:y,onListChange:f,renderImage:b,imageDimensions:g={width:s,aspectRatio:p},imageContainerStyle:_,...v},h)=>{let I=nt.useRef(null),[P,C]=useState([]),{formatMessage:x}=F();useEffect(()=>{(p||s)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[s,p]);let[T,N]=useControlledState(v.selectedKeys,v.defaultSelectedKeys??[],v.onSelectionChange),[R,S]=useControlledState(l?$i(l):void 0,$i(c),f?D=>{f?.(Ea(D));}:void 0),k=useCallback(D=>{let q=D.target.key,j=D.keys;if(D.target.dropPosition==="before"){let $=ey(R,q,j);S($);}else if(D.target.dropPosition==="after"){let $=ty(R,q,j);S($);}r?.(D);},[R,r,S]),w=useCallback(()=>{i&&P.length&&(S(R.filter(D=>!P.includes(D.id))),i(new Set(P)),C([]));},[P,R,i,S]),B=useCallback((D,q,j)=>{let{value:$}=D;invariant(Ve($));let O={id:$.id,label:$.label,src:$.data?.src,alt:$.data?.alt};return jsx(oy,{item:D,options:q,liRef:j,fit:o,onDelete:i?J=>{C([J]);}:void 0,renderImage:b,className:Ae(m,O,q),imageClassName:u,imageLabelClassName:y,imageDimensions:g,style:_})},[o,i,b,m,u,y,g,_]),{keyboardProps:H}=useKeyboard({onKeyDown(D){if(d?.(D),D.key==="Backspace"||D.key==="Delete"){if(!i)return;if([...T].length)C([...T]);else {let j=D.target.dataset.key;C([j]);}}}});return jsxs("div",{...H,ref:h,style:t,className:classNames("BaselineUI-ImageGallery",e),"data-block-id":a,"data-block-class":n,children:[jsx(le,{...v,selectedKeys:T,items:R,onReorder:k,layout:"grid",orientation:"vertical",className:Wf,ref:I,dropIndicatorStyle:SI,renderOption:B,renderDragPreview:D=>jsx(Da,{items:D,ulRef:I,containerClassName:".BaselineUI-ImageGallery",previewClassName:Ma(),itemDataAttribute:"data-image-key",showCount:!0}),onSelectionChange:N,getItems:D=>[...D].map(q=>{let j=Jf(R,q);return {src:j?.src||"",alt:j?.alt||"",key:q}})}),jsx(Ie,{isOpen:!![...P].length,onOpenChange:D=>{D||C([]);},children:jsx(De,{isDismissable:!0,children:jsx(Na,{showCloseButton:!1,title:"Are you sure you want to delete this item?",primaryActionLabel:x(ar.delete),cancelLabel:x(ar.cancel),onCancel:()=>{C([]);},onPrimaryAction:w,autoFocusButton:"cancel"})})})]})});ny.displayName="ImageGallery";var ar=K({delete:{id:"delete",defaultMessage:"Delete"},cancel:{id:"cancel",defaultMessage:"Cancel"},loading:{id:"loading",defaultMessage:"Loading"}});var iy="_1sexph00",sy="_1sexph01 _1yep5z617x _1yep5z617y _1yep5z617z _1yep5z61a9 _1yep5z61aa _1yep5z61ab _1yep5z61bf _1yep5z61bg _1yep5z61bh _1yep5z6193 _1yep5z6194 _1yep5z6195 _1yep5z61ry _1yep5z61rz _1yep5z61s0";var cy=nt.forwardRef(({className:e,style:t,items:o,"data-block-id":r,"data-block-class":a,hideLabel:n,size:i="md",isDisabled:s,showSelectedIcon:p=!0,excludeFromTabOrder:l,onPress:c,isSelected:d,defaultSelected:m,onButtonSelectionChange:u,moreAriaLabel:y,optionStyle:f,optionClassName:b,triggerClassName:g,triggerStyle:_,tooltipProps:v,...h},I)=>{let{formatMessage:P}=F(),C=ae(),x=useSelectState({items:o,...h,defaultSelectedKey:h.defaultSelectedKey||o?.[0]?.id,children:C,validationState:h.validationState==="error"?"invalid":"valid"}),[T,N]=useControlledState(d,!!m,O=>{u?.({isSelected:O,selectedKey:x.selectedKey});}),{hoverProps:R,isHovered:S}=useHover({isDisabled:s}),k=useMemo(()=>{let O=x.collection.getItem(x.selectedKey),J=O?.textValue||O?.["aria-label"],V=O?.value,Z=V?.icon,X={size:i,isSelected:T,onPress:Ce=>{N(!T),c?.(Ce);},isDisabled:s,excludeFromTabOrder:l,className:typeof b=="function"?b(V,{isButton:!0,isSelected:T}):b,style:typeof f=="function"?f(V,{isButton:!0,isSelected:T}):f};return n&&Z?jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:J,placement:"bottom start",offset:4,...typeof v=="function"?v("button"):v,children:jsx(ge,{icon:Z,"aria-label":J,variant:"toolbar",...X})}):jsx(Kr,{iconStart:Z,label:J,variant:"toolbar",...X})},[l,n,T,s,c,b,f,N,i,x.collection,x.selectedKey,v]),w=h["aria-label"],B=useCallback(({buttonProps:O,ref:J})=>{delete O["aria-labelledby"];let V=y||`${P(OI.more)} ${w}`;return jsx(re,{variant:"inverse",size:"sm",includeArrow:!1,text:V,placement:"bottom start",offset:4,...v,children:jsx(PressResponder,{...O,children:jsx(E,{"aria-label":V,ref:J,icon:CaretDownIcon,variant:"toolbar",size:i,className:({isFocusVisible:Z})=>classNames(Ur({isSelected:T,isFocusVisible:Z}),sy,g),style:_,isDisabled:s,excludeFromTabOrder:l})})})},[w,l,P,T,s,y,i,v,g,_]),H=filterTruthyValues({"data-block-id":r,"data-block-class":a,"data-hovered":S,"data-selected":T,"data-disabled":s,"data-expanded":x.isOpen}),D=oe(I),q=useMemo(()=>({state:x,popoverAnchorRef:D}),[x,D]),j=useCallback(O=>typeof b=="function"?b(O,{isButton:!1,isSelected:x.selectionManager.isSelected(O.id)}):b,[b,x.selectionManager]),$=useCallback(O=>typeof f=="function"?f(O,{isButton:!1,isSelected:x.selectionManager.isSelected(O.id)}):f,[f,x.selectionManager]);return jsx(Yr.Provider,{value:q,children:jsxs(L,{...R,role:"group",display:"inline-flex",flexDirection:"row",alignItems:"center",className:classNames(iy,"BaselineUI-ButtonSelect",e),"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],"aria-describedby":h["aria-describedby"],"aria-details":h["aria-details"],style:t,ref:D,...H,children:[k,jsx(Qe,{isDisabled:s,showSelectedIcon:p,placement:"bottom start",items:o,...h,style:{width:20},optionClassName:j,optionStyle:$,variant:"ghost",renderTrigger:B})]})})});cy.displayName="ButtonSelect";var OI=K({more:{id:"more",defaultMessage:"More"}});var dy=z({defaultClassName:"_18v88n10 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6lh",variantClassNames:{labelPosition:{top:"_1yep5z614v _1yep5z614w _1yep5z614x",start:"_1yep5z614s _1yep5z614t _1yep5z614u _1yep5z616a _1yep5z616b _1yep5z616c _1yep5z6vf _1yep5z6vg _1yep5z6vh"}},defaultVariants:{},compoundVariants:[]}),uy=z({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6eu _1yep5z6lh _1yep5z6ls _1yep5z6lk _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z610v"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),my=z({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ip _1yep5z6iq _1yep5z6ir _1yep5z6le",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z610b",warning:"_1yep5z610j"},isReadOnly:{true:"_1yep5z6112"}},defaultVariants:{},compoundVariants:[]}),fy=z({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z6lv _1yep5z6lt _1yep5z6h4 _1yep5z6jd _1yep5z6je _1yep5z6jf",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z612k",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6wf _1yep5z6wg _1yep5z6wh _1yep5z6x3 _1yep5z6x4 _1yep5z6x5 _1yep5z6xr _1yep5z6xs _1yep5z6xt _1yep5z6yf _1yep5z6yg _1yep5z6yh _1yep5z617s _1yep5z617q _1yep5z612y _1yep5z617j _1yep5z617i _1yep5z613r _1yep5z617l"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z613r"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:!0,isFocused:!1,validationState:"valid"},"_1yep5z61tp _1yep5z61tn _1yep5z61oy"],[{variant:"ghost",isFocused:!1,isHovered:!1,validationState:"valid"},"_18v88n1n"],[{isHovered:!0,validationState:"valid",isDisabled:!1,isReadOnly:!1,isFocused:!1,variant:"primary"},"_1yep5z61oz"],[{isHovered:!0,validationState:"warning",isDisabled:!1,isReadOnly:!1,isFocused:!1},"_1yep5z61oz"],[{isReadOnly:!0,variant:"primary",isFocused:!1},"_18v88n1o"]]}),yy=z({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ev",variantClassNames:{isDisabled:{true:"_1yep5z610v"}},defaultVariants:{},compoundVariants:[]}),by=z({defaultClassName:"_18v88n19 _1yep5z6ip _1yep5z6iq _1yep5z6ir",variantClassNames:{labelPosition:{top:"_1yep5z6t3 _1yep5z6t4 _1yep5z6t5",start:"_1yep5z6n0 _1yep5z6n1 _1yep5z6n2 _1yep5z614v _1yep5z614w _1yep5z614x"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:!1},"_1yep5z61s1 _1yep5z61s2 _1yep5z61s3"]]}),gy=z({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6lk",variantClassNames:{isFocusVisible:{true:"_1yep5z6121 _1yep5z6143 _1yep5z617h"},isHovered:{true:"_1yep5z6121 _1yep5z6143 _1yep5z617h"},isOpen:{true:"_1yep5z6143 _1yep5z617h"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:!0},"_1yep5z61ny _1yep5z61q0 _1yep5z61te"],[{isHovered:!0},"_1yep5z61ny _1yep5z61q0 _1yep5z61te"],[{isOpen:!0},"_1yep5z61q0 _1yep5z61te"]]});function vy({allowsCustomValue:e,onValueChange:t,inputValue:o},r,a,n,i){let[s,p]=useState(null),l=useRef(!1);useEffect(()=>{if(!t)return;let d=a.current,m=u=>{p(u.target);};return d?.addEventListener("focusin",m),()=>{d?.removeEventListener("focusin",m);}},[t,a,r.selectedKey]),useGranularEffect(()=>{r.selectedKey&&(t?.({value:r.selectedItem?.textValue,key:r.selectedKey}),l.current=!1);},[r.selectedKey],[t,r.selectedItem]),useInteractOutside({ref:n,isDisabled:!t,onInteractOutside:d=>{!i.current?.contains(d.target)&&s===n.current&&e&&l.current&&(t?.({value:n.current?.value,key:null}),l.current=!1);}}),useEffect(()=>{if(!t)return;let d=n.current,m=()=>{l.current=!0;};return d?.addEventListener("input",m),()=>{d?.removeEventListener("input",m);}},[n,t]),useEffect(()=>{l.current=!1;},[o]);let{keyboardProps:c}=useKeyboard({isDisabled:!t,onKeyDown:d=>{e&&d.key==="Enter"&&l.current?(t?.({value:n.current?.value,key:null}),l.current=!1):d.key==="Escape"&&r.close(),d.continuePropagation();}});return {inputProps:c}}var hy=nt.forwardRef(({className:e,style:t,inputStyle:o,inputClassName:r,"data-block-id":a,"data-block-class":n,label:i,items:s,showSelectedIcon:p=!1,onSelectionChange:l,onInputChange:c,isInvalid:d=!1,labelPosition:m="top",validationState:u="valid",variant:y="primary",toggleLabel:f,renderOption:b,showIcon:g=!0,filter:_,minValue:v,maxValue:h,inputType:I="text",onInputSubmit:P,onValueChange:C,...x},T)=>{let N=useObjectRef(T),{contains:R}=useFilter({sensitivity:"base"}),S=ae(),k=useComboBoxState({...x,defaultFilter:_||R,defaultItems:s,onSelectionChange:l,onInputChange:c,children:S,validationState:d?"invalid":"valid"}),w=nt.useRef(null),B=nt.useRef(null),H=nt.useRef(null),D=nt.useRef(null),q=nt.useRef(null),{inputProps:j}=vy({onValueChange:C,allowsCustomValue:x.allowsCustomValue,inputValue:x.inputValue},k,N,B,D),{buttonProps:$,inputProps:O,listBoxProps:J,labelProps:V,errorMessageProps:Z,descriptionProps:X,validationErrors:Ce}=useComboBox({...x,inputRef:B,defaultItems:s,buttonRef:w,listBoxRef:H,popoverRef:D,validationState:u==="error"?"invalid":"valid"},k),Pe=x.errorMessage||Ce.join(" "),ye=ke({...x,errorMessage:Pe,descriptionProps:X,errorMessageProps:Z,labelPosition:m});Pe&&(u="error");let{hoverProps:Te,isHovered:He}=useHover({isDisabled:x.isDisabled}),{isFocused:te,focusProps:de,isFocusVisible:_t}=useFocusRing(),zt=jt({isReadOnly:x.isReadOnly,validationState:u}),mo=filterTruthyValues({"data-read-only":x.isReadOnly,"data-disabled":x.isDisabled,"data-validation-state":u,"data-focused":te,"data-focus-visible":_t}),{labelProps:ht,fieldProps:Y}=useLabel({label:i,"aria-label":x["aria-label"],"aria-labelledby":x["aria-labelledby"],"aria-describedby":x["aria-describedby"],"aria-details":x["aria-details"]}),{keyboardProps:U}=useKeyboard({onKeyDown:W=>{x.allowsCustomValue&&W.key==="Enter"&&P?.(O.value?.toString()??"");}}),{focusProps:ne}=useFocus({onBlur:()=>{x.allowsCustomValue&&O.value&&P?.(O.value?.toString()??"");}});return jsx(it.Provider,{value:k,children:jsxs("div",{className:classNames(dy({labelPosition:m}),e,"BaselineUI-ComboBox"),"data-block-id":a,"data-block-class":n,style:t,ref:N,children:[i||m==="start"&&ye?jsxs("div",{className:by({labelPosition:m,hasMessage:!!ye}),children:[jsx("label",{...mergeProps(V,ht),className:yy({isDisabled:x.isDisabled}),children:i}),m==="start"&&ye]}):null,jsxs("div",{...Te,className:fy({validationState:u,isHovered:He,isFocused:te,variant:y,isReadOnly:!!x.isReadOnly,isDisabled:!!x.isDisabled}),ref:q,children:[jsx("input",{...mergeProps(O,j,de,mo,Y,ne,U,I==="number"?{type:"number",min:v,max:h,onKeyDown:W=>{(W.key==="ArrowUp"||W.key==="ArrowDown")&&W.preventDefault();}}:null),ref:B,className:classNames(uy({isDisabled:x.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",r),style:o}),zt&&g?jsx(zt,{className:my({validationState:u,isReadOnly:x.isReadOnly}),size:16}):null,jsx(G,{...$,ref:w,variant:"popover",label:f,className:gy({isFocusVisible:!x.isDisabled&&!x.isReadOnly&&_t,isHovered:!x.isDisabled&&!x.isReadOnly&&He,isOpen:k.isOpen})})]}),jsx(be,{className:We,ref:D,triggerRef:q,state:k,children:jsx(le,{...J,items:s,ref:H,renderOption:b,selectionMode:"single",showSelectedIcon:p,className:Hr})}),m==="top"&&ye]})})});hy.displayName="ComboBox";var xy=z({defaultClassName:"byycd01 _1yep5z6d6 _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6i7 _1yep5z6i8 _1yep5z6i9",variantClassNames:{},defaultVariants:{},compoundVariants:[]});var Zi=nt.forwardRef(({enableReorder:e,...t},o)=>e?jsx(Cy,{ref:o,...t}):jsx(Qi,{ref:o,...t}));Zi.displayName="GridListItem";var Qi=nt.forwardRef(({item:e,state:t,dropState:o,renderGridItem:r,dragHandleProps:a},n)=>{let i=oe(n),s=useGridListItem({node:e},t,i),p=t.selectionManager.selectionMode!=="none"&&t.selectionManager.selectionBehavior==="toggle",{checkboxProps:l}=useGridListSelectionCheckbox({key:e.key},t),c={...s,checkBoxProps:p?l:void 0,dragHandleProps:a};return jsxs("div",{"data-grid-list-item-key":e.key,children:[o?jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"before"},dropState:o}):null,r?r(e,c,i):null,o&&t.collection.getKeyAfter(e.key)==null?jsx(Ct,{target:{type:"item",key:e.key,dropPosition:"after"},dropState:o}):null]},e.key)});Qi.displayName="BaseGridListItem";var Cy=nt.forwardRef(({dragState:e,item:t,...o},r)=>{let a=useDraggableItem({key:t.key,hasDragButton:!0},e);return jsx(Qi,{item:t,dragHandleProps:a,ref:r,...o})});Cy.displayName="DraggableGridListItem";var uR=e=>{e.key==="Enter"||e.key==="Escape"||e.stopPropagation();},ky=nt.forwardRef(({className:e,style:t,isEditing:o=!1,"data-block-id":r,"data-block-class":a,gridListHandle:n,onReorder:i,enableReorder:s=!1,layout:p="stack",orientation:l="vertical",renderGridItem:c,...d},m)=>{let u=ae(),y=useListState({...d,children:u}),f=nt.useRef(null),b=oe(m),{gridProps:g}=useGridList(d,y,b);gr({handle:n,type:"gridlist"},y,b);let{collectionProps:_,dragState:v,dropState:h}=ur({...d,onReorder:i,enableReorder:s,layout:p,orientation:l,preview:f,getItems:C=>[...C].map(x=>{let T=y.collection.getItem(x);return invariant(T,"Expected item to be defined."),{key:T.key.toString()}})},y,b),I=o?uR:g.onKeyDownCapture,P={state:y,dragState:v,dropState:h,enableReorder:s,renderGridItem:c};return jsxs("ul",{...mergeProps(g,_),className:classNames("BaselineUI-GridList",e),"data-block-id":r,"data-block-class":a,style:t,ref:b,"aria-rowcount":y.collection.size,onKeyDownCapture:I,children:[[...y.collection].map(C=>jsx(Zi,{item:C,...P},C.key)),s?jsx(DragPreview,{ref:f,children:C=>jsx(Da,{items:C,ulRef:b,containerClassName:".BaselineUI-GridList",previewClassName:xy(),itemDataAttribute:"data-grid-list-item-key"})}):null]})});ky.displayName="GridList";var Iy="_1yep5z6f5",Ry="_1dc3b8m0";var wy=nt.forwardRef(({className:e,selectionMode:t,style:o,"data-block-id":r,"data-block-class":a,tooltipProps:n,icon:i,renderActionItem:s,...p},l)=>{let c=oe(l),d=ae(),m=useListState({...p,selectionMode:t,suppressTextValueWarning:!0,children:d}),{actionGroupProps:u}=useActionGroup({...p,selectionMode:t,children:d},m,c),y=[...m.collection].map(f=>(invariant(f.value),jsx(hR,{item:f,state:m,isDisabled:p.isDisabled,onAction:p.onAction,tooltipProps:n,renderActionItem:s},f.key)));return i?jsxs(L,{...u,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:[jsx(i,{size:24,className:Iy}),jsx(L,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:y})]}):jsx(L,{...u,display:"flex",flexDirection:"row",gap:"xs",className:classNames("BaselineUI-ActionGroup",e),"data-block-id":r,"data-block-class":a,style:o,ref:c,children:y})});wy.displayName="ActionGroup";var hR=({item:e,state:t,tooltipProps:o,renderActionItem:r,onAction:a,isDisabled:n})=>{let{buttonProps:i}=useActionGroupItem({key:e.key},t),s=n||t.selectionManager.isDisabled(e.key),p=t.selectionManager.isSelected(e.key);invariant(e.value);let{icon:l}=e.value;invariant(l);let c=useMemo(()=>(invariant(e.value),typeof o=="function"?o(e.value):o),[o,e.value]);return jsx(PressResponder,{...mergeProps(i,{onPress:()=>{a?.(e.key);}}),children:jsx(re,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:!1,offset:4,...c,children:r?.(e,{isSelected:p,isDisabled:s})||jsx(E,{variant:"tertiary",icon:l,"aria-label":e.textValue,size:"sm",isDisabled:s,className:classNames({[Ry]:p},"BaselineUI-ActionGroup-Item")})})})};var Ty="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",Sy="_1yep5z61qp _1yep5z61qq _1yep5z61qr _1yep5z61h9 _1yep5z61ha _1yep5z61hb";var Ly=nt.forwardRef(({className:e,style:t,items:o,optionsContainerClassName:r,label:a,icon:n,value:i,defaultValue:s,onChange:p,isDisabled:l,optionClassName:c,optionStyle:d,labelPosition:m="top","data-block-id":u,"data-block-class":y,shouldFocusWrap:f,tooltip:b=!0,...g},_)=>{let v=useMemo(()=>o.map(I=>({id:I.color,label:I.label})),[o]),h=useId();return useEffect(()=>{!a&&!g["aria-label"]&&!g["aria-labelledby"]&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[a,g]),jsxs(L,{...$a(g),className:classNames("BaselineUI-ColorSwatchPicker",e),"data-block-id":u,"data-block-class":y,display:"flex",flexDirection:m==="top"?"column":"row",alignItems:m==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:t,ref:_,children:[n||a?jsxs(L,{display:"flex",alignItems:"center",gap:"md",children:[n?jsx(n,{size:24,className:sprinkles({color:"icon.primary"})}):null,a?jsx(Q,{id:h,type:"label",size:"sm",children:a}):null]}):null,jsx(le,{className:classNames(Sy,r),selectionMode:"single",items:v,orientation:"horizontal",defaultSelectedKeys:s?[s]:void 0,disabledKeys:l?v.map(I=>I.id):void 0,isDisabled:l,selectedKeys:i?[i]:void 0,onSelectionChange:I=>{p?.([...I][0]);},optionClassName:c,optionStyle:d,renderOption:({key:I,textValue:P},{isSelected:C,isFocusVisible:x,isDisabled:T,optionProps:N},R)=>jsx("li",{...N,"data-disabled":T,className:classNames(Ty,N.className),ref:R,children:jsx(et,{isFocusVisible:x,color:I,isSelected:C,"aria-label":P,isInteractive:!0,isDisabled:T,tooltip:b})}),shouldFocusWrap:f,...g,"aria-labelledby":a?h:g["aria-labelledby"]})]})});Ly.displayName="ColorSwatchPicker";var My="_10dw1p96",Dy="_10dw1p95",Ey=z({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6im _1yep5z6in _1yep5z6io _1yep5z6iv _1yep5z6iw _1yep5z6ix _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6jd _1yep5z6je _1yep5z6jf _1yep5z6lk _1yep5z6l7 _1yep5z6l4",variantClassNames:{isSelected:{true:"_1yep5z6120"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isFocusVisible:{true:"_1yep5z613r _1yep5z617k _1yep5z617i"}},defaultVariants:{},compoundVariants:[[{isHovered:!0,isSelected:!1,isRenaming:!1},"_1yep5z61nw _1yep5z61pu _1yep5z61tg _1yep5z61tf"]]});function Hy(e,t){if(typeof e=="function"&&!e.prototype?.isReactComponent){let o=e(t);return isValidElement(o)?e:o}return e}var Oy=({context:e,depth:t,children:o,item:r,onPrimaryAction:a,onSecondaryAction:n,actionsPosition:i,primaryActionIcon:s,secondaryActionIcon:p,primaryActionAriaLabel:l,secondaryActionAriaLabel:c,onRename:d,onAction:m,renderItemTitle:u=y=>y.data.label})=>{let{formatMessage:y}=F(),{hoverProps:f,isHovered:b}=useHover({}),g=useRef(null),{onKeyDown:_,...v}=e.interactiveElementProps;delete v.onFocus,delete v.onClick;let h=createFocusManager(g),I=useCallback(k=>{if(k.key==="ArrowRight"&&(e.isExpanded||!r.children?.length))g.current?.setAttribute("tabindex","-1"),k.preventDefault(),k.stopPropagation(),h.focusNext();else switch(k.key){case"ArrowLeft":{h.focusPrevious()?(k.preventDefault(),k.stopPropagation()):(_?.(k),e.focusItem(!0));break}case"Enter":{e.toggleExpandedState();break}default:_?.(k);}},[e,h,_,r,g]),P=useMemo(()=>{let k=Hy(s,r.index),w=Hy(p,r.index),B=typeof l=="function"?l(r.index):l,H=typeof c=="function"?c(r.index):c;return k||w?jsxs(L,{display:"flex",flexDirection:"row",children:[k?jsx(ge,{icon:k,"aria-label":B,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{a?.(r.index);},tooltip:!0}):null,w?jsx(ge,{icon:w,"aria-label":H,size:"sm",excludeFromTabOrder:!0,variant:"secondary",onPress:()=>{n?.(r.index);},tooltip:!0}):null]}):null},[s,r.index,p,l,c,a,n]),C=useCallback(k=>{k.key==="Enter"?(d?.({key:r.index,value:k.target.value}),e.stopRenamingItem()):k.key==="Escape"?(e.stopRenamingItem(),g.current?.setAttribute("tabindex","0"),g.current?.focus()):k.key!=="ArrowRight"&&k.key!=="ArrowLeft"&&k.key!=="ArrowUp"&&k.key!=="ArrowDown"&&!k.metaKey&&k.continuePropagation();},[r.index,e,d,g]),x=r.data.icon,T=!!d,{pressProps:N}=usePress({onPress:()=>{m?.(r.index);}}),{isFocusVisible:R,focusProps:S}=useFocusRing$1();return jsxs(Fragment,{children:[jsx("div",{...mergeProps({onKeyDown:I,onFocus:()=>{e.focusItem(!1);}},N,S,f,e.itemContainerWithoutChildrenProps,v),className:classNames(Dy,Ey({isHovered:b,isSelected:e.isSelected,isFocusVisible:R,isRenaming:e.isRenaming}),"BaselineUI-TreeView-Row"),role:"row","data-key":r.index,"data-expanded":r.isFolder?e.isExpanded:void 0,"aria-expanded":r.isFolder?e.isExpanded:void 0,"data-selected":e.isSelected,"aria-selected":e.isSelected,"data-depth":t,"aria-level":t+1,"aria-posinset":r.data.posInset,"aria-setsize":r.data.setSize,"aria-label":r.data.label,style:{justifyContent:i==="end"?"space-between":void 0},ref:g,children:jsxs(L,{role:"gridcell",style:{display:"contents"},"aria-colindex":1,children:[i==="start"?P:null,jsxs(L,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(L,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${t*2} * ${themeVars.spacing.lg})`},children:[jsx(E,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{e.toggleExpandedState();},"aria-label":y(e.isExpanded?rs.collapse:rs.expand),style:{visibility:r.children?.length?"visible":"hidden"},className:classNames(My,"BaselineUI-TreeView-ExpansionToggle"),UNSAFE_NON_INTERACTIVE:!0}),x?jsx(x,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(L,{paddingLeft:"sm",paddingY:e.isRenaming?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:k=>{T&&(k.stopPropagation(),k.preventDefault(),e.startRenamingItem());},children:[e.isRenaming?jsx("div",{onClick:k=>{k.stopPropagation();},children:jsx(Xe,{defaultValue:r.data.label,autoFocus:!0,onBlur:k=>{d?.({key:r.index,value:k.target.value}),e.stopRenamingItem();},"aria-label":y(rs.rename),onKeyDown:C,className:"BaselineUI-TreeView-RenameInput"})}):jsx(Q,{type:"label",size:"sm",className:classNames(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:u(r)}),r.data.description?jsx(Q,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:r.data.description}):null]})]}),i==="end"?P:null]})}),o]})},rs=K({expand:{id:"expand",defaultMessage:"Expand"},collapse:{id:"collapse",defaultMessage:"Collapse"},rename:{id:"rename",defaultMessage:"Rename"}});function qR(e,{posInset:t,setSize:o}){return {index:e.id,children:e.children?e.children.map(r=>r.id):[],data:{label:e.label,description:e.description,icon:e.icon,...e.data,posInset:t,setSize:o},isFolder:!!e.children?.length}}function GR(e,t){let o={};function r(a,n,i){if(o[a.id]=t(a,{posInset:n,setSize:i}),a.children)for(let s=0;s<a.children.length;s++)r(a.children[s],s+1,a.children.length);}return r(e,0,0),o}var $y=nt.forwardRef(({className:e,style:t,"data-block-id":o,"data-block-class":r,items:a,rootId:n=a.id,onPrimaryAction:i,onSecondaryAction:s,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,actionsPosition:m="start",onRename:u,onAction:y,renderItemTitle:f,...b},g)=>{let _=ae(),v=useRef(null),h=useTreeState({...b,selectionMode:"multiple",items:a.children,children:_}),I=useMemo(()=>Object.fromEntries(Object.entries(GR(a,qR)).map(([R,S])=>[R,{...S,canRename:!!u}])),[a,u]),P=useId(),[C,x]=nt.useState(a.children?.[0]?.id??""),T=useRef(C),N=useMemo(()=>({[`tree-${P}`]:{focusedItem:C,expandedItems:[...h.expandedKeys],selectedItems:[...h.selectionManager.selectedKeys]}}),[C,h.expandedKeys,h.selectionManager.selectedKeys,P]);return useEffect(()=>{if(!v.current)return;let R=Oe(v.current),S=R instanceof ShadowRoot,k=v.current?.contains(R?.activeElement??null);S&&k&&Oe(v.current)?.querySelector(`[data-rct-item-id="${C}"]`)?.focus();},[C]),jsx(ControlledTreeEnvironment,{items:I,getItemTitle:R=>R.data?.label,viewState:N,onExpandItem:R=>{h.setExpandedKeys(new Set([...h.expandedKeys,R.index])),b.onExpand?.(R.index.toString());},onFocusItem:R=>{x(R.index),R.index&&(T.current=R.index);},onCollapseItem:R=>{h.setExpandedKeys(new Set([...h.expandedKeys].filter(S=>S!==R.index))),b.onCollapse?.(R.index.toString());},onSelectItems:R=>{h.selectionManager.setSelectedKeys(new Set(R));},renderItem:R=>jsx(Oy,{...R,onPrimaryAction:i,onSecondaryAction:s,actionsPosition:m,primaryActionIcon:p,secondaryActionIcon:l,primaryActionAriaLabel:c,secondaryActionAriaLabel:d,onRename:u,onAction:y,renderItemTitle:f}),renderLiveDescriptorContainer:({children:R})=>jsx(Ke,{children:jsx(VisuallyHidden,{children:R})}),renderTreeContainer:({containerProps:R,children:S})=>jsx("div",{...xt(R,{onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||k.currentTarget.querySelector(`[data-key="${T.current}"]`)?.setAttribute("tabindex","0");}}),"data-block-id":o,"data-block-class":r,style:{...t,...R.style},className:classNames(e,"BaselineUI-TreeView"),ref:M(g,R.ref,v),role:"treegrid",children:S}),renderItemsContainer:({children:R})=>R,children:jsx(Tree,{treeId:`tree-${P}`,rootItem:n,treeLabel:b["aria-label"],treeLabelledBy:b["aria-labelledby"]})})});$y.displayName="TreeView";var ew=forwardRef(({className:e,isCollapsible:t=!1,...o},r)=>{let a=useRef(null),n=useId();return useImperativeHandle(r,()=>({resize:a.current?.resize})),jsx(Panel,{className:classNames("BaselineUI-Panel",e),collapsible:t,ref:a,id:n,...o})});ew.displayName="Panel";var sw=forwardRef(({className:e,...t},o)=>{let r=useRef(null);return useImperativeHandle(o,()=>({setLayout:r.current?.setLayout})),jsx(PanelGroup,{className:classNames("BaselineUI-PanelGroup",e),ref:r,...t})});sw.displayName="PanelGroup";var Uy="_6abhjk0";var dw=({className:e,isDisabled:t=!1,...o})=>jsx(PanelResizeHandle,{disabled:t,className:classNames(Uy,"BaselineUI-PanelResizeHandle",e),...o});dw.displayName="PanelResizeHandle";
55
55
 
56
- export { Zc as Accordion, nd as AccordionItem, G as ActionButton, wy as ActionGroup, hR as ActionGroupItem, E as ActionIconButton, Na as AlertDialog, Kf as AudioPlayer, Xt as Avatar, L as Box, cy as ButtonSelect, zc as Checkbox, Qt as ColorInput, et as ColorSwatch, Ly as ColorSwatchPicker, hy as ComboBox, Nc as DateFormat, ue as Dialog, Ql as DialogTitle, Zs as DomNodeRenderer, Dr as Drawer, kf as Editor, $p as FileUpload, Lr as Focusable, Fm as FreehandCanvas, ky as GridList, uu as Group, vl as I18nProvider, Tm as IconColorInput, da as IconColorInputButton, md as IconSelect, mp as IconSlider, Zm as ImageDropZone, ny as ImageGallery, Bd as InlineAlert, Dp as Link, le as ListBox, Ef as Markdown, Or as Menu, mu as MessageFormat, Ie as Modal, Nh as ModalClose, De as ModalContent, ea as ModalTrigger, $t as NumberFormat, Me as NumberInput, Sc as Pagination, ew as Panel, sw as PanelGroup, dw as PanelResizeHandle, Ne as Popover, Re as PopoverContent, Le as PopoverTrigger, Ke as Portal, Pl as PortalContainerProvider, ou as Preview, Qp as ProgressBar, Kt as ProgressSpinner, du as RadioGroup, ic as Reaction, Tf as ScrollControlButton, Rp as SearchInput, Qe as Select, A as Separator, Ft as Slider, xp as Switch, Rd as TabItem, Id as Tabs, Ac as TagGroup, Q as Text, Xe as TextInput, Dt as ThemeProvider, Kr as ToggleButton, ge as ToggleIconButton, va as Toolbar, re as Tooltip, Gm as Transform, Ta as Transition, $y as TreeView, K as defineMessages, fN as isInsideOverlayContent, Ks as isRect, Nt as useDevice, F as useI18n, Tt as useImage, ml as useIntersectionObserver, St as useIsFirstRender, xl as useLocalStorage, lM as useMutationObserver, ve as usePortalContainer, ul as useResizeObserver, yM as useTextSelection, yl as useUndoRedo, sn as useUserPreferences };
56
+ export { Zc as Accordion, nd as AccordionItem, G as ActionButton, wy as ActionGroup, hR as ActionGroupItem, E as ActionIconButton, Na as AlertDialog, Kf as AudioPlayer, Xt as Avatar, L as Box, cy as ButtonSelect, zc as Checkbox, Qt as ColorInput, et as ColorSwatch, Ly as ColorSwatchPicker, hy as ComboBox, Nc as DateFormat, me as Dialog, Ql as DialogTitle, Zs as DomNodeRenderer, Dr as Drawer, kf as Editor, $p as FileUpload, Lr as Focusable, Fu as FreehandCanvas, ky as GridList, mm as Group, vl as I18nProvider, Tu as IconColorInput, da as IconColorInputButton, ud as IconSelect, up as IconSlider, Zu as ImageDropZone, ny as ImageGallery, Bd as InlineAlert, Dp as Link, le as ListBox, Ef as Markdown, Vr as Menu, um as MessageFormat, Ie as Modal, Nh as ModalClose, De as ModalContent, ea as ModalTrigger, $t as NumberFormat, Me as NumberInput, Sc as Pagination, ew as Panel, sw as PanelGroup, dw as PanelResizeHandle, Ne as Popover, Re as PopoverContent, Le as PopoverTrigger, Ke as Portal, Pl as PortalContainerProvider, om as Preview, Qp as ProgressBar, Kt as ProgressSpinner, dm as RadioGroup, ic as Reaction, Tf as ScrollControlButton, Rp as SearchInput, Qe as Select, A as Separator, Ft as Slider, xp as Switch, Rd as TabItem, Id as Tabs, Ac as TagGroup, Q as Text, Xe as TextInput, Dt as ThemeProvider, Kr as ToggleButton, ge as ToggleIconButton, va as Toolbar, re as Tooltip, Gu as Transform, Ta as Transition, $y as TreeView, K as defineMessages, fN as isInsideOverlayContent, Ks as isRect, Nt as useDevice, F as useI18n, Tt as useImage, ul as useIntersectionObserver, St as useIsFirstRender, xl as useLocalStorage, lM as useMutationObserver, ve as usePortalContainer, ml as useResizeObserver, yM as useTextSelection, yl as useUndoRedo, sn as useUserPreferences };