@univerjs/design 0.18.0 → 0.19.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/lib/umd/index.js CHANGED
@@ -1,30 +1,7 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`),require(`react/jsx-runtime`),require(`react-dom`),require(`react-dom/client`)):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`,`react-dom`,`react-dom/client`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverDesign={},e.React,e.React,e.ReactDOM,e.ReactDOM))})(this,function(e,t,n,r,i){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e},p=(e,t,n)=>(n=e==null?{}:a(l(e)),f(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e));t=p(t),r=p(r);function m({ref:e,...n}){let{icon:r,id:i,className:a,extend:o,...s}=n,c=`univerjs-icon univerjs-icon-${i} ${a||``}`.trim(),l=(0,t.useRef)(`_${v()}`);return h(r,`${i}`,{defIds:r.defIds,idSuffix:l.current},{ref:e,className:c,...s},o)}function h(e,n,r,i,a){return(0,t.createElement)(e.tag,{key:n,...g(e,r,a),...i},(_(e,r).children||[]).map((t,i)=>h(t,`${n}-${e.tag}-${i}`,r,void 0,a)))}function g(e,t,n){let r={...e.attrs};n!=null&&n.colorChannel1&&r.fill===`colorChannel1`&&(r.fill=n.colorChannel1),e.tag===`mask`&&r.id&&(r.id+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{e===`mask`&&typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))});let{defIds:i}=t;return!i||i.length===0?r:(e.tag===`use`&&r[`xlink:href`]&&(r[`xlink:href`]+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))}),r)}function _(e,t){var n;let{defIds:r}=t;return!r||r.length===0?e:e.tag===`defs`&&(n=e.children)!=null&&n.length?{...e,children:e.children.map(e=>typeof e.attrs.id==`string`&&r&&r.includes(e.attrs.id)?{...e,attrs:{...e.attrs,id:e.attrs.id+t.idSuffix}}:e)}:e}function v(){return Math.random().toString(36).substring(2,8)}m.displayName=`UniverIcon`;let y={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.87598 11.8327C8.87598 11.5013 9.14461 11.2327 9.47598 11.2327H11.476C11.8073 11.2327 12.076 11.5013 12.076 11.8327C12.076 12.164 11.8073 12.4327 11.476 12.4327H9.47598C9.14461 12.4327 8.87598 12.164 8.87598 11.8327Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.80898 11.2327C4.47761 11.2327 4.20898 11.5013 4.20898 11.8327C4.20898 12.164 4.47761 12.4327 4.80898 12.4327H6.80898C7.14036 12.4327 7.40898 12.164 7.40898 11.8327C7.40898 11.5013 7.14036 11.2327 6.80898 11.2327H4.80898Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.87598 9.16592C8.87598 8.83455 9.14461 8.56592 9.47598 8.56592H11.476C11.8073 8.56592 12.076 8.83455 12.076 9.16592C12.076 9.49729 11.8073 9.76592 11.476 9.76592H9.47598C9.14461 9.76592 8.87598 9.49729 8.87598 9.16592Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.80898 8.56592C4.47761 8.56592 4.20898 8.83455 4.20898 9.16592C4.20898 9.49729 4.47761 9.76592 4.80898 9.76592H6.80898C7.14036 9.76592 7.40898 9.49729 7.40898 9.16592C7.40898 8.83455 7.14036 8.56592 6.80898 8.56592H4.80898Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M6.00615 1.69985C6.00615 1.36848 5.73752 1.09985 5.40615 1.09985C5.07478 1.09985 4.80615 1.36848 4.80615 1.69985V2.34009H3.64248C2.20654 2.34009 1.04248 3.50415 1.04248 4.94009V12.3C1.04248 13.7359 2.20654 14.9 3.64248 14.9H12.6425C14.0784 14.9 15.2425 13.7359 15.2425 12.3V4.94009C15.2425 3.50415 14.0784 2.34009 12.6425 2.34009H11.4798V1.69985C11.4798 1.36848 11.2112 1.09985 10.8798 1.09985C10.5484 1.09985 10.2798 1.36848 10.2798 1.69985V2.34009H6.00615V1.69985ZM14.0425 5.97021V4.94009C14.0425 4.16689 13.4157 3.54009 12.6425 3.54009H11.4798V4.09985C11.4798 4.43122 11.2112 4.69985 10.8798 4.69985C10.5484 4.69985 10.2798 4.43122 10.2798 4.09985V3.54009H6.00615V4.09985C6.00615 4.43122 5.73752 4.69985 5.40615 4.69985C5.07478 4.69985 4.80615 4.43122 4.80615 4.09985V3.54009H3.64248C2.86928 3.54009 2.24248 4.16689 2.24248 4.94009V5.97021H14.0425ZM2.24248 7.17021H14.0425V12.3C14.0425 13.0731 13.4157 13.7 12.6425 13.7H3.64248C2.86928 13.7 2.24248 13.0732 2.24248 12.3V7.17021Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},b=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`calendar-icon`,ref:n,icon:y}))});b.displayName=`CalendarIcon`;let x={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},S=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`check-mark-icon`,ref:n,icon:x}))});S.displayName=`CheckMarkIcon`;let C={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.24483 4.80026C8.24487 4.46889 7.97627 4.20023 7.6449 4.2002C7.31353 4.20016 7.04487 4.46876 7.04483 4.80013L7.04443 8.40306C7.04442 8.56222 7.10763 8.71486 7.22017 8.82739L9.64664 11.2539C9.88095 11.4882 10.2608 11.4882 10.4952 11.2539C10.7295 11.0195 10.7295 10.6396 10.4952 10.4053L8.24446 8.15463L8.24483 4.80026Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.14248 0.899902C4.22126 0.899902 1.04248 4.07868 1.04248 7.9999C1.04248 11.9211 4.22126 15.0999 8.14248 15.0999C12.0637 15.0999 15.2425 11.9211 15.2425 7.9999C15.2425 4.07868 12.0637 0.899902 8.14248 0.899902ZM2.24248 7.9999C2.24248 4.74142 4.884 2.0999 8.14248 2.0999C11.401 2.0999 14.0425 4.74142 14.0425 7.9999C14.0425 11.2584 11.401 13.8999 8.14248 13.8999C4.884 13.8999 2.24248 11.2584 2.24248 7.9999Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},w=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`clock-icon`,ref:n,icon:C}))});w.displayName=`ClockIcon`;let T={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M3.71274 2.86421C3.47843 2.6299 3.09853 2.6299 2.86421 2.86421C2.6299 3.09853 2.6299 3.47843 2.86421 3.71274L7.15154 8.00007L2.86421 12.2874C2.6299 12.5217 2.6299 12.9016 2.86421 13.1359C3.09853 13.3702 3.47843 13.3702 3.71274 13.1359L8.00007 8.84859L12.2874 13.1359C12.5217 13.3702 12.9016 13.3702 13.1359 13.1359C13.3702 12.9016 13.3702 12.5217 13.1359 12.2874L8.84859 8.00007L13.1359 3.71274C13.3702 3.47843 13.3702 3.09853 13.1359 2.86421C12.9016 2.6299 12.5217 2.6299 12.2874 2.86421L8.00007 7.15154L3.71274 2.86421Z`}}]},E=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`close-icon`,ref:n,icon:T}))});E.displayName=`CloseIcon`;let D={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},O=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`delete-icon`,ref:n,icon:D}))});O.displayName=`DeleteIcon`;let k={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 20 20`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M10.5547 14.1884C10.2599 14.5214 9.74019 14.5214 9.4454 14.1884L3.71321 7.71335C3.29002 7.23532 3.6294 6.48161 4.26784 6.48161L15.7322 6.48161C16.3707 6.48161 16.7101 7.23532 16.2869 7.71335L10.5547 14.1884Z`}}]},A=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`down-icon`,ref:n,icon:k}))});A.displayName=`DownIcon`;let j={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.85869 12.9216C8.38445 13.4708 7.61555 13.4708 7.14131 12.9216L0.358114 5.06726C-0.406895 4.18144 0.134916 2.66683 1.2168 2.66683L14.7832 2.66683C15.8651 2.66683 16.4069 4.18144 15.6419 5.06726L8.85869 12.9216Z`}}]},M=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`dropdown-icon`,ref:n,icon:j}))});M.displayName=`DropdownIcon`;let N={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM10.3097 5.69014C10.544 5.92445 10.544 6.30435 10.3097 6.53867L8.84843 7.9999L10.3099 9.46137C10.5442 9.69569 10.5442 10.0756 10.3099 10.3099C10.0756 10.5442 9.69569 10.5442 9.46137 10.3099L7.9999 8.84843L6.53842 10.3099C6.30411 10.5442 5.92421 10.5442 5.6899 10.3099C5.45558 10.0756 5.45558 9.69569 5.6899 9.46137L7.15137 7.9999L5.69014 6.53867C5.45583 6.30435 5.45583 5.92445 5.69014 5.69014C5.92445 5.45583 6.30435 5.45583 6.53867 5.69014L7.9999 7.15137L9.46113 5.69014C9.69544 5.45583 10.0753 5.45583 10.3097 5.69014Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},P=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`error-icon`,ref:n,icon:N}))});P.displayName=`ErrorIcon`;let F={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.00016 1.33203C6.68162 1.33203 5.39269 1.72302 4.29636 2.45557C3.20004 3.18811 2.34555 4.2293 1.84097 5.44747C1.33638 6.66565 1.20436 8.00609 1.4616 9.2993C1.71883 10.5925 2.35377 11.7804 3.28612 12.7127C4.21847 13.6451 5.40636 14.28 6.69956 14.5373C7.99277 14.7945 9.33321 14.6625 10.5514 14.1579C11.7696 13.6533 12.8108 12.7988 13.5433 11.7025C14.2758 10.6062 14.6668 9.31724 14.6668 7.9987C14.6649 6.23118 13.9619 4.53662 12.7121 3.2868C11.4622 2.03697 9.76768 1.33397 8.00016 1.33203ZM7.66683 3.9987C7.86461 3.9987 8.05795 4.05735 8.2224 4.16723C8.38685 4.27711 8.51502 4.43329 8.59071 4.61601C8.6664 4.79874 8.6862 4.99981 8.64762 5.19379C8.60903 5.38777 8.51379 5.56595 8.37394 5.7058C8.23409 5.84566 8.0559 5.9409 7.86192 5.97948C7.66794 6.01807 7.46687 5.99826 7.28415 5.92258C7.10142 5.84689 6.94524 5.71872 6.83536 5.55427C6.72548 5.38982 6.66683 5.19648 6.66683 4.9987C6.66683 4.73348 6.77219 4.47913 6.95972 4.29159C7.14726 4.10405 7.40162 3.9987 7.66683 3.9987ZM9.3335 11.332H6.66683C6.49002 11.332 6.32045 11.2618 6.19543 11.1368C6.0704 11.0117 6.00016 10.8422 6.00016 10.6654C6.00016 10.4886 6.0704 10.319 6.19543 10.194C6.32045 10.0689 6.49002 9.9987 6.66683 9.9987H7.3335V7.9987H6.66683C6.49002 7.9987 6.32045 7.92846 6.19543 7.80343C6.0704 7.67841 6.00016 7.50884 6.00016 7.33203C6.00016 7.15522 6.0704 6.98565 6.19543 6.86063C6.32045 6.7356 6.49002 6.66536 6.66683 6.66536H8.00016C8.17698 6.66536 8.34655 6.7356 8.47157 6.86063C8.59659 6.98565 8.66683 7.15522 8.66683 7.33203V9.9987H9.3335C9.51031 9.9987 9.67988 10.0689 9.8049 10.194C9.92993 10.319 10.0002 10.4886 10.0002 10.6654C10.0002 10.8422 9.92993 11.0117 9.8049 11.1368C9.67988 11.2618 9.51031 11.332 9.3335 11.332Z`}}]},I=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`info-icon`,ref:n,icon:F}))});I.displayName=`InfoIcon`;let L={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},R=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`more-down-icon`,ref:n,icon:L}))});R.displayName=`MoreDownIcon`;let ee={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M10.3536 12.3536C10.1583 12.5488 9.84171 12.5488 9.64645 12.3536L6.64645 9.35355C6.45118 9.15829 6.45118 8.84171 6.64645 8.64645L9.64645 5.64645C9.84171 5.45118 10.1583 5.45118 10.3536 5.64645C10.5488 5.84171 10.5488 6.15829 10.3536 6.35355L7.70711 9L10.3536 11.6464C10.5488 11.8417 10.5488 12.1583 10.3536 12.3536Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},te=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`more-left-icon`,ref:n,icon:ee}))});te.displayName=`MoreLeftIcon`;let ne={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M6.14645 4.64645C6.34171 4.45118 6.65829 4.45118 6.85355 4.64645L9.85355 7.64645C10.0488 7.84171 10.0488 8.15829 9.85355 8.35355L6.85355 11.3536C6.65829 11.5488 6.34171 11.5488 6.14645 11.3536C5.95118 11.1583 5.95118 10.8417 6.14645 10.6464L8.79289 8L6.14645 5.35355C5.95118 5.15829 5.95118 4.84171 6.14645 4.64645Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},re=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`more-right-icon`,ref:n,icon:ne}))});re.displayName=`MoreRightIcon`;let ie={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},ae=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`more-up-icon`,ref:n,icon:ie}))});ae.displayName=`MoreUpIcon`;let oe={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M5.65252 5.41446C5.86681 5.53124 6.00016 5.75579 6.00016 5.99984V9.99984C6.00016 10.368 5.70168 10.6665 5.3335 10.6665C4.96531 10.6665 4.66683 10.368 4.66683 9.99984V7.22312L4.36151 7.42005C4.05209 7.61961 3.63948 7.53056 3.43992 7.22115C3.24035 6.91173 3.3294 6.49912 3.63882 6.29956L4.97215 5.43959C5.17724 5.30731 5.43822 5.29767 5.65252 5.41446Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M12.3335 5.99984C12.3335 5.75579 12.2001 5.53124 11.9858 5.41446C11.7716 5.29767 11.5106 5.30731 11.3055 5.43959L9.97215 6.29956C9.66274 6.49912 9.57368 6.91173 9.77325 7.22115C9.97281 7.53056 10.3854 7.61961 10.6948 7.42005L11.0002 7.22312V9.99984C11.0002 10.368 11.2986 10.6665 11.6668 10.6665C12.035 10.6665 12.3335 10.368 12.3335 9.99984V5.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.00008 5.99984C8.36827 5.99984 8.66675 6.29831 8.66675 6.6665V6.99984C8.66675 7.36803 8.36827 7.6665 8.00008 7.6665C7.63189 7.6665 7.33341 7.36803 7.33341 6.99984V6.6665C7.33341 6.29831 7.63189 5.99984 8.00008 5.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.66675 8.99984C8.66675 8.63165 8.36827 8.33317 8.00008 8.33317C7.63189 8.33317 7.33341 8.63165 7.33341 8.99984V9.33317C7.33341 9.70136 7.63189 9.99984 8.00008 9.99984C8.36827 9.99984 8.66675 9.70136 8.66675 9.33317V8.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M0.666748 2.99984C0.666748 2.26346 1.2637 1.6665 2.00008 1.6665H14.0001C14.7365 1.6665 15.3334 2.26346 15.3334 2.99984V12.9998C15.3334 13.7362 14.7365 14.3332 14.0001 14.3332H2.00008C1.26371 14.3332 0.666748 13.7362 0.666748 12.9998V2.99984ZM14.0001 2.99984H2.00008V12.9998H14.0001V2.99984Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},se=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`one-to-one-icon`,ref:n,icon:oe}))});se.displayName=`OneToOneIcon`;let ce={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.7245 6.42417C11.9588 6.18985 11.9588 5.80995 11.7245 5.57564C11.4901 5.34132 11.1102 5.34132 10.8759 5.57564L7.3002 9.15137L5.72446 7.57564C5.49014 7.34132 5.11025 7.34132 4.87593 7.57564C4.64162 7.80995 4.64162 8.18985 4.87593 8.42417L6.87593 10.4242C7.11025 10.6585 7.49014 10.6585 7.72446 10.4242L11.7245 6.42417Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},le=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`success-icon`,ref:n,icon:ce}))});le.displayName=`SuccessIcon`;let ue={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8.00008 12.3671C8.46031 12.3671 8.83342 11.994 8.83342 11.5338C8.83342 11.0735 8.46031 10.7004 8.00008 10.7004C7.53985 10.7004 7.16675 11.0735 7.16675 11.5338C7.16675 11.994 7.53985 12.3671 8.00008 12.3671ZM8.5999 4.4335C8.5999 4.10213 8.33127 3.8335 7.9999 3.8335C7.66853 3.8335 7.3999 4.10213 7.3999 4.4335V9.36683C7.3999 9.6982 7.66853 9.96683 7.9999 9.96683C8.33127 9.96683 8.5999 9.6982 8.5999 9.36683V4.4335Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},de=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`warning-icon`,ref:n,icon:ue}))});de.displayName=`WarningIcon`;let fe={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.04883 5.38216C8.04883 5.01397 7.75035 4.71549 7.38216 4.71549C7.01397 4.71549 6.71549 5.01397 6.71549 5.38216V6.71897L5.3865 6.7207C5.01831 6.72117 4.72022 7.02004 4.7207 7.38823C4.72118 7.75642 5.02005 8.05451 5.38824 8.05403L6.71549 8.0523V9.38216C6.71549 9.75035 7.01397 10.0488 7.38216 10.0488C7.75035 10.0488 8.04883 9.75035 8.04883 9.38216V8.05056L9.38304 8.04883C9.75123 8.04835 10.0493 7.74948 10.0488 7.38129C10.0484 7.0131 9.74949 6.71502 9.3813 6.7155L8.04883 6.71723V5.38216Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M7.38216 1.04883C3.88437 1.04883 1.04883 3.88437 1.04883 7.38216C1.04883 10.88 3.88437 13.7155 7.38216 13.7155C8.89089 13.7155 10.2764 13.1879 11.3643 12.3072L13.813 14.7559C14.0733 15.0162 14.4954 15.0162 14.7558 14.7559C15.0161 14.4955 15.0161 14.0734 14.7558 13.8131L12.3071 11.3644C13.1879 10.2765 13.7155 8.89095 13.7155 7.38216C13.7155 3.88437 10.88 1.04883 7.38216 1.04883ZM2.38216 7.38216C2.38216 4.62075 4.62075 2.38216 7.38216 2.38216C10.1436 2.38216 12.3822 4.62075 12.3822 7.38216C12.3822 10.1436 10.1436 12.3822 7.38216 12.3822C4.62075 12.3822 2.38216 10.1436 2.38216 7.38216Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},pe=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`zoom-in-icon`,ref:n,icon:fe}))});pe.displayName=`ZoomInIcon`;let me={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M4.71549 7.38216C4.71549 7.01397 5.01397 6.71549 5.38216 6.71549H9.38216C9.75035 6.71549 10.0488 7.01397 10.0488 7.38216C10.0488 7.75035 9.75035 8.04883 9.38216 8.04883H5.38216C5.01397 8.04883 4.71549 7.75035 4.71549 7.38216Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.04883 7.38216C1.04883 3.88437 3.88437 1.04883 7.38216 1.04883C10.88 1.04883 13.7155 3.88437 13.7155 7.38216C13.7155 8.89095 13.1879 10.2765 12.3071 11.3644L14.7558 13.8131C15.0161 14.0734 15.0161 14.4955 14.7558 14.7559C14.4954 15.0162 14.0733 15.0162 13.813 14.7559L11.3643 12.3072C10.2764 13.1879 8.89089 13.7155 7.38216 13.7155C3.88437 13.7155 1.04883 10.88 1.04883 7.38216ZM7.38216 2.38216C4.62075 2.38216 2.38216 4.62075 2.38216 7.38216C2.38216 10.1436 4.62075 12.3822 7.38216 12.3822C10.1436 12.3822 12.3822 10.1436 12.3822 7.38216C12.3822 4.62075 10.1436 2.38216 7.38216 2.38216Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},he=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`zoom-out-icon`,ref:n,icon:me}))});he.displayName=`ZoomOutIcon`;let ge={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`#0B9EFB`,d:`M8.79993 14.0166C8.79993 14.4585 8.44176 14.8166 7.99993 14.8166C4.23529 14.8166 1.18345 11.7648 1.18345 8.00017C1.18345 4.23554 4.23529 1.18369 7.99993 1.1837C11.7646 1.1837 14.8164 4.23554 14.8164 8.00017C14.8164 8.442 14.4582 8.80017 14.0164 8.80017C13.5746 8.80017 13.2164 8.442 13.2164 8.00017C13.2164 5.11919 10.8809 2.7837 7.99993 2.7837C5.11895 2.7837 2.78345 5.11919 2.78345 8.00017C2.78345 10.8812 5.11895 13.2166 7.99993 13.2166C8.44176 13.2166 8.79993 13.5748 8.79993 14.0166Z`,fillOpacity:.2,fillRule:`evenodd`,clipRule:`evenodd`}},{tag:`path`,attrs:{fill:`#0B9EFB`,d:`M7.20007 1.98384C7.20007 1.54201 7.55824 1.18384 8.00007 1.18384C11.7647 1.18384 14.8165 4.23568 14.8165 8.00032C14.8165 11.765 11.7647 14.8168 8.00007 14.8168C4.23543 14.8168 1.18359 11.765 1.18359 8.00032C1.18359 7.55849 1.54177 7.20031 1.98359 7.20031C2.42542 7.20031 2.78359 7.55849 2.78359 8.00032C2.78359 10.8813 5.11909 13.2168 8.00007 13.2168C10.8811 13.2168 13.2165 10.8813 13.2165 8.00032C13.2165 5.11933 10.8811 2.78384 8.00007 2.78384C7.55824 2.78384 7.20007 2.42567 7.20007 1.98384Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},_e=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`loading-multi-icon`,ref:n,icon:ge}))});_e.displayName=`LoadingMultiIcon`;function ve(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ve(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function ye(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ve(e))&&(r&&(r+=` `),r+=t);return r}let z=e=>{let t=Ce(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(`-`);return n[0]===``&&n.length!==1&&n.shift(),be(n,t)||Se(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},be=(e,t)=>{var n;if(e.length===0)return t.classGroupId;let r=e[0],i=t.nextPart.get(r),a=i?be(e.slice(1),i):void 0;if(a)return a;if(t.validators.length===0)return;let o=e.join(`-`);return(n=t.validators.find(({validator:e})=>e(o)))==null?void 0:n.classGroupId},xe=/^\[(.+)\]$/,Se=e=>{if(xe.test(e)){let t=xe.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},Ce=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return De(Object.entries(e.classGroups),n).forEach(([e,n])=>{we(n,r,e,t)}),r},we=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:Te(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(Ee(e)){we(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{we(i,Te(t,e),n,r)})})},Te=(e,t)=>{let n=e;return t.split(`-`).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Ee=e=>e.isThemeGetter,De=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Oe=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},ke=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(`!`);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},Ae=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},je=e=>({cache:Oe(e.cacheSize),parseClassName:ke(e),...z(e)}),Me=/\s+/,Ne=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Me),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?` `+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=Ae(c).join(`:`),h=l?m+`!`:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function Pe(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=Fe(t))&&(r&&(r+=` `),r+=n);return r}let Fe=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Fe(e[r]))&&(n&&(n+=` `),n+=t);return n};function Ie(e,...t){let n,r,i,a=o;function o(o){return n=je(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=Ne(e,n);return i(e,a),a}return function(){return a(Pe.apply(null,arguments))}}let B=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},Le=/^\[(?:([a-z-]+):)?(.+)\]$/i,Re=/^\d+\/\d+$/,ze=new Set([`px`,`full`,`screen`]),Be=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ve=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,He=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,We=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ge=e=>qe(e)||ze.has(e)||Re.test(e),Ke=e=>at(e,`length`,ot),qe=e=>!!e&&!Number.isNaN(Number(e)),Je=e=>at(e,`number`,qe),Ye=e=>!!e&&Number.isInteger(Number(e)),Xe=e=>e.endsWith(`%`)&&qe(e.slice(0,-1)),V=e=>Le.test(e),Ze=e=>Be.test(e),Qe=new Set([`length`,`size`,`percentage`]),$e=e=>at(e,Qe,st),et=e=>at(e,`position`,st),tt=new Set([`image`,`url`]),nt=e=>at(e,tt,lt),rt=e=>at(e,``,ct),it=()=>!0,at=(e,t,n)=>{let r=Le.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},ot=e=>Ve.test(e)&&!He.test(e),st=()=>!1,ct=e=>Ue.test(e),lt=e=>We.test(e),ut=Ie(()=>{let e=B(`colors`),t=B(`spacing`),n=B(`blur`),r=B(`brightness`),i=B(`borderColor`),a=B(`borderRadius`),o=B(`borderSpacing`),s=B(`borderWidth`),c=B(`contrast`),l=B(`grayscale`),u=B(`hueRotate`),d=B(`invert`),f=B(`gap`),p=B(`gradientColorStops`),m=B(`gradientColorStopPositions`),h=B(`inset`),g=B(`margin`),_=B(`opacity`),v=B(`padding`),y=B(`saturate`),b=B(`scale`),x=B(`sepia`),S=B(`skew`),C=B(`space`),w=B(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,V,t],O=()=>[V,t],k=()=>[``,Ge,Ke],A=()=>[`auto`,qe,V],j=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],M=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],N=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],F=()=>[``,`0`,V],I=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],L=()=>[qe,V];return{cacheSize:500,separator:`:`,theme:{colors:[it],spacing:[Ge,Ke],blur:[`none`,``,Ze,V],brightness:L(),borderColor:[e],borderRadius:[`none`,``,`full`,Ze,V],borderSpacing:O(),borderWidth:k(),contrast:L(),grayscale:F(),hueRotate:L(),invert:F(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Xe,Ke],inset:D(),margin:D(),opacity:L(),padding:O(),saturate:L(),scale:L(),sepia:F(),skew:L(),space:O(),translate:O()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,V]}],container:[`container`],columns:[{columns:[Ze]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:[...j(),V]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,Ye,V]}],basis:[{basis:D()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,V]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:[`first`,`last`,`none`,Ye,V]}],"grid-cols":[{"grid-cols":[it]}],"col-start-end":[{col:[`auto`,{span:[`full`,Ye,V]},V]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[it]}],"row-start-end":[{row:[`auto`,{span:[Ye,V]},V]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,V]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,V]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...P()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...P(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...P(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,V,t]}],"min-w":[{"min-w":[V,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[V,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[Ze]},Ze]}],h:[{h:[V,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[V,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[V,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[V,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,Ze,Ke]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,Je]}],"font-family":[{font:[it]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,V]}],"line-clamp":[{"line-clamp":[`none`,qe,Je]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,Ge,V]}],"list-image":[{"list-image":[`none`,V]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,V]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...M(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,Ge,Ke]}],"underline-offset":[{"underline-offset":[`auto`,Ge,V]}],"text-decoration-color":[{decoration:[e]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:O()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,V]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,V]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...j(),et]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,$e]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},nt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...M(),`hidden`]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:M()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[``,...M()]}],"outline-offset":[{"outline-offset":[Ge,V]}],"outline-w":[{outline:[Ge,Ke]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Ge,Ke]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,Ze,rt]}],"shadow-color":[{shadow:[it]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...N(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,Ze,V]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,V]}],duration:[{duration:L()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,V]}],delay:[{delay:L()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,V]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Ye,V]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,V]}],accent:[{accent:[`auto`,e]}],appearance:[{appearance:[`none`,`auto`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,V]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,V]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[Ge,Ke,Je]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]}}});function H(...e){return ut(ye(e))}function dt(e){let{className:r,items:i}=e,[a,o]=(0,t.useState)(null),s=e=>{o(a===e?null:e)};return(0,n.jsx)(`div`,{"data-u-comp":`accordion`,className:H(`
2
- univer-divide-x-0 univer-divide-y univer-divide-solid univer-divide-gray-200
3
- dark:!univer-divide-gray-600
4
- `,r),children:i.map((e,t)=>(0,n.jsxs)(`div`,{children:[(0,n.jsxs)(`button`,{className:`
5
- univer-box-border univer-flex univer-w-full univer-cursor-pointer univer-items-center
6
- univer-gap-1.5 univer-border-none univer-bg-transparent univer-p-4 univer-text-left
7
- univer-text-gray-700
8
- hover:univer-text-gray-900
9
- focus:univer-outline-none
10
- dark:!univer-text-gray-200
11
- dark:hover:!univer-text-white
12
- `,type:`button`,onClick:()=>s(t),children:[(0,n.jsx)(A,{className:H(`univer-size-2.5 univer-flex-shrink-0 univer-transition-transform`,{"-univer-rotate-90":a!==t,"univer-rotate-0":a===t})}),(0,n.jsx)(`span`,{className:`univer-font-medium`,children:e.label})]}),(0,n.jsx)(`div`,{className:H(`
13
- univer-overflow-hidden univer-transition-[max-height,opacity] univer-duration-500
14
- univer-ease-in-out
15
- `,{"univer-max-h-screen":a===t,"univer-max-h-0":a!==t}),children:(0,n.jsx)(`div`,{className:`univer-box-border univer-px-4 univer-py-1.5`,children:e.children})})]},t))})}let ft=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,pt=ye,mt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return pt(e,n==null?void 0:n.class,n==null?void 0:n.className);let{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(e=>{let t=n==null?void 0:n[e],r=a==null?void 0:a[e];if(t===null)return null;let o=ft(t)||ft(r);return i[e][o]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return pt(e,o,t==null||(r=t.compoundVariants)==null?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]),n==null?void 0:n.class,n==null?void 0:n.className)},ht=mt(`
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`),require(`react/jsx-runtime`),require(`react-dom`),require(`react-dom/client`)):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`,`react-dom`,`react-dom/client`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverDesign={},e.React,e.React,e.ReactDOM,e.ReactDOM))})(this,function(e,t,n,r,i){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e},p=(e,t,n)=>(n=e==null?{}:a(l(e)),f(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e));t=p(t),r=p(r);function m({ref:e,...n}){let{icon:r,id:i,className:a,extend:o,...s}=n,c=`univerjs-icon univerjs-icon-${i} ${a||``}`.trim(),l=(0,t.useRef)(`_${v()}`);return h(r,`${i}`,{defIds:r.defIds,idSuffix:l.current},{ref:e,className:c,...s},o)}function h(e,n,r,i,a){return(0,t.createElement)(e.tag,{key:n,...g(e,r,a),...i},(_(e,r).children||[]).map((t,i)=>h(t,`${n}-${e.tag}-${i}`,r,void 0,a)))}function g(e,t,n){let r={...e.attrs};n!=null&&n.colorChannel1&&r.fill===`colorChannel1`&&(r.fill=n.colorChannel1),e.tag===`mask`&&r.id&&(r.id+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{e===`mask`&&typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))});let{defIds:i}=t;return!i||i.length===0?r:(e.tag===`use`&&r[`xlink:href`]&&(r[`xlink:href`]+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))}),r)}function _(e,t){var n;let{defIds:r}=t;return!r||r.length===0?e:e.tag===`defs`&&(n=e.children)!=null&&n.length?{...e,children:e.children.map(e=>typeof e.attrs.id==`string`&&r&&r.includes(e.attrs.id)?{...e,attrs:{...e.attrs,id:e.attrs.id+t.idSuffix}}:e)}:e}function v(){return Math.random().toString(36).substring(2,8)}m.displayName=`UniverIcon`;let y={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.87598 11.8327C8.87598 11.5013 9.14461 11.2327 9.47598 11.2327H11.476C11.8073 11.2327 12.076 11.5013 12.076 11.8327C12.076 12.164 11.8073 12.4327 11.476 12.4327H9.47598C9.14461 12.4327 8.87598 12.164 8.87598 11.8327Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.80898 11.2327C4.47761 11.2327 4.20898 11.5013 4.20898 11.8327C4.20898 12.164 4.47761 12.4327 4.80898 12.4327H6.80898C7.14036 12.4327 7.40898 12.164 7.40898 11.8327C7.40898 11.5013 7.14036 11.2327 6.80898 11.2327H4.80898Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.87598 9.16592C8.87598 8.83455 9.14461 8.56592 9.47598 8.56592H11.476C11.8073 8.56592 12.076 8.83455 12.076 9.16592C12.076 9.49729 11.8073 9.76592 11.476 9.76592H9.47598C9.14461 9.76592 8.87598 9.49729 8.87598 9.16592Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.80898 8.56592C4.47761 8.56592 4.20898 8.83455 4.20898 9.16592C4.20898 9.49729 4.47761 9.76592 4.80898 9.76592H6.80898C7.14036 9.76592 7.40898 9.49729 7.40898 9.16592C7.40898 8.83455 7.14036 8.56592 6.80898 8.56592H4.80898Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M6.00615 1.69985C6.00615 1.36848 5.73752 1.09985 5.40615 1.09985C5.07478 1.09985 4.80615 1.36848 4.80615 1.69985V2.34009H3.64248C2.20654 2.34009 1.04248 3.50415 1.04248 4.94009V12.3C1.04248 13.7359 2.20654 14.9 3.64248 14.9H12.6425C14.0784 14.9 15.2425 13.7359 15.2425 12.3V4.94009C15.2425 3.50415 14.0784 2.34009 12.6425 2.34009H11.4798V1.69985C11.4798 1.36848 11.2112 1.09985 10.8798 1.09985C10.5484 1.09985 10.2798 1.36848 10.2798 1.69985V2.34009H6.00615V1.69985ZM14.0425 5.97021V4.94009C14.0425 4.16689 13.4157 3.54009 12.6425 3.54009H11.4798V4.09985C11.4798 4.43122 11.2112 4.69985 10.8798 4.69985C10.5484 4.69985 10.2798 4.43122 10.2798 4.09985V3.54009H6.00615V4.09985C6.00615 4.43122 5.73752 4.69985 5.40615 4.69985C5.07478 4.69985 4.80615 4.43122 4.80615 4.09985V3.54009H3.64248C2.86928 3.54009 2.24248 4.16689 2.24248 4.94009V5.97021H14.0425ZM2.24248 7.17021H14.0425V12.3C14.0425 13.0731 13.4157 13.7 12.6425 13.7H3.64248C2.86928 13.7 2.24248 13.0732 2.24248 12.3V7.17021Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},b=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`calendar-icon`,ref:n,icon:y}))});b.displayName=`CalendarIcon`;let x={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},S=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`check-mark-icon`,ref:n,icon:x}))});S.displayName=`CheckMarkIcon`;let C={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.24483 4.80026C8.24487 4.46889 7.97627 4.20023 7.6449 4.2002C7.31353 4.20016 7.04487 4.46876 7.04483 4.80013L7.04443 8.40306C7.04442 8.56222 7.10763 8.71486 7.22017 8.82739L9.64664 11.2539C9.88095 11.4882 10.2608 11.4882 10.4952 11.2539C10.7295 11.0195 10.7295 10.6396 10.4952 10.4053L8.24446 8.15463L8.24483 4.80026Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.14248 0.899902C4.22126 0.899902 1.04248 4.07868 1.04248 7.9999C1.04248 11.9211 4.22126 15.0999 8.14248 15.0999C12.0637 15.0999 15.2425 11.9211 15.2425 7.9999C15.2425 4.07868 12.0637 0.899902 8.14248 0.899902ZM2.24248 7.9999C2.24248 4.74142 4.884 2.0999 8.14248 2.0999C11.401 2.0999 14.0425 4.74142 14.0425 7.9999C14.0425 11.2584 11.401 13.8999 8.14248 13.8999C4.884 13.8999 2.24248 11.2584 2.24248 7.9999Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},w=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`clock-icon`,ref:n,icon:C}))});w.displayName=`ClockIcon`;let T={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M3.71274 2.86421C3.47843 2.6299 3.09853 2.6299 2.86421 2.86421C2.6299 3.09853 2.6299 3.47843 2.86421 3.71274L7.15154 8.00007L2.86421 12.2874C2.6299 12.5217 2.6299 12.9016 2.86421 13.1359C3.09853 13.3702 3.47843 13.3702 3.71274 13.1359L8.00007 8.84859L12.2874 13.1359C12.5217 13.3702 12.9016 13.3702 13.1359 13.1359C13.3702 12.9016 13.3702 12.5217 13.1359 12.2874L8.84859 8.00007L13.1359 3.71274C13.3702 3.47843 13.3702 3.09853 13.1359 2.86421C12.9016 2.6299 12.5217 2.6299 12.2874 2.86421L8.00007 7.15154L3.71274 2.86421Z`}}]},E=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`close-icon`,ref:n,icon:T}))});E.displayName=`CloseIcon`;let D={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},O=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`delete-icon`,ref:n,icon:D}))});O.displayName=`DeleteIcon`;let k={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 20 20`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M10.5547 14.1884C10.2599 14.5214 9.74019 14.5214 9.4454 14.1884L3.71321 7.71335C3.29002 7.23532 3.6294 6.48161 4.26784 6.48161L15.7322 6.48161C16.3707 6.48161 16.7101 7.23532 16.2869 7.71335L10.5547 14.1884Z`}}]},A=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`down-icon`,ref:n,icon:k}))});A.displayName=`DownIcon`;let j={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.85869 12.9216C8.38445 13.4708 7.61555 13.4708 7.14131 12.9216L0.358114 5.06726C-0.406895 4.18144 0.134916 2.66683 1.2168 2.66683L14.7832 2.66683C15.8651 2.66683 16.4069 4.18144 15.6419 5.06726L8.85869 12.9216Z`}}]},M=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`dropdown-icon`,ref:n,icon:j}))});M.displayName=`DropdownIcon`;let N={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM10.3097 5.69014C10.544 5.92445 10.544 6.30435 10.3097 6.53867L8.84843 7.9999L10.3099 9.46137C10.5442 9.69569 10.5442 10.0756 10.3099 10.3099C10.0756 10.5442 9.69569 10.5442 9.46137 10.3099L7.9999 8.84843L6.53842 10.3099C6.30411 10.5442 5.92421 10.5442 5.6899 10.3099C5.45558 10.0756 5.45558 9.69569 5.6899 9.46137L7.15137 7.9999L5.69014 6.53867C5.45583 6.30435 5.45583 5.92445 5.69014 5.69014C5.92445 5.45583 6.30435 5.45583 6.53867 5.69014L7.9999 7.15137L9.46113 5.69014C9.69544 5.45583 10.0753 5.45583 10.3097 5.69014Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},P=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`error-icon`,ref:n,icon:N}))});P.displayName=`ErrorIcon`;let F={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.00016 1.33203C6.68162 1.33203 5.39269 1.72302 4.29636 2.45557C3.20004 3.18811 2.34555 4.2293 1.84097 5.44747C1.33638 6.66565 1.20436 8.00609 1.4616 9.2993C1.71883 10.5925 2.35377 11.7804 3.28612 12.7127C4.21847 13.6451 5.40636 14.28 6.69956 14.5373C7.99277 14.7945 9.33321 14.6625 10.5514 14.1579C11.7696 13.6533 12.8108 12.7988 13.5433 11.7025C14.2758 10.6062 14.6668 9.31724 14.6668 7.9987C14.6649 6.23118 13.9619 4.53662 12.7121 3.2868C11.4622 2.03697 9.76768 1.33397 8.00016 1.33203ZM7.66683 3.9987C7.86461 3.9987 8.05795 4.05735 8.2224 4.16723C8.38685 4.27711 8.51502 4.43329 8.59071 4.61601C8.6664 4.79874 8.6862 4.99981 8.64762 5.19379C8.60903 5.38777 8.51379 5.56595 8.37394 5.7058C8.23409 5.84566 8.0559 5.9409 7.86192 5.97948C7.66794 6.01807 7.46687 5.99826 7.28415 5.92258C7.10142 5.84689 6.94524 5.71872 6.83536 5.55427C6.72548 5.38982 6.66683 5.19648 6.66683 4.9987C6.66683 4.73348 6.77219 4.47913 6.95972 4.29159C7.14726 4.10405 7.40162 3.9987 7.66683 3.9987ZM9.3335 11.332H6.66683C6.49002 11.332 6.32045 11.2618 6.19543 11.1368C6.0704 11.0117 6.00016 10.8422 6.00016 10.6654C6.00016 10.4886 6.0704 10.319 6.19543 10.194C6.32045 10.0689 6.49002 9.9987 6.66683 9.9987H7.3335V7.9987H6.66683C6.49002 7.9987 6.32045 7.92846 6.19543 7.80343C6.0704 7.67841 6.00016 7.50884 6.00016 7.33203C6.00016 7.15522 6.0704 6.98565 6.19543 6.86063C6.32045 6.7356 6.49002 6.66536 6.66683 6.66536H8.00016C8.17698 6.66536 8.34655 6.7356 8.47157 6.86063C8.59659 6.98565 8.66683 7.15522 8.66683 7.33203V9.9987H9.3335C9.51031 9.9987 9.67988 10.0689 9.8049 10.194C9.92993 10.319 10.0002 10.4886 10.0002 10.6654C10.0002 10.8422 9.92993 11.0117 9.8049 11.1368C9.67988 11.2618 9.51031 11.332 9.3335 11.332Z`}}]},I=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`info-icon`,ref:n,icon:F}))});I.displayName=`InfoIcon`;let L={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},R=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`more-down-icon`,ref:n,icon:L}))});R.displayName=`MoreDownIcon`;let ee={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M10.3536 12.3536C10.1583 12.5488 9.84171 12.5488 9.64645 12.3536L6.64645 9.35355C6.45118 9.15829 6.45118 8.84171 6.64645 8.64645L9.64645 5.64645C9.84171 5.45118 10.1583 5.45118 10.3536 5.64645C10.5488 5.84171 10.5488 6.15829 10.3536 6.35355L7.70711 9L10.3536 11.6464C10.5488 11.8417 10.5488 12.1583 10.3536 12.3536Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},te=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`more-left-icon`,ref:n,icon:ee}))});te.displayName=`MoreLeftIcon`;let ne={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M6.14645 4.64645C6.34171 4.45118 6.65829 4.45118 6.85355 4.64645L9.85355 7.64645C10.0488 7.84171 10.0488 8.15829 9.85355 8.35355L6.85355 11.3536C6.65829 11.5488 6.34171 11.5488 6.14645 11.3536C5.95118 11.1583 5.95118 10.8417 6.14645 10.6464L8.79289 8L6.14645 5.35355C5.95118 5.15829 5.95118 4.84171 6.14645 4.64645Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},re=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`more-right-icon`,ref:n,icon:ne}))});re.displayName=`MoreRightIcon`;let ie={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},ae=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`more-up-icon`,ref:n,icon:ie}))});ae.displayName=`MoreUpIcon`;let oe={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M5.65252 5.41446C5.86681 5.53124 6.00016 5.75579 6.00016 5.99984V9.99984C6.00016 10.368 5.70168 10.6665 5.3335 10.6665C4.96531 10.6665 4.66683 10.368 4.66683 9.99984V7.22312L4.36151 7.42005C4.05209 7.61961 3.63948 7.53056 3.43992 7.22115C3.24035 6.91173 3.3294 6.49912 3.63882 6.29956L4.97215 5.43959C5.17724 5.30731 5.43822 5.29767 5.65252 5.41446Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M12.3335 5.99984C12.3335 5.75579 12.2001 5.53124 11.9858 5.41446C11.7716 5.29767 11.5106 5.30731 11.3055 5.43959L9.97215 6.29956C9.66274 6.49912 9.57368 6.91173 9.77325 7.22115C9.97281 7.53056 10.3854 7.61961 10.6948 7.42005L11.0002 7.22312V9.99984C11.0002 10.368 11.2986 10.6665 11.6668 10.6665C12.035 10.6665 12.3335 10.368 12.3335 9.99984V5.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.00008 5.99984C8.36827 5.99984 8.66675 6.29831 8.66675 6.6665V6.99984C8.66675 7.36803 8.36827 7.6665 8.00008 7.6665C7.63189 7.6665 7.33341 7.36803 7.33341 6.99984V6.6665C7.33341 6.29831 7.63189 5.99984 8.00008 5.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.66675 8.99984C8.66675 8.63165 8.36827 8.33317 8.00008 8.33317C7.63189 8.33317 7.33341 8.63165 7.33341 8.99984V9.33317C7.33341 9.70136 7.63189 9.99984 8.00008 9.99984C8.36827 9.99984 8.66675 9.70136 8.66675 9.33317V8.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M0.666748 2.99984C0.666748 2.26346 1.2637 1.6665 2.00008 1.6665H14.0001C14.7365 1.6665 15.3334 2.26346 15.3334 2.99984V12.9998C15.3334 13.7362 14.7365 14.3332 14.0001 14.3332H2.00008C1.26371 14.3332 0.666748 13.7362 0.666748 12.9998V2.99984ZM14.0001 2.99984H2.00008V12.9998H14.0001V2.99984Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},se=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`one-to-one-icon`,ref:n,icon:oe}))});se.displayName=`OneToOneIcon`;let ce={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.7245 6.42417C11.9588 6.18985 11.9588 5.80995 11.7245 5.57564C11.4901 5.34132 11.1102 5.34132 10.8759 5.57564L7.3002 9.15137L5.72446 7.57564C5.49014 7.34132 5.11025 7.34132 4.87593 7.57564C4.64162 7.80995 4.64162 8.18985 4.87593 8.42417L6.87593 10.4242C7.11025 10.6585 7.49014 10.6585 7.72446 10.4242L11.7245 6.42417Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},le=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`success-icon`,ref:n,icon:ce}))});le.displayName=`SuccessIcon`;let ue={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8.00008 12.3671C8.46031 12.3671 8.83342 11.994 8.83342 11.5338C8.83342 11.0735 8.46031 10.7004 8.00008 10.7004C7.53985 10.7004 7.16675 11.0735 7.16675 11.5338C7.16675 11.994 7.53985 12.3671 8.00008 12.3671ZM8.5999 4.4335C8.5999 4.10213 8.33127 3.8335 7.9999 3.8335C7.66853 3.8335 7.3999 4.10213 7.3999 4.4335V9.36683C7.3999 9.6982 7.66853 9.96683 7.9999 9.96683C8.33127 9.96683 8.5999 9.6982 8.5999 9.36683V4.4335Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},de=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`warning-icon`,ref:n,icon:ue}))});de.displayName=`WarningIcon`;let fe={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.04883 5.38216C8.04883 5.01397 7.75035 4.71549 7.38216 4.71549C7.01397 4.71549 6.71549 5.01397 6.71549 5.38216V6.71897L5.3865 6.7207C5.01831 6.72117 4.72022 7.02004 4.7207 7.38823C4.72118 7.75642 5.02005 8.05451 5.38824 8.05403L6.71549 8.0523V9.38216C6.71549 9.75035 7.01397 10.0488 7.38216 10.0488C7.75035 10.0488 8.04883 9.75035 8.04883 9.38216V8.05056L9.38304 8.04883C9.75123 8.04835 10.0493 7.74948 10.0488 7.38129C10.0484 7.0131 9.74949 6.71502 9.3813 6.7155L8.04883 6.71723V5.38216Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M7.38216 1.04883C3.88437 1.04883 1.04883 3.88437 1.04883 7.38216C1.04883 10.88 3.88437 13.7155 7.38216 13.7155C8.89089 13.7155 10.2764 13.1879 11.3643 12.3072L13.813 14.7559C14.0733 15.0162 14.4954 15.0162 14.7558 14.7559C15.0161 14.4955 15.0161 14.0734 14.7558 13.8131L12.3071 11.3644C13.1879 10.2765 13.7155 8.89095 13.7155 7.38216C13.7155 3.88437 10.88 1.04883 7.38216 1.04883ZM2.38216 7.38216C2.38216 4.62075 4.62075 2.38216 7.38216 2.38216C10.1436 2.38216 12.3822 4.62075 12.3822 7.38216C12.3822 10.1436 10.1436 12.3822 7.38216 12.3822C4.62075 12.3822 2.38216 10.1436 2.38216 7.38216Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},pe=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`zoom-in-icon`,ref:n,icon:fe}))});pe.displayName=`ZoomInIcon`;let me={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M4.71549 7.38216C4.71549 7.01397 5.01397 6.71549 5.38216 6.71549H9.38216C9.75035 6.71549 10.0488 7.01397 10.0488 7.38216C10.0488 7.75035 9.75035 8.04883 9.38216 8.04883H5.38216C5.01397 8.04883 4.71549 7.75035 4.71549 7.38216Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.04883 7.38216C1.04883 3.88437 3.88437 1.04883 7.38216 1.04883C10.88 1.04883 13.7155 3.88437 13.7155 7.38216C13.7155 8.89095 13.1879 10.2765 12.3071 11.3644L14.7558 13.8131C15.0161 14.0734 15.0161 14.4955 14.7558 14.7559C14.4954 15.0162 14.0733 15.0162 13.813 14.7559L11.3643 12.3072C10.2764 13.1879 8.89089 13.7155 7.38216 13.7155C3.88437 13.7155 1.04883 10.88 1.04883 7.38216ZM7.38216 2.38216C4.62075 2.38216 2.38216 4.62075 2.38216 7.38216C2.38216 10.1436 4.62075 12.3822 7.38216 12.3822C10.1436 12.3822 12.3822 10.1436 12.3822 7.38216C12.3822 4.62075 10.1436 2.38216 7.38216 2.38216Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},he=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`zoom-out-icon`,ref:n,icon:me}))});he.displayName=`ZoomOutIcon`;let ge={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`#0B9EFB`,d:`M8.79993 14.0166C8.79993 14.4585 8.44176 14.8166 7.99993 14.8166C4.23529 14.8166 1.18345 11.7648 1.18345 8.00017C1.18345 4.23554 4.23529 1.18369 7.99993 1.1837C11.7646 1.1837 14.8164 4.23554 14.8164 8.00017C14.8164 8.442 14.4582 8.80017 14.0164 8.80017C13.5746 8.80017 13.2164 8.442 13.2164 8.00017C13.2164 5.11919 10.8809 2.7837 7.99993 2.7837C5.11895 2.7837 2.78345 5.11919 2.78345 8.00017C2.78345 10.8812 5.11895 13.2166 7.99993 13.2166C8.44176 13.2166 8.79993 13.5748 8.79993 14.0166Z`,fillOpacity:.2,fillRule:`evenodd`,clipRule:`evenodd`}},{tag:`path`,attrs:{fill:`#0B9EFB`,d:`M7.20007 1.98384C7.20007 1.54201 7.55824 1.18384 8.00007 1.18384C11.7647 1.18384 14.8165 4.23568 14.8165 8.00032C14.8165 11.765 11.7647 14.8168 8.00007 14.8168C4.23543 14.8168 1.18359 11.765 1.18359 8.00032C1.18359 7.55849 1.54177 7.20031 1.98359 7.20031C2.42542 7.20031 2.78359 7.55849 2.78359 8.00032C2.78359 10.8813 5.11909 13.2168 8.00007 13.2168C10.8811 13.2168 13.2165 10.8813 13.2165 8.00032C13.2165 5.11933 10.8811 2.78384 8.00007 2.78384C7.55824 2.78384 7.20007 2.42567 7.20007 1.98384Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},_e=(0,t.forwardRef)(function(e,n){return(0,t.createElement)(m,Object.assign({},e,{id:`loading-multi-icon`,ref:n,icon:ge}))});_e.displayName=`LoadingMultiIcon`;function ve(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ve(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function ye(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ve(e))&&(r&&(r+=` `),r+=t);return r}let z=e=>{let t=Ce(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(`-`);return n[0]===``&&n.length!==1&&n.shift(),be(n,t)||Se(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},be=(e,t)=>{var n;if(e.length===0)return t.classGroupId;let r=e[0],i=t.nextPart.get(r),a=i?be(e.slice(1),i):void 0;if(a)return a;if(t.validators.length===0)return;let o=e.join(`-`);return(n=t.validators.find(({validator:e})=>e(o)))==null?void 0:n.classGroupId},xe=/^\[(.+)\]$/,Se=e=>{if(xe.test(e)){let t=xe.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},Ce=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return De(Object.entries(e.classGroups),n).forEach(([e,n])=>{we(n,r,e,t)}),r},we=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:Te(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(Ee(e)){we(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{we(i,Te(t,e),n,r)})})},Te=(e,t)=>{let n=e;return t.split(`-`).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Ee=e=>e.isThemeGetter,De=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Oe=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},ke=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(`!`);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},Ae=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},je=e=>({cache:Oe(e.cacheSize),parseClassName:ke(e),...z(e)}),Me=/\s+/,Ne=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Me),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?` `+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=Ae(c).join(`:`),h=l?m+`!`:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function Pe(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=Fe(t))&&(r&&(r+=` `),r+=n);return r}let Fe=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Fe(e[r]))&&(n&&(n+=` `),n+=t);return n};function Ie(e,...t){let n,r,i,a=o;function o(o){return n=je(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=Ne(e,n);return i(e,a),a}return function(){return a(Pe.apply(null,arguments))}}let B=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},Le=/^\[(?:([a-z-]+):)?(.+)\]$/i,Re=/^\d+\/\d+$/,ze=new Set([`px`,`full`,`screen`]),Be=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ve=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,He=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,We=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ge=e=>qe(e)||ze.has(e)||Re.test(e),Ke=e=>at(e,`length`,ot),qe=e=>!!e&&!Number.isNaN(Number(e)),Je=e=>at(e,`number`,qe),Ye=e=>!!e&&Number.isInteger(Number(e)),Xe=e=>e.endsWith(`%`)&&qe(e.slice(0,-1)),V=e=>Le.test(e),Ze=e=>Be.test(e),Qe=new Set([`length`,`size`,`percentage`]),$e=e=>at(e,Qe,st),et=e=>at(e,`position`,st),tt=new Set([`image`,`url`]),nt=e=>at(e,tt,lt),rt=e=>at(e,``,ct),it=()=>!0,at=(e,t,n)=>{let r=Le.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},ot=e=>Ve.test(e)&&!He.test(e),st=()=>!1,ct=e=>Ue.test(e),lt=e=>We.test(e),ut=Ie(()=>{let e=B(`colors`),t=B(`spacing`),n=B(`blur`),r=B(`brightness`),i=B(`borderColor`),a=B(`borderRadius`),o=B(`borderSpacing`),s=B(`borderWidth`),c=B(`contrast`),l=B(`grayscale`),u=B(`hueRotate`),d=B(`invert`),f=B(`gap`),p=B(`gradientColorStops`),m=B(`gradientColorStopPositions`),h=B(`inset`),g=B(`margin`),_=B(`opacity`),v=B(`padding`),y=B(`saturate`),b=B(`scale`),x=B(`sepia`),S=B(`skew`),C=B(`space`),w=B(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,V,t],O=()=>[V,t],k=()=>[``,Ge,Ke],A=()=>[`auto`,qe,V],j=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],M=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],N=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],F=()=>[``,`0`,V],I=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],L=()=>[qe,V];return{cacheSize:500,separator:`:`,theme:{colors:[it],spacing:[Ge,Ke],blur:[`none`,``,Ze,V],brightness:L(),borderColor:[e],borderRadius:[`none`,``,`full`,Ze,V],borderSpacing:O(),borderWidth:k(),contrast:L(),grayscale:F(),hueRotate:L(),invert:F(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Xe,Ke],inset:D(),margin:D(),opacity:L(),padding:O(),saturate:L(),scale:L(),sepia:F(),skew:L(),space:O(),translate:O()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,V]}],container:[`container`],columns:[{columns:[Ze]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:[...j(),V]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,Ye,V]}],basis:[{basis:D()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,V]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:[`first`,`last`,`none`,Ye,V]}],"grid-cols":[{"grid-cols":[it]}],"col-start-end":[{col:[`auto`,{span:[`full`,Ye,V]},V]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[it]}],"row-start-end":[{row:[`auto`,{span:[Ye,V]},V]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,V]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,V]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...P()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...P(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...P(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,V,t]}],"min-w":[{"min-w":[V,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[V,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[Ze]},Ze]}],h:[{h:[V,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[V,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[V,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[V,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,Ze,Ke]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,Je]}],"font-family":[{font:[it]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,V]}],"line-clamp":[{"line-clamp":[`none`,qe,Je]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,Ge,V]}],"list-image":[{"list-image":[`none`,V]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,V]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...M(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,Ge,Ke]}],"underline-offset":[{"underline-offset":[`auto`,Ge,V]}],"text-decoration-color":[{decoration:[e]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:O()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,V]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,V]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...j(),et]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,$e]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},nt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[...M(),`hidden`]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":[`divide-y-reverse`],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:M()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[``,...M()]}],"outline-offset":[{"outline-offset":[Ge,V]}],"outline-w":[{outline:[Ge,Ke]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Ge,Ke]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,Ze,rt]}],"shadow-color":[{shadow:[it]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...N(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,Ze,V]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,V]}],duration:[{duration:L()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,V]}],delay:[{delay:L()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,V]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Ye,V]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,V]}],accent:[{accent:[`auto`,e]}],appearance:[{appearance:[`none`,`auto`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,V]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,V]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[Ge,Ke,Je]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]}}});function H(...e){return ut(ye(e))}function dt(e){let{className:r,items:i}=e,[a,o]=(0,t.useState)(null),s=e=>{o(a===e?null:e)};return(0,n.jsx)(`div`,{"data-u-comp":`accordion`,className:H(`univer-divide-x-0 univer-divide-y univer-divide-solid univer-divide-gray-200 dark:!univer-divide-gray-600`,r),children:i.map((e,t)=>(0,n.jsxs)(`div`,{children:[(0,n.jsxs)(`button`,{className:`univer-box-border univer-flex univer-w-full univer-cursor-pointer univer-items-center univer-gap-1.5 univer-border-none univer-bg-transparent univer-p-4 univer-text-left univer-text-gray-700 hover:univer-text-gray-900 focus:univer-outline-none dark:!univer-text-gray-200 dark:hover:!univer-text-white`,type:`button`,onClick:()=>s(t),children:[(0,n.jsx)(A,{className:H(`univer-size-2.5 univer-flex-shrink-0 univer-transition-transform`,{"-univer-rotate-90":a!==t,"univer-rotate-0":a===t})}),(0,n.jsx)(`span`,{className:`univer-font-medium`,children:e.label})]}),(0,n.jsx)(`div`,{className:H(`univer-overflow-hidden univer-transition-[max-height,opacity] univer-duration-500 univer-ease-in-out`,{"univer-max-h-screen":a===t,"univer-max-h-0":a!==t}),children:(0,n.jsx)(`div`,{className:`univer-box-border univer-px-4 univer-py-1.5`,children:e.children})})]},t))})}let ft=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,pt=ye,mt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return pt(e,n==null?void 0:n.class,n==null?void 0:n.className);let{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(e=>{let t=n==null?void 0:n[e],r=a==null?void 0:a[e];if(t===null)return null;let o=ft(t)||ft(r);return i[e][o]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return pt(e,o,t==null||(r=t.compoundVariants)==null?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]),n==null?void 0:n.class,n==null?void 0:n.className)},ht=mt(`
16
2
  univer-relative univer-inline-block univer-overflow-hidden univer-whitespace-nowrap univer-bg-gray-200
17
3
  univer-text-center univer-align-middle univer-text-white
18
- `,{variants:{shape:{circle:`univer-rounded-full`,square:`univer-rounded`},size:{middle:`univer-size-9 univer-leading-9`,small:`univer-size-7 univer-leading-7`}},defaultVariants:{shape:`circle`,size:`middle`}});function gt(e){let{children:t,className:r,style:i,title:a,alt:o,shape:s=`circle`,size:c=`middle`,src:l,fit:u=`fill`,onError:d,onLoad:f}=e,p=typeof c==`number`?{width:`${c}px`,height:`${c}px`,lineHeight:`${c}px`}:{},m={objectFit:u};return(0,n.jsxs)(`span`,{className:H(ht({shape:s,size:typeof c==`number`?`middle`:c}),{"univer-bg-transparent":l},r),style:{...p,...i,...l&&m},children:[l&&(0,n.jsx)(`img`,{className:`univer-block univer-size-full`,src:l,title:a,alt:o,onError:d,onLoad:f}),t]})}function _t(e){let{className:t,children:r,closable:i=!1,onClose:a}=e;return(0,n.jsxs)(`span`,{"data-u-comp":`badge`,className:H(`
19
- univer-box-border univer-inline-flex univer-items-center univer-gap-1 univer-truncate
20
- univer-rounded-md univer-border univer-border-solid univer-border-gray-100 univer-bg-gray-100
21
- univer-px-2.5 univer-py-0.5 univer-text-xs univer-font-medium univer-text-gray-900
22
- dark:!univer-border-gray-500 dark:!univer-bg-gray-700 dark:!univer-text-gray-300
23
- `,t),children:[(0,n.jsx)(`span`,{className:`univer-flex-1 univer-truncate`,children:r}),i&&(0,n.jsx)(`button`,{className:`
24
- univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none
25
- univer-p-0 univer-outline-none univer-transition-opacity
26
- hover:univer-opacity-70
27
- `,type:`button`,"aria-label":`Close badge`,onClick:a,children:(0,n.jsx)(E,{className:`univer-text-current`})})]})}function vt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function yt(...e){return t=>{let n=!1,r=e.map(e=>{let r=vt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():vt(e[t],null)}}}}function U(...e){return t.useCallback(yt(...e),e)}var bt=Symbol.for(`react.lazy`),xt=t.use;function St(e){return typeof e==`object`&&!!e&&`then`in e}function Ct(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===bt&&`_payload`in e&&St(e._payload)}function wt(e){let r=Et(e),i=t.forwardRef((e,i)=>{let{children:a,...o}=e;Ct(a)&&typeof xt==`function`&&(a=xt(a._payload));let s=t.Children.toArray(a),c=s.find(Ot);if(c){let e=c.props.children,a=s.map(n=>n===c?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return(0,n.jsx)(r,{...o,ref:i,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return(0,n.jsx)(r,{...o,ref:i,children:a})});return i.displayName=`${e}.Slot`,i}var Tt=wt(`Slot`);function Et(e){let n=t.forwardRef((e,n)=>{let{children:r,...i}=e;if(Ct(r)&&typeof xt==`function`&&(r=xt(r._payload)),t.isValidElement(r)){let e=At(r),a=kt(i,r.props);return r.type!==t.Fragment&&(a.ref=n?yt(n,e):e),t.cloneElement(r,a)}return t.Children.count(r)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Dt=Symbol(`radix.slottable`);function Ot(e){return t.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Dt}function kt(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function At(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}let jt=mt(`
4
+ `,{variants:{shape:{circle:`univer-rounded-full`,square:`univer-rounded`},size:{middle:`univer-size-9 univer-leading-9`,small:`univer-size-7 univer-leading-7`}},defaultVariants:{shape:`circle`,size:`middle`}});function gt(e){let{children:t,className:r,style:i,title:a,alt:o,shape:s=`circle`,size:c=`middle`,src:l,fit:u=`fill`,onError:d,onLoad:f}=e,p=typeof c==`number`?{width:`${c}px`,height:`${c}px`,lineHeight:`${c}px`}:{},m={objectFit:u};return(0,n.jsxs)(`span`,{className:H(ht({shape:s,size:typeof c==`number`?`middle`:c}),{"univer-bg-transparent":l},r),style:{...p,...i,...l&&m},children:[l&&(0,n.jsx)(`img`,{className:`univer-block univer-size-full`,src:l,title:a,alt:o,onError:d,onLoad:f}),t]})}function _t(e){let{className:t,children:r,closable:i=!1,onClose:a}=e;return(0,n.jsxs)(`span`,{"data-u-comp":`badge`,className:H(`univer-box-border univer-inline-flex univer-items-center univer-gap-1 univer-truncate univer-rounded-md univer-border univer-border-solid univer-border-gray-100 univer-bg-gray-100 univer-px-2.5 univer-py-0.5 univer-text-xs univer-font-medium univer-text-gray-900 dark:!univer-border-gray-500 dark:!univer-bg-gray-700 dark:!univer-text-gray-300`,t),children:[(0,n.jsx)(`span`,{className:`univer-flex-1 univer-truncate`,children:r}),i&&(0,n.jsx)(`button`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-p-0 univer-outline-none univer-transition-opacity hover:univer-opacity-70`,type:`button`,"aria-label":`Close badge`,onClick:a,children:(0,n.jsx)(E,{className:`univer-text-current`})})]})}function vt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function yt(...e){return t=>{let n=!1,r=e.map(e=>{let r=vt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():vt(e[t],null)}}}}function U(...e){return t.useCallback(yt(...e),e)}var bt=Symbol.for(`react.lazy`),xt=t.use;function St(e){return typeof e==`object`&&!!e&&`then`in e}function Ct(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===bt&&`_payload`in e&&St(e._payload)}function wt(e){let r=Et(e),i=t.forwardRef((e,i)=>{let{children:a,...o}=e;Ct(a)&&typeof xt==`function`&&(a=xt(a._payload));let s=t.Children.toArray(a),c=s.find(Ot);if(c){let e=c.props.children,a=s.map(n=>n===c?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return(0,n.jsx)(r,{...o,ref:i,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return(0,n.jsx)(r,{...o,ref:i,children:a})});return i.displayName=`${e}.Slot`,i}var Tt=wt(`Slot`);function Et(e){let n=t.forwardRef((e,n)=>{let{children:r,...i}=e;if(Ct(r)&&typeof xt==`function`&&(r=xt(r._payload)),t.isValidElement(r)){let e=At(r),a=kt(i,r.props);return r.type!==t.Fragment&&(a.ref=n?yt(n,e):e),t.cloneElement(r,a)}return t.Children.count(r)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Dt=Symbol(`radix.slottable`);function Ot(e){return t.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Dt}function kt(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function At(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}let jt=mt(`
28
5
  univer-box-border univer-inline-flex univer-cursor-pointer univer-select-none univer-items-center
29
6
  univer-justify-center univer-gap-2 univer-whitespace-nowrap univer-rounded-md univer-border univer-border-solid
30
7
  univer-text-sm univer-font-medium univer-transition-colors
@@ -64,64 +41,7 @@
64
41
  dark:!univer-text-white
65
42
  dark:hover:!univer-bg-gray-700
66
43
  dark:active:!univer-bg-gray-600
67
- `},size:{small:`univer-h-6 univer-rounded-md univer-px-1.5 univer-text-xs`,middle:`univer-h-8 univer-rounded-lg univer-px-2 univer-text-sm`,large:`univer-h-10 univer-rounded-lg univer-px-3 univer-text-sm`}},defaultVariants:{variant:`default`,size:`middle`}}),Mt=(0,t.forwardRef)(({className:e,variant:t,size:r,asChild:i=!1,...a},o)=>(0,n.jsx)(i?Tt:`button`,{className:H(jt({variant:t,size:r,className:e})),ref:o,"data-u-comp":`button`,...a}));Mt.displayName=`Button`;let Nt=({className:e,orientation:r=`horizontal`,children:i})=>{let a=t.Children.count(i),o=r===`horizontal`,s=r===`vertical`;return(0,n.jsx)(`div`,{className:H(`univer-grid`,{"univer-grid-flow-row":s,"univer-w-fit":s},e),children:t.Children.map(i,(e,n)=>{let r=n===0,i=n===a-1;return(0,t.cloneElement)(e,{className:H({"!univer-rounded-l-none":o&&!r,"!univer-rounded-r-none":o&&!i,"!univer-border-l-0":o&&!r,"!univer-rounded-t-none":s&&!r,"!univer-rounded-b-none":s&&!i,"!univer-border-t-0":s&&!r},e.props.className)})})})};function Pt(){return typeof window<`u`&&typeof document<`u`}let Ft=(0,t.createContext)({mountContainer:Pt()?document.body:null});function It(e){let{children:r,locale:i,mountContainer:a}=e,o=(0,t.useMemo)(()=>({locale:i,mountContainer:a}),[i,a]);return(0,n.jsx)(Ft.Provider,{value:o,children:r})}var Lt=p(d(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,E,w),e.$i=!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))}))());let Rt=`univer-scrollbar-thin univer-scrollbar-track-gray-50 univer-scrollbar-thumb-gray-300 dark:!univer-scrollbar-track-gray-900 dark:!univer-scrollbar-thumb-gray-700`,zt=`univer-border-gray-200 dark:!univer-border-gray-600 univer-border-solid`,W=H(zt,`univer-border`),Bt=H(zt,`univer-border-l univer-border-b univer-border-t-0 univer-border-r-0`),Vt=H(zt,`univer-border-l univer-border-b-0 univer-border-t-0 univer-border-r-0`),Ht=H(zt,`univer-border-l-0 univer-border-b-0 univer-border-t univer-border-r-0`),Ut=H(zt,`univer-border-l-0 univer-border-b univer-border-t-0 univer-border-r-0`),Wt=H(zt,`univer-border-l-0 univer-border-b-0 univer-border-t-0 univer-border-r`);function Gt(e){let{className:t,value:r,onValueChange:i}=e;function a(e){let[t,n,a]=e.target.value.split(`:`).map(Number),o=new Date(r==null?Date.now():r);o.setHours(t,n,a,0),i==null||i(o)}return(0,n.jsxs)(`div`,{"data-u-comp":`time-input`,className:`univer-relative univer-mx-auto univer-mt-1 univer-w-fit`,children:[(0,n.jsx)(w,{className:`
68
- univer-absolute univer-left-2 univer-top-1/2 -univer-translate-y-1/2 univer-text-gray-600
69
- dark:!univer-text-gray-400
70
- `}),(0,n.jsx)(`input`,{className:H(`
71
- univer-block univer-h-7 univer-w-fit univer-appearance-none univer-rounded-md univer-bg-transparent
72
- univer-pl-6 univer-pr-2 univer-text-center univer-text-gray-800 univer-shadow univer-outline-none
73
- univer-transition-all univer-duration-200
74
- focus:univer-border-primary-600
75
- dark:!univer-text-white
76
- dark:focus:!univer-border-primary-500
77
- [&::-webkit-calendar-picker-indicator]:univer-hidden
78
- [&::-webkit-calendar-picker-indicator]:univer-appearance-none
79
- `,W,t),type:`time`,step:`1`,value:(0,Lt.default)(r).format(`HH:mm:ss`),onChange:a})]})}function Kt(e,t){return new Date(e,t+1,0).getDate()}function qt(e,t){return new Date(e,t,1).getDay()}function Jt(e){let{className:t,...r}=e;return(0,n.jsx)(`button`,{className:H(`
80
- univer-size-7 univer-rounded-md univer-border-none univer-bg-transparent univer-p-1 univer-transition-all
81
- hover:univer-bg-gray-200
82
- dark:hover:!univer-bg-gray-600
83
- `,t),type:`button`,...r})}function Yt(e){let{className:r,max:i,min:a,showTime:o=!1,value:s,onValueChange:c}=e,{locale:l}=(0,t.useContext)(Ft),{year:u,weekDays:d,months:f}=l==null?void 0:l.Calendar,p=new Date,[m,h]=(0,t.useState)((s==null?p:s).getFullYear()),[g,_]=(0,t.useState)((s==null?p:s).getMonth());function v(){_(e=>e===0?(h(e=>e-1),11):e-1)}function y(){_(e=>e===11?(h(e=>e+1),0):e+1)}let b=Kt(m,g),x=qt(m,g),S=(0,t.useMemo)(()=>{let e=[];for(let t=0;t<x;t++)e.push(null);for(let t=1;t<=b;t++)e.push(t);return e},[b,x]);function C(e){return e&&m===(s==null?void 0:s.getFullYear())&&g===(s==null?void 0:s.getMonth())&&e===(s==null?void 0:s.getDate())}function w(e){return e&&m===p.getFullYear()&&g===p.getMonth()&&e===p.getDate()}function T(e){var t,n,r;if(!e)return!1;let o=(t=s==null?void 0:s.getHours())==null?p.getHours():t,c=(n=s==null?void 0:s.getMinutes())==null?p.getMinutes():n,l=(r=s==null?void 0:s.getSeconds())==null?p.getSeconds():r,u=new Date(m,g,e,o,c,l);return!!(a&&u<a||i&&u>i)}function E(e){var t,n,r;if(T(e))return;let i=(t=s==null?void 0:s.getHours())==null?p.getHours():t,a=(n=s==null?void 0:s.getMinutes())==null?p.getMinutes():n,o=(r=s==null?void 0:s.getSeconds())==null?p.getSeconds():r;c==null||c(new Date(m,g,e,i,a,o))}function D(e){var t;let n=e.getHours(),r=e.getMinutes(),i=e.getSeconds(),a=new Date(m,g,(t=s==null?void 0:s.getDate())==null?p.getDate():t,n,r,i);c==null||c(a)}return(0,n.jsxs)(`div`,{"data-u-comp":`calendar`,className:H(`
84
- univer-mx-auto univer-max-w-xs univer-select-none univer-rounded univer-bg-white univer-text-gray-900
85
- dark:!univer-bg-gray-900 dark:!univer-text-white
86
- `,r),children:[(0,n.jsxs)(`nav`,{className:`univer-mb-4 univer-flex univer-items-center univer-justify-between`,children:[(0,n.jsx)(Jt,{className:`
87
- univer-text-lg univer-text-gray-500
88
- dark:!univer-text-gray-200
89
- `,"aria-label":`Previous Month`,onClick:v,children:(0,n.jsx)(re,{className:`univer-rotate-180`})}),(0,n.jsxs)(`span`,{className:`univer-flex univer-gap-0.5 univer-text-sm univer-font-medium`,children:[(0,n.jsx)(`span`,{children:m}),(0,n.jsx)(`span`,{children:u}),(0,n.jsx)(`span`,{children:f[g]})]}),(0,n.jsx)(Jt,{className:`
90
- univer-text-lg univer-text-gray-500
91
- dark:!univer-text-gray-200
92
- `,"aria-label":`Next Month`,onClick:y,children:(0,n.jsx)(re,{})})]}),(0,n.jsx)(`div`,{className:`
93
- univer-mb-1 univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center univer-text-sm
94
- univer-text-gray-500
95
- dark:!univer-text-gray-200
96
- `,children:d.map(e=>(0,n.jsx)(`div`,{children:e},e))}),(0,n.jsx)(`div`,{className:`univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center`,children:S.map((e,t)=>e?(0,n.jsx)(Jt,{className:H({"!univer-bg-primary-600 univer-font-bold univer-text-white":!w(e)&&C(e),"dark:!univer-text-white":!w(e)&&!C(e),"!univer-bg-primary-600 univer-text-white":w(e)&&C(e),"univer-font-semibold univer-text-primary-600 dark:!univer-text-primary-500":w(e)&&!C(e),"univer-cursor-not-allowed univer-opacity-40":T(e),"univer-hover:bg-primary-100 univer-cursor-pointer univer-text-gray-800":!C(e)&&!T(e)}),onClick:()=>E(e),disabled:T(e),children:e},t):(0,n.jsx)(`div`,{},t))}),o&&(0,n.jsx)(Gt,{value:s,onValueChange:D})]})}function Xt({emptyText:e}){return(0,n.jsx)(`section`,{className:`
97
- univer-h-8 univer-px-2 univer-pr-32 univer-text-sm/8 univer-text-gray-600
98
- dark:!univer-text-gray-200
99
- `,children:e})}function Zt(e){let{value:r,options:i=[],onChange:a,contentClassName:o,wrapperClassName:s}=e,{locale:c}=(0,t.useContext)(Ft),l=(0,t.useMemo)(()=>{let e=[i];return r.forEach((t,n)=>{let r=e[n].find(e=>e.value===t);r!=null&&r.children&&e.push(r.children)}),e},[r]);function u(e,t){if(t===r[e])return;if(r[e+1]){let n=r.slice(0,e+1);n[e]=t,a(n);return}let n=[...r];n[e]=t,a(n)}return(0,n.jsxs)(`section`,{"data-u-comp":`cascader-list`,className:H(`
100
- univer-overflow-auto-y univer-grid univer-h-full univer-max-h-80 univer-grid-flow-col univer-rounded
101
- univer-py-2 univer-text-gray-900
102
- dark:!univer-text-white
103
- [&>ul:not(:last-child)]:univer-border-0 [&>ul:not(:last-child)]:univer-border-r
104
- [&>ul:not(:last-child)]:univer-border-solid [&>ul:not(:last-child)]:univer-border-r-gray-200
105
- `,W,Rt,s),children:[l.map((e,t)=>e.length?(0,n.jsx)(`ul`,{className:H(`
106
- univer-m-0 univer-h-full univer-max-h-full univer-list-none univer-overflow-auto
107
- univer-px-2
108
- `,Rt,o),children:e.map(e=>(0,n.jsx)(`li`,{children:(0,n.jsxs)(`a`,{className:H(`
109
- univer-relative univer-block univer-h-8 univer-cursor-pointer univer-rounded
110
- univer-text-sm/8
111
- `,{"univer-px-7":t>0,"univer-px-1.5":t===0,"univer-bg-gray-200 dark:!univer-bg-gray-600":e.value===r[t]}),onClick:()=>u(t,e.value),children:[t>0&&(0,n.jsx)(`span`,{className:`
112
- univer-absolute univer-left-2 univer-flex univer-h-full
113
- univer-items-center
114
- `,children:e.value===r[t]&&(0,n.jsx)(S,{className:`univer-text-primary-600`})}),(0,n.jsx)(`span`,{children:e.label})]})},e.value))},t):(0,n.jsx)(Xt,{emptyText:c==null?void 0:c.CascaderList.empty},t)),r.length<=0&&(0,n.jsx)(Xt,{emptyText:c==null?void 0:c.CascaderList.empty})]})}function Qt(e){let{children:r,className:i,style:a,value:o,disabled:s,direction:c=`horizontal`,onChange:l}=e,u=e=>{o.includes(e)?l(o.filter(t=>t!==e)):l([...o,e])};return(0,n.jsx)(`div`,{className:H(`univer-flex univer-gap-2`,{"univer-flex-col":c===`vertical`},i),style:a,children:t.Children.map(r,(e,n)=>(0,t.isValidElement)(e)?(0,t.cloneElement)(e,{key:n,children:e.props.children,checked:e.props.value?o.includes(e.props.value):!1,disabled:s==null?e.props.disabled:s,onChange:u}):e)})}function $t(e){let{children:r,className:i,style:a,checked:o=!1,indeterminate:s=!1,value:c,disabled:l=!1,onChange:u,contentClassName:d}=e,f=(0,t.useRef)(null);function p(e){if(e.stopPropagation(),!(!u||l))if(c!==void 0)u==null||u(c);else{var t,n;let e=(t=f==null||(n=f.current)==null?void 0:n.checked)==null?!1:t;u==null||u(e)}}return(0,n.jsxs)(`label`,{"data-u-comp":`checkbox`,className:H(`univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm`,{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!l,"univer-text-gray-400":l},i),style:a,children:[(0,n.jsxs)(`span`,{className:`univer-relative univer-block`,children:[(0,n.jsx)(`input`,{ref:f,className:`univer-absolute univer-size-0 univer-opacity-0`,type:`checkbox`,checked:o,disabled:l,onChange:p}),(0,n.jsxs)(`span`,{className:H(`
115
- univer-relative univer-box-border univer-flex univer-size-4 univer-items-center
116
- univer-justify-center univer-overflow-hidden univer-rounded univer-border univer-border-solid
117
- univer-transition-colors
118
- `,{"univer-opacity-50":l,"univer-border-primary-600 univer-bg-primary-600":o||s,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!o&&!s}),children:[o&&(0,n.jsx)(S,{className:`
119
- univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-3
120
- -univer-translate-x-1/2 -univer-translate-y-1/2 univer-text-white
121
- `}),s&&!o&&(0,n.jsx)(`span`,{className:`
122
- univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-h-0.5 univer-w-2.5
123
- -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded univer-bg-white
124
- `})]})]}),(0,n.jsx)(`span`,{className:H(`univer-select-none`,d),children:r})]})}typeof window<`u`&&window.document&&window.document.createElement;function G(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function en(e,r){let i=t.createContext(r),a=e=>{let{children:r,...a}=e,o=t.useMemo(()=>a,Object.values(a));return(0,n.jsx)(i.Provider,{value:o,children:r})};a.displayName=e+`Provider`;function o(n){let a=t.useContext(i);if(a)return a;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${e}\``)}return[a,o]}function tn(e,r=[]){let i=[];function a(r,a){let o=t.createContext(a),s=i.length;i=[...i,a];let c=r=>{var i;let{scope:a,children:c,...l}=r,u=(a==null||(i=a[e])==null?void 0:i[s])||o,d=t.useMemo(()=>l,Object.values(l));return(0,n.jsx)(u.Provider,{value:d,children:c})};c.displayName=r+`Provider`;function l(n,i){var c;let l=(i==null||(c=i[e])==null?void 0:c[s])||o,u=t.useContext(l);if(u)return u;if(a!==void 0)return a;throw Error(`\`${n}\` must be used within \`${r}\``)}return[c,l]}let o=()=>{let n=i.map(e=>t.createContext(e));return function(r){let i=(r==null?void 0:r[e])||n;return t.useMemo(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])}};return o.scopeName=e,[a,nn(o,...r)]}function nn(...e){let n=e[0];if(e.length===1)return n;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=r.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return r.scopeName=n.scopeName,r}var rn,an=(rn=globalThis)!=null&&rn.document?t.useLayoutEffect:()=>{},on=t.useId||(()=>void 0),sn=0;function cn(e){let[n,r]=t.useState(on());return an(()=>{e||r(e=>e==null?String(sn++):e)},[e]),e||(n?`radix-${n}`:``)}var ln=t.useInsertionEffect||an;function un({prop:e,defaultProp:n,onChange:r=()=>{},caller:i}){let[a,o,s]=dn({defaultProp:n,onChange:r}),c=e!==void 0,l=c?e:a;{let n=t.useRef(e!==void 0);t.useEffect(()=>{let e=n.current;if(e!==c){let t=e?`controlled`:`uncontrolled`,n=c?`controlled`:`uncontrolled`;console.warn(`${i} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=c},[c,i])}return[l,t.useCallback(t=>{if(c){let r=fn(t)?t(e):t;if(r!==e){var n;(n=s.current)==null||n.call(s,r)}}else o(t)},[c,e,o,s])]}function dn({defaultProp:e,onChange:n}){let[r,i]=t.useState(e),a=t.useRef(r),o=t.useRef(n);return ln(()=>{o.current=n},[n]),t.useEffect(()=>{if(a.current!==r){var e;(e=o.current)==null||e.call(o,r),a.current=r}},[r,a]),[r,i,o]}function fn(e){return typeof e==`function`}function pn(e){let r=mn(e),i=t.forwardRef((e,i)=>{let{children:a,...o}=e,s=t.Children.toArray(a),c=s.find(gn);if(c){let e=c.props.children,a=s.map(n=>n===c?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return(0,n.jsx)(r,{...o,ref:i,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return(0,n.jsx)(r,{...o,ref:i,children:a})});return i.displayName=`${e}.Slot`,i}function mn(e){let n=t.forwardRef((e,n)=>{let{children:r,...i}=e;if(t.isValidElement(r)){let e=vn(r),a=_n(i,r.props);return r.type!==t.Fragment&&(a.ref=n?yt(n,e):e),t.cloneElement(r,a)}return t.Children.count(r)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var hn=Symbol(`radix.slottable`);function gn(e){return t.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===hn}function _n(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function vn(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var K=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,r)=>{let i=pn(`Primitive.${r}`),a=t.forwardRef((e,t)=>{let{asChild:a,...o}=e,s=a?i:r;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,n.jsx)(s,{...o,ref:t})});return a.displayName=`Primitive.${r}`,{...e,[r]:a}},{});function yn(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}function bn(e){let n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>{var t;return(t=n.current)==null?void 0:t.call(n,...e)},[])}function xn(e,n=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let r=bn(e);t.useEffect(()=>{let e=e=>{e.key===`Escape`&&r(e)};return n.addEventListener(`keydown`,e,{capture:!0}),()=>n.removeEventListener(`keydown`,e,{capture:!0})},[r,n])}var Sn=`DismissableLayer`,Cn=`dismissableLayer.update`,wn=`dismissableLayer.pointerDownOutside`,Tn=`dismissableLayer.focusOutside`,En,Dn=t.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),On=t.forwardRef((e,r)=>{var i,a;let{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=e,p=t.useContext(Dn),[m,h]=t.useState(null),g=(i=m==null?void 0:m.ownerDocument)==null?(a=globalThis)==null?void 0:a.document:i,[,_]=t.useState({}),v=U(r,e=>h(e)),y=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(b),S=m?y.indexOf(m):-1,C=p.layersWithOutsidePointerEventsDisabled.size>0,w=S>=x,T=jn(e=>{let t=e.target,n=[...p.branches].some(e=>e.contains(t));!w||n||(c==null||c(e),u==null||u(e),e.defaultPrevented||d==null||d())},g),E=Mn(e=>{let t=e.target;[...p.branches].some(e=>e.contains(t))||(l==null||l(e),u==null||u(e),e.defaultPrevented||d==null||d())},g);return xn(e=>{S===p.layers.size-1&&(s==null||s(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},g),t.useEffect(()=>{if(m)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(En=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),Nn(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=En)}},[m,g,o,p]),t.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),Nn())},[m,p]),t.useEffect(()=>{let e=()=>_({});return document.addEventListener(Cn,e),()=>document.removeEventListener(Cn,e)},[]),(0,n.jsx)(K.div,{...f,ref:v,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:G(e.onFocusCapture,E.onFocusCapture),onBlurCapture:G(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,T.onPointerDownCapture)})});On.displayName=Sn;var kn=`DismissableLayerBranch`,An=t.forwardRef((e,r)=>{let i=t.useContext(Dn),a=t.useRef(null),o=U(r,a);return t.useEffect(()=>{let e=a.current;if(e)return i.branches.add(e),()=>{i.branches.delete(e)}},[i.branches]),(0,n.jsx)(K.div,{...e,ref:o})});An.displayName=kn;function jn(e,n=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let r=bn(e),i=t.useRef(!1),a=t.useRef(()=>{});return t.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){Pn(wn,r,i,{discrete:!0})},i={originalEvent:e};e.pointerType===`touch`?(n.removeEventListener(`click`,a.current),a.current=t,n.addEventListener(`click`,a.current,{once:!0})):t()}else n.removeEventListener(`click`,a.current);i.current=!1},t=window.setTimeout(()=>{n.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(t),n.removeEventListener(`pointerdown`,e),n.removeEventListener(`click`,a.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}function Mn(e,n=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let r=bn(e),i=t.useRef(!1);return t.useEffect(()=>{let e=e=>{e.target&&!i.current&&Pn(Tn,r,{originalEvent:e},{discrete:!1})};return n.addEventListener(`focusin`,e),()=>n.removeEventListener(`focusin`,e)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Nn(){let e=new CustomEvent(Cn);document.dispatchEvent(e)}function Pn(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?yn(i,a):i.dispatchEvent(a)}var Fn=`focusScope.autoFocusOnMount`,In=`focusScope.autoFocusOnUnmount`,Ln={bubbles:!1,cancelable:!0},Rn=`FocusScope`,zn=t.forwardRef((e,r)=>{let{loop:i=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[l,u]=t.useState(null),d=bn(o),f=bn(s),p=t.useRef(null),m=U(r,e=>u(e)),h=t.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;t.useEffect(()=>{if(a){let e=function(e){if(h.paused||!l)return;let t=e.target;l.contains(t)?p.current=t:Kn(p.current,{select:!0})},t=function(e){if(h.paused||!l)return;let t=e.relatedTarget;t!==null&&(l.contains(t)||Kn(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Kn(l)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[a,l,h.paused]),t.useEffect(()=>{if(l){qn.add(h);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(Fn,Ln);l.addEventListener(Fn,d),l.dispatchEvent(t),t.defaultPrevented||(Bn(Xn(Hn(l)),{select:!0}),document.activeElement===e&&Kn(l))}return()=>{l.removeEventListener(Fn,d),setTimeout(()=>{let t=new CustomEvent(In,Ln);l.addEventListener(In,f),l.dispatchEvent(t),t.defaultPrevented||Kn(e==null?document.body:e,{select:!0}),l.removeEventListener(In,f),qn.remove(h)},0)}}},[l,d,f,h]);let g=t.useCallback(e=>{if(!i&&!a||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[r,a]=Vn(t);r&&a?!e.shiftKey&&n===a?(e.preventDefault(),i&&Kn(r,{select:!0})):e.shiftKey&&n===r&&(e.preventDefault(),i&&Kn(a,{select:!0})):n===t&&e.preventDefault()}},[i,a,h.paused]);return(0,n.jsx)(K.div,{tabIndex:-1,...c,ref:m,onKeyDown:g})});zn.displayName=Rn;function Bn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Kn(r,{select:t}),document.activeElement!==n)return}function Vn(e){let t=Hn(e);return[Un(t,e),Un(t.reverse(),e)]}function Hn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Un(e,t){for(let n of e)if(!Wn(n,{upTo:t}))return n}function Wn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Gn(e){return e instanceof HTMLInputElement&&`select`in e}function Kn(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gn(e)&&t&&e.select()}}var qn=Jn();function Jn(){let e=[];return{add(t){let n=e[0];t!==n&&(n==null||n.pause()),e=Yn(e,t),e.unshift(t)},remove(t){var n;e=Yn(e,t),(n=e[0])==null||n.resume()}}}function Yn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Xn(e){return e.filter(e=>e.tagName!==`A`)}var Zn=`Portal`,Qn=t.forwardRef((e,i)=>{var a;let{container:o,...s}=e,[c,l]=t.useState(!1);an(()=>l(!0),[]);let u=o||c&&((a=globalThis)==null||(a=a.document)==null?void 0:a.body);return u?r.default.createPortal((0,n.jsx)(K.div,{...s,ref:i}),u):null});Qn.displayName=Zn;function $n(e,n){return t.useReducer((e,t)=>{let r=n[e][t];return r==null?e:r},e)}var q=e=>{let{present:n,children:r}=e,i=er(n),a=typeof r==`function`?r({present:i.isPresent}):t.Children.only(r),o=U(i.ref,nr(a));return typeof r==`function`||i.isPresent?t.cloneElement(a,{ref:o}):null};q.displayName=`Presence`;function er(e){let[n,r]=t.useState(),i=t.useRef(null),a=t.useRef(e),o=t.useRef(`none`),[s,c]=$n(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return t.useEffect(()=>{let e=tr(i.current);o.current=s===`mounted`?e:`none`},[s]),an(()=>{let t=i.current,n=a.current;if(n!==e){let r=o.current,i=tr(t);e?c(`MOUNT`):i===`none`||(t==null?void 0:t.display)===`none`?c(`UNMOUNT`):c(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,c]),an(()=>{if(n){var e;let t,r=(e=n.ownerDocument.defaultView)==null?window:e,s=e=>{let o=tr(i.current).includes(CSS.escape(e.animationName));if(e.target===n&&o&&(c(`ANIMATION_END`),!a.current)){let e=n.style.animationFillMode;n.style.animationFillMode=`forwards`,t=r.setTimeout(()=>{n.style.animationFillMode===`forwards`&&(n.style.animationFillMode=e)})}},l=e=>{e.target===n&&(o.current=tr(i.current))};return n.addEventListener(`animationstart`,l),n.addEventListener(`animationcancel`,s),n.addEventListener(`animationend`,s),()=>{r.clearTimeout(t),n.removeEventListener(`animationstart`,l),n.removeEventListener(`animationcancel`,s),n.removeEventListener(`animationend`,s)}}else c(`ANIMATION_END`)},[n,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:t.useCallback(e=>{i.current=e?getComputedStyle(e):null,r(e)},[])}}function tr(e){return(e==null?void 0:e.animationName)||`none`}function nr(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var rr=0;function ir(){t.useEffect(()=>{var e,t;let n=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,(e=n[0])==null?ar():e),document.body.insertAdjacentElement(`beforeend`,(t=n[1])==null?ar():t),rr++,()=>{rr===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),rr--}},[])}function ar(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var or=function(){return or=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},or.apply(this,arguments)};function sr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function cr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var lr=`right-scroll-bar-position`,ur=`width-before-scroll-bar`,dr=`with-scroll-bars-hidden`,fr=`--removed-body-scroll-bar-size`;function pr(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function mr(e,n){var r=(0,t.useState)(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=n,r.facade}var hr=typeof window<`u`?t.useLayoutEffect:t.useEffect,gr=new WeakMap;function _r(e,t){var n=mr(t||null,function(t){return e.forEach(function(e){return pr(e,t)})});return hr(function(){var t=gr.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||pr(e,null)}),i.forEach(function(e){r.has(e)||pr(e,a)})}gr.set(n,e)},[e]),n}function vr(e){return e}function yr(e,t){t===void 0&&(t=vr);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function br(e){e===void 0&&(e={});var t=yr(null);return t.options=or({async:!0,ssr:!1},e),t}var xr=function(e){var n=e.sideCar,r=sr(e,[`sideCar`]);if(!n)throw Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw Error(`Sidecar medium not found`);return t.createElement(i,or({},r))};xr.isSideCarExport=!0;function Sr(e,t){return e.useMedium(t),xr}var Cr=br(),wr=function(){},Tr=t.forwardRef(function(e,n){var r=t.useRef(null),i=t.useState({onScrollCapture:wr,onWheelCapture:wr,onTouchMoveCapture:wr}),a=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=sr(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=_r([r,n]),w=or(or({},x),a);return t.createElement(t.Fragment,null,d&&t.createElement(S,{sideCar:Cr,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:r,gapMode:b}),s?t.cloneElement(t.Children.only(c),or(or({},w),{ref:C})):t.createElement(y,or({},w,{className:l,ref:C}),c))});Tr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tr.classNames={fullWidth:ur,zeroRight:lr};var Er,Dr=function(){if(Er)return Er;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Or(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Dr();return t&&e.setAttribute(`nonce`,t),e}function kr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ar(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var jr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Or())&&(kr(t,n),Ar(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mr=function(){var e=jr();return function(n,r){t.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},Nr=function(){var e=Mr();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Pr={left:0,top:0,right:0,gap:0},Fr=function(e){return parseInt(e||``,10)||0},Ir=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Fr(n),Fr(r),Fr(i)]},Lr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Pr;var t=Ir(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Rr=Nr(),zr=`data-scroll-locked`,Br=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
44
+ `},size:{small:`univer-h-6 univer-rounded-md univer-px-1.5 univer-text-xs`,middle:`univer-h-8 univer-rounded-lg univer-px-2 univer-text-sm`,large:`univer-h-10 univer-rounded-lg univer-px-3 univer-text-sm`}},defaultVariants:{variant:`default`,size:`middle`}}),Mt=(0,t.forwardRef)(({className:e,variant:t,size:r,asChild:i=!1,...a},o)=>(0,n.jsx)(i?Tt:`button`,{className:H(jt({variant:t,size:r,className:e})),ref:o,"data-u-comp":`button`,...a}));Mt.displayName=`Button`;let Nt=({className:e,orientation:r=`horizontal`,children:i})=>{let a=t.Children.count(i),o=r===`horizontal`,s=r===`vertical`;return(0,n.jsx)(`div`,{className:H(`univer-grid`,{"univer-grid-flow-row":s,"univer-w-fit":s},e),children:t.Children.map(i,(e,n)=>{let r=n===0,i=n===a-1;return(0,t.cloneElement)(e,{className:H({"!univer-rounded-l-none":o&&!r,"!univer-rounded-r-none":o&&!i,"!univer-border-l-0":o&&!r,"!univer-rounded-t-none":s&&!r,"!univer-rounded-b-none":s&&!i,"!univer-border-t-0":s&&!r},e.props.className)})})})};function Pt(){return typeof window<`u`&&typeof document<`u`}let Ft=(0,t.createContext)({mountContainer:Pt()?document.body:null});function It(e){let{children:r,locale:i,mountContainer:a}=e,o=(0,t.useMemo)(()=>({locale:i,mountContainer:a}),[i,a]);return(0,n.jsx)(Ft.Provider,{value:o,children:r})}var Lt=p(d(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,E,w),e.$i=!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))}))());let Rt=`univer-scrollbar-thin univer-scrollbar-track-gray-50 univer-scrollbar-thumb-gray-300 dark:!univer-scrollbar-track-gray-900 dark:!univer-scrollbar-thumb-gray-700`,zt=`univer-border-gray-200 dark:!univer-border-gray-600 univer-border-solid`,W=H(zt,`univer-border`),Bt=H(zt,`univer-border-l univer-border-b univer-border-t-0 univer-border-r-0`),Vt=H(zt,`univer-border-l univer-border-b-0 univer-border-t-0 univer-border-r-0`),Ht=H(zt,`univer-border-l-0 univer-border-b-0 univer-border-t univer-border-r-0`),Ut=H(zt,`univer-border-l-0 univer-border-b univer-border-t-0 univer-border-r-0`),Wt=H(zt,`univer-border-l-0 univer-border-b-0 univer-border-t-0 univer-border-r`);function Gt(e){let{className:t,value:r,onValueChange:i}=e;function a(e){let[t,n,a]=e.target.value.split(`:`).map(Number),o=new Date(r==null?Date.now():r);o.setHours(t,n,a,0),i==null||i(o)}return(0,n.jsxs)(`div`,{"data-u-comp":`time-input`,className:`univer-relative univer-mx-auto univer-mt-1 univer-w-fit`,children:[(0,n.jsx)(w,{className:`univer-absolute univer-left-2 univer-top-1/2 -univer-translate-y-1/2 univer-text-gray-600 dark:!univer-text-gray-400`}),(0,n.jsx)(`input`,{className:H(`univer-block univer-h-7 univer-w-fit univer-appearance-none univer-rounded-md univer-bg-transparent univer-pl-6 univer-pr-2 univer-text-center univer-text-gray-800 univer-shadow univer-outline-none univer-transition-all univer-duration-200 focus:univer-border-primary-600 dark:!univer-text-white dark:focus:!univer-border-primary-500 [&::-webkit-calendar-picker-indicator]:univer-hidden [&::-webkit-calendar-picker-indicator]:univer-appearance-none`,W,t),type:`time`,step:`1`,value:(0,Lt.default)(r).format(`HH:mm:ss`),onChange:a})]})}function Kt(e,t){return new Date(e,t+1,0).getDate()}function qt(e,t){return new Date(e,t,1).getDay()}function Jt(e){let{className:t,...r}=e;return(0,n.jsx)(`button`,{className:H(`univer-size-7 univer-rounded-md univer-border-none univer-bg-transparent univer-p-1 univer-transition-all hover:univer-bg-gray-200 dark:hover:!univer-bg-gray-600`,t),type:`button`,...r})}function Yt(e){let{className:r,max:i,min:a,showTime:o=!1,value:s,onValueChange:c}=e,{locale:l}=(0,t.useContext)(Ft),{year:u,weekDays:d,months:f}=l==null?void 0:l.Calendar,p=new Date,[m,h]=(0,t.useState)((s==null?p:s).getFullYear()),[g,_]=(0,t.useState)((s==null?p:s).getMonth());function v(){_(e=>e===0?(h(e=>e-1),11):e-1)}function y(){_(e=>e===11?(h(e=>e+1),0):e+1)}let b=Kt(m,g),x=qt(m,g),S=(0,t.useMemo)(()=>{let e=[];for(let t=0;t<x;t++)e.push(null);for(let t=1;t<=b;t++)e.push(t);return e},[b,x]);function C(e){return e&&m===(s==null?void 0:s.getFullYear())&&g===(s==null?void 0:s.getMonth())&&e===(s==null?void 0:s.getDate())}function w(e){return e&&m===p.getFullYear()&&g===p.getMonth()&&e===p.getDate()}function T(e){var t,n,r;if(!e)return!1;let o=(t=s==null?void 0:s.getHours())==null?p.getHours():t,c=(n=s==null?void 0:s.getMinutes())==null?p.getMinutes():n,l=(r=s==null?void 0:s.getSeconds())==null?p.getSeconds():r,u=new Date(m,g,e,o,c,l);return!!(a&&u<a||i&&u>i)}function E(e){var t,n,r;if(T(e))return;let i=(t=s==null?void 0:s.getHours())==null?p.getHours():t,a=(n=s==null?void 0:s.getMinutes())==null?p.getMinutes():n,o=(r=s==null?void 0:s.getSeconds())==null?p.getSeconds():r;c==null||c(new Date(m,g,e,i,a,o))}function D(e){var t;let n=e.getHours(),r=e.getMinutes(),i=e.getSeconds(),a=new Date(m,g,(t=s==null?void 0:s.getDate())==null?p.getDate():t,n,r,i);c==null||c(a)}return(0,n.jsxs)(`div`,{"data-u-comp":`calendar`,className:H(`univer-mx-auto univer-max-w-xs univer-select-none univer-rounded univer-bg-white univer-text-gray-900 dark:!univer-bg-gray-900 dark:!univer-text-white`,r),children:[(0,n.jsxs)(`nav`,{className:`univer-mb-4 univer-flex univer-items-center univer-justify-between`,children:[(0,n.jsx)(Jt,{className:`univer-text-lg univer-text-gray-500 dark:!univer-text-gray-200`,"aria-label":`Previous Month`,onClick:v,children:(0,n.jsx)(re,{className:`univer-rotate-180`})}),(0,n.jsxs)(`span`,{className:`univer-flex univer-gap-0.5 univer-text-sm univer-font-medium`,children:[(0,n.jsx)(`span`,{children:m}),(0,n.jsx)(`span`,{children:u}),(0,n.jsx)(`span`,{children:f[g]})]}),(0,n.jsx)(Jt,{className:`univer-text-lg univer-text-gray-500 dark:!univer-text-gray-200`,"aria-label":`Next Month`,onClick:y,children:(0,n.jsx)(re,{})})]}),(0,n.jsx)(`div`,{className:`univer-mb-1 univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center univer-text-sm univer-text-gray-500 dark:!univer-text-gray-200`,children:d.map(e=>(0,n.jsx)(`div`,{children:e},e))}),(0,n.jsx)(`div`,{className:`univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center`,children:S.map((e,t)=>e?(0,n.jsx)(Jt,{className:H({"!univer-bg-primary-600 univer-font-bold univer-text-white":!w(e)&&C(e),"dark:!univer-text-white":!w(e)&&!C(e),"!univer-bg-primary-600 univer-text-white":w(e)&&C(e),"univer-font-semibold univer-text-primary-600 dark:!univer-text-primary-500":w(e)&&!C(e),"univer-cursor-not-allowed univer-opacity-40":T(e),"univer-hover:bg-primary-100 univer-cursor-pointer univer-text-gray-800":!C(e)&&!T(e)}),onClick:()=>E(e),disabled:T(e),children:e},t):(0,n.jsx)(`div`,{},t))}),o&&(0,n.jsx)(Gt,{value:s,onValueChange:D})]})}function Xt({emptyText:e}){return(0,n.jsx)(`section`,{className:`univer-h-8 univer-px-2 univer-pr-32 univer-text-sm/8 univer-text-gray-600 dark:!univer-text-gray-200`,children:e})}function Zt(e){let{value:r,options:i=[],onChange:a,contentClassName:o,wrapperClassName:s}=e,{locale:c}=(0,t.useContext)(Ft),l=(0,t.useMemo)(()=>{let e=[i];return r.forEach((t,n)=>{let r=e[n].find(e=>e.value===t);r!=null&&r.children&&e.push(r.children)}),e},[r]);function u(e,t){if(t===r[e])return;if(r[e+1]){let n=r.slice(0,e+1);n[e]=t,a(n);return}let n=[...r];n[e]=t,a(n)}return(0,n.jsxs)(`section`,{"data-u-comp":`cascader-list`,className:H(`univer-overflow-auto-y univer-grid univer-h-full univer-max-h-80 univer-grid-flow-col univer-rounded univer-py-2 univer-text-gray-900 dark:!univer-text-white [&>ul:not(:last-child)]:univer-border-0 [&>ul:not(:last-child)]:univer-border-r [&>ul:not(:last-child)]:univer-border-solid [&>ul:not(:last-child)]:univer-border-r-gray-200`,W,Rt,s),children:[l.map((e,t)=>e.length?(0,n.jsx)(`ul`,{className:H(`univer-m-0 univer-h-full univer-max-h-full univer-list-none univer-overflow-auto univer-px-2`,Rt,o),children:e.map(e=>(0,n.jsx)(`li`,{children:(0,n.jsxs)(`a`,{className:H(`univer-relative univer-block univer-h-8 univer-cursor-pointer univer-rounded univer-text-sm/8`,{"univer-px-7":t>0,"univer-px-1.5":t===0,"univer-bg-gray-200 dark:!univer-bg-gray-600":e.value===r[t]}),onClick:()=>u(t,e.value),children:[t>0&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-2 univer-flex univer-h-full univer-items-center`,children:e.value===r[t]&&(0,n.jsx)(S,{className:`univer-text-primary-600`})}),(0,n.jsx)(`span`,{children:e.label})]})},e.value))},t):(0,n.jsx)(Xt,{emptyText:c==null?void 0:c.CascaderList.empty},t)),r.length<=0&&(0,n.jsx)(Xt,{emptyText:c==null?void 0:c.CascaderList.empty})]})}function Qt(e){let{children:r,className:i,style:a,value:o,disabled:s,direction:c=`horizontal`,onChange:l}=e,u=e=>{o.includes(e)?l(o.filter(t=>t!==e)):l([...o,e])};return(0,n.jsx)(`div`,{className:H(`univer-flex univer-gap-2`,{"univer-flex-col":c===`vertical`},i),style:a,children:t.Children.map(r,(e,n)=>(0,t.isValidElement)(e)?(0,t.cloneElement)(e,{key:n,children:e.props.children,checked:e.props.value?o.includes(e.props.value):!1,disabled:s==null?e.props.disabled:s,onChange:u}):e)})}function $t(e){let{children:r,className:i,style:a,checked:o=!1,indeterminate:s=!1,value:c,disabled:l=!1,onChange:u,contentClassName:d}=e,f=(0,t.useRef)(null);function p(e){if(e.stopPropagation(),!(!u||l))if(c!==void 0)u==null||u(c);else{var t,n;let e=(t=f==null||(n=f.current)==null?void 0:n.checked)==null?!1:t;u==null||u(e)}}return(0,n.jsxs)(`label`,{"data-u-comp":`checkbox`,className:H(`univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm`,{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!l,"univer-text-gray-400":l},i),style:a,children:[(0,n.jsxs)(`span`,{className:`univer-relative univer-block`,children:[(0,n.jsx)(`input`,{ref:f,className:`univer-absolute univer-size-0 univer-opacity-0`,type:`checkbox`,checked:o,disabled:l,onChange:p}),(0,n.jsxs)(`span`,{className:H(`univer-relative univer-box-border univer-flex univer-size-4 univer-items-center univer-justify-center univer-overflow-hidden univer-rounded univer-border univer-border-solid univer-transition-colors`,{"univer-opacity-50":l,"univer-border-primary-600 univer-bg-primary-600":o||s,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!o&&!s}),children:[o&&(0,n.jsx)(S,{className:`univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-3 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-text-white`}),s&&!o&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-h-0.5 univer-w-2.5 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded univer-bg-white`})]})]}),(0,n.jsx)(`span`,{className:H(`univer-select-none`,d),children:r})]})}typeof window<`u`&&window.document&&window.document.createElement;function G(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function en(e,r){let i=t.createContext(r),a=e=>{let{children:r,...a}=e,o=t.useMemo(()=>a,Object.values(a));return(0,n.jsx)(i.Provider,{value:o,children:r})};a.displayName=e+`Provider`;function o(n){let a=t.useContext(i);if(a)return a;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${e}\``)}return[a,o]}function tn(e,r=[]){let i=[];function a(r,a){let o=t.createContext(a),s=i.length;i=[...i,a];let c=r=>{var i;let{scope:a,children:c,...l}=r,u=(a==null||(i=a[e])==null?void 0:i[s])||o,d=t.useMemo(()=>l,Object.values(l));return(0,n.jsx)(u.Provider,{value:d,children:c})};c.displayName=r+`Provider`;function l(n,i){var c;let l=(i==null||(c=i[e])==null?void 0:c[s])||o,u=t.useContext(l);if(u)return u;if(a!==void 0)return a;throw Error(`\`${n}\` must be used within \`${r}\``)}return[c,l]}let o=()=>{let n=i.map(e=>t.createContext(e));return function(r){let i=(r==null?void 0:r[e])||n;return t.useMemo(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])}};return o.scopeName=e,[a,nn(o,...r)]}function nn(...e){let n=e[0];if(e.length===1)return n;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=r.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return r.scopeName=n.scopeName,r}var rn,an=(rn=globalThis)!=null&&rn.document?t.useLayoutEffect:()=>{},on=t.useId||(()=>void 0),sn=0;function cn(e){let[n,r]=t.useState(on());return an(()=>{e||r(e=>e==null?String(sn++):e)},[e]),e||(n?`radix-${n}`:``)}var ln=t.useInsertionEffect||an;function un({prop:e,defaultProp:n,onChange:r=()=>{},caller:i}){let[a,o,s]=dn({defaultProp:n,onChange:r}),c=e!==void 0,l=c?e:a;{let n=t.useRef(e!==void 0);t.useEffect(()=>{let e=n.current;if(e!==c){let t=e?`controlled`:`uncontrolled`,n=c?`controlled`:`uncontrolled`;console.warn(`${i} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=c},[c,i])}return[l,t.useCallback(t=>{if(c){let r=fn(t)?t(e):t;if(r!==e){var n;(n=s.current)==null||n.call(s,r)}}else o(t)},[c,e,o,s])]}function dn({defaultProp:e,onChange:n}){let[r,i]=t.useState(e),a=t.useRef(r),o=t.useRef(n);return ln(()=>{o.current=n},[n]),t.useEffect(()=>{if(a.current!==r){var e;(e=o.current)==null||e.call(o,r),a.current=r}},[r,a]),[r,i,o]}function fn(e){return typeof e==`function`}function pn(e){let r=mn(e),i=t.forwardRef((e,i)=>{let{children:a,...o}=e,s=t.Children.toArray(a),c=s.find(gn);if(c){let e=c.props.children,a=s.map(n=>n===c?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return(0,n.jsx)(r,{...o,ref:i,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return(0,n.jsx)(r,{...o,ref:i,children:a})});return i.displayName=`${e}.Slot`,i}function mn(e){let n=t.forwardRef((e,n)=>{let{children:r,...i}=e;if(t.isValidElement(r)){let e=vn(r),a=_n(i,r.props);return r.type!==t.Fragment&&(a.ref=n?yt(n,e):e),t.cloneElement(r,a)}return t.Children.count(r)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var hn=Symbol(`radix.slottable`);function gn(e){return t.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===hn}function _n(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function vn(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var K=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,r)=>{let i=pn(`Primitive.${r}`),a=t.forwardRef((e,t)=>{let{asChild:a,...o}=e,s=a?i:r;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,n.jsx)(s,{...o,ref:t})});return a.displayName=`Primitive.${r}`,{...e,[r]:a}},{});function yn(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}function bn(e){let n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>{var t;return(t=n.current)==null?void 0:t.call(n,...e)},[])}function xn(e,n=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let r=bn(e);t.useEffect(()=>{let e=e=>{e.key===`Escape`&&r(e)};return n.addEventListener(`keydown`,e,{capture:!0}),()=>n.removeEventListener(`keydown`,e,{capture:!0})},[r,n])}var Sn=`DismissableLayer`,Cn=`dismissableLayer.update`,wn=`dismissableLayer.pointerDownOutside`,Tn=`dismissableLayer.focusOutside`,En,Dn=t.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),On=t.forwardRef((e,r)=>{var i,a;let{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=e,p=t.useContext(Dn),[m,h]=t.useState(null),g=(i=m==null?void 0:m.ownerDocument)==null?(a=globalThis)==null?void 0:a.document:i,[,_]=t.useState({}),v=U(r,e=>h(e)),y=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(b),S=m?y.indexOf(m):-1,C=p.layersWithOutsidePointerEventsDisabled.size>0,w=S>=x,T=jn(e=>{let t=e.target,n=[...p.branches].some(e=>e.contains(t));!w||n||(c==null||c(e),u==null||u(e),e.defaultPrevented||d==null||d())},g),E=Mn(e=>{let t=e.target;[...p.branches].some(e=>e.contains(t))||(l==null||l(e),u==null||u(e),e.defaultPrevented||d==null||d())},g);return xn(e=>{S===p.layers.size-1&&(s==null||s(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},g),t.useEffect(()=>{if(m)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(En=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),Nn(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=En)}},[m,g,o,p]),t.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),Nn())},[m,p]),t.useEffect(()=>{let e=()=>_({});return document.addEventListener(Cn,e),()=>document.removeEventListener(Cn,e)},[]),(0,n.jsx)(K.div,{...f,ref:v,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:G(e.onFocusCapture,E.onFocusCapture),onBlurCapture:G(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,T.onPointerDownCapture)})});On.displayName=Sn;var kn=`DismissableLayerBranch`,An=t.forwardRef((e,r)=>{let i=t.useContext(Dn),a=t.useRef(null),o=U(r,a);return t.useEffect(()=>{let e=a.current;if(e)return i.branches.add(e),()=>{i.branches.delete(e)}},[i.branches]),(0,n.jsx)(K.div,{...e,ref:o})});An.displayName=kn;function jn(e,n=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let r=bn(e),i=t.useRef(!1),a=t.useRef(()=>{});return t.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){Pn(wn,r,i,{discrete:!0})},i={originalEvent:e};e.pointerType===`touch`?(n.removeEventListener(`click`,a.current),a.current=t,n.addEventListener(`click`,a.current,{once:!0})):t()}else n.removeEventListener(`click`,a.current);i.current=!1},t=window.setTimeout(()=>{n.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(t),n.removeEventListener(`pointerdown`,e),n.removeEventListener(`click`,a.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}function Mn(e,n=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let r=bn(e),i=t.useRef(!1);return t.useEffect(()=>{let e=e=>{e.target&&!i.current&&Pn(Tn,r,{originalEvent:e},{discrete:!1})};return n.addEventListener(`focusin`,e),()=>n.removeEventListener(`focusin`,e)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Nn(){let e=new CustomEvent(Cn);document.dispatchEvent(e)}function Pn(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?yn(i,a):i.dispatchEvent(a)}var Fn=`focusScope.autoFocusOnMount`,In=`focusScope.autoFocusOnUnmount`,Ln={bubbles:!1,cancelable:!0},Rn=`FocusScope`,zn=t.forwardRef((e,r)=>{let{loop:i=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[l,u]=t.useState(null),d=bn(o),f=bn(s),p=t.useRef(null),m=U(r,e=>u(e)),h=t.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;t.useEffect(()=>{if(a){let e=function(e){if(h.paused||!l)return;let t=e.target;l.contains(t)?p.current=t:Kn(p.current,{select:!0})},t=function(e){if(h.paused||!l)return;let t=e.relatedTarget;t!==null&&(l.contains(t)||Kn(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Kn(l)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[a,l,h.paused]),t.useEffect(()=>{if(l){qn.add(h);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(Fn,Ln);l.addEventListener(Fn,d),l.dispatchEvent(t),t.defaultPrevented||(Bn(Xn(Hn(l)),{select:!0}),document.activeElement===e&&Kn(l))}return()=>{l.removeEventListener(Fn,d),setTimeout(()=>{let t=new CustomEvent(In,Ln);l.addEventListener(In,f),l.dispatchEvent(t),t.defaultPrevented||Kn(e==null?document.body:e,{select:!0}),l.removeEventListener(In,f),qn.remove(h)},0)}}},[l,d,f,h]);let g=t.useCallback(e=>{if(!i&&!a||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[r,a]=Vn(t);r&&a?!e.shiftKey&&n===a?(e.preventDefault(),i&&Kn(r,{select:!0})):e.shiftKey&&n===r&&(e.preventDefault(),i&&Kn(a,{select:!0})):n===t&&e.preventDefault()}},[i,a,h.paused]);return(0,n.jsx)(K.div,{tabIndex:-1,...c,ref:m,onKeyDown:g})});zn.displayName=Rn;function Bn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Kn(r,{select:t}),document.activeElement!==n)return}function Vn(e){let t=Hn(e);return[Un(t,e),Un(t.reverse(),e)]}function Hn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Un(e,t){for(let n of e)if(!Wn(n,{upTo:t}))return n}function Wn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Gn(e){return e instanceof HTMLInputElement&&`select`in e}function Kn(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Gn(e)&&t&&e.select()}}var qn=Jn();function Jn(){let e=[];return{add(t){let n=e[0];t!==n&&(n==null||n.pause()),e=Yn(e,t),e.unshift(t)},remove(t){var n;e=Yn(e,t),(n=e[0])==null||n.resume()}}}function Yn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Xn(e){return e.filter(e=>e.tagName!==`A`)}var Zn=`Portal`,Qn=t.forwardRef((e,i)=>{var a;let{container:o,...s}=e,[c,l]=t.useState(!1);an(()=>l(!0),[]);let u=o||c&&((a=globalThis)==null||(a=a.document)==null?void 0:a.body);return u?r.default.createPortal((0,n.jsx)(K.div,{...s,ref:i}),u):null});Qn.displayName=Zn;function $n(e,n){return t.useReducer((e,t)=>{let r=n[e][t];return r==null?e:r},e)}var q=e=>{let{present:n,children:r}=e,i=er(n),a=typeof r==`function`?r({present:i.isPresent}):t.Children.only(r),o=U(i.ref,nr(a));return typeof r==`function`||i.isPresent?t.cloneElement(a,{ref:o}):null};q.displayName=`Presence`;function er(e){let[n,r]=t.useState(),i=t.useRef(null),a=t.useRef(e),o=t.useRef(`none`),[s,c]=$n(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return t.useEffect(()=>{let e=tr(i.current);o.current=s===`mounted`?e:`none`},[s]),an(()=>{let t=i.current,n=a.current;if(n!==e){let r=o.current,i=tr(t);e?c(`MOUNT`):i===`none`||(t==null?void 0:t.display)===`none`?c(`UNMOUNT`):c(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,c]),an(()=>{if(n){var e;let t,r=(e=n.ownerDocument.defaultView)==null?window:e,s=e=>{let o=tr(i.current).includes(CSS.escape(e.animationName));if(e.target===n&&o&&(c(`ANIMATION_END`),!a.current)){let e=n.style.animationFillMode;n.style.animationFillMode=`forwards`,t=r.setTimeout(()=>{n.style.animationFillMode===`forwards`&&(n.style.animationFillMode=e)})}},l=e=>{e.target===n&&(o.current=tr(i.current))};return n.addEventListener(`animationstart`,l),n.addEventListener(`animationcancel`,s),n.addEventListener(`animationend`,s),()=>{r.clearTimeout(t),n.removeEventListener(`animationstart`,l),n.removeEventListener(`animationcancel`,s),n.removeEventListener(`animationend`,s)}}else c(`ANIMATION_END`)},[n,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:t.useCallback(e=>{i.current=e?getComputedStyle(e):null,r(e)},[])}}function tr(e){return(e==null?void 0:e.animationName)||`none`}function nr(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var rr=0;function ir(){t.useEffect(()=>{var e,t;let n=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,(e=n[0])==null?ar():e),document.body.insertAdjacentElement(`beforeend`,(t=n[1])==null?ar():t),rr++,()=>{rr===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),rr--}},[])}function ar(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var or=function(){return or=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},or.apply(this,arguments)};function sr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function cr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var lr=`right-scroll-bar-position`,ur=`width-before-scroll-bar`,dr=`with-scroll-bars-hidden`,fr=`--removed-body-scroll-bar-size`;function pr(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function mr(e,n){var r=(0,t.useState)(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=n,r.facade}var hr=typeof window<`u`?t.useLayoutEffect:t.useEffect,gr=new WeakMap;function _r(e,t){var n=mr(t||null,function(t){return e.forEach(function(e){return pr(e,t)})});return hr(function(){var t=gr.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||pr(e,null)}),i.forEach(function(e){r.has(e)||pr(e,a)})}gr.set(n,e)},[e]),n}function vr(e){return e}function yr(e,t){t===void 0&&(t=vr);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function br(e){e===void 0&&(e={});var t=yr(null);return t.options=or({async:!0,ssr:!1},e),t}var xr=function(e){var n=e.sideCar,r=sr(e,[`sideCar`]);if(!n)throw Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw Error(`Sidecar medium not found`);return t.createElement(i,or({},r))};xr.isSideCarExport=!0;function Sr(e,t){return e.useMedium(t),xr}var Cr=br(),wr=function(){},Tr=t.forwardRef(function(e,n){var r=t.useRef(null),i=t.useState({onScrollCapture:wr,onWheelCapture:wr,onTouchMoveCapture:wr}),a=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=sr(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=_r([r,n]),w=or(or({},x),a);return t.createElement(t.Fragment,null,d&&t.createElement(S,{sideCar:Cr,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:r,gapMode:b}),s?t.cloneElement(t.Children.only(c),or(or({},w),{ref:C})):t.createElement(y,or({},w,{className:l,ref:C}),c))});Tr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tr.classNames={fullWidth:ur,zeroRight:lr};var Er,Dr=function(){if(Er)return Er;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Or(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Dr();return t&&e.setAttribute(`nonce`,t),e}function kr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ar(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var jr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Or())&&(kr(t,n),Ar(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mr=function(){var e=jr();return function(n,r){t.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},Nr=function(){var e=Mr();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Pr={left:0,top:0,right:0,gap:0},Fr=function(e){return parseInt(e||``,10)||0},Ir=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Fr(n),Fr(r),Fr(i)]},Lr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Pr;var t=Ir(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Rr=Nr(),zr=`data-scroll-locked`,Br=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
125
45
  .${dr} {
126
46
  overflow: hidden ${r};
127
47
  padding-right: ${s}px ${r};
@@ -165,237 +85,26 @@
165
85
 
166
86
  If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
167
87
 
168
- For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return t.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},na=`DialogDescriptionWarning`,ra=({contentRef:e,descriptionId:n})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ea(na).contentName}}.`;return t.useEffect(()=>{var t;let i=(t=e.current)==null?void 0:t.getAttribute(`aria-describedby`);n&&i&&(document.getElementById(n)||console.warn(r))},[r,e,n]),null},ia=ki,aa=Fi,oa=Li,sa=Vi,ca=Ki,la=Ji,ua=Xi;let da=ia,fa=aa,pa=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(oa,{ref:r,className:H(`
169
- data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0
170
- data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0
171
- univer-fixed univer-inset-0 univer-z-[1080] univer-bg-[rgba(0,0,0,0.8)]
172
- `,e),...t}));pa.displayName=oa.displayName;let ma=(0,t.forwardRef)(({className:e,children:t,closable:r=!0,onClickClose:i,...a},o)=>(0,n.jsxs)(fa,{children:[(0,n.jsx)(pa,{}),(0,n.jsxs)(sa,{ref:o,className:H(`
173
- data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0
174
- data-[state=open]:univer-zoom-in-95 data-[state=open]:univer-slide-in-from-left-1/2
175
- data-[state=open]:univer-slide-in-from-top-[48%]
176
- data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0
177
- data-[state=closed]:univer-zoom-out-95 data-[state=closed]:univer-slide-out-to-left-1/2
178
- data-[state=closed]:univer-slide-out-to-top-[48%]
179
- univer-fixed univer-left-1/2 univer-top-1/2 univer-z-[1080] univer-box-border univer-grid
180
- univer-w-full univer-max-w-lg -univer-translate-x-1/2 -univer-translate-y-1/2 univer-gap-4
181
- univer-bg-white univer-p-4 univer-text-gray-500 univer-shadow-md univer-duration-200
182
- sm:!univer-rounded-lg
183
- dark:!univer-bg-gray-700 dark:!univer-text-gray-400
184
- `,W,e),...a,children:[t,r&&(0,n.jsxs)(ua,{className:`
185
- univer-absolute univer-right-4 univer-top-4 univer-size-6 univer-cursor-pointer univer-rounded-sm
186
- univer-border-none univer-bg-transparent univer-p-0 univer-transition-opacity
187
- hover:univer-opacity-100
188
- disabled:univer-pointer-events-none
189
- `,onClick:i,children:[(0,n.jsx)(E,{className:`univer-size-4 univer-text-gray-400`}),(0,n.jsx)(`span`,{className:`univer-sr-only`,children:`Close`})]})]})]}));ma.displayName=sa.displayName;let ha=({className:e,...t})=>(0,n.jsx)(`div`,{className:H(`
190
- univer-flex univer-flex-col univer-space-y-1.5 univer-text-center
191
- sm:!univer-text-left
192
- `,e),...t});ha.displayName=`DialogHeader`;let ga=({className:e,...t})=>(0,n.jsx)(`div`,{className:H(`
193
- univer-flex univer-flex-col-reverse
194
- sm:!univer-flex-row sm:!univer-justify-end sm:!univer-space-x-2
195
- `,e),...t});ga.displayName=`DialogFooter`;let _a=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(ca,{ref:r,className:H(`
196
- univer-my-0 univer-text-lg univer-font-semibold univer-leading-none univer-tracking-tight
197
- univer-text-gray-900
198
- dark:!univer-text-white
199
- `,e),...t}));_a.displayName=ca.displayName;let va=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(la,{ref:r,className:H(`univer-text-sm univer-text-gray-500`,e),...t}));va.displayName=la.displayName;function ya(e={}){let n=(0,t.useCallback)(()=>{let{innerWidth:e,innerHeight:t}=window;return{x:Math.max(0,(e-0)/2),y:Math.max(0,(t-0)/2)}},[]),{defaultPosition:r=n(),enabled:i=!1}=e,[a,o]=(0,t.useState)(r),[s,c]=(0,t.useState)(!1),l=(0,t.useRef)(null),u=(0,t.useRef)({x:0,y:0}),d=(0,t.useRef)({x:0,y:0}),f=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(!l.current||f.current||e.defaultPosition)return;let{width:t,height:n}=l.current.getBoundingClientRect(),{innerWidth:r,innerHeight:i}=window,a=Math.max(0,(r-t)/2),s=Math.max(0,(i-n)/2);o({x:a,y:s}),u.current={x:a,y:s},f.current=!0},[e.defaultPosition]);let p=(0,t.useCallback)((e,t)=>{if(!l.current)return{x:e,y:t};let n=l.current.getBoundingClientRect(),{clientWidth:r,clientHeight:i}=document.documentElement,a=u.current.x+(e-d.current.x),o=u.current.y+(t-d.current.y);return a<0&&(a=0),o<0&&(o=0),a+n.width>r&&(a=r-n.width),o+n.height>i&&(o=i-n.height),{x:a,y:o}},[]),m=(0,t.useCallback)(e=>{i&&(e.preventDefault(),e.stopPropagation(),u.current={...a},d.current={x:e.clientX,y:e.clientY},c(!0),document.body.style.userSelect=`none`)},[i,a]),h=(0,t.useCallback)(e=>{s&&(e.preventDefault(),e.stopPropagation(),o(p(e.clientX,e.clientY)))},[s,p]),g=(0,t.useCallback)(()=>{c(!1),document.body.style.userSelect=``},[]);return(0,t.useEffect)(()=>{if(i)return document.addEventListener(`mousemove`,h),document.addEventListener(`mouseup`,g),()=>{document.removeEventListener(`mousemove`,h),document.removeEventListener(`mouseup`,g)}},[i,h,g]),{position:a,isDragging:s,elementRef:l,setElementRef:t=>{if(l.current=t,t&&!f.current&&!e.defaultPosition){let{width:e,height:n}=t.getBoundingClientRect(),{innerWidth:r,innerHeight:i}=window,a=Math.max(0,(r-e)/2),s=Math.max(0,(i-n)/2);o({x:a,y:s}),u.current={x:a,y:s},f.current=!0}},handleMouseDown:m}}function ba(e){var r,i,a,o;let{className:s,children:c,style:l,open:u=!1,title:d,width:f,draggable:p=!1,defaultPosition:m,footer:h,mask:g=!0,keyboard:_=!0,closable:v=!0,maskClosable:y=!0,showOk:b,showCancel:x,onOpenChange:S,onClose:C,onOk:w,onCancel:T}=e,{locale:E}=(0,t.useContext)(Ft),{position:D,isDragging:O,setElementRef:k,handleMouseDown:A}=ya({defaultPosition:m,enabled:p}),j=h==null?b||x?(0,n.jsxs)(`div`,{className:`univer-flex univer-justify-end univer-gap-2`,children:[x&&(0,n.jsx)(Mt,{onClick:T,children:(r=E==null||(i=E.Confirm)==null?void 0:i.cancel)==null?`Cancel`:r}),b&&(0,n.jsx)(Mt,{variant:`primary`,onClick:w,children:(a=E==null||(o=E.Confirm)==null?void 0:o.confirm)==null?`OK`:a})]}):null:h,M=(0,t.useCallback)(e=>{e&&p&&k(e)},[p,k]),N=(0,t.useCallback)(e=>{!g&&!e||(S==null||S(e),e||C==null||C())},[C,S]);function P(){S==null||S(!1),C==null||C()}return(0,n.jsx)(da,{open:u,onOpenChange:N,modal:g!==!1,children:(0,n.jsxs)(ma,{ref:M,className:H(s,{"!univer-animate-none":p}),style:{...l,width:f?typeof f==`number`?`${f}px`:f:void 0,maxWidth:f?`initial`:void 0,...p?{position:`absolute`,margin:0,left:0,top:0,transform:`translate(${D.x}px, ${D.y}px)`,transition:O?`none`:void 0,cursor:O?`grabbing`:void 0}:{}},closable:v,onClickClose:P,onEscapeKeyDown:e=>{_&&P(),e.preventDefault()},onPointerDownOutside:e=>{y&&P(),e.preventDefault()},children:[(0,n.jsxs)(ha,{className:H({"!univer-hidden":!d}),"data-drag-handle":p?`true`:void 0,style:{cursor:p?`grab`:void 0,userSelect:p?`none`:void 0,touchAction:p?`none`:void 0},onMouseDown:p?A:void 0,children:[(0,n.jsx)(_a,{children:d}),(0,n.jsx)(va,{className:`univer-hidden`})]}),c,j&&(0,n.jsx)(ga,{children:j})]})})}let xa=(e,t,n)=>{t/=100,n/=100;let r=n*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r,o=0,s=0,c=0;return e>=0&&e<60?(o=r,s=i,c=0):e>=60&&e<120?(o=i,s=r,c=0):e>=120&&e<180?(o=0,s=r,c=i):e>=180&&e<240?(o=0,s=i,c=r):e>=240&&e<300?(o=i,s=0,c=r):e>=300&&e<360&&(o=r,s=0,c=i),[Math.round((o+a)*255),Math.round((s+a)*255),Math.round((c+a)*255)]},Sa=(e,t,n)=>{let r=e=>e.toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`},Ca=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=0,o=0,s=r;return r!==0&&(o=i/r),i!==0&&(r===e?a=(t-n)/i+(t<n?6:0):r===t?a=(n-e)/i+2:r===n&&(a=(e-t)/i+4),a*=60),[a,o*100,s*100]},wa=e=>{e.length===4&&(e=`#${e.slice(1).split(``).map(e=>e+e).join(``)}`);let[t,n,r]=e.match(/\w\w/g).map(e=>Number.parseInt(e,16));return Ca(t,n,r)},Ta=(e,t,n)=>{let[r,i,a]=xa(e,t,n);return Sa(r,i,a)},Ea=(e,t,n,r)=>{let[i,a,o]=xa(e,t,n);return`rgba(${i}, ${a}, ${o}, ${r})`},Da=e=>{let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);if(!t)throw Error(`Invalid RGBA string`);return[Number.parseInt(t[1],10),Number.parseInt(t[2],10),Number.parseInt(t[3],10),t[4]?Number.parseFloat(t[4]):1]};function Oa({hsv:e,alpha:r,onChange:i,onChanged:a}){let[o,s]=(0,t.useState)(!1),c=(0,t.useRef)(null),l=(0,t.useRef)(null),u=(0,t.useCallback)(e=>{var t,n;let r=c.current;if(!r)return;let a=(t=(n=l.current)==null?void 0:n.clientWidth)==null?0:t,o=r.getBoundingClientRect(),s=o.width-a;if(s<=0){i(0);return}let u=Math.max(0,Math.min(e-o.left,s));i(Math.round(u/s*100)/100)},[i]),d=(0,t.useCallback)(e=>{o&&u(e.clientX)},[o,u]),f=(0,t.useCallback)(()=>{s(!1),a==null||a(r)},[r]);(0,t.useEffect)(()=>(o&&(window.addEventListener(`pointermove`,d),window.addEventListener(`pointerup`,f),window.addEventListener(`mouseup`,f)),()=>{window.removeEventListener(`pointermove`,d),window.removeEventListener(`pointerup`,f),window.removeEventListener(`mouseup`,f)}),[o,d,f]);let p=()=>{var e,t,n,i;let a=Math.min(Math.max(r*100,0),100),o=(e=(t=l.current)==null?void 0:t.clientWidth)==null?0:e,s=(n=(i=c.current)==null?void 0:i.clientWidth)==null?0:n,u=s>0?o/s*100:0;return`${a/100*(100-u)}%`},m=xa(...e);return(0,n.jsxs)(`div`,{className:`univer-relative univer-w-full univer-select-none`,children:[(0,n.jsx)(`div`,{className:`univer-absolute univer-inset-0 univer-rounded-full`,style:{backgroundImage:`linear-gradient(45deg, #E3E5EA 25%, transparent 25%), linear-gradient(-45deg, #E3E5EA 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #E3E5EA 75%), linear-gradient(-45deg, transparent 75%, #E3E5EA 75%)`,backgroundPosition:`0 0, 0 4px, 4px -4px, -4px 0`,backgroundSize:`8px 8px`}}),(0,n.jsx)(`div`,{ref:c,className:`
200
- univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner
201
- `,style:{background:`linear-gradient(to right, transparent, rgb(${m.join(`,`)}))`},onPointerDown:e=>{s(!0),u(e.clientX)},children:(0,n.jsx)(`div`,{ref:l,className:`
202
- univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full
203
- univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform
204
- univer-duration-75 univer-will-change-transform
205
- `,style:{left:p(),transform:`translateY(-50%)`,transition:o?`none`:`all 0.1s ease-out`}})})]})}function ka({hsv:e,onChange:r}){let[i,a]=(0,t.useState)(``),o=(0,t.useMemo)(()=>Ta(e[0],e[1],e[2]),[e]);(0,t.useEffect)(()=>{a(o.replace(/^#/,``))},[o]);let s=e=>/^[0-9A-Fa-f]{6}$/.test(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`input`,{className:H(`
206
- univer-w-full univer-px-2 !univer-pl-4 univer-uppercase
207
- focus:univer-border-primary-500 focus:univer-outline-none
208
- dark:!univer-text-white
209
- `,W),value:i,onChange:e=>{let t=e.target.value.trim();if(!(t.length>6)&&!(t!==``&&!/^[0-9A-Fa-f]*$/.test(t))&&(a(t),s(t))){let e=wa(t);e&&r&&r(...e)}},onBlur:()=>{s(i)||a(o.replace(/^#/,``))},maxLength:6,spellCheck:!1}),(0,n.jsx)(`span`,{className:`
210
- univer-absolute univer-left-1.5 univer-top-1/2 -univer-translate-y-1/2 univer-text-sm
211
- univer-text-gray-400
212
- `,children:`#`})]})}function Aa({hsv:e,alpha:r,format:i,onChange:a}){let[o,s]=(0,t.useState)({r:0,g:0,b:0,a:1});(0,t.useEffect)(()=>{let[t,n,i]=xa(e[0],e[1],e[2]);s({r:Math.round(t),g:Math.round(n),b:Math.round(i),a:r==null?1:r})},[e,r]);let c=(t,n)=>{if(t===`a`){if(n!==``&&!/^\d*\.?\d*$/.test(n))return;let t=n===``?0:Number.parseFloat(n);if(t>1)return;s({...o,a:t}),a&&a(e[0],e[1],e[2],t);return}if(n!==``&&!/^\d*$/.test(n))return;let r=n===``?0:Number.parseInt(n,10);if(r>255)return;let i={...o,[t]:r};s(i),a&&a(...Ca(i.r,i.g,i.b),o.a)},l=()=>{let[t,n,i]=xa(e[0],e[1],e[2]);s({r:Math.round(t),g:Math.round(n),b:Math.round(i),a:r==null?1:r})};return(0,n.jsxs)(`div`,{className:`
213
- univer-flex univer-items-center univer-gap-2
214
- [&>input]:univer-w-11 [&>input]:univer-border-gray-200
215
- [&>input]:focus:univer-border-primary-500
216
- dark:[&>input]:!univer-border-gray-600 dark:[&>input]:!univer-text-white
217
- `,children:[(0,n.jsx)(`input`,{value:o.r,onChange:e=>c(`r`,e.target.value),onBlur:l,maxLength:3}),(0,n.jsx)(`input`,{value:o.g,onChange:e=>c(`g`,e.target.value),onBlur:l,maxLength:3}),(0,n.jsx)(`input`,{value:o.b,onChange:e=>c(`b`,e.target.value),onBlur:l,maxLength:3}),i===`rgba`&&(0,n.jsx)(`input`,{value:o.a,onChange:e=>c(`a`,e.target.value),onBlur:l,maxLength:4})]})}function ja({hsv:e,alpha:t,format:r,onChange:i}){return(0,n.jsx)(`div`,{className:`
218
- dark:![&_input]:univer-border-gray-600 dark:![&_input]:univer-text-white
219
- univer-flex univer-gap-2
220
- [&_input]:univer-box-border [&_input]:univer-flex [&_input]:univer-h-7 [&_input]:univer-items-center
221
- [&_input]:univer-rounded [&_input]:univer-border [&_input]:univer-border-solid
222
- [&_input]:univer-border-gray-200 [&_input]:univer-bg-transparent [&_input]:univer-px-1.5
223
- [&_input]:univer-text-sm [&_input]:univer-text-gray-700 [&_input]:univer-outline-none
224
- `,children:(0,n.jsxs)(`div`,{className:`univer-relative univer-flex univer-flex-1 univer-gap-2`,children:[(0,n.jsx)(ka,{hsv:e,onChange:i}),(0,n.jsx)(Aa,{hsv:e,alpha:t,format:r,onChange:i})]})})}let Ma=[[`#FFFFFF`,`#E1EFFE`,`#FDE8E8`,`#FEECDC`,`#FFF4B9`,`#DEF7EC`,`#D5F5F6`,`#EDEBFE`,`#FCE8F3`],[`#CDD0D8`,`#A4CAFE`,`#F8B4B4`,`#FDBA8C`,`#FAC815`,`#84E1BC`,`#7EDCE2`,`#CABFFD`,`#F8B4D9`],[`#979DAC`,`#3F83F8`,`#F05252`,`#FF5A1F`,`#D49D0F`,`#0DA471`,`#0694A2`,`#9061F9`,`#E74694`],[`#414657`,`#1A56DB`,`#C81E1E`,`#B43403`,`#9A6D15`,`#046C4E`,`#036672`,`#6C2BD9`,`#BF125D`],[`#000000`,`#233876`,`#771D1D`,`#8A2C0D`,`#634312`,`#014737`,`#014451`,`#4A1D96`,`#751A3D`]];function Na({hsv:e,onChange:r}){let i=(0,t.useCallback)(e=>{let[t,n,i]=wa(e);r(t,n,i)},[r]),a=Ta(e[0],e[1],e[2]);return(0,n.jsx)(`div`,{"data-u-comp":`color-picker-presets`,className:`univer-grid univer-content-center univer-gap-2`,children:Ma.map((e,t)=>(0,n.jsx)(`div`,{className:`univer-grid univer-grid-flow-col univer-items-center univer-justify-between univer-gap-2`,children:e.map((e,r)=>(0,n.jsx)(`button`,{type:`button`,className:H(`
225
- univer-box-border univer-size-5 univer-cursor-pointer univer-rounded-full univer-border
226
- univer-border-solid univer-border-transparent univer-bg-gray-300 univer-transition-shadow
227
- `,{"univer-ring-2 univer-ring-offset-2 univer-ring-offset-white dark:!univer-ring-primary-600 dark:!univer-ring-offset-gray-600":e.toUpperCase()===a.toUpperCase(),"!univer-border-gray-200":t===0&&r===0}),style:{backgroundColor:e},onClick:()=>i(e)},r))},t))})}function Pa({hsv:e,onChange:r,onChanged:i}){let a=(0,t.useRef)(null),o=(0,t.useRef)(null),[s,c]=(0,t.useState)(!1);(0,t.useEffect)(()=>{let t=a.current;if(!t)return;let n=t.getContext(`2d`);if(!n)return;let r=n.createLinearGradient(0,0,t.width,0);r.addColorStop(0,`hsl(${e[0]}, 0%, 50%)`),r.addColorStop(1,`hsl(${e[0]}, 100%, 50%)`),n.fillStyle=r,n.fillRect(0,0,t.width,t.height);let i=n.createLinearGradient(0,0,0,t.height);i.addColorStop(0,`rgba(255, 255, 255, 0)`),i.addColorStop(1,`rgba(0, 0, 0, 1)`),n.fillStyle=i,n.fillRect(0,0,t.width,t.height)},[e]);let l=t=>{t.stopPropagation();let n=a.current;if(!n)return;let i=n.getBoundingClientRect(),o=Math.max(0,Math.min(t.clientX-i.left,i.width)),s=Math.max(0,Math.min(t.clientY-i.top,i.height)),c=o/i.width*100,l=100-s/i.height*100;r(e[0],c,l)},u=(0,t.useCallback)(()=>{c(!1)},[e]);function d(){i==null||i(e[0],e[1],e[2])}(0,t.useEffect)(()=>{var e;return(e=o.current)==null||e.addEventListener(`mouseup`,d),window.addEventListener(`pointerup`,u),window.addEventListener(`mouseup`,u),()=>{var e;(e=o.current)==null||e.removeEventListener(`mouseup`,d),window.removeEventListener(`pointerup`,u),window.removeEventListener(`mouseup`,u)}},[e]);let f=()=>{var t,n,r,i;let a=(t=(n=o.current)==null?void 0:n.clientWidth)==null?0:t,c=(r=(i=o.current)==null?void 0:i.clientHeight)==null?0:r;return{transform:`translate(${e[1]/100*a-8}px, ${(100-e[2])/100*c-8}px)`,transition:s?`none`:`transform 0.1s ease-out`}};return(0,t.useEffect)(()=>{let e=()=>{c(!1)};return window.addEventListener(`pointerup`,e),window.addEventListener(`mouseup`,e),()=>{window.removeEventListener(`pointerup`,e),window.removeEventListener(`mouseup`,e)}},[]),(0,n.jsxs)(`div`,{"data-u-comp":`color-picker-spectrum`,ref:o,className:`univer-relative univer-overflow-hidden`,children:[(0,n.jsx)(`canvas`,{ref:a,className:`univer-size-full univer-cursor-crosshair univer-rounded`,onPointerDown:e=>{c(!0),l(e)},onPointerMove:e=>s&&l(e)}),(0,n.jsx)(`div`,{className:`
228
- univer-pointer-events-none univer-absolute univer-left-0 univer-top-0 univer-size-4
229
- univer-rounded-full univer-border-2 univer-border-white univer-shadow-md univer-ring-2
230
- univer-ring-white univer-will-change-transform
231
- `,style:f()})]})}function Fa({hsv:e,onChange:r,onChanged:i}){let[a,o]=(0,t.useState)(!1),s=(0,t.useRef)(null),c=(0,t.useRef)(null),l=(0,t.useCallback)(t=>{var n,i;let a=s.current;if(!a)return;let o=(n=(i=c.current)==null?void 0:i.clientWidth)==null?0:n,l=a.getBoundingClientRect(),u=l.width-o;if(u<=0){r(0,e[1],e[2]);return}let d=Math.max(0,Math.min(t-l.left,u));r(Math.round(d/u*360),e[1],e[2])},[e,r]),u=(0,t.useCallback)(e=>{e.stopPropagation(),a&&l(e.clientX)},[a,l]),d=(0,t.useCallback)(()=>{o(!1),i==null||i(e[0],e[1],e[2])},[e,i]);(0,t.useEffect)(()=>(a&&(window.addEventListener(`pointermove`,u),window.addEventListener(`pointerup`,d),window.addEventListener(`mouseup`,d)),()=>{window.removeEventListener(`pointermove`,u),window.removeEventListener(`pointerup`,d),window.removeEventListener(`mouseup`,d)}),[a,u,d]);let f=()=>{var t,n,r,i;let a=Math.min(Math.max(e[0],0),360),o=(t=(n=c.current)==null?void 0:n.clientWidth)==null?0:t,l=(r=(i=s.current)==null?void 0:i.clientWidth)==null?0:r,u=l>0?o/l*100:0;return`${a/360*(100-u)}%`};return(0,n.jsx)(`div`,{"data-u-comp":`color-picker-hue-slider`,className:`univer-relative univer-w-full univer-select-none`,children:(0,n.jsx)(`div`,{ref:s,className:`
232
- univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner
233
- `,style:{background:`linear-gradient(to right,
88
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return t.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},na=`DialogDescriptionWarning`,ra=({contentRef:e,descriptionId:n})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ea(na).contentName}}.`;return t.useEffect(()=>{var t;let i=(t=e.current)==null?void 0:t.getAttribute(`aria-describedby`);n&&i&&(document.getElementById(n)||console.warn(r))},[r,e,n]),null},ia=ki,aa=Fi,oa=Li,sa=Vi,ca=Ki,la=Ji,ua=Xi;let da=ia,fa=aa,pa=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(oa,{ref:r,className:H(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 univer-fixed univer-inset-0 univer-z-[1080] univer-bg-[rgba(0,0,0,0.8)]`,e),...t}));pa.displayName=oa.displayName;let ma=(0,t.forwardRef)(({className:e,children:t,closable:r=!0,onClickClose:i,...a},o)=>(0,n.jsxs)(fa,{children:[(0,n.jsx)(pa,{}),(0,n.jsxs)(sa,{ref:o,className:H(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=open]:univer-slide-in-from-left-1/2 data-[state=open]:univer-slide-in-from-top-[48%] data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[state=closed]:univer-slide-out-to-left-1/2 data-[state=closed]:univer-slide-out-to-top-[48%] univer-fixed univer-left-1/2 univer-top-1/2 univer-z-[1080] univer-box-border univer-grid univer-w-full univer-max-w-lg -univer-translate-x-1/2 -univer-translate-y-1/2 univer-gap-4 univer-bg-white univer-p-4 univer-text-gray-500 univer-shadow-md univer-duration-200 sm:!univer-rounded-lg dark:!univer-bg-gray-700 dark:!univer-text-gray-400`,W,e),...a,children:[t,r&&(0,n.jsxs)(ua,{className:`univer-absolute univer-right-4 univer-top-4 univer-size-6 univer-cursor-pointer univer-rounded-sm univer-border-none univer-bg-transparent univer-p-0 univer-transition-opacity hover:univer-opacity-100 disabled:univer-pointer-events-none`,onClick:i,children:[(0,n.jsx)(E,{className:`univer-size-4 univer-text-gray-400`}),(0,n.jsx)(`span`,{className:`univer-sr-only`,children:`Close`})]})]})]}));ma.displayName=sa.displayName;let ha=({className:e,...t})=>(0,n.jsx)(`div`,{className:H(`univer-flex univer-flex-col univer-space-y-1.5 univer-text-center sm:!univer-text-left`,e),...t});ha.displayName=`DialogHeader`;let ga=({className:e,...t})=>(0,n.jsx)(`div`,{className:H(`univer-flex univer-flex-col-reverse sm:!univer-flex-row sm:!univer-justify-end sm:!univer-space-x-2`,e),...t});ga.displayName=`DialogFooter`;let _a=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(ca,{ref:r,className:H(`univer-my-0 univer-text-lg univer-font-semibold univer-leading-none univer-tracking-tight univer-text-gray-900 dark:!univer-text-white`,e),...t}));_a.displayName=ca.displayName;let va=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(la,{ref:r,className:H(`univer-text-sm univer-text-gray-500`,e),...t}));va.displayName=la.displayName;function ya(e={}){let n=(0,t.useCallback)(()=>{let{innerWidth:e,innerHeight:t}=window;return{x:Math.max(0,(e-0)/2),y:Math.max(0,(t-0)/2)}},[]),{defaultPosition:r=n(),enabled:i=!1}=e,[a,o]=(0,t.useState)(r),[s,c]=(0,t.useState)(!1),l=(0,t.useRef)(null),u=(0,t.useRef)({x:0,y:0}),d=(0,t.useRef)({x:0,y:0}),f=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(!l.current||f.current||e.defaultPosition)return;let{width:t,height:n}=l.current.getBoundingClientRect(),{innerWidth:r,innerHeight:i}=window,a=Math.max(0,(r-t)/2),s=Math.max(0,(i-n)/2);o({x:a,y:s}),u.current={x:a,y:s},f.current=!0},[e.defaultPosition]);let p=(0,t.useCallback)((e,t)=>{if(!l.current)return{x:e,y:t};let n=l.current.getBoundingClientRect(),{clientWidth:r,clientHeight:i}=document.documentElement,a=u.current.x+(e-d.current.x),o=u.current.y+(t-d.current.y);return a<0&&(a=0),o<0&&(o=0),a+n.width>r&&(a=r-n.width),o+n.height>i&&(o=i-n.height),{x:a,y:o}},[]),m=(0,t.useCallback)(e=>{i&&(e.preventDefault(),e.stopPropagation(),u.current={...a},d.current={x:e.clientX,y:e.clientY},c(!0),document.body.style.userSelect=`none`)},[i,a]),h=(0,t.useCallback)(e=>{s&&(e.preventDefault(),e.stopPropagation(),o(p(e.clientX,e.clientY)))},[s,p]),g=(0,t.useCallback)(()=>{c(!1),document.body.style.userSelect=``},[]);return(0,t.useEffect)(()=>{if(i)return document.addEventListener(`mousemove`,h),document.addEventListener(`mouseup`,g),()=>{document.removeEventListener(`mousemove`,h),document.removeEventListener(`mouseup`,g)}},[i,h,g]),{position:a,isDragging:s,elementRef:l,setElementRef:t=>{if(l.current=t,t&&!f.current&&!e.defaultPosition){let{width:e,height:n}=t.getBoundingClientRect(),{innerWidth:r,innerHeight:i}=window,a=Math.max(0,(r-e)/2),s=Math.max(0,(i-n)/2);o({x:a,y:s}),u.current={x:a,y:s},f.current=!0}},handleMouseDown:m}}function ba(e){var r,i,a,o;let{className:s,children:c,style:l,open:u=!1,title:d,width:f,draggable:p=!1,defaultPosition:m,footer:h,mask:g=!0,keyboard:_=!0,closable:v=!0,maskClosable:y=!0,showOk:b,showCancel:x,onOpenChange:S,onClose:C,onOk:w,onCancel:T}=e,{locale:E}=(0,t.useContext)(Ft),{position:D,isDragging:O,setElementRef:k,handleMouseDown:A}=ya({defaultPosition:m,enabled:p}),j=h==null?b||x?(0,n.jsxs)(`div`,{className:`univer-flex univer-justify-end univer-gap-2`,children:[x&&(0,n.jsx)(Mt,{onClick:T,children:(r=E==null||(i=E.Confirm)==null?void 0:i.cancel)==null?`Cancel`:r}),b&&(0,n.jsx)(Mt,{variant:`primary`,onClick:w,children:(a=E==null||(o=E.Confirm)==null?void 0:o.confirm)==null?`OK`:a})]}):null:h,M=(0,t.useCallback)(e=>{e&&p&&k(e)},[p,k]),N=(0,t.useCallback)(e=>{!g&&!e||(S==null||S(e),e||C==null||C())},[C,S]);function P(){S==null||S(!1),C==null||C()}return(0,n.jsx)(da,{open:u,onOpenChange:N,modal:g!==!1,children:(0,n.jsxs)(ma,{ref:M,className:H(s,{"!univer-animate-none":p}),style:{...l,width:f?typeof f==`number`?`${f}px`:f:void 0,maxWidth:f?`initial`:void 0,...p?{position:`absolute`,margin:0,left:0,top:0,transform:`translate(${D.x}px, ${D.y}px)`,transition:O?`none`:void 0,cursor:O?`grabbing`:void 0}:{}},closable:v,onClickClose:P,onEscapeKeyDown:e=>{_&&P(),e.preventDefault()},onPointerDownOutside:e=>{y&&P(),e.preventDefault()},children:[(0,n.jsxs)(ha,{className:H({"!univer-hidden":!d}),"data-drag-handle":p?`true`:void 0,style:{cursor:p?`grab`:void 0,userSelect:p?`none`:void 0,touchAction:p?`none`:void 0},onMouseDown:p?A:void 0,children:[(0,n.jsx)(_a,{children:d}),(0,n.jsx)(va,{className:`univer-hidden`})]}),c,j&&(0,n.jsx)(ga,{children:j})]})})}let xa=(e,t,n)=>{t/=100,n/=100;let r=n*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r,o=0,s=0,c=0;return e>=0&&e<60?(o=r,s=i,c=0):e>=60&&e<120?(o=i,s=r,c=0):e>=120&&e<180?(o=0,s=r,c=i):e>=180&&e<240?(o=0,s=i,c=r):e>=240&&e<300?(o=i,s=0,c=r):e>=300&&e<360&&(o=r,s=0,c=i),[Math.round((o+a)*255),Math.round((s+a)*255),Math.round((c+a)*255)]},Sa=(e,t,n)=>{let r=e=>e.toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`},Ca=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=0,o=0,s=r;return r!==0&&(o=i/r),i!==0&&(r===e?a=(t-n)/i+(t<n?6:0):r===t?a=(n-e)/i+2:r===n&&(a=(e-t)/i+4),a*=60),[a,o*100,s*100]},wa=e=>{e.length===4&&(e=`#${e.slice(1).split(``).map(e=>e+e).join(``)}`);let[t,n,r]=e.match(/\w\w/g).map(e=>Number.parseInt(e,16));return Ca(t,n,r)},Ta=(e,t,n)=>{let[r,i,a]=xa(e,t,n);return Sa(r,i,a)},Ea=(e,t,n,r)=>{let[i,a,o]=xa(e,t,n);return`rgba(${i}, ${a}, ${o}, ${r})`},Da=e=>{let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);if(!t)throw Error(`Invalid RGBA string`);return[Number.parseInt(t[1],10),Number.parseInt(t[2],10),Number.parseInt(t[3],10),t[4]?Number.parseFloat(t[4]):1]};function Oa({hsv:e,alpha:r,onChange:i,onChanged:a}){let[o,s]=(0,t.useState)(!1),c=(0,t.useRef)(null),l=(0,t.useRef)(null),u=(0,t.useCallback)(e=>{var t,n;let r=c.current;if(!r)return;let a=(t=(n=l.current)==null?void 0:n.clientWidth)==null?0:t,o=r.getBoundingClientRect(),s=o.width-a;if(s<=0){i(0);return}let u=Math.max(0,Math.min(e-o.left,s));i(Math.round(u/s*100)/100)},[i]),d=(0,t.useCallback)(e=>{o&&u(e.clientX)},[o,u]),f=(0,t.useCallback)(()=>{s(!1),a==null||a(r)},[r]);(0,t.useEffect)(()=>(o&&(window.addEventListener(`pointermove`,d),window.addEventListener(`pointerup`,f),window.addEventListener(`mouseup`,f)),()=>{window.removeEventListener(`pointermove`,d),window.removeEventListener(`pointerup`,f),window.removeEventListener(`mouseup`,f)}),[o,d,f]);let p=()=>{var e,t,n,i;let a=Math.min(Math.max(r*100,0),100),o=(e=(t=l.current)==null?void 0:t.clientWidth)==null?0:e,s=(n=(i=c.current)==null?void 0:i.clientWidth)==null?0:n,u=s>0?o/s*100:0;return`${a/100*(100-u)}%`},m=xa(...e);return(0,n.jsxs)(`div`,{className:`univer-relative univer-w-full univer-select-none`,children:[(0,n.jsx)(`div`,{className:`univer-absolute univer-inset-0 univer-rounded-full`,style:{backgroundImage:`linear-gradient(45deg, #E3E5EA 25%, transparent 25%), linear-gradient(-45deg, #E3E5EA 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #E3E5EA 75%), linear-gradient(-45deg, transparent 75%, #E3E5EA 75%)`,backgroundPosition:`0 0, 0 4px, 4px -4px, -4px 0`,backgroundSize:`8px 8px`}}),(0,n.jsx)(`div`,{ref:c,className:`univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner`,style:{background:`linear-gradient(to right, transparent, rgb(${m.join(`,`)}))`},onPointerDown:e=>{s(!0),u(e.clientX)},children:(0,n.jsx)(`div`,{ref:l,className:`univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform univer-duration-75 univer-will-change-transform`,style:{left:p(),transform:`translateY(-50%)`,transition:o?`none`:`all 0.1s ease-out`}})})]})}function ka({hsv:e,onChange:r}){let[i,a]=(0,t.useState)(``),o=(0,t.useMemo)(()=>Ta(e[0],e[1],e[2]),[e]);(0,t.useEffect)(()=>{a(o.replace(/^#/,``))},[o]);let s=e=>/^[0-9A-Fa-f]{6}$/.test(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`input`,{className:H(`univer-w-full univer-px-2 !univer-pl-4 univer-uppercase focus:univer-border-primary-500 focus:univer-outline-none dark:!univer-text-white`,W),value:i,onChange:e=>{let t=e.target.value.trim();if(!(t.length>6)&&!(t!==``&&!/^[0-9A-Fa-f]*$/.test(t))&&(a(t),s(t))){let e=wa(t);e&&r&&r(...e)}},onBlur:()=>{s(i)||a(o.replace(/^#/,``))},maxLength:6,spellCheck:!1}),(0,n.jsx)(`span`,{className:`univer-absolute univer-left-1.5 univer-top-1/2 -univer-translate-y-1/2 univer-text-sm univer-text-gray-400`,children:`#`})]})}function Aa({hsv:e,alpha:r,format:i,onChange:a}){let[o,s]=(0,t.useState)({r:0,g:0,b:0,a:1});(0,t.useEffect)(()=>{let[t,n,i]=xa(e[0],e[1],e[2]);s({r:Math.round(t),g:Math.round(n),b:Math.round(i),a:r==null?1:r})},[e,r]);let c=(t,n)=>{if(t===`a`){if(n!==``&&!/^\d*\.?\d*$/.test(n))return;let t=n===``?0:Number.parseFloat(n);if(t>1)return;s({...o,a:t}),a&&a(e[0],e[1],e[2],t);return}if(n!==``&&!/^\d*$/.test(n))return;let r=n===``?0:Number.parseInt(n,10);if(r>255)return;let i={...o,[t]:r};s(i),a&&a(...Ca(i.r,i.g,i.b),o.a)},l=()=>{let[t,n,i]=xa(e[0],e[1],e[2]);s({r:Math.round(t),g:Math.round(n),b:Math.round(i),a:r==null?1:r})};return(0,n.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-2 [&>input]:univer-w-11 [&>input]:univer-border-gray-200 [&>input]:focus:univer-border-primary-500 dark:[&>input]:!univer-border-gray-600 dark:[&>input]:!univer-text-white`,children:[(0,n.jsx)(`input`,{value:o.r,onChange:e=>c(`r`,e.target.value),onBlur:l,maxLength:3}),(0,n.jsx)(`input`,{value:o.g,onChange:e=>c(`g`,e.target.value),onBlur:l,maxLength:3}),(0,n.jsx)(`input`,{value:o.b,onChange:e=>c(`b`,e.target.value),onBlur:l,maxLength:3}),i===`rgba`&&(0,n.jsx)(`input`,{value:o.a,onChange:e=>c(`a`,e.target.value),onBlur:l,maxLength:4})]})}function ja({hsv:e,alpha:t,format:r,onChange:i}){return(0,n.jsx)(`div`,{className:`dark:![&_input]:univer-border-gray-600 dark:![&_input]:univer-text-white univer-flex univer-gap-2 [&_input]:univer-box-border [&_input]:univer-flex [&_input]:univer-h-7 [&_input]:univer-items-center [&_input]:univer-rounded [&_input]:univer-border [&_input]:univer-border-solid [&_input]:univer-border-gray-200 [&_input]:univer-bg-transparent [&_input]:univer-px-1.5 [&_input]:univer-text-sm [&_input]:univer-text-gray-700 [&_input]:univer-outline-none`,children:(0,n.jsxs)(`div`,{className:`univer-relative univer-flex univer-flex-1 univer-gap-2`,children:[(0,n.jsx)(ka,{hsv:e,onChange:i}),(0,n.jsx)(Aa,{hsv:e,alpha:t,format:r,onChange:i})]})})}let Ma=[[`#FFFFFF`,`#E1EFFE`,`#FDE8E8`,`#FEECDC`,`#FFF4B9`,`#DEF7EC`,`#D5F5F6`,`#EDEBFE`,`#FCE8F3`],[`#CDD0D8`,`#A4CAFE`,`#F8B4B4`,`#FDBA8C`,`#FAC815`,`#84E1BC`,`#7EDCE2`,`#CABFFD`,`#F8B4D9`],[`#979DAC`,`#3F83F8`,`#F05252`,`#FF5A1F`,`#D49D0F`,`#0DA471`,`#0694A2`,`#9061F9`,`#E74694`],[`#414657`,`#1A56DB`,`#C81E1E`,`#B43403`,`#9A6D15`,`#046C4E`,`#036672`,`#6C2BD9`,`#BF125D`],[`#000000`,`#233876`,`#771D1D`,`#8A2C0D`,`#634312`,`#014737`,`#014451`,`#4A1D96`,`#751A3D`]];function Na({hsv:e,onChange:r}){let i=(0,t.useCallback)(e=>{let[t,n,i]=wa(e);r(t,n,i)},[r]),a=Ta(e[0],e[1],e[2]);return(0,n.jsx)(`div`,{"data-u-comp":`color-picker-presets`,className:`univer-grid univer-content-center univer-gap-2`,children:Ma.map((e,t)=>(0,n.jsx)(`div`,{className:`univer-grid univer-grid-flow-col univer-items-center univer-justify-between univer-gap-2`,children:e.map((e,r)=>(0,n.jsx)(`button`,{type:`button`,className:H(`univer-box-border univer-size-5 univer-cursor-pointer univer-rounded-full univer-border univer-border-solid univer-border-transparent univer-bg-gray-300 univer-transition-shadow`,{"univer-ring-2 univer-ring-offset-2 univer-ring-offset-white dark:!univer-ring-primary-600 dark:!univer-ring-offset-gray-600":e.toUpperCase()===a.toUpperCase(),"!univer-border-gray-200":t===0&&r===0}),style:{backgroundColor:e},onClick:()=>i(e)},r))},t))})}function Pa({hsv:e,onChange:r,onChanged:i}){let a=(0,t.useRef)(null),o=(0,t.useRef)(null),[s,c]=(0,t.useState)(!1);(0,t.useEffect)(()=>{let t=a.current;if(!t)return;let n=t.getContext(`2d`);if(!n)return;let r=n.createLinearGradient(0,0,t.width,0);r.addColorStop(0,`hsl(${e[0]}, 0%, 50%)`),r.addColorStop(1,`hsl(${e[0]}, 100%, 50%)`),n.fillStyle=r,n.fillRect(0,0,t.width,t.height);let i=n.createLinearGradient(0,0,0,t.height);i.addColorStop(0,`rgba(255, 255, 255, 0)`),i.addColorStop(1,`rgba(0, 0, 0, 1)`),n.fillStyle=i,n.fillRect(0,0,t.width,t.height)},[e]);let l=t=>{t.stopPropagation();let n=a.current;if(!n)return;let i=n.getBoundingClientRect(),o=Math.max(0,Math.min(t.clientX-i.left,i.width)),s=Math.max(0,Math.min(t.clientY-i.top,i.height)),c=o/i.width*100,l=100-s/i.height*100;r(e[0],c,l)},u=(0,t.useCallback)(()=>{c(!1)},[e]);function d(){i==null||i(e[0],e[1],e[2])}(0,t.useEffect)(()=>{var e;return(e=o.current)==null||e.addEventListener(`mouseup`,d),window.addEventListener(`pointerup`,u),window.addEventListener(`mouseup`,u),()=>{var e;(e=o.current)==null||e.removeEventListener(`mouseup`,d),window.removeEventListener(`pointerup`,u),window.removeEventListener(`mouseup`,u)}},[e]);let f=()=>{var t,n,r,i;let a=(t=(n=o.current)==null?void 0:n.clientWidth)==null?0:t,c=(r=(i=o.current)==null?void 0:i.clientHeight)==null?0:r;return{transform:`translate(${e[1]/100*a-8}px, ${(100-e[2])/100*c-8}px)`,transition:s?`none`:`transform 0.1s ease-out`}};return(0,t.useEffect)(()=>{let e=()=>{c(!1)};return window.addEventListener(`pointerup`,e),window.addEventListener(`mouseup`,e),()=>{window.removeEventListener(`pointerup`,e),window.removeEventListener(`mouseup`,e)}},[]),(0,n.jsxs)(`div`,{"data-u-comp":`color-picker-spectrum`,ref:o,className:`univer-relative univer-overflow-hidden`,children:[(0,n.jsx)(`canvas`,{ref:a,className:`univer-size-full univer-cursor-crosshair univer-rounded`,onPointerDown:e=>{c(!0),l(e)},onPointerMove:e=>s&&l(e)}),(0,n.jsx)(`div`,{className:`univer-pointer-events-none univer-absolute univer-left-0 univer-top-0 univer-size-4 univer-rounded-full univer-border-2 univer-border-white univer-shadow-md univer-ring-2 univer-ring-white univer-will-change-transform`,style:f()})]})}function Fa({hsv:e,onChange:r,onChanged:i}){let[a,o]=(0,t.useState)(!1),s=(0,t.useRef)(null),c=(0,t.useRef)(null),l=(0,t.useCallback)(t=>{var n,i;let a=s.current;if(!a)return;let o=(n=(i=c.current)==null?void 0:i.clientWidth)==null?0:n,l=a.getBoundingClientRect(),u=l.width-o;if(u<=0){r(0,e[1],e[2]);return}let d=Math.max(0,Math.min(t-l.left,u));r(Math.round(d/u*360),e[1],e[2])},[e,r]),u=(0,t.useCallback)(e=>{e.stopPropagation(),a&&l(e.clientX)},[a,l]),d=(0,t.useCallback)(()=>{o(!1),i==null||i(e[0],e[1],e[2])},[e,i]);(0,t.useEffect)(()=>(a&&(window.addEventListener(`pointermove`,u),window.addEventListener(`pointerup`,d),window.addEventListener(`mouseup`,d)),()=>{window.removeEventListener(`pointermove`,u),window.removeEventListener(`pointerup`,d),window.removeEventListener(`mouseup`,d)}),[a,u,d]);let f=()=>{var t,n,r,i;let a=Math.min(Math.max(e[0],0),360),o=(t=(n=c.current)==null?void 0:n.clientWidth)==null?0:t,l=(r=(i=s.current)==null?void 0:i.clientWidth)==null?0:r,u=l>0?o/l*100:0;return`${a/360*(100-u)}%`};return(0,n.jsx)(`div`,{"data-u-comp":`color-picker-hue-slider`,className:`univer-relative univer-w-full univer-select-none`,children:(0,n.jsx)(`div`,{ref:s,className:`univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner`,style:{background:`linear-gradient(to right,
234
89
  hsl(0, 100%, 50%),
235
90
  hsl(60, 100%, 50%),
236
91
  hsl(120, 100%, 50%),
237
92
  hsl(180, 100%, 50%),
238
93
  hsl(240, 100%, 50%),
239
94
  hsl(300, 100%, 50%),
240
- hsl(360, 100%, 50%))`},onPointerDown:e=>{o(!0),l(e.clientX)},children:(0,n.jsx)(`div`,{ref:c,className:`
241
- univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full
242
- univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform
243
- univer-duration-75 univer-will-change-transform
244
- `,style:{left:f(),transform:`translateY(-50%)`,transition:a?`none`:`all 0.1s ease-out`}})})})}let Ia=(0,t.memo)(Pa),La=(0,t.memo)(Fa),Ra=(0,t.memo)(Oa),za=(0,t.memo)(ja),Ba=(0,t.memo)(Na);function Va({format:e=`hex`,value:r,onChange:i}){if(!Pt)return null;let{locale:a}=(0,t.useContext)(Ft),[o,s]=(0,t.useState)([0,100,100]),[c,l]=(0,t.useState)(1),[u,d]=(0,t.useState)(!1),f=(0,t.useCallback)((e,t,n)=>xa(e,t,n),[]);(0,t.useEffect)(()=>{try{let t=r||(e===`hex`?`#000000`:`rgba(0, 0, 0, 1)`);if(e===`hex`){let[e,n,r]=wa(t);s([e,n,r]),l(1)}else if(e===`rgba`){let[e,n,r,i]=Da(t),[a,o,c]=Ca(e,n,r);s([a,o,c]),l(i)}}catch(e){console.error(`Invalid value:`,e)}},[r,e]);function p(e,t,n){s([e,t,n])}function m(e){l(e)}function h(t,n,r,a=c){if(e===`hex`){let[e,a,o]=f(t,n,r),s=Sa(e,a,o);i==null||i(s)}else if(e===`rgba`){let[e,o,s]=f(t,n,r);i==null||i(`rgba(${e}, ${o}, ${s}, ${a})`)}}function g(){let[t,n,r]=o;if(e===`hex`){let e=Ta(t,n,r);i==null||i(e)}else if(e===`rgba`){let[e,a,o]=f(t,n,r);i==null||i(`rgba(${e}, ${a}, ${o}, ${c})`)}d(!1)}return(0,n.jsxs)(`div`,{"data-u-comp":`color-picker`,className:`univer-cursor-default univer-space-y-2 univer-rounded-lg`,onClick:e=>e.stopPropagation(),children:[(0,n.jsx)(Ba,{hsv:o,onChange:(e,t,n)=>{p(e,t,n),m(1),h(e,t,n,1)}}),(0,n.jsx)(`div`,{className:`univer-flex univer-h-7 univer-items-center`,children:(0,n.jsx)(`a`,{className:`
245
- univer-cursor-pointer univer-gap-2 univer-text-sm univer-text-gray-900 univer-transition-opacity
246
- hover:univer-opacity-80
247
- dark:!univer-text-white
248
- `,onClick:()=>d(!0),children:a==null?void 0:a.ColorPicker.more})}),(0,n.jsx)(ba,{className:`!univer-w-fit !univer-p-2.5`,closable:!1,maskClosable:!1,open:u,onOpenChange:d,children:(0,n.jsxs)(`div`,{className:`univer-grid univer-w-64 univer-gap-2`,children:[(0,n.jsx)(Ia,{hsv:o,onChange:p}),(0,n.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-2`,children:[(0,n.jsx)(`div`,{className:`univer-size-6 univer-flex-shrink-0 univer-rounded-sm`,style:{backgroundColor:e===`hex`?Ta(...o):Ea(...o,c)}}),(0,n.jsxs)(`div`,{className:`univer-flex-1 univer-space-y-2`,children:[(0,n.jsx)(La,{hsv:o,onChange:p}),e===`rgba`&&(0,n.jsx)(Ra,{hsv:o,alpha:c,onChange:m})]})]}),(0,n.jsx)(za,{hsv:o,alpha:c,format:e,onChange:(e,t,n,r)=>{p(e,t,n),r!==void 0&&m(r)}}),(0,n.jsxs)(`footer`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[(0,n.jsx)(Mt,{onClick:()=>d(!1),children:a==null?void 0:a.ColorPicker.cancel}),(0,n.jsx)(Mt,{variant:`primary`,onClick:g,children:a==null?void 0:a.ColorPicker.confirm})]})]})})]})}function Ha(e){let{locale:t,cancelText:r,confirmText:i,onClose:a,onConfirm:o,closable:s=!0}=e;return(0,n.jsxs)(`footer`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[s&&(0,n.jsx)(Mt,{onClick:a,children:r==null?t==null?void 0:t.Confirm.cancel:r}),(0,n.jsx)(Mt,{variant:`primary`,onClick:o,children:i==null?t==null?void 0:t.Confirm.confirm:i})]})}function Ua(e){let{children:r,visible:i=!1,title:a,cancelText:o,confirmText:s,width:c,onClose:l,onConfirm:u,closable:d=!0}=e,{locale:f}=(0,t.useContext)(Ft);return(0,n.jsx)(ba,{open:i,title:a,maskClosable:!1,footer:(0,n.jsx)(Ha,{locale:f,cancelText:o,confirmText:s,onClose:l,onConfirm:u,closable:d}),onClose:l,width:c,closable:d,children:r})}let Wa=[`top`,`right`,`bottom`,`left`],Ga=Math.min,J=Math.max,Ka=Math.round,qa=Math.floor,Ja=e=>({x:e,y:e}),Ya={left:`right`,right:`left`,bottom:`top`,top:`bottom`},Xa={start:`end`,end:`start`};function Za(e,t,n){return J(e,Ga(t,n))}function Qa(e,t){return typeof e==`function`?e(t):e}function $a(e){return e.split(`-`)[0]}function eo(e){return e.split(`-`)[1]}function to(e){return e===`x`?`y`:`x`}function no(e){return e===`y`?`height`:`width`}let ro=new Set([`top`,`bottom`]);function io(e){return ro.has($a(e))?`y`:`x`}function ao(e){return to(io(e))}function oo(e,t,n){n===void 0&&(n=!1);let r=eo(e),i=ao(e),a=no(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=go(o)),[o,go(o)]}function so(e){let t=go(e);return[co(e),t,co(t)]}function co(e){return e.replace(/start|end/g,e=>Xa[e])}let lo=[`left`,`right`],uo=[`right`,`left`],fo=[`top`,`bottom`],po=[`bottom`,`top`];function mo(e,t,n){switch(e){case`top`:case`bottom`:return n?t?uo:lo:t?lo:uo;case`left`:case`right`:return t?fo:po;default:return[]}}function ho(e,t,n,r){let i=eo(e),a=mo($a(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(co)))),a}function go(e){return e.replace(/left|right|bottom|top/g,e=>Ya[e])}function _o(e){return{top:0,right:0,bottom:0,left:0,...e}}function vo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:_o(e)}function yo(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function bo(e,t,n){let{reference:r,floating:i}=e,a=io(t),o=ao(t),s=no(o),c=$a(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(eo(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}let xo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=bo(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g==null?u:g,d=_==null?d:_,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=bo(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function So(e,t){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=Qa(t,e),m=vo(p),h=s[f?d===`floating`?`reference`:`floating`:d],g=yo(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),_=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),y=await(a.isElement==null?void 0:a.isElement(v))&&await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},b=yo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:v,strategy:c}):_);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}let Co=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Qa(e,t)||{};if(l==null)return{};let d=vo(u),f={x:n,y:r},p=ao(i),m=no(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ga(d[_],T),D=Ga(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Za(O,A,k),M=!c.arrow&&eo(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),wo=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n,r;let{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p=`bestFit`,fallbackAxisSideDirection:m=`none`,flipAlignment:h=!0,...g}=Qa(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let _=$a(i),v=io(s),y=$a(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=f||(y||!h?[go(s)]:so(s)),S=m!==`none`;!f&&S&&x.push(...ho(s,h,m,b));let C=[s,...x],w=await So(t,g),T=[],E=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&T.push(w[_]),d){let e=oo(i,o,b);T.push(w[e[0]],w[e[1]])}if(E=[...E,{placement:i,overflows:T}],!T.every(e=>e<=0)){var D,O;let e=(((D=a.flip)==null?void 0:D.index)||0)+1,t=C[e];if(t&&(!(d===`alignment`&&v!==io(t))||E.every(e=>io(e.placement)===v?e.overflows[0]>0:!0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=(O=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])==null?void 0:O.placement;if(!n)switch(p){case`bestFit`:{var k;let e=(k=E.filter(e=>{if(S){let t=io(e.placement);return t===v||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])==null?void 0:k[0];e&&(n=e);break}case`initialPlacement`:n=s;break}if(i!==n)return{reset:{placement:n}}}return{}}}};function To(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Eo(e){return Wa.some(t=>e[t]>=0)}let Do=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=Qa(e,t);switch(r){case`referenceHidden`:{let e=To(await So(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Eo(e)}}}case`escaped`:{let e=To(await So(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Eo(e)}}}default:return{}}}}},Oo=new Set([`left`,`top`]);async function ko(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=$a(n),s=eo(n),c=io(n)===`y`,l=Oo.has(o)?-1:1,u=a&&c?-1:1,d=Qa(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}let Ao=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,c=await ko(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},jo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Qa(e,t),l={x:n,y:r},u=await So(t,c),d=io($a(i)),f=to(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=Za(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=Za(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Mo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Qa(e,t),u={x:n,y:r},d=io(i),f=to(d),p=u[f],m=u[d],h=Qa(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var _,v;let e=f===`y`?`width`:`height`,t=Oo.has($a(i)),n=a.reference[d]-a.floating[e]+(t&&((_=o.offset)==null?void 0:_[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:((v=o.offset)==null?void 0:v[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},No=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Qa(e,t),u=await So(t,l),d=$a(i),f=eo(i),p=io(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Ga(h-u[g],v),x=Ga(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=J(u.left,0),t=J(u.right,0),n=J(u.top,0),r=J(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:J(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:J(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Po(){return typeof window<`u`}function Fo(e){return Lo(e)?(e.nodeName||``).toLowerCase():`#document`}function Y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Io(e){var t;return(t=(Lo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lo(e){return Po()?e instanceof Node||e instanceof Y(e).Node:!1}function Ro(e){return Po()?e instanceof Element||e instanceof Y(e).Element:!1}function zo(e){return Po()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function Bo(e){return!Po()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}let Vo=new Set([`inline`,`contents`]);function Ho(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ts(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Vo.has(i)}let Uo=new Set([`table`,`td`,`th`]);function Wo(e){return Uo.has(Fo(e))}let Go=[`:popover-open`,`:modal`];function Ko(e){return Go.some(t=>{try{return e.matches(t)}catch{return!1}})}let qo=[`transform`,`translate`,`scale`,`rotate`,`perspective`],Jo=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],Yo=[`paint`,`layout`,`strict`,`content`];function Xo(e){let t=Qo(),n=Ro(e)?ts(e):e;return qo.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||Jo.some(e=>(n.willChange||``).includes(e))||Yo.some(e=>(n.contain||``).includes(e))}function Zo(e){let t=rs(e);for(;zo(t)&&!es(t);){if(Xo(t))return t;if(Ko(t))return null;t=rs(t)}return null}function Qo(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}let $o=new Set([`html`,`body`,`#document`]);function es(e){return $o.has(Fo(e))}function ts(e){return Y(e).getComputedStyle(e)}function ns(e){return Ro(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rs(e){if(Fo(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Bo(e)&&e.host||Io(e);return Bo(t)?t.host:t}function is(e){let t=rs(e);return es(t)?e.ownerDocument?e.ownerDocument.body:e.body:zo(t)&&Ho(t)?t:is(t)}function as(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let i=is(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Y(i);if(a){let e=os(o);return t.concat(o,o.visualViewport||[],Ho(i)?i:[],e&&n?as(e):[])}return t.concat(i,as(i,[],n))}function os(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ss(e){let t=ts(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=zo(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ka(n)!==a||Ka(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function cs(e){return Ro(e)?e:e.contextElement}function ls(e){let t=cs(e);if(!zo(t))return Ja(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ss(t),o=(a?Ka(n.width):n.width)/r,s=(a?Ka(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}let us=Ja(0);function ds(e){let t=Y(e);return!Qo()||!t.visualViewport?us:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Y(e)?!1:t}function ps(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=cs(e),o=Ja(1);t&&(r?Ro(r)&&(o=ls(r)):o=ls(e));let s=fs(a,n,r)?ds(a):Ja(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Y(a),t=r&&Ro(r)?Y(r):r,n=e,i=os(n);for(;i&&r&&t!==n;){let e=ls(i),t=i.getBoundingClientRect(),r=ts(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Y(i),i=os(n)}}return yo({width:u,height:d,x:c,y:l})}function ms(e,t){let n=ns(e).scrollLeft;return t?t.left+n:ps(Io(e)).left+n}function hs(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ms(e,n),y:n.top+t.scrollTop}}function gs(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Io(r),s=t?Ko(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ja(1),u=Ja(0),d=zo(r);if((d||!d&&!a)&&((Fo(r)!==`body`||Ho(o))&&(c=ns(r)),zo(r))){let e=ps(r);l=ls(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?hs(o,c):Ja(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function _s(e){return Array.from(e.getClientRects())}function vs(e){let t=Io(e),n=ns(e),r=e.ownerDocument.body,i=J(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=J(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ms(e),s=-n.scrollTop;return ts(r).direction===`rtl`&&(o+=J(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function ys(e,t){let n=Y(e),r=Io(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Qo();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=ms(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else l<=25&&(a+=l);return{width:a,height:o,x:s,y:c}}let bs=new Set([`absolute`,`fixed`]);function xs(e,t){let n=ps(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=zo(e)?ls(e):Ja(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ss(e,t,n){let r;if(t===`viewport`)r=ys(e,n);else if(t===`document`)r=vs(Io(e));else if(Ro(t))r=xs(t,n);else{let n=ds(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return yo(r)}function Cs(e,t){let n=rs(e);return n===t||!Ro(n)||es(n)?!1:ts(n).position===`fixed`||Cs(n,t)}function ws(e,t){let n=t.get(e);if(n)return n;let r=as(e,[],!1).filter(e=>Ro(e)&&Fo(e)!==`body`),i=null,a=ts(e).position===`fixed`,o=a?rs(e):e;for(;Ro(o)&&!es(o);){let t=ts(o),n=Xo(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&bs.has(i.position)||Ho(o)&&!n&&Cs(e,o))?r=r.filter(e=>e!==o):i=t,o=rs(o)}return t.set(e,r),r}function Ts(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ko(t)?[]:ws(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Ss(t,n,i);return e.top=J(r.top,e.top),e.right=Ga(r.right,e.right),e.bottom=Ga(r.bottom,e.bottom),e.left=J(r.left,e.left),e},Ss(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Es(e){let{width:t,height:n}=ss(e);return{width:t,height:n}}function Ds(e,t,n){let r=zo(t),i=Io(t),a=n===`fixed`,o=ps(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ja(0);function l(){c.x=ms(i)}if(r||!r&&!a)if((Fo(t)!==`body`||Ho(i))&&(s=ns(t)),r){let e=ps(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?hs(i,s):Ja(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Os(e){return ts(e).position===`static`}function ks(e,t){if(!zo(e)||ts(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Io(e)===n&&(n=n.ownerDocument.body),n}function As(e,t){let n=Y(e);if(Ko(e))return n;if(!zo(e)){let t=rs(e);for(;t&&!es(t);){if(Ro(t)&&!Os(t))return t;t=rs(t)}return n}let r=ks(e,t);for(;r&&Wo(r)&&Os(r);)r=ks(r,t);return r&&es(r)&&Os(r)&&!Xo(r)?n:r||Zo(e)||n}let js=async function(e){let t=this.getOffsetParent||As,n=this.getDimensions,r=await n(e.floating);return{reference:Ds(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ms(e){return ts(e).direction===`rtl`}let Ns={convertOffsetParentRelativeRectToViewportRelativeRect:gs,getDocumentElement:Io,getClippingRect:Ts,getOffsetParent:As,getElementRects:js,getClientRects:_s,getDimensions:Es,getScale:ls,isElement:Ro,isRTL:Ms};function Ps(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fs(e,t){let n=null,r,i=Io(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=qa(d),h=qa(i.clientWidth-(u+f)),g=qa(i.clientHeight-(d+p)),_=qa(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:J(0,Ga(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ps(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Is(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=cs(e),u=i||a?[...l?as(l):[],...as(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Fs(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?ps(e):null;c&&g();function g(){let t=ps(e);h&&!Ps(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d==null||d(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}let Ls=Ao,Rs=jo,zs=wo,Bs=No,Vs=Do,Hs=Co,Us=Mo,Ws=(e,t,n)=>{let r=new Map,i={platform:Ns,...n},a={...i.platform,_c:r};return xo(e,t,{...i,platform:a})};var Gs=typeof document<`u`?t.useLayoutEffect:function(){};function Ks(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ks(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ks(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function qs(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Js(e,t){let n=qs(e);return Math.round(t*n)/n}function Ys(e){let n=t.useRef(e);return Gs(()=>{n.current=e}),n}function Xs(e){e===void 0&&(e={});let{placement:n=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=t.useState({x:0,y:0,strategy:i,placement:n,middlewareData:{},isPositioned:!1}),[m,h]=t.useState(a);Ks(m,a)||h(a);let[g,_]=t.useState(null),[v,y]=t.useState(null),b=t.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=t.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=s||g,C=c||v,w=t.useRef(null),T=t.useRef(null),E=t.useRef(f),D=u!=null,O=Ys(u),k=Ys(o),A=Ys(d),j=t.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:n,strategy:i,middleware:m};k.current&&(e.platform=k.current),Ws(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Ks(E.current,t)&&(E.current=t,r.flushSync(()=>{p(t)}))})},[m,n,i,k,A]);Gs(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let M=t.useRef(!1);Gs(()=>(M.current=!0,()=>{M.current=!1}),[]),Gs(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=t.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=t.useMemo(()=>({reference:S,floating:C}),[S,C]),F=t.useMemo(()=>{let e={position:i,left:0,top:0};if(!P.floating)return e;let t=Js(P.floating,f.x),n=Js(P.floating,f.y);return l?{...e,transform:`translate(`+t+`px, `+n+`px)`,...qs(P.floating)>=1.5&&{willChange:`transform`}}:{position:i,left:t,top:n}},[i,l,P.floating,f.x,f.y]);return t.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:F}),[f,j,N,P,F])}let Zs=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Hs({element:r.current,padding:i}).fn(n):r?Hs({element:r,padding:i}).fn(n):{}}}},Qs=(e,t)=>({...Ls(e),options:[e,t]}),$s=(e,t)=>({...Rs(e),options:[e,t]}),ec=(e,t)=>({...Us(e),options:[e,t]}),tc=(e,t)=>({...zs(e),options:[e,t]}),nc=(e,t)=>({...Bs(e),options:[e,t]}),rc=(e,t)=>({...Vs(e),options:[e,t]}),ic=(e,t)=>({...Zs(e),options:[e,t]});var ac=`Arrow`,oc=t.forwardRef((e,t)=>{let{children:r,width:i=10,height:a=5,...o}=e;return(0,n.jsx)(K.svg,{...o,ref:t,width:i,height:a,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?r:(0,n.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});oc.displayName=ac;var sc=oc;function cc(e){let[n,r]=t.useState(void 0);return an(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let n=t[0],i,a;if(`borderBoxSize`in n){let e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else r(void 0)},[e]),n}var lc=`Popper`,[uc,dc]=tn(lc),[fc,pc]=uc(lc),mc=e=>{let{__scopePopper:r,children:i}=e,[a,o]=t.useState(null);return(0,n.jsx)(fc,{scope:r,anchor:a,onAnchorChange:o,children:i})};mc.displayName=lc;var hc=`PopperAnchor`,gc=t.forwardRef((e,r)=>{let{__scopePopper:i,virtualRef:a,...o}=e,s=pc(hc,i),c=t.useRef(null),l=U(r,c),u=t.useRef(null);return t.useEffect(()=>{let e=u.current;u.current=(a==null?void 0:a.current)||c.current,e!==u.current&&s.onAnchorChange(u.current)}),a?null:(0,n.jsx)(K.div,{...o,ref:l})});gc.displayName=hc;var _c=`PopperContent`,[vc,yc]=uc(_c),bc=t.forwardRef((e,r)=>{var i,a,o,s,c,l,u,d;let{__scopePopper:f,side:p=`bottom`,sideOffset:m=0,align:h=`center`,alignOffset:g=0,arrowPadding:_=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:x=`partial`,hideWhenDetached:S=!1,updatePositionStrategy:C=`optimized`,onPlaced:w,...T}=e,E=pc(_c,f),[D,O]=t.useState(null),k=U(r,e=>O(e)),[A,j]=t.useState(null),M=cc(A),N=(i=M==null?void 0:M.width)==null?0:i,P=(a=M==null?void 0:M.height)==null?0:a,F=p+(h===`center`?``:`-`+h),I=typeof b==`number`?b:{top:0,right:0,bottom:0,left:0,...b},L=Array.isArray(y)?y:[y],R=L.length>0,ee={padding:I,boundary:L.filter(wc),altBoundary:R},{refs:te,floatingStyles:ne,placement:re,isPositioned:ie,middlewareData:ae}=Xs({strategy:`fixed`,placement:F,whileElementsMounted:(...e)=>Is(...e,{animationFrame:C===`always`}),elements:{reference:E.anchor},middleware:[Qs({mainAxis:m+P,alignmentAxis:g}),v&&$s({mainAxis:!0,crossAxis:!1,limiter:x===`partial`?ec():void 0,...ee}),v&&tc({...ee}),nc({...ee,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),A&&ic({element:A,padding:_}),Tc({arrowWidth:N,arrowHeight:P}),S&&rc({strategy:`referenceHidden`,...ee})]}),[oe,se]=Ec(re),ce=bn(w);an(()=>{ie&&(ce==null||ce())},[ie,ce]);let le=(o=ae.arrow)==null?void 0:o.x,ue=(s=ae.arrow)==null?void 0:s.y,de=((c=ae.arrow)==null?void 0:c.centerOffset)!==0,[fe,pe]=t.useState();return an(()=>{D&&pe(window.getComputedStyle(D).zIndex)},[D]),(0,n.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:ie?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:fe,"--radix-popper-transform-origin":[(l=ae.transformOrigin)==null?void 0:l.x,(u=ae.transformOrigin)==null?void 0:u.y].join(` `),...((d=ae.hide)==null?void 0:d.referenceHidden)&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,n.jsx)(vc,{scope:f,placedSide:oe,onArrowChange:j,arrowX:le,arrowY:ue,shouldHideArrow:de,children:(0,n.jsx)(K.div,{"data-side":oe,"data-align":se,...T,ref:k,style:{...T.style,animation:ie?void 0:`none`}})})})});bc.displayName=_c;var xc=`PopperArrow`,Sc={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Cc=t.forwardRef(function(e,t){let{__scopePopper:r,...i}=e,a=yc(xc,r),o=Sc[a.placedSide];return(0,n.jsx)(`span`,{ref:a.onArrowChange,style:{position:`absolute`,left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[a.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[a.placedSide],visibility:a.shouldHideArrow?`hidden`:void 0},children:(0,n.jsx)(sc,{...i,ref:t,style:{...i.style,display:`block`}})})});Cc.displayName=xc;function wc(e){return e!==null}var Tc=e=>({name:`transformOrigin`,options:e,fn(t){var n,r,i,a,o;let{placement:s,rects:c,middlewareData:l}=t,u=((n=l.arrow)==null?void 0:n.centerOffset)!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,m]=Ec(s),h={start:`0%`,center:`50%`,end:`100%`}[m],g=((r=(i=l.arrow)==null?void 0:i.x)==null?0:r)+d/2,_=((a=(o=l.arrow)==null?void 0:o.y)==null?0:a)+f/2,v=``,y=``;return p===`bottom`?(v=u?h:`${g}px`,y=`${-f}px`):p===`top`?(v=u?h:`${g}px`,y=`${c.floating.height+f}px`):p===`right`?(v=`${-f}px`,y=u?h:`${_}px`):p===`left`&&(v=`${c.floating.width+f}px`,y=u?h:`${_}px`),{data:{x:v,y}}}});function Ec(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Dc=mc,Oc=gc,kc=bc,Ac=Cc,jc=`Popover`,[Mc,Nc]=tn(jc,[dc]),Pc=dc(),[Fc,Ic]=Mc(jc),Lc=e=>{let{__scopePopover:r,children:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,l=Pc(r),u=t.useRef(null),[d,f]=t.useState(!1),[p,m]=un({prop:a,defaultProp:o==null?!1:o,onChange:s,caller:jc});return(0,n.jsx)(Dc,{...l,children:(0,n.jsx)(Fc,{scope:r,contentId:cn(),triggerRef:u,open:p,onOpenChange:m,onOpenToggle:t.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:t.useCallback(()=>f(!0),[]),onCustomAnchorRemove:t.useCallback(()=>f(!1),[]),modal:c,children:i})})};Lc.displayName=jc;var Rc=`PopoverAnchor`,zc=t.forwardRef((e,r)=>{let{__scopePopover:i,...a}=e,o=Ic(Rc,i),s=Pc(i),{onCustomAnchorAdd:c,onCustomAnchorRemove:l}=o;return t.useEffect(()=>(c(),()=>l()),[c,l]),(0,n.jsx)(Oc,{...s,...a,ref:r})});zc.displayName=Rc;var Bc=`PopoverTrigger`,Vc=t.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=Ic(Bc,r),o=Pc(r),s=U(t,a.triggerRef),c=(0,n.jsx)(K.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":nl(a.open),...i,ref:s,onClick:G(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:(0,n.jsx)(Oc,{asChild:!0,...o,children:c})});Vc.displayName=Bc;var Hc=`PopoverPortal`,[Uc,Wc]=Mc(Hc,{forceMount:void 0}),Gc=e=>{let{__scopePopover:t,forceMount:r,children:i,container:a}=e,o=Ic(Hc,t);return(0,n.jsx)(Uc,{scope:t,forceMount:r,children:(0,n.jsx)(q,{present:r||o.open,children:(0,n.jsx)(Qn,{asChild:!0,container:a,children:i})})})};Gc.displayName=Hc;var Kc=`PopoverContent`,qc=t.forwardRef((e,t)=>{let r=Wc(Kc,e.__scopePopover),{forceMount:i=r.forceMount,...a}=e,o=Ic(Kc,e.__scopePopover);return(0,n.jsx)(q,{present:i||o.open,children:o.modal?(0,n.jsx)(Yc,{...a,ref:t}):(0,n.jsx)(Xc,{...a,ref:t})})});qc.displayName=Kc;var Jc=pn(`PopoverContent.RemoveScroll`),Yc=t.forwardRef((e,r)=>{let i=Ic(Kc,e.__scopePopover),a=t.useRef(null),o=U(r,a),s=t.useRef(!1);return t.useEffect(()=>{let e=a.current;if(e)return Ci(e)},[]),(0,n.jsx)(mi,{as:Jc,allowPinchZoom:!0,children:(0,n.jsx)(Zc,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),s.current||(t=i.triggerRef.current)==null||t.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;s.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Xc=t.forwardRef((e,r)=>{let i=Ic(Kc,e.__scopePopover),a=t.useRef(!1),o=t.useRef(!1);return(0,n.jsx)(Zc,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n;if((n=e.onCloseAutoFocus)==null||n.call(e,t),!t.defaultPrevented){var r;a.current||(r=i.triggerRef.current)==null||r.focus(),t.preventDefault()}a.current=!1,o.current=!1},onInteractOutside:t=>{var n,r;(n=e.onInteractOutside)==null||n.call(e,t),t.defaultPrevented||(a.current=!0,t.detail.originalEvent.type===`pointerdown`&&(o.current=!0));let s=t.target;(r=i.triggerRef.current)!=null&&r.contains(s)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&o.current&&t.preventDefault()}})}),Zc=t.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,p=Ic(Kc,r),m=Pc(r);return ir(),(0,n.jsx)(zn,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,n.jsx)(On,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:(0,n.jsx)(kc,{"data-state":nl(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Qc=`PopoverClose`,$c=t.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=Ic(Qc,r);return(0,n.jsx)(K.button,{type:`button`,...i,ref:t,onClick:G(e.onClick,()=>a.onOpenChange(!1))})});$c.displayName=Qc;var el=`PopoverArrow`,tl=t.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=Pc(r);return(0,n.jsx)(Ac,{...a,...i,ref:t})});tl.displayName=el;function nl(e){return e?`open`:`closed`}var rl=Lc,il=Vc,al=Gc,ol=qc;function sl({...e}){return(0,n.jsx)(rl,{"data-slot":`popover`,...e})}function cl({...e}){return(0,n.jsx)(il,{"data-slot":`popover-trigger`,...e})}function ll({className:e,align:t=`center`,sideOffset:r=4,...i}){return(0,n.jsx)(al,{children:(0,n.jsx)(ol,{"data-slot":`popover-content`,align:t,sideOffset:r,className:H(`
249
- univer-outline-hidden
250
- data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0
251
- data-[state=open]:univer-zoom-in-95
252
- data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0
253
- data-[state=closed]:univer-zoom-out-95
254
- data-[side=bottom]:univer-slide-in-from-top-2
255
- data-[side=left]:univer-slide-in-from-right-2
256
- data-[side=right]:univer-slide-in-from-left-2
257
- data-[side=top]:univer-slide-in-from-bottom-2
258
- univer-z-[1080] univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto
259
- univer-rounded-md univer-bg-white univer-text-gray-900 univer-shadow-md
260
- dark:!univer-bg-gray-900 dark:!univer-text-white
261
- dark:focus-visible:!univer-border-gray-600
262
- `,W,Rt,e),...i})})}function ul(e){let{children:r,overlay:i,disabled:a,open:o,onOpenChange:s,...c}=e,[l,u]=(0,t.useState)(!1),d=o!==void 0,f=d?o:l;function p(e){a||(d||u(e),s==null||s(e))}return(0,n.jsxs)(sl,{open:f,onOpenChange:p,children:[(0,n.jsx)(cl,{asChild:!0,children:r}),(0,n.jsx)(ll,{...c,children:i})]})}function dl(e){let{value:r,onValueChange:i,className:a}=e,[o,s]=(0,t.useState)(!1);function c(e){i==null||i(e),s(!1)}return(0,n.jsx)(ul,{align:`start`,overlay:(0,n.jsx)(`div`,{className:`univer-p-2`,children:(0,n.jsx)(Yt,{value:r,onValueChange:c})}),open:o,onOpenChange:s,children:(0,n.jsxs)(`button`,{className:H(`
263
- univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md
264
- univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all
265
- hover:univer-border-primary-600
266
- dark:!univer-text-white
267
- `,W,a),type:`button`,children:[(0,Lt.default)(r).format(`YYYY-MM-DD`),(0,n.jsx)(b,{className:`
268
- univer-text-gray-600
269
- dark:!univer-text-gray-400
270
- `})]})})}function fl(e){let{value:r=[new Date,new Date],onValueChange:i,className:a}=e,[o,s]=(0,t.useState)(!1);function c(e){let[t,n]=e;t>n&&([t,n]=[n,t]),i==null||i([t,n]),s(!1)}return(0,n.jsx)(ul,{align:`start`,overlay:(0,n.jsxs)(`div`,{className:`univer-grid univer-grid-cols-2 univer-gap-2 univer-p-2`,children:[(0,n.jsx)(Yt,{value:r[0],max:r[1],onValueChange:e=>{c([e,r[1]])}}),(0,n.jsx)(Yt,{value:r[1],min:r[0],onValueChange:e=>{c([r[0],e])}})]}),open:o,onOpenChange:s,children:(0,n.jsxs)(`button`,{className:H(`
271
- univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md
272
- univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all
273
- hover:univer-border-primary-600
274
- dark:!univer-text-white
275
- `,W,a),type:`button`,children:[(0,n.jsxs)(`span`,{className:`univer-flex univer-gap-1`,children:[(0,n.jsx)(`span`,{children:(0,Lt.default)(r[0]).format(`YYYY-MM-DD`)}),(0,n.jsx)(`span`,{children:`-`}),(0,n.jsx)(`span`,{children:(0,Lt.default)(r[1]).format(`YYYY-MM-DD`)})]}),(0,n.jsx)(b,{className:`
276
- univer-text-gray-600
277
- dark:!univer-text-gray-400
278
- `})]})})}function pl(e,t,n){if(t===n||t<0||n<0||t>=e.length||n>=e.length)return e;let r=[...e],[i]=r.splice(t,1);return r.splice(n,0,i),r}function ml(e){let{list:i,onListChange:a,idKey:o,itemRender:s,className:c,style:l,draggableHandle:u,rowHeight:d,margin:f=[0,0],onDragStart:p,onDragStop:m,...h}=e,[g,_]=(0,t.useState)(i),v=(0,t.useRef)(i),[y,b]=(0,t.useState)(null),[x,S]=(0,t.useState)(null),[C,w]=(0,t.useState)(null),[T,E]=(0,t.useState)(null),[D,O]=(0,t.useState)(!1),k=(0,t.useRef)(null),A=(0,t.useRef)({x:0,y:0}),j=(0,t.useRef)({width:0,height:0}),M=(0,t.useRef)(null),N=(0,t.useRef)(null),P=(0,t.useRef)(-1);(0,t.useEffect)(()=>{y||(_(i),v.current=i)},[y,i]),(0,t.useEffect)(()=>{O(typeof document<`u`)},[]),(0,t.useEffect)(()=>{if(!y)return;let e=e=>{let t=N.current;if(!t||k.current!==e.pointerId)return;E({x:e.clientX-A.current.x,y:e.clientY-A.current.y});let n=document.elementFromPoint(e.clientX,e.clientY),r=n==null?void 0:n.closest(`[data-draggable-list-item-id]`),i=r==null?void 0:r.dataset.draggableListItemId;!i||i===t||(S(i),_(e=>{let n=e.findIndex(e=>I(e)===t),r=e.findIndex(e=>I(e)===i);if(n<0||r<0||n===r)return e;let a=pl(e,n,r);return v.current=a,a}))},t=e=>{if(k.current!==e.pointerId)return;let t=N.current,n=P.current,r=v.current;if(t){let e=r.findIndex(e=>I(e)===t);m==null||m(void 0,{y:n},{y:e}),n>=0&&a([...r])}k.current=null,M.current=null,N.current=null,P.current=-1,S(null),w(null),E(null),b(null)};return window.addEventListener(`pointermove`,e),window.addEventListener(`pointerup`,t),window.addEventListener(`pointercancel`,t),()=>{window.removeEventListener(`pointermove`,e),window.removeEventListener(`pointerup`,t),window.removeEventListener(`pointercancel`,t)}},[y,m,a]);let F=(0,t.useMemo)(()=>{let[e,t]=f;return{rowGap:`${t}px`,paddingLeft:e?`${e}px`:void 0,paddingRight:e?`${e}px`:void 0,...l}},[f,l]),I=e=>String(e[o]),L=y?g.find(e=>I(e)===y):null;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{...h,className:H(`univer-flex univer-flex-col`,y&&`univer-cursor-grabbing univer-select-none`,c),style:F,children:g.map((e,t)=>{let r=I(e),i=y===r,a=x===r&&!i;return(0,n.jsxs)(`div`,{"data-draggable-list-item-id":r,className:H(`univer-relative univer-transition-all univer-duration-150`,i&&`univer-opacity-0`,a&&`
95
+ hsl(360, 100%, 50%))`},onPointerDown:e=>{o(!0),l(e.clientX)},children:(0,n.jsx)(`div`,{ref:c,className:`univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform univer-duration-75 univer-will-change-transform`,style:{left:f(),transform:`translateY(-50%)`,transition:a?`none`:`all 0.1s ease-out`}})})})}let Ia=(0,t.memo)(Pa),La=(0,t.memo)(Fa),Ra=(0,t.memo)(Oa),za=(0,t.memo)(ja),Ba=(0,t.memo)(Na);function Va({format:e=`hex`,value:r,onChange:i}){if(!Pt)return null;let{locale:a}=(0,t.useContext)(Ft),[o,s]=(0,t.useState)([0,100,100]),[c,l]=(0,t.useState)(1),[u,d]=(0,t.useState)(!1),f=(0,t.useCallback)((e,t,n)=>xa(e,t,n),[]);(0,t.useEffect)(()=>{try{let t=r||(e===`hex`?`#000000`:`rgba(0, 0, 0, 1)`);if(e===`hex`){let[e,n,r]=wa(t);s([e,n,r]),l(1)}else if(e===`rgba`){let[e,n,r,i]=Da(t),[a,o,c]=Ca(e,n,r);s([a,o,c]),l(i)}}catch(e){console.error(`Invalid value:`,e)}},[r,e]);function p(e,t,n){s([e,t,n])}function m(e){l(e)}function h(t,n,r,a=c){if(e===`hex`){let[e,a,o]=f(t,n,r),s=Sa(e,a,o);i==null||i(s)}else if(e===`rgba`){let[e,o,s]=f(t,n,r);i==null||i(`rgba(${e}, ${o}, ${s}, ${a})`)}}function g(){let[t,n,r]=o;if(e===`hex`){let e=Ta(t,n,r);i==null||i(e)}else if(e===`rgba`){let[e,a,o]=f(t,n,r);i==null||i(`rgba(${e}, ${a}, ${o}, ${c})`)}d(!1)}return(0,n.jsxs)(`div`,{"data-u-comp":`color-picker`,className:`univer-cursor-default univer-space-y-2 univer-rounded-lg`,onClick:e=>e.stopPropagation(),children:[(0,n.jsx)(Ba,{hsv:o,onChange:(e,t,n)=>{p(e,t,n),m(1),h(e,t,n,1)}}),(0,n.jsx)(`div`,{className:`univer-flex univer-h-7 univer-items-center`,children:(0,n.jsx)(`a`,{className:`univer-cursor-pointer univer-gap-2 univer-text-sm univer-text-gray-900 univer-transition-opacity hover:univer-opacity-80 dark:!univer-text-white`,onClick:()=>d(!0),children:a==null?void 0:a.ColorPicker.more})}),(0,n.jsx)(ba,{className:`!univer-w-fit !univer-p-2.5`,closable:!1,maskClosable:!1,open:u,onOpenChange:d,children:(0,n.jsxs)(`div`,{className:`univer-grid univer-w-64 univer-gap-2`,children:[(0,n.jsx)(Ia,{hsv:o,onChange:p}),(0,n.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-2`,children:[(0,n.jsx)(`div`,{className:`univer-size-6 univer-flex-shrink-0 univer-rounded-sm`,style:{backgroundColor:e===`hex`?Ta(...o):Ea(...o,c)}}),(0,n.jsxs)(`div`,{className:`univer-flex-1 univer-space-y-2`,children:[(0,n.jsx)(La,{hsv:o,onChange:p}),e===`rgba`&&(0,n.jsx)(Ra,{hsv:o,alpha:c,onChange:m})]})]}),(0,n.jsx)(za,{hsv:o,alpha:c,format:e,onChange:(e,t,n,r)=>{p(e,t,n),r!==void 0&&m(r)}}),(0,n.jsxs)(`footer`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[(0,n.jsx)(Mt,{onClick:()=>d(!1),children:a==null?void 0:a.ColorPicker.cancel}),(0,n.jsx)(Mt,{variant:`primary`,onClick:g,children:a==null?void 0:a.ColorPicker.confirm})]})]})})]})}function Ha(e){let{locale:t,cancelText:r,confirmText:i,onClose:a,onConfirm:o,closable:s=!0}=e;return(0,n.jsxs)(`footer`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[s&&(0,n.jsx)(Mt,{onClick:a,children:r==null?t==null?void 0:t.Confirm.cancel:r}),(0,n.jsx)(Mt,{variant:`primary`,onClick:o,children:i==null?t==null?void 0:t.Confirm.confirm:i})]})}function Ua(e){let{children:r,visible:i=!1,title:a,cancelText:o,confirmText:s,width:c,onClose:l,onConfirm:u,closable:d=!0}=e,{locale:f}=(0,t.useContext)(Ft);return(0,n.jsx)(ba,{open:i,title:a,maskClosable:!1,footer:(0,n.jsx)(Ha,{locale:f,cancelText:o,confirmText:s,onClose:l,onConfirm:u,closable:d}),onClose:l,width:c,closable:d,children:r})}let Wa=[`top`,`right`,`bottom`,`left`],Ga=Math.min,J=Math.max,Ka=Math.round,qa=Math.floor,Ja=e=>({x:e,y:e}),Ya={left:`right`,right:`left`,bottom:`top`,top:`bottom`},Xa={start:`end`,end:`start`};function Za(e,t,n){return J(e,Ga(t,n))}function Qa(e,t){return typeof e==`function`?e(t):e}function $a(e){return e.split(`-`)[0]}function eo(e){return e.split(`-`)[1]}function to(e){return e===`x`?`y`:`x`}function no(e){return e===`y`?`height`:`width`}let ro=new Set([`top`,`bottom`]);function io(e){return ro.has($a(e))?`y`:`x`}function ao(e){return to(io(e))}function oo(e,t,n){n===void 0&&(n=!1);let r=eo(e),i=ao(e),a=no(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=go(o)),[o,go(o)]}function so(e){let t=go(e);return[co(e),t,co(t)]}function co(e){return e.replace(/start|end/g,e=>Xa[e])}let lo=[`left`,`right`],uo=[`right`,`left`],fo=[`top`,`bottom`],po=[`bottom`,`top`];function mo(e,t,n){switch(e){case`top`:case`bottom`:return n?t?uo:lo:t?lo:uo;case`left`:case`right`:return t?fo:po;default:return[]}}function ho(e,t,n,r){let i=eo(e),a=mo($a(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(co)))),a}function go(e){return e.replace(/left|right|bottom|top/g,e=>Ya[e])}function _o(e){return{top:0,right:0,bottom:0,left:0,...e}}function vo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:_o(e)}function yo(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function bo(e,t,n){let{reference:r,floating:i}=e,a=io(t),o=ao(t),s=no(o),c=$a(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(eo(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}let xo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=bo(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g==null?u:g,d=_==null?d:_,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=bo(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function So(e,t){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=Qa(t,e),m=vo(p),h=s[f?d===`floating`?`reference`:`floating`:d],g=yo(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),_=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),y=await(a.isElement==null?void 0:a.isElement(v))&&await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},b=yo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:v,strategy:c}):_);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}let Co=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Qa(e,t)||{};if(l==null)return{};let d=vo(u),f={x:n,y:r},p=ao(i),m=no(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ga(d[_],T),D=Ga(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Za(O,A,k),M=!c.arrow&&eo(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),wo=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n,r;let{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p=`bestFit`,fallbackAxisSideDirection:m=`none`,flipAlignment:h=!0,...g}=Qa(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let _=$a(i),v=io(s),y=$a(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=f||(y||!h?[go(s)]:so(s)),S=m!==`none`;!f&&S&&x.push(...ho(s,h,m,b));let C=[s,...x],w=await So(t,g),T=[],E=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&T.push(w[_]),d){let e=oo(i,o,b);T.push(w[e[0]],w[e[1]])}if(E=[...E,{placement:i,overflows:T}],!T.every(e=>e<=0)){var D,O;let e=(((D=a.flip)==null?void 0:D.index)||0)+1,t=C[e];if(t&&(!(d===`alignment`&&v!==io(t))||E.every(e=>io(e.placement)===v?e.overflows[0]>0:!0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=(O=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])==null?void 0:O.placement;if(!n)switch(p){case`bestFit`:{var k;let e=(k=E.filter(e=>{if(S){let t=io(e.placement);return t===v||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])==null?void 0:k[0];e&&(n=e);break}case`initialPlacement`:n=s;break}if(i!==n)return{reset:{placement:n}}}return{}}}};function To(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Eo(e){return Wa.some(t=>e[t]>=0)}let Do=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=Qa(e,t);switch(r){case`referenceHidden`:{let e=To(await So(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Eo(e)}}}case`escaped`:{let e=To(await So(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Eo(e)}}}default:return{}}}}},Oo=new Set([`left`,`top`]);async function ko(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=$a(n),s=eo(n),c=io(n)===`y`,l=Oo.has(o)?-1:1,u=a&&c?-1:1,d=Qa(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}let Ao=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,c=await ko(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},jo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Qa(e,t),l={x:n,y:r},u=await So(t,c),d=io($a(i)),f=to(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=Za(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=Za(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Mo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Qa(e,t),u={x:n,y:r},d=io(i),f=to(d),p=u[f],m=u[d],h=Qa(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var _,v;let e=f===`y`?`width`:`height`,t=Oo.has($a(i)),n=a.reference[d]-a.floating[e]+(t&&((_=o.offset)==null?void 0:_[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:((v=o.offset)==null?void 0:v[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},No=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Qa(e,t),u=await So(t,l),d=$a(i),f=eo(i),p=io(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Ga(h-u[g],v),x=Ga(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=J(u.left,0),t=J(u.right,0),n=J(u.top,0),r=J(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:J(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:J(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Po(){return typeof window<`u`}function Fo(e){return Lo(e)?(e.nodeName||``).toLowerCase():`#document`}function Y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Io(e){var t;return(t=(Lo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lo(e){return Po()?e instanceof Node||e instanceof Y(e).Node:!1}function Ro(e){return Po()?e instanceof Element||e instanceof Y(e).Element:!1}function zo(e){return Po()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function Bo(e){return!Po()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}let Vo=new Set([`inline`,`contents`]);function Ho(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ts(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Vo.has(i)}let Uo=new Set([`table`,`td`,`th`]);function Wo(e){return Uo.has(Fo(e))}let Go=[`:popover-open`,`:modal`];function Ko(e){return Go.some(t=>{try{return e.matches(t)}catch{return!1}})}let qo=[`transform`,`translate`,`scale`,`rotate`,`perspective`],Jo=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],Yo=[`paint`,`layout`,`strict`,`content`];function Xo(e){let t=Qo(),n=Ro(e)?ts(e):e;return qo.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||Jo.some(e=>(n.willChange||``).includes(e))||Yo.some(e=>(n.contain||``).includes(e))}function Zo(e){let t=rs(e);for(;zo(t)&&!es(t);){if(Xo(t))return t;if(Ko(t))return null;t=rs(t)}return null}function Qo(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}let $o=new Set([`html`,`body`,`#document`]);function es(e){return $o.has(Fo(e))}function ts(e){return Y(e).getComputedStyle(e)}function ns(e){return Ro(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rs(e){if(Fo(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Bo(e)&&e.host||Io(e);return Bo(t)?t.host:t}function is(e){let t=rs(e);return es(t)?e.ownerDocument?e.ownerDocument.body:e.body:zo(t)&&Ho(t)?t:is(t)}function as(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let i=is(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Y(i);if(a){let e=os(o);return t.concat(o,o.visualViewport||[],Ho(i)?i:[],e&&n?as(e):[])}return t.concat(i,as(i,[],n))}function os(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ss(e){let t=ts(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=zo(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ka(n)!==a||Ka(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function cs(e){return Ro(e)?e:e.contextElement}function ls(e){let t=cs(e);if(!zo(t))return Ja(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ss(t),o=(a?Ka(n.width):n.width)/r,s=(a?Ka(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}let us=Ja(0);function ds(e){let t=Y(e);return!Qo()||!t.visualViewport?us:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Y(e)?!1:t}function ps(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=cs(e),o=Ja(1);t&&(r?Ro(r)&&(o=ls(r)):o=ls(e));let s=fs(a,n,r)?ds(a):Ja(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Y(a),t=r&&Ro(r)?Y(r):r,n=e,i=os(n);for(;i&&r&&t!==n;){let e=ls(i),t=i.getBoundingClientRect(),r=ts(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Y(i),i=os(n)}}return yo({width:u,height:d,x:c,y:l})}function ms(e,t){let n=ns(e).scrollLeft;return t?t.left+n:ps(Io(e)).left+n}function hs(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ms(e,n),y:n.top+t.scrollTop}}function gs(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Io(r),s=t?Ko(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ja(1),u=Ja(0),d=zo(r);if((d||!d&&!a)&&((Fo(r)!==`body`||Ho(o))&&(c=ns(r)),zo(r))){let e=ps(r);l=ls(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?hs(o,c):Ja(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function _s(e){return Array.from(e.getClientRects())}function vs(e){let t=Io(e),n=ns(e),r=e.ownerDocument.body,i=J(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=J(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ms(e),s=-n.scrollTop;return ts(r).direction===`rtl`&&(o+=J(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function ys(e,t){let n=Y(e),r=Io(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Qo();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=ms(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else l<=25&&(a+=l);return{width:a,height:o,x:s,y:c}}let bs=new Set([`absolute`,`fixed`]);function xs(e,t){let n=ps(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=zo(e)?ls(e):Ja(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ss(e,t,n){let r;if(t===`viewport`)r=ys(e,n);else if(t===`document`)r=vs(Io(e));else if(Ro(t))r=xs(t,n);else{let n=ds(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return yo(r)}function Cs(e,t){let n=rs(e);return n===t||!Ro(n)||es(n)?!1:ts(n).position===`fixed`||Cs(n,t)}function ws(e,t){let n=t.get(e);if(n)return n;let r=as(e,[],!1).filter(e=>Ro(e)&&Fo(e)!==`body`),i=null,a=ts(e).position===`fixed`,o=a?rs(e):e;for(;Ro(o)&&!es(o);){let t=ts(o),n=Xo(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&bs.has(i.position)||Ho(o)&&!n&&Cs(e,o))?r=r.filter(e=>e!==o):i=t,o=rs(o)}return t.set(e,r),r}function Ts(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ko(t)?[]:ws(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Ss(t,n,i);return e.top=J(r.top,e.top),e.right=Ga(r.right,e.right),e.bottom=Ga(r.bottom,e.bottom),e.left=J(r.left,e.left),e},Ss(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Es(e){let{width:t,height:n}=ss(e);return{width:t,height:n}}function Ds(e,t,n){let r=zo(t),i=Io(t),a=n===`fixed`,o=ps(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ja(0);function l(){c.x=ms(i)}if(r||!r&&!a)if((Fo(t)!==`body`||Ho(i))&&(s=ns(t)),r){let e=ps(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?hs(i,s):Ja(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Os(e){return ts(e).position===`static`}function ks(e,t){if(!zo(e)||ts(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Io(e)===n&&(n=n.ownerDocument.body),n}function As(e,t){let n=Y(e);if(Ko(e))return n;if(!zo(e)){let t=rs(e);for(;t&&!es(t);){if(Ro(t)&&!Os(t))return t;t=rs(t)}return n}let r=ks(e,t);for(;r&&Wo(r)&&Os(r);)r=ks(r,t);return r&&es(r)&&Os(r)&&!Xo(r)?n:r||Zo(e)||n}let js=async function(e){let t=this.getOffsetParent||As,n=this.getDimensions,r=await n(e.floating);return{reference:Ds(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ms(e){return ts(e).direction===`rtl`}let Ns={convertOffsetParentRelativeRectToViewportRelativeRect:gs,getDocumentElement:Io,getClippingRect:Ts,getOffsetParent:As,getElementRects:js,getClientRects:_s,getDimensions:Es,getScale:ls,isElement:Ro,isRTL:Ms};function Ps(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fs(e,t){let n=null,r,i=Io(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=qa(d),h=qa(i.clientWidth-(u+f)),g=qa(i.clientHeight-(d+p)),_=qa(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:J(0,Ga(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ps(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Is(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=cs(e),u=i||a?[...l?as(l):[],...as(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Fs(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?ps(e):null;c&&g();function g(){let t=ps(e);h&&!Ps(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d==null||d(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}let Ls=Ao,Rs=jo,zs=wo,Bs=No,Vs=Do,Hs=Co,Us=Mo,Ws=(e,t,n)=>{let r=new Map,i={platform:Ns,...n},a={...i.platform,_c:r};return xo(e,t,{...i,platform:a})};var Gs=typeof document<`u`?t.useLayoutEffect:function(){};function Ks(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ks(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ks(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function qs(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Js(e,t){let n=qs(e);return Math.round(t*n)/n}function Ys(e){let n=t.useRef(e);return Gs(()=>{n.current=e}),n}function Xs(e){e===void 0&&(e={});let{placement:n=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=t.useState({x:0,y:0,strategy:i,placement:n,middlewareData:{},isPositioned:!1}),[m,h]=t.useState(a);Ks(m,a)||h(a);let[g,_]=t.useState(null),[v,y]=t.useState(null),b=t.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=t.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=s||g,C=c||v,w=t.useRef(null),T=t.useRef(null),E=t.useRef(f),D=u!=null,O=Ys(u),k=Ys(o),A=Ys(d),j=t.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:n,strategy:i,middleware:m};k.current&&(e.platform=k.current),Ws(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Ks(E.current,t)&&(E.current=t,r.flushSync(()=>{p(t)}))})},[m,n,i,k,A]);Gs(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let M=t.useRef(!1);Gs(()=>(M.current=!0,()=>{M.current=!1}),[]),Gs(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=t.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=t.useMemo(()=>({reference:S,floating:C}),[S,C]),F=t.useMemo(()=>{let e={position:i,left:0,top:0};if(!P.floating)return e;let t=Js(P.floating,f.x),n=Js(P.floating,f.y);return l?{...e,transform:`translate(`+t+`px, `+n+`px)`,...qs(P.floating)>=1.5&&{willChange:`transform`}}:{position:i,left:t,top:n}},[i,l,P.floating,f.x,f.y]);return t.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:F}),[f,j,N,P,F])}let Zs=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Hs({element:r.current,padding:i}).fn(n):r?Hs({element:r,padding:i}).fn(n):{}}}},Qs=(e,t)=>({...Ls(e),options:[e,t]}),$s=(e,t)=>({...Rs(e),options:[e,t]}),ec=(e,t)=>({...Us(e),options:[e,t]}),tc=(e,t)=>({...zs(e),options:[e,t]}),nc=(e,t)=>({...Bs(e),options:[e,t]}),rc=(e,t)=>({...Vs(e),options:[e,t]}),ic=(e,t)=>({...Zs(e),options:[e,t]});var ac=`Arrow`,oc=t.forwardRef((e,t)=>{let{children:r,width:i=10,height:a=5,...o}=e;return(0,n.jsx)(K.svg,{...o,ref:t,width:i,height:a,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?r:(0,n.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});oc.displayName=ac;var sc=oc;function cc(e){let[n,r]=t.useState(void 0);return an(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let n=t[0],i,a;if(`borderBoxSize`in n){let e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else r(void 0)},[e]),n}var lc=`Popper`,[uc,dc]=tn(lc),[fc,pc]=uc(lc),mc=e=>{let{__scopePopper:r,children:i}=e,[a,o]=t.useState(null);return(0,n.jsx)(fc,{scope:r,anchor:a,onAnchorChange:o,children:i})};mc.displayName=lc;var hc=`PopperAnchor`,gc=t.forwardRef((e,r)=>{let{__scopePopper:i,virtualRef:a,...o}=e,s=pc(hc,i),c=t.useRef(null),l=U(r,c),u=t.useRef(null);return t.useEffect(()=>{let e=u.current;u.current=(a==null?void 0:a.current)||c.current,e!==u.current&&s.onAnchorChange(u.current)}),a?null:(0,n.jsx)(K.div,{...o,ref:l})});gc.displayName=hc;var _c=`PopperContent`,[vc,yc]=uc(_c),bc=t.forwardRef((e,r)=>{var i,a,o,s,c,l,u,d;let{__scopePopper:f,side:p=`bottom`,sideOffset:m=0,align:h=`center`,alignOffset:g=0,arrowPadding:_=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:x=`partial`,hideWhenDetached:S=!1,updatePositionStrategy:C=`optimized`,onPlaced:w,...T}=e,E=pc(_c,f),[D,O]=t.useState(null),k=U(r,e=>O(e)),[A,j]=t.useState(null),M=cc(A),N=(i=M==null?void 0:M.width)==null?0:i,P=(a=M==null?void 0:M.height)==null?0:a,F=p+(h===`center`?``:`-`+h),I=typeof b==`number`?b:{top:0,right:0,bottom:0,left:0,...b},L=Array.isArray(y)?y:[y],R=L.length>0,ee={padding:I,boundary:L.filter(wc),altBoundary:R},{refs:te,floatingStyles:ne,placement:re,isPositioned:ie,middlewareData:ae}=Xs({strategy:`fixed`,placement:F,whileElementsMounted:(...e)=>Is(...e,{animationFrame:C===`always`}),elements:{reference:E.anchor},middleware:[Qs({mainAxis:m+P,alignmentAxis:g}),v&&$s({mainAxis:!0,crossAxis:!1,limiter:x===`partial`?ec():void 0,...ee}),v&&tc({...ee}),nc({...ee,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),A&&ic({element:A,padding:_}),Tc({arrowWidth:N,arrowHeight:P}),S&&rc({strategy:`referenceHidden`,...ee})]}),[oe,se]=Ec(re),ce=bn(w);an(()=>{ie&&(ce==null||ce())},[ie,ce]);let le=(o=ae.arrow)==null?void 0:o.x,ue=(s=ae.arrow)==null?void 0:s.y,de=((c=ae.arrow)==null?void 0:c.centerOffset)!==0,[fe,pe]=t.useState();return an(()=>{D&&pe(window.getComputedStyle(D).zIndex)},[D]),(0,n.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:ie?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:fe,"--radix-popper-transform-origin":[(l=ae.transformOrigin)==null?void 0:l.x,(u=ae.transformOrigin)==null?void 0:u.y].join(` `),...((d=ae.hide)==null?void 0:d.referenceHidden)&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,n.jsx)(vc,{scope:f,placedSide:oe,onArrowChange:j,arrowX:le,arrowY:ue,shouldHideArrow:de,children:(0,n.jsx)(K.div,{"data-side":oe,"data-align":se,...T,ref:k,style:{...T.style,animation:ie?void 0:`none`}})})})});bc.displayName=_c;var xc=`PopperArrow`,Sc={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Cc=t.forwardRef(function(e,t){let{__scopePopper:r,...i}=e,a=yc(xc,r),o=Sc[a.placedSide];return(0,n.jsx)(`span`,{ref:a.onArrowChange,style:{position:`absolute`,left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[a.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[a.placedSide],visibility:a.shouldHideArrow?`hidden`:void 0},children:(0,n.jsx)(sc,{...i,ref:t,style:{...i.style,display:`block`}})})});Cc.displayName=xc;function wc(e){return e!==null}var Tc=e=>({name:`transformOrigin`,options:e,fn(t){var n,r,i,a,o;let{placement:s,rects:c,middlewareData:l}=t,u=((n=l.arrow)==null?void 0:n.centerOffset)!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,m]=Ec(s),h={start:`0%`,center:`50%`,end:`100%`}[m],g=((r=(i=l.arrow)==null?void 0:i.x)==null?0:r)+d/2,_=((a=(o=l.arrow)==null?void 0:o.y)==null?0:a)+f/2,v=``,y=``;return p===`bottom`?(v=u?h:`${g}px`,y=`${-f}px`):p===`top`?(v=u?h:`${g}px`,y=`${c.floating.height+f}px`):p===`right`?(v=`${-f}px`,y=u?h:`${_}px`):p===`left`&&(v=`${c.floating.width+f}px`,y=u?h:`${_}px`),{data:{x:v,y}}}});function Ec(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Dc=mc,Oc=gc,kc=bc,Ac=Cc,jc=`Popover`,[Mc,Nc]=tn(jc,[dc]),Pc=dc(),[Fc,Ic]=Mc(jc),Lc=e=>{let{__scopePopover:r,children:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,l=Pc(r),u=t.useRef(null),[d,f]=t.useState(!1),[p,m]=un({prop:a,defaultProp:o==null?!1:o,onChange:s,caller:jc});return(0,n.jsx)(Dc,{...l,children:(0,n.jsx)(Fc,{scope:r,contentId:cn(),triggerRef:u,open:p,onOpenChange:m,onOpenToggle:t.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:t.useCallback(()=>f(!0),[]),onCustomAnchorRemove:t.useCallback(()=>f(!1),[]),modal:c,children:i})})};Lc.displayName=jc;var Rc=`PopoverAnchor`,zc=t.forwardRef((e,r)=>{let{__scopePopover:i,...a}=e,o=Ic(Rc,i),s=Pc(i),{onCustomAnchorAdd:c,onCustomAnchorRemove:l}=o;return t.useEffect(()=>(c(),()=>l()),[c,l]),(0,n.jsx)(Oc,{...s,...a,ref:r})});zc.displayName=Rc;var Bc=`PopoverTrigger`,Vc=t.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=Ic(Bc,r),o=Pc(r),s=U(t,a.triggerRef),c=(0,n.jsx)(K.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":nl(a.open),...i,ref:s,onClick:G(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:(0,n.jsx)(Oc,{asChild:!0,...o,children:c})});Vc.displayName=Bc;var Hc=`PopoverPortal`,[Uc,Wc]=Mc(Hc,{forceMount:void 0}),Gc=e=>{let{__scopePopover:t,forceMount:r,children:i,container:a}=e,o=Ic(Hc,t);return(0,n.jsx)(Uc,{scope:t,forceMount:r,children:(0,n.jsx)(q,{present:r||o.open,children:(0,n.jsx)(Qn,{asChild:!0,container:a,children:i})})})};Gc.displayName=Hc;var Kc=`PopoverContent`,qc=t.forwardRef((e,t)=>{let r=Wc(Kc,e.__scopePopover),{forceMount:i=r.forceMount,...a}=e,o=Ic(Kc,e.__scopePopover);return(0,n.jsx)(q,{present:i||o.open,children:o.modal?(0,n.jsx)(Yc,{...a,ref:t}):(0,n.jsx)(Xc,{...a,ref:t})})});qc.displayName=Kc;var Jc=pn(`PopoverContent.RemoveScroll`),Yc=t.forwardRef((e,r)=>{let i=Ic(Kc,e.__scopePopover),a=t.useRef(null),o=U(r,a),s=t.useRef(!1);return t.useEffect(()=>{let e=a.current;if(e)return Ci(e)},[]),(0,n.jsx)(mi,{as:Jc,allowPinchZoom:!0,children:(0,n.jsx)(Zc,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),s.current||(t=i.triggerRef.current)==null||t.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;s.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Xc=t.forwardRef((e,r)=>{let i=Ic(Kc,e.__scopePopover),a=t.useRef(!1),o=t.useRef(!1);return(0,n.jsx)(Zc,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n;if((n=e.onCloseAutoFocus)==null||n.call(e,t),!t.defaultPrevented){var r;a.current||(r=i.triggerRef.current)==null||r.focus(),t.preventDefault()}a.current=!1,o.current=!1},onInteractOutside:t=>{var n,r;(n=e.onInteractOutside)==null||n.call(e,t),t.defaultPrevented||(a.current=!0,t.detail.originalEvent.type===`pointerdown`&&(o.current=!0));let s=t.target;(r=i.triggerRef.current)!=null&&r.contains(s)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&o.current&&t.preventDefault()}})}),Zc=t.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,p=Ic(Kc,r),m=Pc(r);return ir(),(0,n.jsx)(zn,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,n.jsx)(On,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:(0,n.jsx)(kc,{"data-state":nl(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Qc=`PopoverClose`,$c=t.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=Ic(Qc,r);return(0,n.jsx)(K.button,{type:`button`,...i,ref:t,onClick:G(e.onClick,()=>a.onOpenChange(!1))})});$c.displayName=Qc;var el=`PopoverArrow`,tl=t.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=Pc(r);return(0,n.jsx)(Ac,{...a,...i,ref:t})});tl.displayName=el;function nl(e){return e?`open`:`closed`}var rl=Lc,il=Vc,al=Gc,ol=qc;function sl({...e}){return(0,n.jsx)(rl,{"data-slot":`popover`,...e})}function cl({...e}){return(0,n.jsx)(il,{"data-slot":`popover-trigger`,...e})}function ll({className:e,align:t=`center`,sideOffset:r=4,...i}){return(0,n.jsx)(al,{children:(0,n.jsx)(ol,{"data-slot":`popover-content`,align:t,sideOffset:r,className:H(`univer-outline-hidden data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto univer-rounded-md univer-bg-white univer-text-gray-900 univer-shadow-md dark:!univer-bg-gray-900 dark:!univer-text-white dark:focus-visible:!univer-border-gray-600`,W,Rt,e),...i})})}function ul(e){let{children:r,overlay:i,disabled:a,open:o,onOpenChange:s,...c}=e,[l,u]=(0,t.useState)(!1),d=o!==void 0,f=d?o:l;function p(e){a||(d||u(e),s==null||s(e))}return(0,n.jsxs)(sl,{open:f,onOpenChange:p,children:[(0,n.jsx)(cl,{asChild:!0,children:r}),(0,n.jsx)(ll,{...c,children:i})]})}function dl(e){let{value:r,onValueChange:i,className:a}=e,[o,s]=(0,t.useState)(!1);function c(e){i==null||i(e),s(!1)}return(0,n.jsx)(ul,{align:`start`,overlay:(0,n.jsx)(`div`,{className:`univer-p-2`,children:(0,n.jsx)(Yt,{value:r,onValueChange:c})}),open:o,onOpenChange:s,children:(0,n.jsxs)(`button`,{className:H(`univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-white`,W,a),type:`button`,children:[(0,Lt.default)(r).format(`YYYY-MM-DD`),(0,n.jsx)(b,{className:`univer-text-gray-600 dark:!univer-text-gray-400`})]})})}function fl(e){let{value:r=[new Date,new Date],onValueChange:i,className:a}=e,[o,s]=(0,t.useState)(!1);function c(e){let[t,n]=e;t>n&&([t,n]=[n,t]),i==null||i([t,n]),s(!1)}return(0,n.jsx)(ul,{align:`start`,overlay:(0,n.jsxs)(`div`,{className:`univer-grid univer-grid-cols-2 univer-gap-2 univer-p-2`,children:[(0,n.jsx)(Yt,{value:r[0],max:r[1],onValueChange:e=>{c([e,r[1]])}}),(0,n.jsx)(Yt,{value:r[1],min:r[0],onValueChange:e=>{c([r[0],e])}})]}),open:o,onOpenChange:s,children:(0,n.jsxs)(`button`,{className:H(`univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-white`,W,a),type:`button`,children:[(0,n.jsxs)(`span`,{className:`univer-flex univer-gap-1`,children:[(0,n.jsx)(`span`,{children:(0,Lt.default)(r[0]).format(`YYYY-MM-DD`)}),(0,n.jsx)(`span`,{children:`-`}),(0,n.jsx)(`span`,{children:(0,Lt.default)(r[1]).format(`YYYY-MM-DD`)})]}),(0,n.jsx)(b,{className:`univer-text-gray-600 dark:!univer-text-gray-400`})]})})}function pl(e,t,n){if(t===n||t<0||n<0||t>=e.length||n>=e.length)return e;let r=[...e],[i]=r.splice(t,1);return r.splice(n,0,i),r}function ml(e){let{list:i,onListChange:a,idKey:o,itemRender:s,className:c,style:l,draggableHandle:u,rowHeight:d,margin:f=[0,0],onDragStart:p,onDragStop:m,...h}=e,[g,_]=(0,t.useState)(i),v=(0,t.useRef)(i),[y,b]=(0,t.useState)(null),[x,S]=(0,t.useState)(null),[C,w]=(0,t.useState)(null),[T,E]=(0,t.useState)(null),[D,O]=(0,t.useState)(!1),k=(0,t.useRef)(null),A=(0,t.useRef)({x:0,y:0}),j=(0,t.useRef)({width:0,height:0}),M=(0,t.useRef)(null),N=(0,t.useRef)(null),P=(0,t.useRef)(null),F=(0,t.useRef)(-1);(0,t.useEffect)(()=>{y||(_(i),v.current=i)},[y,i]),(0,t.useEffect)(()=>{O(typeof document<`u`)},[]),(0,t.useEffect)(()=>{let e=M.current;e&&(e.replaceChildren(),C&&e.appendChild(C))},[C]),(0,t.useEffect)(()=>{if(!y)return;let e=e=>{let t=P.current;if(!t||k.current!==e.pointerId)return;E({x:e.clientX-A.current.x,y:e.clientY-A.current.y});let n=document.elementFromPoint(e.clientX,e.clientY),r=n==null?void 0:n.closest(`[data-draggable-list-item-id]`),i=r==null?void 0:r.dataset.draggableListItemId;!i||i===t||(S(i),_(e=>{let n=e.findIndex(e=>L(e)===t),r=e.findIndex(e=>L(e)===i);if(n<0||r<0||n===r)return e;let a=pl(e,n,r);return v.current=a,a}))},t=e=>{if(k.current!==e.pointerId)return;let t=P.current,n=F.current,r=v.current;if(t){let e=r.findIndex(e=>L(e)===t);m==null||m(void 0,{y:n},{y:e}),n>=0&&a([...r])}k.current=null,N.current=null,P.current=null,F.current=-1,S(null),w(null),E(null),b(null)};return window.addEventListener(`pointermove`,e),window.addEventListener(`pointerup`,t),window.addEventListener(`pointercancel`,t),()=>{window.removeEventListener(`pointermove`,e),window.removeEventListener(`pointerup`,t),window.removeEventListener(`pointercancel`,t)}},[y,m,a]);let I=(0,t.useMemo)(()=>{let[e,t]=f;return{rowGap:`${t}px`,paddingLeft:e?`${e}px`:void 0,paddingRight:e?`${e}px`:void 0,...l}},[f,l]),L=e=>String(e[o]),R=y?g.find(e=>L(e)===y):null;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{...h,className:H(`univer-flex univer-flex-col`,y&&`univer-cursor-grabbing univer-select-none`,c),style:I,children:g.map((e,t)=>{let r=L(e),i=y===r,a=x===r&&!i;return(0,n.jsxs)(`div`,{"data-draggable-list-item-id":r,className:H(`univer-relative univer-transition-all univer-duration-150`,i&&`univer-opacity-0`,a&&`
279
96
  univer-bg-primary-50/60
280
97
  dark:!univer-bg-primary-900/20
281
98
  univer-rounded univer-border univer-border-primary-200
282
99
  dark:!univer-border-primary-700
283
- `),onPointerDownCapture:e=>{if(k.current!==null||(u?M.current=e.target.closest(u)?r:null:M.current=r,M.current!==r))return;let n=e.currentTarget.getBoundingClientRect();A.current={x:e.clientX-n.left,y:e.clientY-n.top},j.current={width:n.width,height:n.height},E({x:n.left,y:n.top}),w(e.currentTarget.innerHTML),k.current=e.pointerId,N.current=r,P.current=t,b(r),v.current=g,p==null||p(void 0,{y:t}),e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId)},style:{...d?{minHeight:`${d}px`}:void 0,cursor:y?`grabbing`:void 0},children:[i&&(0,n.jsx)(`div`,{className:`
100
+ `),onPointerDownCapture:e=>{if(k.current!==null||(u?N.current=e.target.closest(u)?r:null:N.current=r,N.current!==r))return;let n=e.currentTarget.getBoundingClientRect();A.current={x:e.clientX-n.left,y:e.clientY-n.top},j.current={width:n.width,height:n.height},E({x:n.left,y:n.top}),w(e.currentTarget.cloneNode(!0)),k.current=e.pointerId,P.current=r,F.current=t,b(r),v.current=g,p==null||p(void 0,{y:t}),e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId)},style:{...d?{minHeight:`${d}px`}:void 0,cursor:y?`grabbing`:void 0},children:[i&&(0,n.jsx)(`div`,{className:`
284
101
  univer-bg-primary-50/50 univer-absolute univer-inset-0 univer-rounded
285
102
  univer-border univer-border-dashed univer-border-primary-300
286
- `}),s(e,t)]},r)})}),D&&L&&T&&(0,r.createPortal)((0,n.jsx)(`div`,{className:H(`
287
- univer-pointer-events-none univer-fixed univer-rounded-md univer-border univer-border-gray-200
288
- univer-bg-white univer-shadow-lg
289
- dark:!univer-border-gray-700 dark:!univer-bg-gray-800
290
- `),style:{zIndex:2147483647,left:`${T.x}px`,top:`${T.y}px`,width:`${j.current.width}px`,height:`${j.current.height}px`,opacity:.95},children:C?(0,n.jsx)(`div`,{dangerouslySetInnerHTML:{__html:C}}):s(L,g.findIndex(e=>I(e)===I(L)))}),document.body)]})}function hl(e){let r=e+`CollectionProvider`,[i,a]=tn(r),[o,s]=i(r,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:i}=e,a=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,n.jsx)(o,{scope:r,itemMap:s,collectionRef:a,children:i})};c.displayName=r;let l=e+`CollectionSlot`,u=pn(l),d=t.default.forwardRef((e,t)=>{let{scope:r,children:i}=e;return(0,n.jsx)(u,{ref:U(t,s(l,r).collectionRef),children:i})});d.displayName=l;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=pn(f),h=t.default.forwardRef((e,r)=>{let{scope:i,children:a,...o}=e,c=t.default.useRef(null),l=U(r,c),u=s(f,i);return t.default.useEffect(()=>(u.itemMap.set(c,{ref:c,...o}),()=>void u.itemMap.delete(c))),(0,n.jsx)(m,{[p]:``,ref:l,children:a})});h.displayName=f;function g(n){let r=s(e+`CollectionConsumer`,n);return t.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])}return[{Provider:c,Slot:d,ItemSlot:h},g,a]}Map;var gl=t.createContext(void 0);function _l(e){let n=t.useContext(gl);return e||n||`ltr`}var vl=`rovingFocusGroup.onEntryFocus`,yl={bubbles:!1,cancelable:!0},bl=`RovingFocusGroup`,[xl,Sl,Cl]=hl(bl),[wl,Tl]=tn(bl,[Cl]),[El,Dl]=wl(bl),Ol=t.forwardRef((e,t)=>(0,n.jsx)(xl.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,n.jsx)(xl.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,n.jsx)(kl,{...e,ref:t})})}));Ol.displayName=bl;var kl=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,orientation:a,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=t.useRef(null),h=U(r,m),g=_l(s),[_,v]=un({prop:c,defaultProp:l==null?null:l,onChange:u,caller:bl}),[y,b]=t.useState(!1),x=bn(d),S=Sl(i),C=t.useRef(!1),[w,T]=t.useState(0);return t.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(vl,x),()=>e.removeEventListener(vl,x)},[x]),(0,n.jsx)(El,{scope:i,orientation:a,dir:g,loop:o,currentTabStopId:_,onItemFocus:t.useCallback(e=>v(e),[v]),onItemShiftTab:t.useCallback(()=>b(!0),[]),onFocusableItemAdd:t.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>T(e=>e-1),[]),children:(0,n.jsx)(K.div,{tabIndex:y||w===0?-1:0,"data-orientation":a,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:G(e.onMouseDown,()=>{C.current=!0}),onFocus:G(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(vl,yl);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Fl([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}C.current=!1}),onBlur:G(e.onBlur,()=>b(!1))})})}),Al=`RovingFocusGroupItem`,jl=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,focusable:a=!0,active:o=!1,tabStopId:s,children:c,...l}=e,u=cn(),d=s||u,f=Dl(Al,i),p=f.currentTabStopId===d,m=Sl(i),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=f;return t.useEffect(()=>{if(a)return h(),()=>g()},[a,h,g]),(0,n.jsx)(xl.ItemSlot,{scope:i,id:d,focusable:a,active:o,children:(0,n.jsx)(K.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:r,onMouseDown:G(e.onMouseDown,e=>{a?f.onItemFocus(d):e.preventDefault()}),onFocus:G(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:G(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Pl(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?Il(n,r+1):n.slice(r+1)}setTimeout(()=>Fl(n))}}),children:typeof c==`function`?c({isCurrentTabStop:p,hasTabStop:_!=null}):c})})});jl.displayName=Al;var Ml={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Nl(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Pl(e,t,n){let r=Nl(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ml[r]}function Fl(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Il(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ll=Ol,Rl=jl,zl=[`Enter`,` `],Bl=[`ArrowDown`,`PageUp`,`Home`],Vl=[`ArrowUp`,`PageDown`,`End`],Hl=[...Bl,...Vl],Ul={ltr:[...zl,`ArrowRight`],rtl:[...zl,`ArrowLeft`]},Wl={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Gl=`Menu`,[Kl,ql,Jl]=hl(Gl),[Yl,Xl]=tn(Gl,[Jl,dc,Tl]),Zl=dc(),Ql=Tl(),[$l,eu]=Yl(Gl),[tu,nu]=Yl(Gl),ru=e=>{let{__scopeMenu:r,open:i=!1,children:a,dir:o,onOpenChange:s,modal:c=!0}=e,l=Zl(r),[u,d]=t.useState(null),f=t.useRef(!1),p=bn(s),m=_l(o);return t.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,n.jsx)(Dc,{...l,children:(0,n.jsx)($l,{scope:r,open:i,onOpenChange:p,content:u,onContentChange:d,children:(0,n.jsx)(tu,{scope:r,onClose:t.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:c,children:a})})})};ru.displayName=Gl;var iu=`MenuAnchor`,au=t.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e,a=Zl(r);return(0,n.jsx)(Oc,{...a,...i,ref:t})});au.displayName=iu;var ou=`MenuPortal`,[su,cu]=Yl(ou,{forceMount:void 0}),lu=e=>{let{__scopeMenu:t,forceMount:r,children:i,container:a}=e,o=eu(ou,t);return(0,n.jsx)(su,{scope:t,forceMount:r,children:(0,n.jsx)(q,{present:r||o.open,children:(0,n.jsx)(Qn,{asChild:!0,container:a,children:i})})})};lu.displayName=ou;var X=`MenuContent`,[uu,du]=Yl(X),fu=t.forwardRef((e,t)=>{let r=cu(X,e.__scopeMenu),{forceMount:i=r.forceMount,...a}=e,o=eu(X,e.__scopeMenu),s=nu(X,e.__scopeMenu);return(0,n.jsx)(Kl.Provider,{scope:e.__scopeMenu,children:(0,n.jsx)(q,{present:i||o.open,children:(0,n.jsx)(Kl.Slot,{scope:e.__scopeMenu,children:s.modal?(0,n.jsx)(pu,{...a,ref:t}):(0,n.jsx)(mu,{...a,ref:t})})})})}),pu=t.forwardRef((e,r)=>{let i=eu(X,e.__scopeMenu),a=t.useRef(null),o=U(r,a);return t.useEffect(()=>{let e=a.current;if(e)return Ci(e)},[]),(0,n.jsx)(gu,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})}),mu=t.forwardRef((e,t)=>{let r=eu(X,e.__scopeMenu);return(0,n.jsx)(gu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),hu=pn(`MenuContent.ScrollLock`),gu=t.forwardRef((e,r)=>{let{__scopeMenu:i,loop:a=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=eu(X,i),y=nu(X,i),b=Zl(i),x=Ql(i),S=ql(i),[C,w]=t.useState(null),T=t.useRef(null),E=U(r,T,v.onContentChange),D=t.useRef(0),O=t.useRef(``),k=t.useRef(0),A=t.useRef(null),j=t.useRef(`right`),M=t.useRef(0),N=g?mi:t.Fragment,P=g?{as:hu,allowPinchZoom:!0}:void 0,F=e=>{var t,n;let r=O.current+e,i=S().filter(e=>!e.disabled),a=document.activeElement,o=(t=i.find(e=>e.ref.current===a))==null?void 0:t.textValue,s=ed(i.map(e=>e.textValue),r,o),c=(n=i.find(e=>e.textValue===s))==null?void 0:n.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(r),c&&setTimeout(()=>c.focus())};t.useEffect(()=>()=>window.clearTimeout(D.current),[]),ir();let I=t.useCallback(e=>{var t,n;return j.current===((t=A.current)==null?void 0:t.side)&&nd(e,(n=A.current)==null?void 0:n.area)},[]);return(0,n.jsx)(uu,{scope:i,searchRef:O,onItemEnter:t.useCallback(e=>{I(e)&&e.preventDefault()},[I]),onItemLeave:t.useCallback(e=>{var t;I(e)||((t=T.current)==null||t.focus(),w(null))},[I]),onTriggerLeave:t.useCallback(e=>{I(e)&&e.preventDefault()},[I]),pointerGraceTimerRef:k,onPointerGraceIntentChange:t.useCallback(e=>{A.current=e},[]),children:(0,n.jsx)(N,{...P,children:(0,n.jsx)(zn,{asChild:!0,trapped:o,onMountAutoFocus:G(s,e=>{var t;e.preventDefault(),(t=T.current)==null||t.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,n.jsx)(On,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,n.jsx)(Ll,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:a,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:G(u,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,n.jsx)(kc,{role:`menu`,"aria-orientation":`vertical`,"data-state":Yu(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:G(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&F(e.key));let i=T.current;if(e.target!==i||!Hl.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);Vl.includes(e.key)&&a.reverse(),Qu(a)}),onBlur:G(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:G(e.onPointerMove,rd(e=>{let t=e.target,n=M.current!==e.clientX;e.currentTarget.contains(t)&&n&&(j.current=e.clientX>M.current?`right`:`left`,M.current=e.clientX)}))})})})})})})});fu.displayName=X;var _u=`MenuGroup`,vu=t.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(K.div,{role:`group`,...i,ref:t})});vu.displayName=_u;var yu=`MenuLabel`,bu=t.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(K.div,{...i,ref:t})});bu.displayName=yu;var xu=`MenuItem`,Su=`menu.itemSelect`,Cu=t.forwardRef((e,r)=>{let{disabled:i=!1,onSelect:a,...o}=e,s=t.useRef(null),c=nu(xu,e.__scopeMenu),l=du(xu,e.__scopeMenu),u=U(r,s),d=t.useRef(!1),f=()=>{let e=s.current;if(!i&&e){let t=new CustomEvent(Su,{bubbles:!0,cancelable:!0});e.addEventListener(Su,e=>a==null?void 0:a(e),{once:!0}),yn(e,t),t.defaultPrevented?d.current=!1:c.onClose()}};return(0,n.jsx)(wu,{...o,ref:u,disabled:i,onClick:G(e.onClick,f),onPointerDown:t=>{var n;(n=e.onPointerDown)==null||n.call(e,t),d.current=!0},onPointerUp:G(e.onPointerUp,e=>{var t;d.current||(t=e.currentTarget)==null||t.click()}),onKeyDown:G(e.onKeyDown,e=>{let t=l.searchRef.current!==``;i||t&&e.key===` `||zl.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Cu.displayName=xu;var wu=t.forwardRef((e,r)=>{let{__scopeMenu:i,disabled:a=!1,textValue:o,...s}=e,c=du(xu,i),l=Ql(i),u=t.useRef(null),d=U(r,u),[f,p]=t.useState(!1),[m,h]=t.useState(``);return t.useEffect(()=>{let e=u.current;if(e){var t;h(((t=e.textContent)==null?``:t).trim())}},[s.children]),(0,n.jsx)(Kl.ItemSlot,{scope:i,disabled:a,textValue:o==null?m:o,children:(0,n.jsx)(Rl,{asChild:!0,...l,focusable:!a,children:(0,n.jsx)(K.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":a||void 0,"data-disabled":a?``:void 0,...s,ref:d,onPointerMove:G(e.onPointerMove,rd(e=>{a?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:G(e.onPointerLeave,rd(e=>c.onItemLeave(e))),onFocus:G(e.onFocus,()=>p(!0)),onBlur:G(e.onBlur,()=>p(!1))})})})}),Tu=`MenuCheckboxItem`,Eu=t.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:i,...a}=e;return(0,n.jsx)(Pu,{scope:e.__scopeMenu,checked:r,children:(0,n.jsx)(Cu,{role:`menuitemcheckbox`,"aria-checked":Xu(r)?`mixed`:r,...a,ref:t,"data-state":Zu(r),onSelect:G(a.onSelect,()=>i==null?void 0:i(Xu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Eu.displayName=Tu;var Du=`MenuRadioGroup`,[Ou,ku]=Yl(Du,{value:void 0,onValueChange:()=>{}}),Au=t.forwardRef((e,t)=>{let{value:r,onValueChange:i,...a}=e,o=bn(i);return(0,n.jsx)(Ou,{scope:e.__scopeMenu,value:r,onValueChange:o,children:(0,n.jsx)(vu,{...a,ref:t})})});Au.displayName=Du;var ju=`MenuRadioItem`,Mu=t.forwardRef((e,t)=>{let{value:r,...i}=e,a=ku(ju,e.__scopeMenu),o=r===a.value;return(0,n.jsx)(Pu,{scope:e.__scopeMenu,checked:o,children:(0,n.jsx)(Cu,{role:`menuitemradio`,"aria-checked":o,...i,ref:t,"data-state":Zu(o),onSelect:G(i.onSelect,()=>{var e;return(e=a.onValueChange)==null?void 0:e.call(a,r)},{checkForDefaultPrevented:!1})})})});Mu.displayName=ju;var Nu=`MenuItemIndicator`,[Pu,Fu]=Yl(Nu,{checked:!1}),Iu=t.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:i,...a}=e,o=Fu(Nu,r);return(0,n.jsx)(q,{present:i||Xu(o.checked)||o.checked===!0,children:(0,n.jsx)(K.span,{...a,ref:t,"data-state":Zu(o.checked)})})});Iu.displayName=Nu;var Lu=`MenuSeparator`,Ru=t.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(K.div,{role:`separator`,"aria-orientation":`horizontal`,...i,ref:t})});Ru.displayName=Lu;var zu=`MenuArrow`,Bu=t.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e,a=Zl(r);return(0,n.jsx)(Ac,{...a,...i,ref:t})});Bu.displayName=zu;var Vu=`MenuSub`,[Hu,Uu]=Yl(Vu),Wu=e=>{let{__scopeMenu:r,children:i,open:a=!1,onOpenChange:o}=e,s=eu(Vu,r),c=Zl(r),[l,u]=t.useState(null),[d,f]=t.useState(null),p=bn(o);return t.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),(0,n.jsx)(Dc,{...c,children:(0,n.jsx)($l,{scope:r,open:a,onOpenChange:p,content:d,onContentChange:f,children:(0,n.jsx)(Hu,{scope:r,contentId:cn(),triggerId:cn(),trigger:l,onTriggerChange:u,children:i})})})};Wu.displayName=Vu;var Gu=`MenuSubTrigger`,Ku=t.forwardRef((e,r)=>{let i=eu(Gu,e.__scopeMenu),a=nu(Gu,e.__scopeMenu),o=Uu(Gu,e.__scopeMenu),s=du(Gu,e.__scopeMenu),c=t.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},f=t.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return t.useEffect(()=>f,[f]),t.useEffect(()=>{let e=l.current;return()=>{window.clearTimeout(e),u(null)}},[l,u]),(0,n.jsx)(au,{asChild:!0,...d,children:(0,n.jsx)(wu,{id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":i.open,"aria-controls":o.contentId,"data-state":Yu(i.open),...e,ref:yt(r,o.onTriggerChange),onClick:t=>{var n;(n=e.onClick)==null||n.call(e,t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),i.open||i.onOpenChange(!0))},onPointerMove:G(e.onPointerMove,rd(t=>{s.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!i.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{i.onOpenChange(!0),f()},100))})),onPointerLeave:G(e.onPointerLeave,rd(e=>{var t;f();let n=(t=i.content)==null?void 0:t.getBoundingClientRect();if(n){var r;let t=(r=i.content)==null?void 0:r.dataset.side,a=t===`right`,o=a?-5:5,c=n[a?`left`:`right`],u=n[a?`right`:`left`];s.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:n.top},{x:u,y:n.top},{x:u,y:n.bottom},{x:c,y:n.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:G(e.onKeyDown,t=>{let n=s.searchRef.current!==``;if(!(e.disabled||n&&t.key===` `)&&Ul[a.dir].includes(t.key)){var r;i.onOpenChange(!0),(r=i.content)==null||r.focus(),t.preventDefault()}})})})});Ku.displayName=Gu;var qu=`MenuSubContent`,Ju=t.forwardRef((e,r)=>{let i=cu(X,e.__scopeMenu),{forceMount:a=i.forceMount,...o}=e,s=eu(X,e.__scopeMenu),c=nu(X,e.__scopeMenu),l=Uu(qu,e.__scopeMenu),u=t.useRef(null),d=U(r,u);return(0,n.jsx)(Kl.Provider,{scope:e.__scopeMenu,children:(0,n.jsx)(q,{present:a||s.open,children:(0,n.jsx)(Kl.Slot,{scope:e.__scopeMenu,children:(0,n.jsx)(gu,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:`start`,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;c.isUsingKeyboardRef.current&&((t=u.current)==null||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:G(e.onFocusOutside,e=>{e.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:G(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:G(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Wl[c.dir].includes(e.key);if(t&&n){var r;s.onOpenChange(!1),(r=l.trigger)==null||r.focus(),e.preventDefault()}})})})})})});Ju.displayName=qu;function Yu(e){return e?`open`:`closed`}function Xu(e){return e===`indeterminate`}function Zu(e){return Xu(e)?`indeterminate`:e?`checked`:`unchecked`}function Qu(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $u(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ed(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=$u(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function td(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function nd(e,t){return t?td({x:e.clientX,y:e.clientY},t):!1}function rd(e){return t=>t.pointerType===`mouse`?e(t):void 0}var id=ru,ad=au,od=lu,sd=fu,cd=vu,ld=bu,ud=Cu,dd=Eu,fd=Au,pd=Mu,md=Iu,hd=Ru,gd=Bu,_d=Wu,vd=Ku,yd=Ju,bd=`DropdownMenu`,[xd,Sd]=tn(bd,[Xl]),Z=Xl(),[Cd,wd]=xd(bd),Td=e=>{let{__scopeDropdownMenu:r,children:i,dir:a,open:o,defaultOpen:s,onOpenChange:c,modal:l=!0}=e,u=Z(r),d=t.useRef(null),[f,p]=un({prop:o,defaultProp:s==null?!1:s,onChange:c,caller:bd});return(0,n.jsx)(Cd,{scope:r,triggerId:cn(),triggerRef:d,contentId:cn(),open:f,onOpenChange:p,onOpenToggle:t.useCallback(()=>p(e=>!e),[p]),modal:l,children:(0,n.jsx)(id,{...u,open:f,onOpenChange:p,dir:a,modal:l,children:i})})};Td.displayName=bd;var Ed=`DropdownMenuTrigger`,Dd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:i=!1,...a}=e,o=wd(Ed,r),s=Z(r);return(0,n.jsx)(ad,{asChild:!0,...s,children:(0,n.jsx)(K.button,{type:`button`,id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?`open`:`closed`,"data-disabled":i?``:void 0,disabled:i,...a,ref:yt(t,o.triggerRef),onPointerDown:G(e.onPointerDown,e=>{!i&&e.button===0&&e.ctrlKey===!1&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:G(e.onKeyDown,e=>{i||([`Enter`,` `].includes(e.key)&&o.onOpenToggle(),e.key===`ArrowDown`&&o.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Dd.displayName=Ed;var Od=`DropdownMenuPortal`,kd=e=>{let{__scopeDropdownMenu:t,...r}=e,i=Z(t);return(0,n.jsx)(od,{...i,...r})};kd.displayName=Od;var Ad=`DropdownMenuContent`,jd=t.forwardRef((e,r)=>{let{__scopeDropdownMenu:i,...a}=e,o=wd(Ad,i),s=Z(i),c=t.useRef(!1);return(0,n.jsx)(sd,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...a,ref:r,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{var t;c.current||(t=o.triggerRef.current)==null||t.focus(),c.current=!1,e.preventDefault()}),onInteractOutside:G(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!o.modal||r)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});jd.displayName=Ad;var Md=`DropdownMenuGroup`,Nd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(cd,{...a,...i,ref:t})});Nd.displayName=Md;var Pd=`DropdownMenuLabel`,Fd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(ld,{...a,...i,ref:t})});Fd.displayName=Pd;var Id=`DropdownMenuItem`,Ld=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(ud,{...a,...i,ref:t})});Ld.displayName=Id;var Rd=`DropdownMenuCheckboxItem`,zd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(dd,{...a,...i,ref:t})});zd.displayName=Rd;var Bd=`DropdownMenuRadioGroup`,Vd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(fd,{...a,...i,ref:t})});Vd.displayName=Bd;var Hd=`DropdownMenuRadioItem`,Ud=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(pd,{...a,...i,ref:t})});Ud.displayName=Hd;var Wd=`DropdownMenuItemIndicator`,Gd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(md,{...a,...i,ref:t})});Gd.displayName=Wd;var Kd=`DropdownMenuSeparator`,qd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(hd,{...a,...i,ref:t})});qd.displayName=Kd;var Jd=`DropdownMenuArrow`,Yd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(gd,{...a,...i,ref:t})});Yd.displayName=Jd;var Xd=e=>{let{__scopeDropdownMenu:t,children:r,open:i,onOpenChange:a,defaultOpen:o}=e,s=Z(t),[c,l]=un({prop:i,defaultProp:o==null?!1:o,onChange:a,caller:`DropdownMenuSub`});return(0,n.jsx)(_d,{...s,open:c,onOpenChange:l,children:r})},Zd=`DropdownMenuSubTrigger`,Qd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(vd,{...a,...i,ref:t})});Qd.displayName=Zd;var $d=`DropdownMenuSubContent`,ef=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(yd,{...a,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});ef.displayName=$d;var tf=Td,nf=Dd,rf=kd,af=jd,of=Ld,sf=zd,cf=Vd,lf=Ud,uf=Gd,df=qd,ff=Xd,pf=Qd,mf=ef;function hf({...e}){return(0,n.jsx)(tf,{"data-slot":`dropdown-menu`,...e})}function gf({...e}){return(0,n.jsx)(rf,{"data-slot":`dropdown-menu-portal`,...e})}function _f({...e}){return(0,n.jsx)(nf,{"data-slot":`dropdown-menu-trigger`,...e})}function vf({...e}){return(0,n.jsx)(ff,{"data-slot":`dropdown-menu-sub`,...e})}function yf({...e}){return(0,n.jsx)(cf,{"data-slot":`dropdown-menu-radio-group`,...e})}function bf({className:e,inset:t,children:r,...i}){return(0,n.jsxs)(pf,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":t,className:H(`
291
- univer-flex univer-cursor-default univer-select-none univer-items-center univer-justify-between
292
- univer-gap-2 univer-rounded univer-px-2 univer-py-1.5 univer-text-sm univer-outline-none
293
- data-[state=open]:univer-bg-gray-100
294
- focus:univer-bg-gray-100
295
- dark:data-[state=open]:!univer-bg-gray-600
296
- dark:focus:!univer-bg-gray-600
297
- [&_svg]:univer-pointer-events-none [&_svg]:univer-size-4 [&_svg]:univer-shrink-0
298
- `,e),...i,children:[r,(0,n.jsx)(re,{className:`ml-auto`})]})}function xf({className:e,...t}){return(0,n.jsx)(mf,{"data-slot":`dropdown-menu-sub-content`,className:H(`
299
- data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0
300
- data-[state=open]:univer-zoom-in-95
301
- data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0
302
- data-[state=closed]:univer-zoom-out-95
303
- data-[side=bottom]:univer-slide-in-from-top-2
304
- data-[side=left]:univer-slide-in-from-right-2
305
- data-[side=right]:univer-slide-in-from-left-2
306
- data-[side=top]:univer-slide-in-from-bottom-2
307
- univer-z-[1080] univer-box-border univer-max-h-[--radix-popper-available-height]
308
- univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900
309
- univer-shadow-md
310
- dark:!univer-bg-gray-700 dark:!univer-text-white
311
- `,W,Rt,e),...t})}function Sf({className:e,sideOffset:t=4,...r}){return(0,n.jsx)(rf,{children:(0,n.jsx)(af,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:H(`
312
- data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0
313
- data-[state=open]:univer-zoom-in-95
314
- data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0
315
- data-[state=closed]:univer-zoom-out-95
316
- data-[side=bottom]:univer-slide-in-from-top-2
317
- data-[side=left]:univer-slide-in-from-right-2
318
- data-[side=right]:univer-slide-in-from-left-2
319
- data-[side=top]:univer-slide-in-from-bottom-2
320
- univer-z-[1080] univer-box-border univer-max-h-[--radix-popper-available-height]
321
- univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900
322
- univer-shadow-md
323
- dark:!univer-bg-gray-700 dark:!univer-text-white
324
- `,W,Rt,e),...r})})}function Cf({className:e,inset:t,variant:r=`default`,...i}){return(0,n.jsx)(of,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":r,className:H(`
325
- univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-gap-2
326
- univer-rounded univer-px-2 univer-py-1.5 univer-text-sm univer-outline-none univer-transition-colors
327
- data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50
328
- focus:univer-bg-gray-100
329
- dark:focus:!univer-bg-gray-600
330
- [&>svg]:univer-size-4 [&>svg]:univer-shrink-0
331
- `,e),...i})}function wf({className:e,children:t,hideIndicator:r,checked:i,...a}){return(0,n.jsxs)(sf,{"data-slot":`dropdown-menu-checkbox-item`,className:H(`
332
- univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center
333
- univer-rounded univer-py-1.5 univer-pr-2 univer-text-sm univer-outline-none univer-transition-colors
334
- data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50
335
- focus:univer-bg-gray-100
336
- dark:focus:!univer-bg-gray-600
337
- `,{"univer-pl-8":!r,"univer-pl-2":r},e),checked:i,...a,children:[!r&&(0,n.jsx)(`span`,{className:`
338
- univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center
339
- univer-justify-center
340
- `,children:(0,n.jsx)(uf,{children:(0,n.jsx)(S,{className:`univer-block univer-size-4 univer-fill-current univer-text-primary-600`})})}),t]})}function Tf({className:e,children:t,hideIndicator:r,...i}){return(0,n.jsxs)(lf,{"data-slot":`dropdown-menu-radio-item`,className:H(`
341
- univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center
342
- univer-rounded univer-py-1.5 univer-pr-2 univer-text-sm univer-outline-none univer-transition-colors
343
- data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50
344
- focus:univer-bg-gray-100
345
- dark:focus:!univer-bg-gray-600
346
- `,{"univer-pl-8":!r,"univer-pl-2":r},e),...i,children:[!r&&(0,n.jsx)(`span`,{className:`
347
- univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center
348
- univer-justify-center
349
- `,children:(0,n.jsx)(uf,{children:(0,n.jsx)(S,{className:`univer-block univer-size-4 univer-fill-current univer-text-primary-600`})})}),t]})}function Ef({className:e,...t}){return(0,n.jsx)(df,{className:H(`
350
- -univer-mx-1 univer-my-1 univer-h-px univer-bg-gray-200
351
- dark:!univer-bg-gray-600
352
- `,e),...t})}function Df(e){let{children:r,items:i,disabled:a,open:o,onOpenChange:s,...c}=e,[l,u]=(0,t.useState)(!1),d=o!==void 0,f=d?o:l;function p(e){a||(d||u(e),s==null||s(e))}function m(e,t){let{className:r,type:i}=e;if(i===`separator`)return(0,n.jsx)(Ef,{className:r},t);if(i===`radio`)return(0,n.jsx)(yf,{className:r,value:e.value,onValueChange:e.onSelect,children:e.options.map((t,r)=>{if(`type`in t){if(t.type===`separator`)return(0,n.jsx)(Ef,{className:t.className},r)}else{if(t.value===void 0)throw Error("[DropdownMenu]: `value` is required");return(0,n.jsx)(Tf,{value:t.value,disabled:t.disabled,hideIndicator:e.hideIndicator,children:t.label},t.value)}return null})},t);if(i===`checkbox`)return(0,n.jsx)(wf,{className:r,disabled:e.disabled,checked:e.checked,onSelect:()=>{var t;(t=e.onSelect)==null||t.call(e,e.value)},children:e.label},t);if(i===`item`)return(0,n.jsx)(Cf,{className:r,disabled:e.disabled,onSelect:()=>{var t;(t=e.onSelect)==null||t.call(e,e)},children:e.children},t);if(i===`subItem`){var a;return(0,n.jsxs)(vf,{children:[(0,n.jsx)(bf,{children:e.children}),(0,n.jsx)(gf,{children:(0,n.jsx)(xf,{sideOffset:12,children:(a=e.options)==null?void 0:a.map((e,t)=>m(e,t))})})]},t)}}return(0,n.jsxs)(hf,{modal:!1,open:f,onOpenChange:p,children:[(0,n.jsx)(_f,{asChild:!0,children:r}),(0,n.jsx)(Sf,{className:`univer-text-sm`,collisionPadding:{top:12,bottom:12},onWheel:e=>e.stopPropagation(),...c,children:i.map((e,t)=>m(e,t))})]})}let Of=(0,t.createContext)(!1),kf=e=>{let{label:r,desc:i,children:a,style:o,className:s,error:c,contentStyle:l,collapsable:u=!1,defaultCollapsed:d=!1}=e,[f,p]=(0,t.useState)(d);return(0,n.jsx)(Of.Provider,{value:!0,children:(0,n.jsxs)(`div`,{"data-u-comp":`form-layout`,className:H(`univer-mb-3 univer-flex univer-flex-col`,s),style:o,children:[r&&(0,n.jsxs)(`div`,{className:H(`
353
- univer-mb-2 univer-flex univer-min-h-3.5 univer-items-center univer-text-sm
354
- univer-text-gray-900
355
- dark:!univer-text-white
356
- `,{"univer-cursor-pointer":u}),onClick:()=>p(!f),children:[r,u&&(0,n.jsx)(ae,{className:H(`univer-ml-1 univer-transition-transform`,{"univer-rotate-180":f})})]}),f&&u?null:(0,n.jsxs)(n.Fragment,{children:[i&&(0,n.jsx)(`div`,{className:`
357
- univer-mt-1 univer-text-sm univer-text-gray-600
358
- dark:!univer-text-gray-200
359
- `,children:i}),a?(0,n.jsxs)(`div`,{className:H(`
360
- last:univer-mb-0
361
- [&_[data-u-comp=input]]:univer-w-full
362
- [&_[data-u-comp=select]]:univer-w-full
363
- `,{"[&_[data-u-comp=input]]:univer-border-red-500":c,"[&_[data-u-comp=select]]:univer-border-red-500":c}),style:l,children:[a,c?(0,n.jsx)(`div`,{className:`univer-mt-1 univer-text-xs univer-text-red-500`,children:c}):null]}):null]})]})})},Af=e=>(0,n.jsx)(`div`,{className:`
364
- univer-flex univer-justify-between
365
- [&_[data-u-comp=form-layout]]:univer-max-w-[calc(50%-8px)] [&_[data-u-comp=form-layout]]:univer-shrink
366
- [&_[data-u-comp=form-layout]]:univer-grow
367
- `,children:e.children});function jf(e){let{className:r,value:i=0,total:a=0,loop:o,text:s,onChange:c}=e,l=(0,t.useMemo)(()=>s==null?`${i}/${a}`:s,[i,a,s]),u=a>0,d=()=>{i===1?o&&(c==null||c(a)):c==null||c(i-1)},f=()=>{i===a?o&&(c==null||c(1)):c==null||c(i+1)};return(0,n.jsx)(`div`,{"data-u-comp":`pager`,className:H(`
368
- univer-flex univer-flex-shrink-0 univer-items-center univer-text-sm univer-text-gray-700
369
- dark:!univer-text-gray-400
370
- `,r),children:u?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`button`,{"data-u-comp":`pager-left-arrow`,className:`
371
- univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded
372
- univer-border-none univer-bg-transparent univer-p-0
373
- hover:univer-bg-gray-50
374
- dark:hover:!univer-bg-gray-600
375
- `,type:`button`,role:`button`,onClick:d,children:(0,n.jsx)(te,{})}),(0,n.jsx)(`span`,{className:`univer-mx-1`,children:l}),(0,n.jsx)(`button`,{"data-u-comp":`pager-right-arrow`,className:`
376
- univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded
377
- univer-border-none univer-bg-transparent univer-p-0
378
- hover:univer-bg-gray-50
379
- dark:hover:!univer-bg-gray-600
380
- `,type:`button`,role:`button`,onClick:f,children:(0,n.jsx)(re,{})})]}):(0,n.jsx)(`div`,{className:`univer-mx-1`,children:l})})}let Mf=`
103
+ `}),s(e,t)]},r)})}),D&&R&&T&&(0,r.createPortal)((0,n.jsx)(`div`,{className:H(`univer-pointer-events-none univer-fixed univer-rounded-md univer-border univer-border-gray-200 univer-bg-white univer-shadow-lg dark:!univer-border-gray-700 dark:!univer-bg-gray-800`),style:{zIndex:2147483647,left:`${T.x}px`,top:`${T.y}px`,width:`${j.current.width}px`,height:`${j.current.height}px`,opacity:.95},children:C?(0,n.jsx)(`div`,{ref:M}):s(R,g.findIndex(e=>L(e)===L(R)))}),document.body)]})}function hl(e){let r=e+`CollectionProvider`,[i,a]=tn(r),[o,s]=i(r,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:i}=e,a=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,n.jsx)(o,{scope:r,itemMap:s,collectionRef:a,children:i})};c.displayName=r;let l=e+`CollectionSlot`,u=pn(l),d=t.default.forwardRef((e,t)=>{let{scope:r,children:i}=e;return(0,n.jsx)(u,{ref:U(t,s(l,r).collectionRef),children:i})});d.displayName=l;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=pn(f),h=t.default.forwardRef((e,r)=>{let{scope:i,children:a,...o}=e,c=t.default.useRef(null),l=U(r,c),u=s(f,i);return t.default.useEffect(()=>(u.itemMap.set(c,{ref:c,...o}),()=>void u.itemMap.delete(c))),(0,n.jsx)(m,{[p]:``,ref:l,children:a})});h.displayName=f;function g(n){let r=s(e+`CollectionConsumer`,n);return t.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])}return[{Provider:c,Slot:d,ItemSlot:h},g,a]}Map;var gl=t.createContext(void 0);function _l(e){let n=t.useContext(gl);return e||n||`ltr`}var vl=`rovingFocusGroup.onEntryFocus`,yl={bubbles:!1,cancelable:!0},bl=`RovingFocusGroup`,[xl,Sl,Cl]=hl(bl),[wl,Tl]=tn(bl,[Cl]),[El,Dl]=wl(bl),Ol=t.forwardRef((e,t)=>(0,n.jsx)(xl.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,n.jsx)(xl.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,n.jsx)(kl,{...e,ref:t})})}));Ol.displayName=bl;var kl=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,orientation:a,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=t.useRef(null),h=U(r,m),g=_l(s),[_,v]=un({prop:c,defaultProp:l==null?null:l,onChange:u,caller:bl}),[y,b]=t.useState(!1),x=bn(d),S=Sl(i),C=t.useRef(!1),[w,T]=t.useState(0);return t.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(vl,x),()=>e.removeEventListener(vl,x)},[x]),(0,n.jsx)(El,{scope:i,orientation:a,dir:g,loop:o,currentTabStopId:_,onItemFocus:t.useCallback(e=>v(e),[v]),onItemShiftTab:t.useCallback(()=>b(!0),[]),onFocusableItemAdd:t.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>T(e=>e-1),[]),children:(0,n.jsx)(K.div,{tabIndex:y||w===0?-1:0,"data-orientation":a,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:G(e.onMouseDown,()=>{C.current=!0}),onFocus:G(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(vl,yl);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Fl([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}C.current=!1}),onBlur:G(e.onBlur,()=>b(!1))})})}),Al=`RovingFocusGroupItem`,jl=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,focusable:a=!0,active:o=!1,tabStopId:s,children:c,...l}=e,u=cn(),d=s||u,f=Dl(Al,i),p=f.currentTabStopId===d,m=Sl(i),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=f;return t.useEffect(()=>{if(a)return h(),()=>g()},[a,h,g]),(0,n.jsx)(xl.ItemSlot,{scope:i,id:d,focusable:a,active:o,children:(0,n.jsx)(K.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:r,onMouseDown:G(e.onMouseDown,e=>{a?f.onItemFocus(d):e.preventDefault()}),onFocus:G(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:G(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Pl(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?Il(n,r+1):n.slice(r+1)}setTimeout(()=>Fl(n))}}),children:typeof c==`function`?c({isCurrentTabStop:p,hasTabStop:_!=null}):c})})});jl.displayName=Al;var Ml={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Nl(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Pl(e,t,n){let r=Nl(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ml[r]}function Fl(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Il(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ll=Ol,Rl=jl,zl=[`Enter`,` `],Bl=[`ArrowDown`,`PageUp`,`Home`],Vl=[`ArrowUp`,`PageDown`,`End`],Hl=[...Bl,...Vl],Ul={ltr:[...zl,`ArrowRight`],rtl:[...zl,`ArrowLeft`]},Wl={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Gl=`Menu`,[Kl,ql,Jl]=hl(Gl),[Yl,Xl]=tn(Gl,[Jl,dc,Tl]),Zl=dc(),Ql=Tl(),[$l,eu]=Yl(Gl),[tu,nu]=Yl(Gl),ru=e=>{let{__scopeMenu:r,open:i=!1,children:a,dir:o,onOpenChange:s,modal:c=!0}=e,l=Zl(r),[u,d]=t.useState(null),f=t.useRef(!1),p=bn(s),m=_l(o);return t.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,n.jsx)(Dc,{...l,children:(0,n.jsx)($l,{scope:r,open:i,onOpenChange:p,content:u,onContentChange:d,children:(0,n.jsx)(tu,{scope:r,onClose:t.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:c,children:a})})})};ru.displayName=Gl;var iu=`MenuAnchor`,au=t.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e,a=Zl(r);return(0,n.jsx)(Oc,{...a,...i,ref:t})});au.displayName=iu;var ou=`MenuPortal`,[su,cu]=Yl(ou,{forceMount:void 0}),lu=e=>{let{__scopeMenu:t,forceMount:r,children:i,container:a}=e,o=eu(ou,t);return(0,n.jsx)(su,{scope:t,forceMount:r,children:(0,n.jsx)(q,{present:r||o.open,children:(0,n.jsx)(Qn,{asChild:!0,container:a,children:i})})})};lu.displayName=ou;var X=`MenuContent`,[uu,du]=Yl(X),fu=t.forwardRef((e,t)=>{let r=cu(X,e.__scopeMenu),{forceMount:i=r.forceMount,...a}=e,o=eu(X,e.__scopeMenu),s=nu(X,e.__scopeMenu);return(0,n.jsx)(Kl.Provider,{scope:e.__scopeMenu,children:(0,n.jsx)(q,{present:i||o.open,children:(0,n.jsx)(Kl.Slot,{scope:e.__scopeMenu,children:s.modal?(0,n.jsx)(pu,{...a,ref:t}):(0,n.jsx)(mu,{...a,ref:t})})})})}),pu=t.forwardRef((e,r)=>{let i=eu(X,e.__scopeMenu),a=t.useRef(null),o=U(r,a);return t.useEffect(()=>{let e=a.current;if(e)return Ci(e)},[]),(0,n.jsx)(gu,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})}),mu=t.forwardRef((e,t)=>{let r=eu(X,e.__scopeMenu);return(0,n.jsx)(gu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),hu=pn(`MenuContent.ScrollLock`),gu=t.forwardRef((e,r)=>{let{__scopeMenu:i,loop:a=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=eu(X,i),y=nu(X,i),b=Zl(i),x=Ql(i),S=ql(i),[C,w]=t.useState(null),T=t.useRef(null),E=U(r,T,v.onContentChange),D=t.useRef(0),O=t.useRef(``),k=t.useRef(0),A=t.useRef(null),j=t.useRef(`right`),M=t.useRef(0),N=g?mi:t.Fragment,P=g?{as:hu,allowPinchZoom:!0}:void 0,F=e=>{var t,n;let r=O.current+e,i=S().filter(e=>!e.disabled),a=document.activeElement,o=(t=i.find(e=>e.ref.current===a))==null?void 0:t.textValue,s=ed(i.map(e=>e.textValue),r,o),c=(n=i.find(e=>e.textValue===s))==null?void 0:n.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(r),c&&setTimeout(()=>c.focus())};t.useEffect(()=>()=>window.clearTimeout(D.current),[]),ir();let I=t.useCallback(e=>{var t,n;return j.current===((t=A.current)==null?void 0:t.side)&&nd(e,(n=A.current)==null?void 0:n.area)},[]);return(0,n.jsx)(uu,{scope:i,searchRef:O,onItemEnter:t.useCallback(e=>{I(e)&&e.preventDefault()},[I]),onItemLeave:t.useCallback(e=>{var t;I(e)||((t=T.current)==null||t.focus(),w(null))},[I]),onTriggerLeave:t.useCallback(e=>{I(e)&&e.preventDefault()},[I]),pointerGraceTimerRef:k,onPointerGraceIntentChange:t.useCallback(e=>{A.current=e},[]),children:(0,n.jsx)(N,{...P,children:(0,n.jsx)(zn,{asChild:!0,trapped:o,onMountAutoFocus:G(s,e=>{var t;e.preventDefault(),(t=T.current)==null||t.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,n.jsx)(On,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,n.jsx)(Ll,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:a,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:G(u,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,n.jsx)(kc,{role:`menu`,"aria-orientation":`vertical`,"data-state":Yu(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:G(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&F(e.key));let i=T.current;if(e.target!==i||!Hl.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);Vl.includes(e.key)&&a.reverse(),Qu(a)}),onBlur:G(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:G(e.onPointerMove,rd(e=>{let t=e.target,n=M.current!==e.clientX;e.currentTarget.contains(t)&&n&&(j.current=e.clientX>M.current?`right`:`left`,M.current=e.clientX)}))})})})})})})});fu.displayName=X;var _u=`MenuGroup`,vu=t.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(K.div,{role:`group`,...i,ref:t})});vu.displayName=_u;var yu=`MenuLabel`,bu=t.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(K.div,{...i,ref:t})});bu.displayName=yu;var xu=`MenuItem`,Su=`menu.itemSelect`,Cu=t.forwardRef((e,r)=>{let{disabled:i=!1,onSelect:a,...o}=e,s=t.useRef(null),c=nu(xu,e.__scopeMenu),l=du(xu,e.__scopeMenu),u=U(r,s),d=t.useRef(!1),f=()=>{let e=s.current;if(!i&&e){let t=new CustomEvent(Su,{bubbles:!0,cancelable:!0});e.addEventListener(Su,e=>a==null?void 0:a(e),{once:!0}),yn(e,t),t.defaultPrevented?d.current=!1:c.onClose()}};return(0,n.jsx)(wu,{...o,ref:u,disabled:i,onClick:G(e.onClick,f),onPointerDown:t=>{var n;(n=e.onPointerDown)==null||n.call(e,t),d.current=!0},onPointerUp:G(e.onPointerUp,e=>{var t;d.current||(t=e.currentTarget)==null||t.click()}),onKeyDown:G(e.onKeyDown,e=>{let t=l.searchRef.current!==``;i||t&&e.key===` `||zl.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Cu.displayName=xu;var wu=t.forwardRef((e,r)=>{let{__scopeMenu:i,disabled:a=!1,textValue:o,...s}=e,c=du(xu,i),l=Ql(i),u=t.useRef(null),d=U(r,u),[f,p]=t.useState(!1),[m,h]=t.useState(``);return t.useEffect(()=>{let e=u.current;if(e){var t;h(((t=e.textContent)==null?``:t).trim())}},[s.children]),(0,n.jsx)(Kl.ItemSlot,{scope:i,disabled:a,textValue:o==null?m:o,children:(0,n.jsx)(Rl,{asChild:!0,...l,focusable:!a,children:(0,n.jsx)(K.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":a||void 0,"data-disabled":a?``:void 0,...s,ref:d,onPointerMove:G(e.onPointerMove,rd(e=>{a?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:G(e.onPointerLeave,rd(e=>c.onItemLeave(e))),onFocus:G(e.onFocus,()=>p(!0)),onBlur:G(e.onBlur,()=>p(!1))})})})}),Tu=`MenuCheckboxItem`,Eu=t.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:i,...a}=e;return(0,n.jsx)(Pu,{scope:e.__scopeMenu,checked:r,children:(0,n.jsx)(Cu,{role:`menuitemcheckbox`,"aria-checked":Xu(r)?`mixed`:r,...a,ref:t,"data-state":Zu(r),onSelect:G(a.onSelect,()=>i==null?void 0:i(Xu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Eu.displayName=Tu;var Du=`MenuRadioGroup`,[Ou,ku]=Yl(Du,{value:void 0,onValueChange:()=>{}}),Au=t.forwardRef((e,t)=>{let{value:r,onValueChange:i,...a}=e,o=bn(i);return(0,n.jsx)(Ou,{scope:e.__scopeMenu,value:r,onValueChange:o,children:(0,n.jsx)(vu,{...a,ref:t})})});Au.displayName=Du;var ju=`MenuRadioItem`,Mu=t.forwardRef((e,t)=>{let{value:r,...i}=e,a=ku(ju,e.__scopeMenu),o=r===a.value;return(0,n.jsx)(Pu,{scope:e.__scopeMenu,checked:o,children:(0,n.jsx)(Cu,{role:`menuitemradio`,"aria-checked":o,...i,ref:t,"data-state":Zu(o),onSelect:G(i.onSelect,()=>{var e;return(e=a.onValueChange)==null?void 0:e.call(a,r)},{checkForDefaultPrevented:!1})})})});Mu.displayName=ju;var Nu=`MenuItemIndicator`,[Pu,Fu]=Yl(Nu,{checked:!1}),Iu=t.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:i,...a}=e,o=Fu(Nu,r);return(0,n.jsx)(q,{present:i||Xu(o.checked)||o.checked===!0,children:(0,n.jsx)(K.span,{...a,ref:t,"data-state":Zu(o.checked)})})});Iu.displayName=Nu;var Lu=`MenuSeparator`,Ru=t.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(K.div,{role:`separator`,"aria-orientation":`horizontal`,...i,ref:t})});Ru.displayName=Lu;var zu=`MenuArrow`,Bu=t.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e,a=Zl(r);return(0,n.jsx)(Ac,{...a,...i,ref:t})});Bu.displayName=zu;var Vu=`MenuSub`,[Hu,Uu]=Yl(Vu),Wu=e=>{let{__scopeMenu:r,children:i,open:a=!1,onOpenChange:o}=e,s=eu(Vu,r),c=Zl(r),[l,u]=t.useState(null),[d,f]=t.useState(null),p=bn(o);return t.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),(0,n.jsx)(Dc,{...c,children:(0,n.jsx)($l,{scope:r,open:a,onOpenChange:p,content:d,onContentChange:f,children:(0,n.jsx)(Hu,{scope:r,contentId:cn(),triggerId:cn(),trigger:l,onTriggerChange:u,children:i})})})};Wu.displayName=Vu;var Gu=`MenuSubTrigger`,Ku=t.forwardRef((e,r)=>{let i=eu(Gu,e.__scopeMenu),a=nu(Gu,e.__scopeMenu),o=Uu(Gu,e.__scopeMenu),s=du(Gu,e.__scopeMenu),c=t.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},f=t.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return t.useEffect(()=>f,[f]),t.useEffect(()=>{let e=l.current;return()=>{window.clearTimeout(e),u(null)}},[l,u]),(0,n.jsx)(au,{asChild:!0,...d,children:(0,n.jsx)(wu,{id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":i.open,"aria-controls":o.contentId,"data-state":Yu(i.open),...e,ref:yt(r,o.onTriggerChange),onClick:t=>{var n;(n=e.onClick)==null||n.call(e,t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),i.open||i.onOpenChange(!0))},onPointerMove:G(e.onPointerMove,rd(t=>{s.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!i.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{i.onOpenChange(!0),f()},100))})),onPointerLeave:G(e.onPointerLeave,rd(e=>{var t;f();let n=(t=i.content)==null?void 0:t.getBoundingClientRect();if(n){var r;let t=(r=i.content)==null?void 0:r.dataset.side,a=t===`right`,o=a?-5:5,c=n[a?`left`:`right`],u=n[a?`right`:`left`];s.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:n.top},{x:u,y:n.top},{x:u,y:n.bottom},{x:c,y:n.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:G(e.onKeyDown,t=>{let n=s.searchRef.current!==``;if(!(e.disabled||n&&t.key===` `)&&Ul[a.dir].includes(t.key)){var r;i.onOpenChange(!0),(r=i.content)==null||r.focus(),t.preventDefault()}})})})});Ku.displayName=Gu;var qu=`MenuSubContent`,Ju=t.forwardRef((e,r)=>{let i=cu(X,e.__scopeMenu),{forceMount:a=i.forceMount,...o}=e,s=eu(X,e.__scopeMenu),c=nu(X,e.__scopeMenu),l=Uu(qu,e.__scopeMenu),u=t.useRef(null),d=U(r,u);return(0,n.jsx)(Kl.Provider,{scope:e.__scopeMenu,children:(0,n.jsx)(q,{present:a||s.open,children:(0,n.jsx)(Kl.Slot,{scope:e.__scopeMenu,children:(0,n.jsx)(gu,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:`start`,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;c.isUsingKeyboardRef.current&&((t=u.current)==null||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:G(e.onFocusOutside,e=>{e.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:G(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:G(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Wl[c.dir].includes(e.key);if(t&&n){var r;s.onOpenChange(!1),(r=l.trigger)==null||r.focus(),e.preventDefault()}})})})})})});Ju.displayName=qu;function Yu(e){return e?`open`:`closed`}function Xu(e){return e===`indeterminate`}function Zu(e){return Xu(e)?`indeterminate`:e?`checked`:`unchecked`}function Qu(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $u(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ed(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=$u(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function td(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function nd(e,t){return t?td({x:e.clientX,y:e.clientY},t):!1}function rd(e){return t=>t.pointerType===`mouse`?e(t):void 0}var id=ru,ad=au,od=lu,sd=fu,cd=vu,ld=bu,ud=Cu,dd=Eu,fd=Au,pd=Mu,md=Iu,hd=Ru,gd=Bu,_d=Wu,vd=Ku,yd=Ju,bd=`DropdownMenu`,[xd,Sd]=tn(bd,[Xl]),Z=Xl(),[Cd,wd]=xd(bd),Td=e=>{let{__scopeDropdownMenu:r,children:i,dir:a,open:o,defaultOpen:s,onOpenChange:c,modal:l=!0}=e,u=Z(r),d=t.useRef(null),[f,p]=un({prop:o,defaultProp:s==null?!1:s,onChange:c,caller:bd});return(0,n.jsx)(Cd,{scope:r,triggerId:cn(),triggerRef:d,contentId:cn(),open:f,onOpenChange:p,onOpenToggle:t.useCallback(()=>p(e=>!e),[p]),modal:l,children:(0,n.jsx)(id,{...u,open:f,onOpenChange:p,dir:a,modal:l,children:i})})};Td.displayName=bd;var Ed=`DropdownMenuTrigger`,Dd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:i=!1,...a}=e,o=wd(Ed,r),s=Z(r);return(0,n.jsx)(ad,{asChild:!0,...s,children:(0,n.jsx)(K.button,{type:`button`,id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?`open`:`closed`,"data-disabled":i?``:void 0,disabled:i,...a,ref:yt(t,o.triggerRef),onPointerDown:G(e.onPointerDown,e=>{!i&&e.button===0&&e.ctrlKey===!1&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:G(e.onKeyDown,e=>{i||([`Enter`,` `].includes(e.key)&&o.onOpenToggle(),e.key===`ArrowDown`&&o.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Dd.displayName=Ed;var Od=`DropdownMenuPortal`,kd=e=>{let{__scopeDropdownMenu:t,...r}=e,i=Z(t);return(0,n.jsx)(od,{...i,...r})};kd.displayName=Od;var Ad=`DropdownMenuContent`,jd=t.forwardRef((e,r)=>{let{__scopeDropdownMenu:i,...a}=e,o=wd(Ad,i),s=Z(i),c=t.useRef(!1);return(0,n.jsx)(sd,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...a,ref:r,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{var t;c.current||(t=o.triggerRef.current)==null||t.focus(),c.current=!1,e.preventDefault()}),onInteractOutside:G(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!o.modal||r)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});jd.displayName=Ad;var Md=`DropdownMenuGroup`,Nd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(cd,{...a,...i,ref:t})});Nd.displayName=Md;var Pd=`DropdownMenuLabel`,Fd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(ld,{...a,...i,ref:t})});Fd.displayName=Pd;var Id=`DropdownMenuItem`,Ld=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(ud,{...a,...i,ref:t})});Ld.displayName=Id;var Rd=`DropdownMenuCheckboxItem`,zd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(dd,{...a,...i,ref:t})});zd.displayName=Rd;var Bd=`DropdownMenuRadioGroup`,Vd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(fd,{...a,...i,ref:t})});Vd.displayName=Bd;var Hd=`DropdownMenuRadioItem`,Ud=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(pd,{...a,...i,ref:t})});Ud.displayName=Hd;var Wd=`DropdownMenuItemIndicator`,Gd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(md,{...a,...i,ref:t})});Gd.displayName=Wd;var Kd=`DropdownMenuSeparator`,qd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(hd,{...a,...i,ref:t})});qd.displayName=Kd;var Jd=`DropdownMenuArrow`,Yd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(gd,{...a,...i,ref:t})});Yd.displayName=Jd;var Xd=e=>{let{__scopeDropdownMenu:t,children:r,open:i,onOpenChange:a,defaultOpen:o}=e,s=Z(t),[c,l]=un({prop:i,defaultProp:o==null?!1:o,onChange:a,caller:`DropdownMenuSub`});return(0,n.jsx)(_d,{...s,open:c,onOpenChange:l,children:r})},Zd=`DropdownMenuSubTrigger`,Qd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(vd,{...a,...i,ref:t})});Qd.displayName=Zd;var $d=`DropdownMenuSubContent`,ef=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(yd,{...a,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});ef.displayName=$d;var tf=Td,nf=Dd,rf=kd,af=jd,of=Ld,sf=zd,cf=Vd,lf=Ud,uf=Gd,df=qd,ff=Xd,pf=Qd,mf=ef;function hf({...e}){return(0,n.jsx)(tf,{"data-slot":`dropdown-menu`,...e})}function gf({...e}){return(0,n.jsx)(rf,{"data-slot":`dropdown-menu-portal`,...e})}function _f({...e}){return(0,n.jsx)(nf,{"data-slot":`dropdown-menu-trigger`,...e})}function vf({...e}){return(0,n.jsx)(ff,{"data-slot":`dropdown-menu-sub`,...e})}function yf({...e}){return(0,n.jsx)(cf,{"data-slot":`dropdown-menu-radio-group`,...e})}function bf({className:e,inset:t,children:r,...i}){return(0,n.jsxs)(pf,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":t,className:H(`univer-flex univer-cursor-default univer-select-none univer-items-center univer-justify-between univer-gap-2 univer-rounded univer-px-2 univer-py-1.5 univer-text-sm univer-outline-none data-[state=open]:univer-bg-gray-100 focus:univer-bg-gray-100 dark:data-[state=open]:!univer-bg-gray-600 dark:focus:!univer-bg-gray-600 [&_svg]:univer-pointer-events-none [&_svg]:univer-size-4 [&_svg]:univer-shrink-0`,e),...i,children:[r,(0,n.jsx)(re,{className:`ml-auto`})]})}function xf({className:e,...t}){return(0,n.jsx)(mf,{"data-slot":`dropdown-menu-sub-content`,className:H(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-box-border univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900 univer-shadow-md dark:!univer-bg-gray-700 dark:!univer-text-white`,W,Rt,e),...t})}function Sf({className:e,sideOffset:t=4,...r}){return(0,n.jsx)(rf,{children:(0,n.jsx)(af,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:H(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-box-border univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900 univer-shadow-md dark:!univer-bg-gray-700 dark:!univer-text-white`,W,Rt,e),...r})})}function Cf({className:e,inset:t,variant:r=`default`,...i}){return(0,n.jsx)(of,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":r,className:H(`univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-gap-2 univer-rounded univer-px-2 univer-py-1.5 univer-text-sm univer-outline-none univer-transition-colors data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50 focus:univer-bg-gray-100 dark:focus:!univer-bg-gray-600 [&>svg]:univer-size-4 [&>svg]:univer-shrink-0`,e),...i})}function wf({className:e,children:t,hideIndicator:r,checked:i,...a}){return(0,n.jsxs)(sf,{"data-slot":`dropdown-menu-checkbox-item`,className:H(`univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-rounded univer-py-1.5 univer-pr-2 univer-text-sm univer-outline-none univer-transition-colors data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50 focus:univer-bg-gray-100 dark:focus:!univer-bg-gray-600`,{"univer-pl-8":!r,"univer-pl-2":r},e),checked:i,...a,children:[!r&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center univer-justify-center`,children:(0,n.jsx)(uf,{children:(0,n.jsx)(S,{className:`univer-block univer-size-4 univer-fill-current univer-text-primary-600`})})}),t]})}function Tf({className:e,children:t,hideIndicator:r,...i}){return(0,n.jsxs)(lf,{"data-slot":`dropdown-menu-radio-item`,className:H(`univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-rounded univer-py-1.5 univer-pr-2 univer-text-sm univer-outline-none univer-transition-colors data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50 focus:univer-bg-gray-100 dark:focus:!univer-bg-gray-600`,{"univer-pl-8":!r,"univer-pl-2":r},e),...i,children:[!r&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center univer-justify-center`,children:(0,n.jsx)(uf,{children:(0,n.jsx)(S,{className:`univer-block univer-size-4 univer-fill-current univer-text-primary-600`})})}),t]})}function Ef({className:e,...t}){return(0,n.jsx)(df,{className:H(`-univer-mx-1 univer-my-1 univer-h-px univer-bg-gray-200 dark:!univer-bg-gray-600`,e),...t})}function Df(e){let{children:r,items:i,disabled:a,open:o,onOpenChange:s,...c}=e,[l,u]=(0,t.useState)(!1),d=o!==void 0,f=d?o:l;function p(e){a||(d||u(e),s==null||s(e))}function m(e,t){let{className:r,type:i}=e;if(i===`separator`)return(0,n.jsx)(Ef,{className:r},t);if(i===`radio`)return(0,n.jsx)(yf,{className:r,value:e.value,onValueChange:e.onSelect,children:e.options.map((t,r)=>{if(`type`in t){if(t.type===`separator`)return(0,n.jsx)(Ef,{className:t.className},r)}else{if(t.value===void 0)throw Error("[DropdownMenu]: `value` is required");return(0,n.jsx)(Tf,{value:t.value,disabled:t.disabled,hideIndicator:e.hideIndicator,children:t.label},t.value)}return null})},t);if(i===`checkbox`)return(0,n.jsx)(wf,{className:r,disabled:e.disabled,checked:e.checked,onSelect:()=>{var t;(t=e.onSelect)==null||t.call(e,e.value)},children:e.label},t);if(i===`item`)return(0,n.jsx)(Cf,{className:r,disabled:e.disabled,onSelect:()=>{var t;(t=e.onSelect)==null||t.call(e,e)},children:e.children},t);if(i===`subItem`){var a;return(0,n.jsxs)(vf,{children:[(0,n.jsx)(bf,{children:e.children}),(0,n.jsx)(gf,{children:(0,n.jsx)(xf,{sideOffset:12,children:(a=e.options)==null?void 0:a.map((e,t)=>m(e,t))})})]},t)}}return(0,n.jsxs)(hf,{modal:!1,open:f,onOpenChange:p,children:[(0,n.jsx)(_f,{asChild:!0,children:r}),(0,n.jsx)(Sf,{className:`univer-text-sm`,collisionPadding:{top:12,bottom:12},onWheel:e=>e.stopPropagation(),...c,children:i.map((e,t)=>m(e,t))})]})}let Of=(0,t.createContext)(!1),kf=e=>{let{label:r,desc:i,children:a,style:o,className:s,error:c,contentStyle:l,collapsable:u=!1,defaultCollapsed:d=!1}=e,[f,p]=(0,t.useState)(d);return(0,n.jsx)(Of.Provider,{value:!0,children:(0,n.jsxs)(`div`,{"data-u-comp":`form-layout`,className:H(`univer-mb-3 univer-flex univer-flex-col`,s),style:o,children:[r&&(0,n.jsxs)(`div`,{className:H(`univer-mb-2 univer-flex univer-min-h-3.5 univer-items-center univer-text-sm univer-text-gray-900 dark:!univer-text-white`,{"univer-cursor-pointer":u}),onClick:()=>p(!f),children:[r,u&&(0,n.jsx)(ae,{className:H(`univer-ml-1 univer-transition-transform`,{"univer-rotate-180":f})})]}),f&&u?null:(0,n.jsxs)(n.Fragment,{children:[i&&(0,n.jsx)(`div`,{className:`univer-mt-1 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200`,children:i}),a?(0,n.jsxs)(`div`,{className:H(`last:univer-mb-0 [&_[data-u-comp=input]]:univer-w-full [&_[data-u-comp=select]]:univer-w-full`,{"[&_[data-u-comp=input]]:univer-border-red-500":c,"[&_[data-u-comp=select]]:univer-border-red-500":c}),style:l,children:[a,c?(0,n.jsx)(`div`,{className:`univer-mt-1 univer-text-xs univer-text-red-500`,children:c}):null]}):null]})]})})},Af=e=>(0,n.jsx)(`div`,{className:`univer-flex univer-justify-between [&_[data-u-comp=form-layout]]:univer-max-w-[calc(50%-8px)] [&_[data-u-comp=form-layout]]:univer-shrink [&_[data-u-comp=form-layout]]:univer-grow`,children:e.children});function jf(e){let{className:r,value:i=0,total:a=0,loop:o,text:s,onChange:c}=e,l=(0,t.useMemo)(()=>s==null?`${i}/${a}`:s,[i,a,s]),u=a>0,d=()=>{i===1?o&&(c==null||c(a)):c==null||c(i-1)},f=()=>{i===a?o&&(c==null||c(1)):c==null||c(i+1)};return(0,n.jsx)(`div`,{"data-u-comp":`pager`,className:H(`univer-flex univer-flex-shrink-0 univer-items-center univer-text-sm univer-text-gray-700 dark:!univer-text-gray-400`,r),children:u?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`button`,{"data-u-comp":`pager-left-arrow`,className:`univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded univer-border-none univer-bg-transparent univer-p-0 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-600`,type:`button`,role:`button`,onClick:d,children:(0,n.jsx)(te,{})}),(0,n.jsx)(`span`,{className:`univer-mx-1`,children:l}),(0,n.jsx)(`button`,{"data-u-comp":`pager-right-arrow`,className:`univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded univer-border-none univer-bg-transparent univer-p-0 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-600`,type:`button`,role:`button`,onClick:f,children:(0,n.jsx)(re,{})})]}):(0,n.jsx)(`div`,{className:`univer-mx-1`,children:l})})}let Mf=`
381
104
  univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none
382
105
  univer-bg-transparent univer-p-0 univer-text-current
383
106
  hover:univer-text-white
384
- `;function Nf(e){let{className:i,images:a,open:o,onOpenChange:s}=e,[c,l]=(0,t.useState)(!1),[u,d]=(0,t.useState)(0),[f,p]=(0,t.useState)(1),m=(0,t.useRef)(null),h=(0,t.useMemo)(()=>a[u],[u,a]);if((0,t.useEffect)(()=>{o&&m.current&&m.current.focus()},[o]),(0,t.useEffect)(()=>{if(!o)return;let e=e=>{e.key===`Escape`&&(s==null||s(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o,s]),(0,t.useEffect)(()=>{if(o)l(!0);else{let e=setTimeout(()=>{l(!1)},150);return()=>clearTimeout(e)}},[o]),(0,t.useEffect)(()=>{if(!o)return;let e=e=>{e.preventDefault();let t=-e.deltaY*.001;p(e=>Math.min(Math.max(.5,e+t),2))};return window.addEventListener(`wheel`,e,{passive:!1}),()=>{window.removeEventListener(`wheel`,e)}},[o]),!o&&!c)return null;function g(e){if(e===`reset`){p(1);return}let t=f+e;t<.5||t>2||p(t)}return(0,r.createPortal)((0,n.jsxs)(`div`,{"data-u-comp":`gallery`,role:`dialog`,"aria-modal":`true`,"aria-label":`Image gallery`,tabIndex:-1,ref:m,className:H(`
385
- univer-absolute univer-inset-0 univer-z-[1080] univer-flex univer-size-full univer-select-none
386
- univer-items-center univer-justify-center
387
- `,{"univer-animate-in univer-fade-in":o,"univer-animate-out univer-fade-out":!o},i),children:[(0,n.jsx)(`div`,{className:`univer-absolute univer-inset-0 univer-size-full univer-bg-gray-900 univer-opacity-80`,"aria-hidden":`true`,onClick:()=>s==null?void 0:s(!1)}),(0,n.jsx)(`div`,{className:`univer-relative`,children:h&&(0,n.jsx)(`img`,{className:`
388
- univer-max-h-[40vh] univer-max-w-[60vw] univer-transition-transform univer-duration-300
389
- univer-ease-out
390
- `,style:{transform:`scale(${f})`},src:h,alt:`Image ${u+1} of ${a.length}`,draggable:!1})}),(0,n.jsxs)(`footer`,{className:`
391
- univer-absolute univer-bottom-6 univer-left-1/2 univer-flex -univer-translate-x-1/2
392
- univer-items-center univer-gap-3 univer-rounded-full univer-bg-gray-800 univer-px-6 univer-py-3
393
- univer-text-gray-400
394
- `,children:[(0,n.jsx)(jf,{className:`
395
- !univer-text-gray-400
396
- [&_[data-u-comp=pager-left-arrow]:hover]:!univer-bg-gray-600
397
- [&_[data-u-comp=pager-right-arrow]:hover]:!univer-bg-gray-600
398
- `,value:u+1,total:a.length,onChange:e=>d(e-1)}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,className:Mf,onClick:()=>g(.25),children:(0,n.jsx)(pe,{"aria-hidden":`true`})}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,className:Mf,onClick:()=>g(-.25),children:(0,n.jsx)(he,{"aria-hidden":`true`})}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Reset zoom`,className:Mf,onClick:()=>g(`reset`),children:(0,n.jsx)(se,{"aria-hidden":`true`})})]})]}),document.body)}let Pf=mt(`
107
+ `;function Nf(e){let{className:i,images:a,open:o,onOpenChange:s}=e,[c,l]=(0,t.useState)(!1),[u,d]=(0,t.useState)(0),[f,p]=(0,t.useState)(1),m=(0,t.useRef)(null),h=(0,t.useMemo)(()=>a[u],[u,a]);if((0,t.useEffect)(()=>{o&&m.current&&m.current.focus()},[o]),(0,t.useEffect)(()=>{if(!o)return;let e=e=>{e.key===`Escape`&&(s==null||s(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o,s]),(0,t.useEffect)(()=>{if(o)l(!0);else{let e=setTimeout(()=>{l(!1)},150);return()=>clearTimeout(e)}},[o]),(0,t.useEffect)(()=>{if(!o)return;let e=e=>{e.preventDefault();let t=-e.deltaY*.001;p(e=>Math.min(Math.max(.5,e+t),2))};return window.addEventListener(`wheel`,e,{passive:!1}),()=>{window.removeEventListener(`wheel`,e)}},[o]),!o&&!c)return null;function g(e){if(e===`reset`){p(1);return}let t=f+e;t<.5||t>2||p(t)}return(0,r.createPortal)((0,n.jsxs)(`div`,{"data-u-comp":`gallery`,role:`dialog`,"aria-modal":`true`,"aria-label":`Image gallery`,tabIndex:-1,ref:m,className:H(`univer-absolute univer-inset-0 univer-z-[1080] univer-flex univer-size-full univer-select-none univer-items-center univer-justify-center`,{"univer-animate-in univer-fade-in":o,"univer-animate-out univer-fade-out":!o},i),children:[(0,n.jsx)(`div`,{className:`univer-absolute univer-inset-0 univer-size-full univer-bg-gray-900 univer-opacity-80`,"aria-hidden":`true`,onClick:()=>s==null?void 0:s(!1)}),(0,n.jsx)(`div`,{className:`univer-relative`,children:h&&(0,n.jsx)(`img`,{className:`univer-max-h-[40vh] univer-max-w-[60vw] univer-transition-transform univer-duration-300 univer-ease-out`,style:{transform:`scale(${f})`},src:h,alt:`Image ${u+1} of ${a.length}`,draggable:!1})}),(0,n.jsxs)(`footer`,{className:`univer-absolute univer-bottom-6 univer-left-1/2 univer-flex -univer-translate-x-1/2 univer-items-center univer-gap-3 univer-rounded-full univer-bg-gray-800 univer-px-6 univer-py-3 univer-text-gray-400`,children:[(0,n.jsx)(jf,{className:`!univer-text-gray-400 [&_[data-u-comp=pager-left-arrow]:hover]:!univer-bg-gray-600 [&_[data-u-comp=pager-right-arrow]:hover]:!univer-bg-gray-600`,value:u+1,total:a.length,onChange:e=>d(e-1)}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,className:Mf,onClick:()=>g(.25),children:(0,n.jsx)(pe,{"aria-hidden":`true`})}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,className:Mf,onClick:()=>g(-.25),children:(0,n.jsx)(he,{"aria-hidden":`true`})}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Reset zoom`,className:Mf,onClick:()=>g(`reset`),children:(0,n.jsx)(se,{"aria-hidden":`true`})})]})]}),document.body)}let Pf=mt(`
399
108
  univer-box-border univer-w-full univer-rounded-md univer-bg-white univer-transition-colors univer-duration-200
400
109
  placeholder:univer-text-gray-400
401
110
  focus:univer-border-primary-600 focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-50
@@ -404,172 +113,16 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
404
113
  `,{variants:{size:{mini:`univer-h-7 univer-px-1.5 univer-text-sm`,small:`univer-h-8 univer-px-2 univer-text-sm`,middle:`univer-h-10 univer-px-3 univer-text-base`,large:`univer-h-12 univer-px-4 univer-text-lg`}},defaultVariants:{size:`small`}}),Ff=(0,t.forwardRef)(({autoFocus:e=!1,className:r,style:i,type:a=`text`,placeholder:o,value:s,size:c=`small`,allowClear:l=!1,disabled:u=!1,onClick:d,onKeyDown:f,onChange:p,onFocus:m,onBlur:h,slot:g,inputClass:_,inputStyle:v,...y},b)=>{let x=e=>{e.stopPropagation(),p==null||p(``)},S=e=>{p==null||p(e.target.value)},C=(0,t.useMemo)(()=>l&&s&&!u||g,[l,u,g,s]),[w,T]=(0,t.useState)(0),D=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let e=null;return g&&D.current&&(e=new MutationObserver(()=>{D.current&&T(D.current.offsetWidth+8)}),e.observe(D.current,{childList:!0,subtree:!0}),T(D.current.offsetWidth+8)),()=>e==null?void 0:e.disconnect()},[D.current]),(0,t.useEffect)(()=>{l&&!(g&&D.current)&&T(26)},[]),(0,n.jsxs)(`div`,{"data-u-comp":`input`,className:H(`univer-relative univer-inline-flex univer-w-full univer-items-center univer-rounded-md`,u&&`univer-cursor-not-allowed`,r),style:i,children:[(0,n.jsx)(`input`,{ref:b,type:a,className:H(Pf({size:c}),W,u&&`
405
114
  univer-cursor-not-allowed univer-bg-gray-50 univer-text-gray-400
406
115
  dark:!univer-text-gray-500
407
- `,l&&!g&&`univer-pr-8`,_),placeholder:o,value:s,disabled:u,autoFocus:e,onClick:d,onKeyDown:f,onChange:S,onFocus:m,onBlur:h,style:{...v,paddingRight:w},...y}),C&&(0,n.jsxs)(`div`,{className:`
408
- univer-absolute univer-right-2 univer-flex univer-items-center univer-gap-1
409
- univer-rounded-full
410
- `,ref:D,children:[g,l&&s&&!u&&(0,n.jsx)(`button`,{type:`button`,onClick:x,className:`
411
- univer-flex univer-size-4 univer-cursor-pointer univer-items-center
412
- univer-rounded-full univer-border-none univer-bg-transparent univer-p-1
413
- univer-text-gray-400 univer-transition-colors univer-duration-200
414
- hover:univer-text-gray-500
415
- focus:univer-outline-none
416
- `,children:(0,n.jsx)(E,{className:`univer-size-3`})})]})]})}),If=(0,t.forwardRef)(({value:e,defaultValue:r,size:i=`small`,min:a=-(2**53-1),max:o=2**53-1,step:s=1,precision:c,formatter:l,parser:u,controls:d=!0,className:f,inputClassName:p,controlsClassName:m,disabled:h,onChange:g,onKeyDown:_,onPressEnter:v,onFocus:y,onBlur:b,allowEmpty:x=!1},S)=>{let[C,w]=(0,t.useState)(e===void 0?r===void 0?null:r:e),T=(0,t.useRef)(C),[E,D]=(0,t.useState)(M(C)),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)(null),j=e=>{S&&(typeof S==`function`?S(e):S.current=e),O.current=e};(0,t.useEffect)(()=>{e!==void 0&&e!==C&&(w(e),T.current=e,D(M(e)))},[e]),(0,t.useEffect)(()=>{C!==null&&(T.current=C)},[C]),(0,t.useEffect)(()=>()=>{k.current&&clearTimeout(k.current),A.current&&clearInterval(A.current)},[]);function M(e){if(e==null)return``;let t=e;return c!==void 0&&(t=Number(e).toFixed(c)),l?l(t):String(t)}function N(e){if(!e)return null;let t=e;u&&(t=u(e));try{let e=t.replace(/[^\d.-]/g,``).split(`.`),n=e[0],r=e.length>1?e.slice(1).join(``):``,i=n+(r?`.${r}`:``),s=Number(i);if(Number.isNaN(s))return null;let l;if(c!==void 0){let e=10**c,t=Math.round(s*e)/e;l=t.toString().includes(`e`)?Number.parseFloat(t.toFixed(c)):t}else l=s.toString().includes(`e`)?Number.parseFloat(s.toFixed(16).replace(/\.?0+$/,``)):s;return o!==void 0&&l>o&&(l=o),a!==void 0&&l<a&&(l=a),l}catch{return null}}function P(e){if(D(e),x&&e===``){w(null),g==null||g(null);return}let t=N(e);w(t),g==null||g(t)}function F(e){if(C===null){if(E===``&&x)g&&g(null);else{let e=T.current;w(e),D(M(e)),g&&g(e)}b==null||b(e);return}let t=C;o!==void 0&&t>o&&(t=o),a!==void 0&&t<a&&(t=a),t===C?D(M(C)):(w(t),D(M(t)),g==null||g(t)),b==null||b(e)}function I(e){if(h)return;let t=e?s:-s,n;n=C===null?T.current===null?a>0?a:0:T.current:C;let r=n+t;o!==void 0&&r>o&&(r=o),a!==void 0&&r<a&&(r=a),r!==n&&(w(r),T.current=r,D(M(r)),g==null||g(r))}function L(e){h||(_==null||_(e),e.key===`ArrowUp`?(e.preventDefault(),I(!0)):e.key===`ArrowDown`?(e.preventDefault(),I(!1)):e.key===`Enter`&&(v==null||v(e)))}function R(e){var t;h||(I(e),(t=O.current)==null||t.focus())}let ee=h||o!==void 0&&C!==null&&C>=o,te=h||a!==void 0&&C!==null&&C<=a;return(0,n.jsx)(`div`,{className:H(`univer-inline-block`,f),children:(0,n.jsxs)(`div`,{className:`univer-relative univer-w-full`,children:[(0,n.jsx)(Ff,{ref:j,className:H(`univer-box-border`,p),size:i,value:E,disabled:h,onChange:P,onFocus:y,onBlur:F,onKeyDown:L}),d&&(0,n.jsxs)(`div`,{className:H(`
417
- univer-absolute univer-right-px univer-top-px univer-flex univer-h-[calc(100%-2px)]
418
- univer-flex-col univer-overflow-hidden univer-rounded-r-md
419
- before:univer-absolute before:univer-top-1/2 before:univer-block before:univer-h-px
420
- before:univer-w-full before:-univer-translate-y-1/2 before:univer-bg-gray-200
421
- before:univer-content-[""]
422
- dark:before:!univer-bg-gray-600
423
- `,Vt,m),children:[(0,n.jsx)(`span`,{className:H(`
424
- univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer
425
- univer-items-center univer-justify-center univer-border-none univer-bg-transparent
426
- univer-p-0 univer-transition-colors
427
- hover:univer-bg-gray-100
428
- dark:!univer-text-white
429
- dark:hover:!univer-bg-gray-600
430
- `,ee&&`univer-cursor-not-allowed univer-opacity-60`),role:`button`,"aria-label":`increment`,"aria-disabled":ee,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{ee||R(!0)},children:`+`}),(0,n.jsx)(`span`,{className:H(`
431
- univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer
432
- univer-items-center univer-justify-center univer-border-none univer-bg-transparent
433
- univer-p-0 univer-transition-colors
434
- hover:univer-bg-gray-100
435
- dark:!univer-text-white
436
- dark:hover:!univer-bg-gray-600
437
- `,te&&`univer-cursor-not-allowed univer-opacity-60`),role:`button`,"aria-label":`decrement`,"aria-disabled":te,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{te||R(!1)},children:`-`})]})]})})});function Lf({items:e,value:r,defaultValue:i,onChange:a,className:o=``}){let[s,c]=(0,t.useState)(r===void 0?i||e[0].value:r),[l,u]=(0,t.useState)({}),d=(0,t.useRef)(new Map),f=(0,t.useRef)(null);(0,t.useEffect)(()=>{r!==void 0&&r!==s&&c(r)},[r]);let p=(e,t)=>{let n=d.current.get(e),r=t?d.current.get(t):null;if(n&&f.current){let e=f.current.getBoundingClientRect(),t=n.getBoundingClientRect(),i=t.left-e.left-4;if(r){let n=r.getBoundingClientRect().left-e.left-4;u({"--slide-from":`${n}px`,"--slide-to":`${i}px`,width:`${t.width}px`,transform:`translateX(${i}px)`})}else u({width:`${t.width}px`,transform:`translateX(${i}px)`})}};(0,t.useEffect)(()=>{p(s)},[s]);let m=e=>{let t=s;c(e),a==null||a(e),p(e,t)};return(0,n.jsxs)(`div`,{"data-u-comp":`segmented`,ref:f,className:H(`
438
- univer-relative univer-box-border univer-flex univer-gap-4 univer-rounded-lg univer-bg-gray-100 univer-p-1
439
- dark:!univer-bg-gray-800
440
- `,o),children:[(0,n.jsx)(`div`,{className:`
441
- univer-animate-univer-slide univer-absolute univer-h-6 univer-rounded-md univer-bg-white
442
- univer-shadow-sm univer-transition-all univer-duration-200
443
- dark:!univer-bg-gray-700 dark:!univer-text-gray-400
444
- `,style:l}),e.map(e=>(0,n.jsx)(`button`,{ref:t=>{t&&d.current.set(e.value,t)},className:H(`
445
- univer-relative univer-box-border univer-flex-1 univer-cursor-pointer univer-border-none
446
- univer-bg-transparent univer-px-3 univer-py-1 univer-text-xs univer-font-medium
447
- univer-transition-colors
448
- `,{"univer-text-gray-900 dark:!univer-text-white":s===e.value,"univer-text-gray-500 hover:univer-text-gray-900 dark:hover:!univer-text-white":s!==e.value}),type:`button`,onClick:()=>m(e.value),children:e.label},String(e.value)))]})}function Rf(e){let{children:i,className:a,asChild:o=!0,title:s,placement:c=`bottom`,showIfEllipsis:l=!1,visible:u,onVisibleChange:d}=e,[f,p]=(0,t.useState)(!1),m=u!==void 0,h=m?u:f,g=(0,t.useRef)(null),_=(0,t.useRef)(null),v=(0,t.useRef)(null),[y,b]=(0,t.useState)(null),[x,S]=(0,t.useState)(c);function C(e){return Math.abs(e.scrollWidth-e.clientWidth)>1}function w(){m?d==null||d(!0):p(!0)}function T(){m?d==null||d(!1):p(!1)}(0,t.useLayoutEffect)(()=>{if(!h)return;let e=g.current,t=_.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=[c,`bottom`,`top`,`right`,`left`],s=c,l=0,u=0,d=e=>{let t=0,i=0;return e===`bottom`?(t=n.bottom+8,i=n.left+n.width/2-r.width/2):e===`top`?(t=n.top-r.height-8,i=n.left+n.width/2-r.width/2):e===`left`?(t=n.top+n.height/2-r.height/2,i=n.left-r.width-8):(t=n.top+n.height/2-r.height/2,i=n.right+8),{t,l:i}};for(let e of o){let{t,l:n}=d(e),o=n>=0&&n+r.width<=i,c=t>=0&&t+r.height<=a;if(o&&c){s=e,l=t,u=n;break}}if(!l&&!u){let e=d(c);l=Math.min(Math.max(0,e.t),a-r.height),u=Math.min(Math.max(0,e.l),i-r.width)}S(s),b({top:Math.round(l+window.scrollY),left:Math.round(u+window.scrollX)})},[h,c]),(0,t.useEffect)(()=>{if(!h)return;let e=()=>{if(!g.current||!_.current)return;let e=g.current.getBoundingClientRect(),t=_.current.getBoundingClientRect(),n=0,r=0;x===`bottom`?(n=e.bottom+8,r=e.left+e.width/2-t.width/2):x===`top`?(n=e.top-t.height-8,r=e.left+e.width/2-t.width/2):x===`left`?(n=e.top+e.height/2-t.height/2,r=e.left-t.width-8):(n=e.top+e.height/2-t.height/2,r=e.right+8),b({top:Math.round(n+window.scrollY),left:Math.round(r+window.scrollX)})};return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[h,x]);let E={ref:e=>g.current=e,onMouseEnter:()=>{l&&g.current&&!C(g.current)||w()},onMouseLeave:()=>T(),onFocus:()=>w(),onBlur:()=>T()},D=o?(0,n.jsx)(`span`,{...E,className:`univer-inline-block univer-max-w-full univer-truncate`,children:i}):(0,n.jsx)(`button`,{type:`button`,...E,children:i}),O=null;if(typeof document<`u`&&h&&s&&document.body){var k,A;O=(0,r.createPortal)((0,n.jsxs)(`div`,{ref:_,role:`tooltip`,className:H(`
449
- univer-animate-in univer-fade-in-0 univer-zoom-in-95 univer-pointer-events-auto univer-absolute
450
- univer-z-[1081] univer-box-border univer-w-fit univer-max-w-sm univer-text-balance univer-rounded-lg
451
- univer-bg-gray-700 univer-px-2.5 univer-py-2 univer-text-xs univer-font-medium univer-text-white
452
- univer-shadow-lg univer-drop-shadow-sm
453
- dark:!univer-bg-gray-100 dark:!univer-text-gray-900
454
- `,a),style:{top:(k=y==null?void 0:y.top)==null?-9999:k,left:(A=y==null?void 0:y.left)==null?-9999:A},onMouseEnter:()=>w(),onMouseLeave:()=>T(),children:[(0,n.jsx)(`div`,{className:`univer-break-words`,children:s}),(0,n.jsx)(`div`,{ref:v,className:`
455
- univer-absolute univer-size-2.5 univer-rotate-45 univer-rounded-sm univer-bg-gray-700
456
- dark:!univer-bg-gray-100
457
- `,style:{...x===`bottom`&&{top:-5,left:`50%`,transform:`translateX(-50%) rotate(45deg)`},...x===`top`&&{bottom:-5,left:`50%`,transform:`translateX(-50%) rotate(45deg)`},...x===`left`&&{right:-5,top:`50%`,transform:`translateY(-50%) rotate(45deg)`},...x===`right`&&{left:-5,top:`50%`,transform:`translateY(-50%) rotate(45deg)`}}})]}),document.body)}return(0,n.jsxs)(n.Fragment,{children:[D,O]})}let zf={type:`linear`,stops:[{color:`#ffffff`,offset:0},{color:`#000000`,offset:100}],angle:90};function Bf(e){var r,i;let{className:a,value:o=zf,onChange:s}=e,{locale:c}=(0,t.useContext)(Ft),[l,u]=(0,t.useState)(0),d=(0,t.useRef)(null),f=(0,t.useMemo)(()=>[...o.stops].sort((e,t)=>e.offset-t.offset),[o.stops]),p=e=>{s==null||s({...o,type:e})},m=e=>{s==null||s({...o,angle:e==null?0:e})},h=e=>{let t=[...o.stops];t[l]={...t[l],color:e},s==null||s({...o,stops:t})},g=e=>{if(e===null)return;let t=[...o.stops];t[l]={...t[l],offset:e},s==null||s({...o,stops:t})},_=e=>{if(!d.current)return;let t=d.current.getBoundingClientRect(),n=Math.round((e.clientX-t.left)/t.width*100),r={color:([...f].reverse().find(e=>e.offset<=n)||f[0]).color,offset:n},i=[...o.stops,r];s==null||s({...o,stops:i}),u(i.length-1)},v=()=>{if(o.stops.length<=2)return;let e=o.stops.filter((e,t)=>t!==l);s==null||s({...o,stops:e}),u(0)},y=(0,t.useMemo)(()=>`linear-gradient(to right, ${f.map(e=>`${e.color} ${e.offset}%`).join(`, `)})`,[f]),b=(0,t.useMemo)(()=>{let e=f.map(e=>`${e.color} ${e.offset}%`).join(`, `);switch(o.type){case`linear`:return`linear-gradient(${o.angle}deg, ${e})`;case`radial`:return`radial-gradient(circle, ${e})`;case`angular`:return`conic-gradient(from ${o.angle}deg, ${e})`;case`diamond`:return`radial-gradient(circle, ${e})`;default:return`linear-gradient(${o.angle}deg, ${e})`}},[o,f]);return(0,n.jsxs)(`div`,{className:H(`
458
- univer-flex univer-w-64 univer-flex-col univer-gap-4 univer-rounded-lg univer-bg-white univer-p-4
459
- univer-shadow-lg
460
- dark:!univer-bg-gray-800
461
- `,a),children:[(0,n.jsx)(Lf,{items:[{label:c==null?void 0:c.GradientColorPicker.linear,value:`linear`},{label:c==null?void 0:c.GradientColorPicker.radial,value:`radial`},{label:c==null?void 0:c.GradientColorPicker.angular,value:`angular`},{label:c==null?void 0:c.GradientColorPicker.diamond,value:`diamond`}],value:o.type,onChange:e=>p(e)}),(0,n.jsx)(`div`,{className:`
462
- univer-h-32 univer-w-full univer-rounded-md univer-border univer-border-gray-200
463
- dark:!univer-border-gray-600
464
- `,style:{background:b}}),(0,n.jsxs)(`div`,{className:`univer-relative univer-mt-4 univer-h-6`,children:[(0,n.jsx)(`div`,{ref:d,className:`
465
- univer-absolute univer-inset-x-0 univer-top-1/2 univer-h-2 -univer-translate-y-1/2
466
- univer-cursor-crosshair univer-rounded-full
467
- `,style:{background:y},onClick:_}),o.stops.map((e,t)=>(0,n.jsx)(`div`,{className:H(`
468
- univer-absolute univer-top-1/2 univer-size-4 -univer-translate-x-1/2
469
- -univer-translate-y-1/2 univer-cursor-pointer univer-rounded-full univer-border-2
470
- univer-border-white univer-shadow-md
471
- `,l===t?`univer-z-10 univer-ring-2 univer-ring-primary-500`:`univer-z-0`),style:{left:`${e.offset}%`,backgroundColor:e.color},onClick:e=>{e.stopPropagation(),u(t)},onPointerDown:n=>{let r=n.clientX,i=e.offset,a=e=>{if(!d.current)return;let n=d.current.getBoundingClientRect(),a=(e.clientX-r)/n.width*100,c=Math.max(0,Math.min(100,Math.round(i+a))),l=[...o.stops];l[t]={...l[t],offset:c},s==null||s({...o,stops:l})},c=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,c)};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,c)}},t))]}),(0,n.jsxs)(`div`,{className:`univer-flex univer-items-end univer-gap-2`,children:[(0,n.jsxs)(`div`,{className:`univer-flex-1`,children:[(0,n.jsx)(`div`,{className:`univer-mb-1 univer-text-xs univer-text-gray-500`,children:c==null?void 0:c.GradientColorPicker.offset}),(0,n.jsx)(If,{value:(r=o.stops[l])==null?void 0:r.offset,min:0,max:100,onChange:g})]}),(o.type===`linear`||o.type===`angular`)&&(0,n.jsxs)(`div`,{className:`univer-flex-1`,children:[(0,n.jsx)(`div`,{className:`univer-mb-1 univer-text-xs univer-text-gray-500`,children:c==null?void 0:c.GradientColorPicker.angle}),(0,n.jsx)(If,{value:o.angle,min:0,max:360,onChange:m})]}),(0,n.jsx)(`div`,{className:`univer-flex univer-gap-1`,children:(0,n.jsx)(Rf,{title:c==null?void 0:c.GradientColorPicker.delete,children:(0,n.jsx)(Mt,{variant:`danger`,onClick:v,disabled:o.stops.length<=2,children:(0,n.jsx)(O,{})})})})]}),(0,n.jsx)(`div`,{className:`
472
- univer-border-t univer-border-gray-100 univer-pt-4
473
- dark:!univer-border-gray-700
474
- `,children:(0,n.jsx)(Va,{value:(i=o.stops[l])==null?void 0:i.color,onChange:h})})]})}var Vf,Hf=`HoverCard`,[Uf,Wf]=tn(Hf,[dc]),Gf=dc(),[Kf,qf]=Uf(Hf),Jf=e=>{let{__scopeHoverCard:r,children:i,open:a,defaultOpen:o,onOpenChange:s,openDelay:c=700,closeDelay:l=300}=e,u=Gf(r),d=t.useRef(0),f=t.useRef(0),p=t.useRef(!1),m=t.useRef(!1),[h,g]=un({prop:a,defaultProp:o==null?!1:o,onChange:s,caller:Hf}),_=t.useCallback(()=>{clearTimeout(f.current),d.current=window.setTimeout(()=>g(!0),c)},[c,g]),v=t.useCallback(()=>{clearTimeout(d.current),!p.current&&!m.current&&(f.current=window.setTimeout(()=>g(!1),l))},[l,g]),y=t.useCallback(()=>g(!1),[g]);return t.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]),(0,n.jsx)(Kf,{scope:r,open:h,onOpenChange:g,onOpen:_,onClose:v,onDismiss:y,hasSelectionRef:p,isPointerDownOnContentRef:m,children:(0,n.jsx)(Dc,{...u,children:i})})};Jf.displayName=Hf;var Yf=`HoverCardTrigger`,Xf=t.forwardRef((e,t)=>{let{__scopeHoverCard:r,...i}=e,a=qf(Yf,r),o=Gf(r);return(0,n.jsx)(Oc,{asChild:!0,...o,children:(0,n.jsx)(K.a,{"data-state":a.open?`open`:`closed`,...i,ref:t,onPointerEnter:G(e.onPointerEnter,op(a.onOpen)),onPointerLeave:G(e.onPointerLeave,op(a.onClose)),onFocus:G(e.onFocus,a.onOpen),onBlur:G(e.onBlur,a.onClose),onTouchStart:G(e.onTouchStart,e=>e.preventDefault())})})});Xf.displayName=Yf;var Zf=`HoverCardPortal`,[Qf,$f]=Uf(Zf,{forceMount:void 0}),ep=e=>{let{__scopeHoverCard:t,forceMount:r,children:i,container:a}=e,o=qf(Zf,t);return(0,n.jsx)(Qf,{scope:t,forceMount:r,children:(0,n.jsx)(q,{present:r||o.open,children:(0,n.jsx)(Qn,{asChild:!0,container:a,children:i})})})};ep.displayName=Zf;var tp=`HoverCardContent`,np=t.forwardRef((e,t)=>{let r=$f(tp,e.__scopeHoverCard),{forceMount:i=r.forceMount,...a}=e,o=qf(tp,e.__scopeHoverCard);return(0,n.jsx)(q,{present:i||o.open,children:(0,n.jsx)(rp,{"data-state":o.open?`open`:`closed`,...a,onPointerEnter:G(e.onPointerEnter,op(o.onOpen)),onPointerLeave:G(e.onPointerLeave,op(o.onClose)),ref:t})})});np.displayName=tp;var rp=t.forwardRef((e,r)=>{let{__scopeHoverCard:i,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,...l}=e,u=qf(tp,i),d=Gf(i),f=t.useRef(null),p=U(r,f),[m,h]=t.useState(!1);return t.useEffect(()=>{if(m){let e=document.body;return Vf=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=Vf,e.style.webkitUserSelect=Vf}}},[m]),t.useEffect(()=>{if(f.current){let e=()=>{h(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var e;((e=document.getSelection())==null?void 0:e.toString())!==``&&(u.hasSelectionRef.current=!0)})};return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),t.useEffect(()=>{f.current&&sp(f.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,n.jsx)(On,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:c,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:G(s,e=>{e.preventDefault()}),onDismiss:u.onDismiss,children:(0,n.jsx)(kc,{...d,...l,onPointerDown:G(l.onPointerDown,e=>{e.currentTarget.contains(e.target)&&h(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:p,style:{...l.style,userSelect:m?`text`:void 0,WebkitUserSelect:m?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})}),ip=`HoverCardArrow`,ap=t.forwardRef((e,t)=>{let{__scopeHoverCard:r,...i}=e,a=Gf(r);return(0,n.jsx)(Ac,{...a,...i,ref:t})});ap.displayName=ip;function op(e){return t=>t.pointerType===`touch`?void 0:e()}function sp(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var cp=Jf,lp=Xf,up=ep,dp=np;let fp=cp,pp=up,mp=lp,hp=(0,t.forwardRef)(({className:e,align:t=`center`,sideOffset:r=4,...i},a)=>(0,n.jsx)(dp,{ref:a,align:t,sideOffset:r,className:H(`
475
- data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95
476
- data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0
477
- data-[state=closed]:univer-zoom-out-95
478
- data-[side=bottom]:univer-slide-in-from-top-2
479
- data-[side=left]:univer-slide-in-from-right-2
480
- data-[side=right]:univer-slide-in-from-left-2
481
- data-[side=top]:univer-slide-in-from-bottom-2
482
- univer-z-[1080] univer-w-64 univer-origin-[--radix-hover-card-content-transform-origin] univer-rounded-md
483
- univer-bg-white univer-text-gray-900 univer-shadow-md univer-outline-none
484
- dark:!univer-bg-gray-900 dark:!univer-text-white
485
- `,W,e),...i}));hp.displayName=dp.displayName;function gp(e){let{children:r,overlay:i,disabled:a,openDelay:o=200,open:s,onOpenChange:c,...l}=e,[u,d]=(0,t.useState)(!1),f=s!==void 0,p=f?s:u;function m(e){a||(f||d(e),c==null||c(e))}return(0,n.jsxs)(fp,{open:p,onOpenChange:m,openDelay:o,children:[(0,n.jsx)(mp,{asChild:!0,children:r}),(0,n.jsx)(pp,{children:(0,n.jsx)(hp,{...l,children:i})})]})}function _p(e){let{keyboard:t,className:r}=e,i=t.split(`+`);return(0,n.jsx)(`span`,{className:H(`
486
- univer-inline-block univer-h-6 univer-select-none univer-whitespace-nowrap univer-rounded-md
487
- univer-bg-gray-50 univer-px-2 univer-font-mono univer-text-xs/6 univer-font-medium univer-text-gray-700
488
- dark:!univer-bg-gray-700 dark:!univer-text-white
489
- `,W,r),children:i.map((e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`kbd`,{className:`univer-inline-block univer-h-full`,children:e}),t<i.length-1&&(0,n.jsx)(`span`,{className:`univer-inline-block univer-h-full univer-px-1`,children:`+`})]},t))})}function vp(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}let yp=e=>{switch(e){case`success`:return Sp;case`info`:return wp;case`warning`:return Cp;case`error`:return Tp;default:return null}},bp=Array(12).fill(0),xp=({visible:e,className:n})=>t.default.createElement(`div`,{className:[`sonner-loading-wrapper`,n].filter(Boolean).join(` `),"data-visible":e},t.default.createElement(`div`,{className:`sonner-spinner`},bp.map((e,n)=>t.default.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${n}`})))),Sp=t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},t.default.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Cp=t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},t.default.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),wp=t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},t.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Tp=t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},t.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Ep=t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},t.default.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),t.default.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),Dp=()=>{let[e,n]=t.default.useState(document.hidden);return t.default.useEffect(()=>{let e=()=>{n(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},Op=1,Q=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)==`number`||((t=e.id)==null?void 0:t.length)>0?e.id:Op++,a=this.toasts.find(e=>e.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:n}),{...t,...e,id:i,dismissible:o,title:n}):t):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:`loading`,message:n.loading,description:typeof n.description==`function`?void 0:n.description}));let i=Promise.resolve(e instanceof Function?e():e),a=r!==void 0,o,s=i.then(async e=>{if(o=[`resolve`,e],t.default.isValidElement(e))a=!1,this.create({id:r,type:`default`,message:e});else if(Ap(e)&&!e.ok){a=!1;let i=typeof n.error==`function`?await n.error(`HTTP error! status: ${e.status}`):n.error,o=typeof n.description==`function`?await n.description(`HTTP error! status: ${e.status}`):n.description,s=typeof i==`object`&&!t.default.isValidElement(i)?i:{message:i};this.create({id:r,type:`error`,description:o,...s})}else if(e instanceof Error){a=!1;let i=typeof n.error==`function`?await n.error(e):n.error,o=typeof n.description==`function`?await n.description(e):n.description,s=typeof i==`object`&&!t.default.isValidElement(i)?i:{message:i};this.create({id:r,type:`error`,description:o,...s})}else if(n.success!==void 0){a=!1;let i=typeof n.success==`function`?await n.success(e):n.success,o=typeof n.description==`function`?await n.description(e):n.description,s=typeof i==`object`&&!t.default.isValidElement(i)?i:{message:i};this.create({id:r,type:`success`,description:o,...s})}}).catch(async e=>{if(o=[`reject`,e],n.error!==void 0){a=!1;let i=typeof n.error==`function`?await n.error(e):n.error,o=typeof n.description==`function`?await n.description(e):n.description,s=typeof i==`object`&&!t.default.isValidElement(i)?i:{message:i};this.create({id:r,type:`error`,description:o,...s})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((e,t)=>s.then(()=>o[0]===`reject`?t(o[1]):e(o[1])).catch(t));return typeof r!=`string`&&typeof r!=`number`?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Op++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},kp=(e,t)=>{let n=(t==null?void 0:t.id)||Op++;return Q.addToast({title:e,...t,id:n}),n},Ap=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,jp=kp,Mp=Object.assign(jp,{success:Q.success,info:Q.info,warning:Q.warning,error:Q.error,custom:Q.custom,message:Q.message,promise:Q.promise,dismiss:Q.dismiss,loading:Q.loading},{getHistory:()=>Q.toasts,getToasts:()=>Q.getActiveToasts()});vp(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function Np(e){return e.label!==void 0}let Pp=4e3;function Fp(...e){return e.filter(Boolean).join(` `)}function Ip(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}let Lp=e=>{var n,r,i,a,o,s,c,l,u;let{invert:d,toast:f,unstyled:p,interacting:m,setHeights:h,visibleToasts:g,heights:_,index:v,toasts:y,expanded:b,removeToast:x,defaultRichColors:S,closeButton:C,style:w,cancelButtonStyle:T,actionButtonStyle:E,className:D=``,descriptionClassName:O=``,duration:k,position:A,gap:j,expandByDefault:M,classNames:N,icons:P,closeButtonAriaLabel:F=`Close toast`}=e,[I,L]=t.default.useState(null),[R,ee]=t.default.useState(null),[te,ne]=t.default.useState(!1),[re,ie]=t.default.useState(!1),[ae,oe]=t.default.useState(!1),[se,ce]=t.default.useState(!1),[le,ue]=t.default.useState(!1),[de,fe]=t.default.useState(0),[pe,me]=t.default.useState(0),he=t.default.useRef(f.duration||k||Pp),ge=t.default.useRef(null),_e=t.default.useRef(null),ve=v===0,ye=v+1<=g,z=f.type,be=f.dismissible!==!1,xe=f.className||``,Se=f.descriptionClassName||``,Ce=t.default.useMemo(()=>_.findIndex(e=>e.toastId===f.id)||0,[_,f.id]),we=t.default.useMemo(()=>{var e;return(e=f.closeButton)==null?C:e},[f.closeButton,C]),Te=t.default.useMemo(()=>f.duration||k||Pp,[f.duration,k]),Ee=t.default.useRef(0),De=t.default.useRef(0),Oe=t.default.useRef(0),ke=t.default.useRef(null),[Ae,je]=A.split(`-`),Me=t.default.useMemo(()=>_.reduce((e,t,n)=>n>=Ce?e:e+t.height,0),[_,Ce]),Ne=Dp(),Pe=f.invert||d,Fe=z===`loading`;De.current=t.default.useMemo(()=>Ce*j+Me,[Ce,Me]),t.default.useEffect(()=>{he.current=Te},[Te]),t.default.useEffect(()=>{ne(!0)},[]),t.default.useEffect(()=>{let e=_e.current;if(e){let t=e.getBoundingClientRect().height;return me(t),h(e=>[{toastId:f.id,height:t,position:f.position},...e]),()=>h(e=>e.filter(e=>e.toastId!==f.id))}},[h,f.id]),t.default.useLayoutEffect(()=>{if(!te)return;let e=_e.current,t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,me(n),h(e=>e.find(e=>e.toastId===f.id)?e.map(e=>e.toastId===f.id?{...e,height:n}:e):[{toastId:f.id,height:n,position:f.position},...e])},[te,f.title,f.description,h,f.id,f.jsx,f.action,f.cancel]);let Ie=t.default.useCallback(()=>{ie(!0),fe(De.current),h(e=>e.filter(e=>e.toastId!==f.id)),setTimeout(()=>{x(f)},200)},[f,x,h,De]);t.default.useEffect(()=>{if(f.promise&&z===`loading`||f.duration===1/0||f.type===`loading`)return;let e;return b||m||Ne?(()=>{if(Oe.current<Ee.current){let e=new Date().getTime()-Ee.current;he.current-=e}Oe.current=new Date().getTime()})():he.current!==1/0&&(Ee.current=new Date().getTime(),e=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),Ie()},he.current)),()=>clearTimeout(e)},[b,m,f,z,Ne,Ie]),t.default.useEffect(()=>{f.delete&&(Ie(),f.onDismiss==null||f.onDismiss.call(f,f))},[Ie,f.delete]);function B(){var e;if(P!=null&&P.loading){var n;return t.default.createElement(`div`,{className:Fp(N==null?void 0:N.loader,f==null||(n=f.classNames)==null?void 0:n.loader,`sonner-loader`),"data-visible":z===`loading`},P.loading)}return t.default.createElement(xp,{className:Fp(N==null?void 0:N.loader,f==null||(e=f.classNames)==null?void 0:e.loader),visible:z===`loading`})}let Le=f.icon||(P==null?void 0:P[z])||yp(z);var Re,ze;return t.default.createElement(`li`,{tabIndex:0,ref:_e,className:Fp(D,xe,N==null?void 0:N.toast,f==null||(n=f.classNames)==null?void 0:n.toast,N==null?void 0:N.default,N==null?void 0:N[z],f==null||(r=f.classNames)==null?void 0:r[z]),"data-sonner-toast":``,"data-rich-colors":(Re=f.richColors)==null?S:Re,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":te,"data-promise":!!f.promise,"data-swiped":le,"data-removed":re,"data-visible":ye,"data-y-position":Ae,"data-x-position":je,"data-index":v,"data-front":ve,"data-swiping":ae,"data-dismissible":be,"data-type":z,"data-invert":Pe,"data-swipe-out":se,"data-swipe-direction":R,"data-expanded":!!(b||M&&te),"data-testid":f.testId,style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${re?de:De.current}px`,"--initial-height":M?`auto`:`${pe}px`,...w,...f.style},onDragEnd:()=>{oe(!1),L(null),ke.current=null},onPointerDown:e=>{e.button!==2&&(Fe||!be||(ge.current=new Date,fe(De.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(oe(!0),ke.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{var e,t,n;if(se||!be)return;ke.current=null;let r=Number(((e=_e.current)==null?void 0:e.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``))||0),i=Number(((t=_e.current)==null?void 0:t.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``))||0),a=new Date().getTime()-((n=ge.current)==null?void 0:n.getTime()),o=I===`x`?r:i,s=Math.abs(o)/a;if(Math.abs(o)>=45||s>.11){fe(De.current),f.onDismiss==null||f.onDismiss.call(f,f),ee(I===`x`?r>0?`right`:`left`:i>0?`down`:`up`),Ie(),ce(!0);return}else{var c,l;(c=_e.current)==null||c.style.setProperty(`--swipe-amount-x`,`0px`),(l=_e.current)==null||l.style.setProperty(`--swipe-amount-y`,`0px`)}ue(!1),oe(!1),L(null)},onPointerMove:t=>{var n,r,i;if(!ke.current||!be||((n=window.getSelection())==null?void 0:n.toString().length)>0)return;let a=t.clientY-ke.current.y,o=t.clientX-ke.current.x;var s;let c=(s=e.swipeDirections)==null?Ip(A):s;!I&&(Math.abs(o)>1||Math.abs(a)>1)&&L(Math.abs(o)>Math.abs(a)?`x`:`y`);let l={x:0,y:0},u=e=>1/(1.5+Math.abs(e)/20);if(I===`y`){if(c.includes(`top`)||c.includes(`bottom`))if(c.includes(`top`)&&a<0||c.includes(`bottom`)&&a>0)l.y=a;else{let e=a*u(a);l.y=Math.abs(e)<Math.abs(a)?e:a}}else if(I===`x`&&(c.includes(`left`)||c.includes(`right`)))if(c.includes(`left`)&&o<0||c.includes(`right`)&&o>0)l.x=o;else{let e=o*u(o);l.x=Math.abs(e)<Math.abs(o)?e:o}(Math.abs(l.x)>0||Math.abs(l.y)>0)&&ue(!0),(r=_e.current)==null||r.style.setProperty(`--swipe-amount-x`,`${l.x}px`),(i=_e.current)==null||i.style.setProperty(`--swipe-amount-y`,`${l.y}px`)}},we&&!f.jsx&&z!==`loading`?t.default.createElement(`button`,{"aria-label":F,"data-disabled":Fe,"data-close-button":!0,onClick:Fe||!be?()=>{}:()=>{Ie(),f.onDismiss==null||f.onDismiss.call(f,f)},className:Fp(N==null?void 0:N.closeButton,f==null||(i=f.classNames)==null?void 0:i.closeButton)},(ze=P==null?void 0:P.close)==null?Ep:ze):null,(z||f.icon||f.promise)&&f.icon!==null&&((P==null?void 0:P[z])!==null||f.icon)?t.default.createElement(`div`,{"data-icon":``,className:Fp(N==null?void 0:N.icon,f==null||(a=f.classNames)==null?void 0:a.icon)},f.promise||f.type===`loading`&&!f.icon?f.icon||B():null,f.type===`loading`?null:Le):null,t.default.createElement(`div`,{"data-content":``,className:Fp(N==null?void 0:N.content,f==null||(o=f.classNames)==null?void 0:o.content)},t.default.createElement(`div`,{"data-title":``,className:Fp(N==null?void 0:N.title,f==null||(s=f.classNames)==null?void 0:s.title)},f.jsx?f.jsx:typeof f.title==`function`?f.title():f.title),f.description?t.default.createElement(`div`,{"data-description":``,className:Fp(O,Se,N==null?void 0:N.description,f==null||(c=f.classNames)==null?void 0:c.description)},typeof f.description==`function`?f.description():f.description):null),t.default.isValidElement(f.cancel)?f.cancel:f.cancel&&Np(f.cancel)?t.default.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||T,onClick:e=>{Np(f.cancel)&&be&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,e),Ie())},className:Fp(N==null?void 0:N.cancelButton,f==null||(l=f.classNames)==null?void 0:l.cancelButton)},f.cancel.label):null,t.default.isValidElement(f.action)?f.action:f.action&&Np(f.action)?t.default.createElement(`button`,{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||E,onClick:e=>{Np(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,e),!e.defaultPrevented&&Ie())},className:Fp(N==null?void 0:N.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function Rp(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function zp(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?`16px`:`24px`;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}let Bp=t.default.forwardRef(function(e,n){let{id:i,invert:a,position:o=`bottom-right`,hotkey:s=[`altKey`,`KeyT`],expand:c,closeButton:l,className:u,offset:d,mobileOffset:f,theme:p=`light`,richColors:m,duration:h,style:g,visibleToasts:_=3,toastOptions:v,dir:y=Rp(),gap:b=14,icons:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=t.default.useState([]),T=t.default.useMemo(()=>i?C.filter(e=>e.toasterId===i):C.filter(e=>!e.toasterId),[C,i]),E=t.default.useMemo(()=>Array.from(new Set([o].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,o]),[D,O]=t.default.useState([]),[k,A]=t.default.useState(!1),[j,M]=t.default.useState(!1),[N,P]=t.default.useState(p===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:p),F=t.default.useRef(null),I=s.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),L=t.default.useRef(null),R=t.default.useRef(!1),ee=t.default.useCallback(e=>{w(t=>{var n;return(n=t.find(t=>t.id===e.id))!=null&&n.delete||Q.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return t.default.useEffect(()=>Q.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{r.default.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[C]),t.default.useEffect(()=>{if(p!==`system`){P(p);return}if(p===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?P(`dark`):P(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{P(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{P(e?`dark`:`light`)}catch(e){console.error(e)}})}},[p]),t.default.useEffect(()=>{C.length<=1&&A(!1)},[C]),t.default.useEffect(()=>{let e=e=>{var t;if(s.every(t=>e[t]||e.code===t)){var n;A(!0),(n=F.current)==null||n.focus()}e.code===`Escape`&&(document.activeElement===F.current||(t=F.current)!=null&&t.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[s]),t.default.useEffect(()=>{if(F.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,R.current=!1)}},[F.current]),t.default.createElement(`section`,{ref:n,"aria-label":`${S} ${I}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},E.map((n,r)=>{var i;let[o,s]=n.split(`-`);return T.length?t.default.createElement(`ol`,{key:n,dir:y===`auto`?Rp():y,tabIndex:-1,ref:F,className:u,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":o,"data-x-position":s,style:{"--front-toast-height":`${((i=D[0])==null?void 0:i.height)||0}px`,"--width":`356px`,"--gap":`${b}px`,...g,...zp(d,f)},onBlur:e=>{R.current&&!e.currentTarget.contains(e.relatedTarget)&&(R.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||R.current||(R.current=!0,L.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&r===0||e.position===n).map((r,i)=>{var o,s;return t.default.createElement(Lp,{key:r.id,icons:x,index:i,toast:r,defaultRichColors:m,duration:(o=v==null?void 0:v.duration)==null?h:o,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:a,visibleToasts:_,closeButton:(s=v==null?void 0:v.closeButton)==null?l:s,interacting:j,position:n,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:ee,toasts:T.filter(e=>e.position==r.position),heights:D.filter(e=>e.position==r.position),setHeights:O,expandByDefault:c,gap:b,expanded:k,swipeDirections:e.swipeDirections})})):null}))}),$=function(e){return e.Success=`success`,e.Info=`info`,e.Warning=`warning`,e.Error=`error`,e.Loading=`loading`,e}({}),Vp=`univer-message-toaster`,Hp=3e3,Up=new Set,Wp=(0,n.jsx)(_e,{className:`univer-animate-spin univer-text-violet-500`}),Gp=0,Kp={[$.Success]:(0,n.jsx)(le,{className:`univer-text-green-500`}),[$.Info]:(0,n.jsx)(I,{className:`
490
- univer-text-sky-500
491
- dark:!univer-text-sky-400
492
- `}),[$.Warning]:(0,n.jsx)(de,{className:`univer-text-amber-500`}),[$.Error]:(0,n.jsx)(P,{className:`univer-text-red-500`}),[$.Loading]:Wp},qp={[$.Success]:`[&_[data-icon]]:univer-text-green-500`,[$.Info]:`[&_[data-icon]]:univer-text-sky-500`,[$.Warning]:`[&_[data-icon]]:univer-text-amber-500`,[$.Error]:`[&_[data-icon]]:univer-text-red-500`,[$.Loading]:`[&_[data-icon]]:univer-text-violet-500`},Jp=e=>{switch(e){case $.Success:return Mp.success;case $.Warning:return Mp.warning;case $.Error:return Mp.error;case $.Loading:return Mp.loading;case $.Info:default:return Mp.info}},Yp=()=>{let e=`univer-message-${Gp}`;return Gp+=1,e},Xp=({className:e,...t})=>(0,n.jsx)(Bp,{id:Vp,position:`top-center`,visibleToasts:4,closeButton:!1,expand:!1,icons:{loading:Wp},offset:{top:16},className:H(`
493
- [&_[data-sonner-toast]]:univer-bg-white/95
494
- dark:[&_[data-sonner-toast]]:!univer-bg-gray-800/95
495
- [&_[data-sonner-toast]]:univer-rounded-2xl [&_[data-sonner-toast]]:univer-border
496
- [&_[data-sonner-toast]]:univer-border-solid [&_[data-sonner-toast]]:univer-border-gray-200
497
- [&_[data-sonner-toast]]:univer-shadow-[0_16px_40px_-20px_rgba(15,23,42,0.55)]
498
- [&_[data-sonner-toast]]:univer-backdrop-blur-sm
499
- dark:[&_[data-sonner-toast]]:!univer-border-gray-600
500
- `,e),toastOptions:{duration:Hp,classNames:{toast:`
116
+ `,l&&!g&&`univer-pr-8`,_),placeholder:o,value:s,disabled:u,autoFocus:e,onClick:d,onKeyDown:f,onChange:S,onFocus:m,onBlur:h,style:{...v,paddingRight:w},...y}),C&&(0,n.jsxs)(`div`,{className:`univer-absolute univer-right-2 univer-flex univer-items-center univer-gap-1 univer-rounded-full`,ref:D,children:[g,l&&s&&!u&&(0,n.jsx)(`button`,{type:`button`,onClick:x,className:`univer-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded-full univer-border-none univer-bg-transparent univer-p-1 univer-text-gray-400 univer-transition-colors univer-duration-200 hover:univer-text-gray-500 focus:univer-outline-none`,children:(0,n.jsx)(E,{className:`univer-size-3`})})]})]})}),If=(0,t.forwardRef)(({value:e,defaultValue:r,size:i=`small`,min:a=-(2**53-1),max:o=2**53-1,step:s=1,precision:c,formatter:l,parser:u,controls:d=!0,className:f,inputClassName:p,controlsClassName:m,disabled:h,onChange:g,onKeyDown:_,onPressEnter:v,onFocus:y,onBlur:b,allowEmpty:x=!1},S)=>{let[C,w]=(0,t.useState)(e===void 0?r===void 0?null:r:e),T=(0,t.useRef)(C),[E,D]=(0,t.useState)(M(C)),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)(null),j=e=>{S&&(typeof S==`function`?S(e):S.current=e),O.current=e};(0,t.useEffect)(()=>{e!==void 0&&e!==C&&(w(e),T.current=e,D(M(e)))},[e]),(0,t.useEffect)(()=>{C!==null&&(T.current=C)},[C]),(0,t.useEffect)(()=>()=>{k.current&&clearTimeout(k.current),A.current&&clearInterval(A.current)},[]);function M(e){if(e==null)return``;let t=e;return c!==void 0&&(t=Number(e).toFixed(c)),l?l(t):String(t)}function N(e){if(!e)return null;let t=e;u&&(t=u(e));try{let e=t.replace(/[^\d.-]/g,``).split(`.`),n=e[0],r=e.length>1?e.slice(1).join(``):``,i=n+(r?`.${r}`:``),s=Number(i);if(Number.isNaN(s))return null;let l;if(c!==void 0){let e=10**c,t=Math.round(s*e)/e;l=t.toString().includes(`e`)?Number.parseFloat(t.toFixed(c)):t}else l=s.toString().includes(`e`)?Number.parseFloat(s.toFixed(16).replace(/\.?0+$/,``)):s;return o!==void 0&&l>o&&(l=o),a!==void 0&&l<a&&(l=a),l}catch{return null}}function P(e){if(D(e),x&&e===``){w(null),g==null||g(null);return}let t=N(e);w(t),g==null||g(t)}function F(e){if(C===null){if(E===``&&x)g&&g(null);else{let e=T.current;w(e),D(M(e)),g&&g(e)}b==null||b(e);return}let t=C;o!==void 0&&t>o&&(t=o),a!==void 0&&t<a&&(t=a),t===C?D(M(C)):(w(t),D(M(t)),g==null||g(t)),b==null||b(e)}function I(e){if(h)return;let t=e?s:-s,n;n=C===null?T.current===null?a>0?a:0:T.current:C;let r=n+t;o!==void 0&&r>o&&(r=o),a!==void 0&&r<a&&(r=a),r!==n&&(w(r),T.current=r,D(M(r)),g==null||g(r))}function L(e){h||(_==null||_(e),e.key===`ArrowUp`?(e.preventDefault(),I(!0)):e.key===`ArrowDown`?(e.preventDefault(),I(!1)):e.key===`Enter`&&(v==null||v(e)))}function R(e){var t;h||(I(e),(t=O.current)==null||t.focus())}let ee=h||o!==void 0&&C!==null&&C>=o,te=h||a!==void 0&&C!==null&&C<=a;return(0,n.jsx)(`div`,{className:H(`univer-inline-block`,f),children:(0,n.jsxs)(`div`,{className:`univer-relative univer-w-full`,children:[(0,n.jsx)(Ff,{ref:j,className:H(`univer-box-border`,p),size:i,value:E,disabled:h,onChange:P,onFocus:y,onBlur:F,onKeyDown:L}),d&&(0,n.jsxs)(`div`,{className:H(`univer-absolute univer-right-px univer-top-px univer-flex univer-h-[calc(100%-2px)] univer-flex-col univer-overflow-hidden univer-rounded-r-md before:univer-absolute before:univer-top-1/2 before:univer-block before:univer-h-px before:univer-w-full before:-univer-translate-y-1/2 before:univer-bg-gray-200 before:univer-content-[""] dark:before:!univer-bg-gray-600`,Vt,m),children:[(0,n.jsx)(`span`,{className:H(`univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-bg-transparent univer-p-0 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,ee&&`univer-cursor-not-allowed univer-opacity-60`),role:`button`,"aria-label":`increment`,"aria-disabled":ee,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{ee||R(!0)},children:`+`}),(0,n.jsx)(`span`,{className:H(`univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-bg-transparent univer-p-0 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,te&&`univer-cursor-not-allowed univer-opacity-60`),role:`button`,"aria-label":`decrement`,"aria-disabled":te,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{te||R(!1)},children:`-`})]})]})})});function Lf({items:e,value:r,defaultValue:i,onChange:a,className:o=``}){let[s,c]=(0,t.useState)(r===void 0?i||e[0].value:r),[l,u]=(0,t.useState)({}),d=(0,t.useRef)(new Map),f=(0,t.useRef)(null);(0,t.useEffect)(()=>{r!==void 0&&r!==s&&c(r)},[r]);let p=(e,t)=>{let n=d.current.get(e),r=t?d.current.get(t):null;if(n&&f.current){let e=f.current.getBoundingClientRect(),t=n.getBoundingClientRect(),i=t.left-e.left-4;if(r){let n=r.getBoundingClientRect().left-e.left-4;u({"--slide-from":`${n}px`,"--slide-to":`${i}px`,width:`${t.width}px`,transform:`translateX(${i}px)`})}else u({width:`${t.width}px`,transform:`translateX(${i}px)`})}};(0,t.useEffect)(()=>{p(s)},[s]);let m=e=>{let t=s;c(e),a==null||a(e),p(e,t)};return(0,n.jsxs)(`div`,{"data-u-comp":`segmented`,ref:f,className:H(`univer-relative univer-box-border univer-flex univer-gap-4 univer-rounded-lg univer-bg-gray-100 univer-p-1 dark:!univer-bg-gray-800`,o),children:[(0,n.jsx)(`div`,{className:`univer-animate-univer-slide univer-absolute univer-h-6 univer-rounded-md univer-bg-white univer-shadow-sm univer-transition-all univer-duration-200 dark:!univer-bg-gray-700 dark:!univer-text-gray-400`,style:l}),e.map(e=>(0,n.jsx)(`button`,{ref:t=>{t&&d.current.set(e.value,t)},className:H(`univer-relative univer-box-border univer-flex-1 univer-cursor-pointer univer-border-none univer-bg-transparent univer-px-3 univer-py-1 univer-text-xs univer-font-medium univer-transition-colors`,{"univer-text-gray-900 dark:!univer-text-white":s===e.value,"univer-text-gray-500 hover:univer-text-gray-900 dark:hover:!univer-text-white":s!==e.value}),type:`button`,onClick:()=>m(e.value),children:e.label},String(e.value)))]})}function Rf(e){let{children:i,className:a,asChild:o=!0,title:s,placement:c=`bottom`,showIfEllipsis:l=!1,visible:u,onVisibleChange:d}=e,[f,p]=(0,t.useState)(!1),m=u!==void 0,h=m?u:f,g=(0,t.useRef)(null),_=(0,t.useRef)(null),v=(0,t.useRef)(null),[y,b]=(0,t.useState)(null),[x,S]=(0,t.useState)(c);function C(e){return Math.abs(e.scrollWidth-e.clientWidth)>1}function w(){m?d==null||d(!0):p(!0)}function T(){m?d==null||d(!1):p(!1)}(0,t.useLayoutEffect)(()=>{if(!h)return;let e=g.current,t=_.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=[c,`bottom`,`top`,`right`,`left`],s=c,l=0,u=0,d=e=>{let t=0,i=0;return e===`bottom`?(t=n.bottom+8,i=n.left+n.width/2-r.width/2):e===`top`?(t=n.top-r.height-8,i=n.left+n.width/2-r.width/2):e===`left`?(t=n.top+n.height/2-r.height/2,i=n.left-r.width-8):(t=n.top+n.height/2-r.height/2,i=n.right+8),{t,l:i}};for(let e of o){let{t,l:n}=d(e),o=n>=0&&n+r.width<=i,c=t>=0&&t+r.height<=a;if(o&&c){s=e,l=t,u=n;break}}if(!l&&!u){let e=d(c);l=Math.min(Math.max(0,e.t),a-r.height),u=Math.min(Math.max(0,e.l),i-r.width)}S(s),b({top:Math.round(l+window.scrollY),left:Math.round(u+window.scrollX)})},[h,c]),(0,t.useEffect)(()=>{if(!h)return;let e=()=>{if(!g.current||!_.current)return;let e=g.current.getBoundingClientRect(),t=_.current.getBoundingClientRect(),n=0,r=0;x===`bottom`?(n=e.bottom+8,r=e.left+e.width/2-t.width/2):x===`top`?(n=e.top-t.height-8,r=e.left+e.width/2-t.width/2):x===`left`?(n=e.top+e.height/2-t.height/2,r=e.left-t.width-8):(n=e.top+e.height/2-t.height/2,r=e.right+8),b({top:Math.round(n+window.scrollY),left:Math.round(r+window.scrollX)})};return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[h,x]);let E={ref:e=>g.current=e,onMouseEnter:()=>{l&&g.current&&!C(g.current)||w()},onMouseLeave:()=>T(),onFocus:()=>w(),onBlur:()=>T()},D=o?(0,n.jsx)(`span`,{...E,className:`univer-inline-block univer-max-w-full univer-truncate`,children:i}):(0,n.jsx)(`button`,{type:`button`,...E,children:i}),O=null;if(typeof document<`u`&&h&&s&&document.body){var k,A;O=(0,r.createPortal)((0,n.jsxs)(`div`,{ref:_,role:`tooltip`,className:H(`univer-animate-in univer-fade-in-0 univer-zoom-in-95 univer-pointer-events-auto univer-absolute univer-z-[1081] univer-box-border univer-w-fit univer-max-w-sm univer-text-balance univer-rounded-lg univer-bg-gray-700 univer-px-2.5 univer-py-2 univer-text-xs univer-font-medium univer-text-white univer-shadow-lg univer-drop-shadow-sm dark:!univer-bg-gray-100 dark:!univer-text-gray-900`,a),style:{top:(k=y==null?void 0:y.top)==null?-9999:k,left:(A=y==null?void 0:y.left)==null?-9999:A},onMouseEnter:()=>w(),onMouseLeave:()=>T(),children:[(0,n.jsx)(`div`,{className:`univer-break-words`,children:s}),(0,n.jsx)(`div`,{ref:v,className:`univer-absolute univer-size-2.5 univer-rotate-45 univer-rounded-sm univer-bg-gray-700 dark:!univer-bg-gray-100`,style:{...x===`bottom`&&{top:-5,left:`50%`,transform:`translateX(-50%) rotate(45deg)`},...x===`top`&&{bottom:-5,left:`50%`,transform:`translateX(-50%) rotate(45deg)`},...x===`left`&&{right:-5,top:`50%`,transform:`translateY(-50%) rotate(45deg)`},...x===`right`&&{left:-5,top:`50%`,transform:`translateY(-50%) rotate(45deg)`}}})]}),document.body)}return(0,n.jsxs)(n.Fragment,{children:[D,O]})}let zf={type:`linear`,stops:[{color:`#ffffff`,offset:0},{color:`#000000`,offset:100}],angle:90};function Bf(e){var r,i;let{className:a,value:o=zf,onChange:s}=e,{locale:c}=(0,t.useContext)(Ft),[l,u]=(0,t.useState)(0),d=(0,t.useRef)(null),f=(0,t.useMemo)(()=>[...o.stops].sort((e,t)=>e.offset-t.offset),[o.stops]),p=e=>{s==null||s({...o,type:e})},m=e=>{s==null||s({...o,angle:e==null?0:e})},h=e=>{let t=[...o.stops];t[l]={...t[l],color:e},s==null||s({...o,stops:t})},g=e=>{if(e===null)return;let t=[...o.stops];t[l]={...t[l],offset:e},s==null||s({...o,stops:t})},_=e=>{if(!d.current)return;let t=d.current.getBoundingClientRect(),n=Math.round((e.clientX-t.left)/t.width*100),r={color:([...f].reverse().find(e=>e.offset<=n)||f[0]).color,offset:n},i=[...o.stops,r];s==null||s({...o,stops:i}),u(i.length-1)},v=()=>{if(o.stops.length<=2)return;let e=o.stops.filter((e,t)=>t!==l);s==null||s({...o,stops:e}),u(0)},y=(0,t.useMemo)(()=>`linear-gradient(to right, ${f.map(e=>`${e.color} ${e.offset}%`).join(`, `)})`,[f]),b=(0,t.useMemo)(()=>{let e=f.map(e=>`${e.color} ${e.offset}%`).join(`, `);switch(o.type){case`linear`:return`linear-gradient(${o.angle}deg, ${e})`;case`radial`:return`radial-gradient(circle, ${e})`;case`angular`:return`conic-gradient(from ${o.angle}deg, ${e})`;case`diamond`:return`radial-gradient(circle, ${e})`;default:return`linear-gradient(${o.angle}deg, ${e})`}},[o,f]);return(0,n.jsxs)(`div`,{className:H(`univer-flex univer-w-64 univer-flex-col univer-gap-4 univer-rounded-lg univer-bg-white univer-p-4 univer-shadow-lg dark:!univer-bg-gray-800`,a),children:[(0,n.jsx)(Lf,{items:[{label:c==null?void 0:c.GradientColorPicker.linear,value:`linear`},{label:c==null?void 0:c.GradientColorPicker.radial,value:`radial`},{label:c==null?void 0:c.GradientColorPicker.angular,value:`angular`},{label:c==null?void 0:c.GradientColorPicker.diamond,value:`diamond`}],value:o.type,onChange:e=>p(e)}),(0,n.jsx)(`div`,{className:`univer-h-32 univer-w-full univer-rounded-md univer-border univer-border-gray-200 dark:!univer-border-gray-600`,style:{background:b}}),(0,n.jsxs)(`div`,{className:`univer-relative univer-mt-4 univer-h-6`,children:[(0,n.jsx)(`div`,{ref:d,className:`univer-absolute univer-inset-x-0 univer-top-1/2 univer-h-2 -univer-translate-y-1/2 univer-cursor-crosshair univer-rounded-full`,style:{background:y},onClick:_}),o.stops.map((e,t)=>(0,n.jsx)(`div`,{className:H(`univer-absolute univer-top-1/2 univer-size-4 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-cursor-pointer univer-rounded-full univer-border-2 univer-border-white univer-shadow-md`,l===t?`univer-z-10 univer-ring-2 univer-ring-primary-500`:`univer-z-0`),style:{left:`${e.offset}%`,backgroundColor:e.color},onClick:e=>{e.stopPropagation(),u(t)},onPointerDown:n=>{let r=n.clientX,i=e.offset,a=e=>{if(!d.current)return;let n=d.current.getBoundingClientRect(),a=(e.clientX-r)/n.width*100,c=Math.max(0,Math.min(100,Math.round(i+a))),l=[...o.stops];l[t]={...l[t],offset:c},s==null||s({...o,stops:l})},c=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,c)};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,c)}},t))]}),(0,n.jsxs)(`div`,{className:`univer-flex univer-items-end univer-gap-2`,children:[(0,n.jsxs)(`div`,{className:`univer-flex-1`,children:[(0,n.jsx)(`div`,{className:`univer-mb-1 univer-text-xs univer-text-gray-500`,children:c==null?void 0:c.GradientColorPicker.offset}),(0,n.jsx)(If,{value:(r=o.stops[l])==null?void 0:r.offset,min:0,max:100,onChange:g})]}),(o.type===`linear`||o.type===`angular`)&&(0,n.jsxs)(`div`,{className:`univer-flex-1`,children:[(0,n.jsx)(`div`,{className:`univer-mb-1 univer-text-xs univer-text-gray-500`,children:c==null?void 0:c.GradientColorPicker.angle}),(0,n.jsx)(If,{value:o.angle,min:0,max:360,onChange:m})]}),(0,n.jsx)(`div`,{className:`univer-flex univer-gap-1`,children:(0,n.jsx)(Rf,{title:c==null?void 0:c.GradientColorPicker.delete,children:(0,n.jsx)(Mt,{variant:`danger`,onClick:v,disabled:o.stops.length<=2,children:(0,n.jsx)(O,{})})})})]}),(0,n.jsx)(`div`,{className:`univer-border-t univer-border-gray-100 univer-pt-4 dark:!univer-border-gray-700`,children:(0,n.jsx)(Va,{value:(i=o.stops[l])==null?void 0:i.color,onChange:h})})]})}var Vf,Hf=`HoverCard`,[Uf,Wf]=tn(Hf,[dc]),Gf=dc(),[Kf,qf]=Uf(Hf),Jf=e=>{let{__scopeHoverCard:r,children:i,open:a,defaultOpen:o,onOpenChange:s,openDelay:c=700,closeDelay:l=300}=e,u=Gf(r),d=t.useRef(0),f=t.useRef(0),p=t.useRef(!1),m=t.useRef(!1),[h,g]=un({prop:a,defaultProp:o==null?!1:o,onChange:s,caller:Hf}),_=t.useCallback(()=>{clearTimeout(f.current),d.current=window.setTimeout(()=>g(!0),c)},[c,g]),v=t.useCallback(()=>{clearTimeout(d.current),!p.current&&!m.current&&(f.current=window.setTimeout(()=>g(!1),l))},[l,g]),y=t.useCallback(()=>g(!1),[g]);return t.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]),(0,n.jsx)(Kf,{scope:r,open:h,onOpenChange:g,onOpen:_,onClose:v,onDismiss:y,hasSelectionRef:p,isPointerDownOnContentRef:m,children:(0,n.jsx)(Dc,{...u,children:i})})};Jf.displayName=Hf;var Yf=`HoverCardTrigger`,Xf=t.forwardRef((e,t)=>{let{__scopeHoverCard:r,...i}=e,a=qf(Yf,r),o=Gf(r);return(0,n.jsx)(Oc,{asChild:!0,...o,children:(0,n.jsx)(K.a,{"data-state":a.open?`open`:`closed`,...i,ref:t,onPointerEnter:G(e.onPointerEnter,op(a.onOpen)),onPointerLeave:G(e.onPointerLeave,op(a.onClose)),onFocus:G(e.onFocus,a.onOpen),onBlur:G(e.onBlur,a.onClose),onTouchStart:G(e.onTouchStart,e=>e.preventDefault())})})});Xf.displayName=Yf;var Zf=`HoverCardPortal`,[Qf,$f]=Uf(Zf,{forceMount:void 0}),ep=e=>{let{__scopeHoverCard:t,forceMount:r,children:i,container:a}=e,o=qf(Zf,t);return(0,n.jsx)(Qf,{scope:t,forceMount:r,children:(0,n.jsx)(q,{present:r||o.open,children:(0,n.jsx)(Qn,{asChild:!0,container:a,children:i})})})};ep.displayName=Zf;var tp=`HoverCardContent`,np=t.forwardRef((e,t)=>{let r=$f(tp,e.__scopeHoverCard),{forceMount:i=r.forceMount,...a}=e,o=qf(tp,e.__scopeHoverCard);return(0,n.jsx)(q,{present:i||o.open,children:(0,n.jsx)(rp,{"data-state":o.open?`open`:`closed`,...a,onPointerEnter:G(e.onPointerEnter,op(o.onOpen)),onPointerLeave:G(e.onPointerLeave,op(o.onClose)),ref:t})})});np.displayName=tp;var rp=t.forwardRef((e,r)=>{let{__scopeHoverCard:i,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,...l}=e,u=qf(tp,i),d=Gf(i),f=t.useRef(null),p=U(r,f),[m,h]=t.useState(!1);return t.useEffect(()=>{if(m){let e=document.body;return Vf=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=Vf,e.style.webkitUserSelect=Vf}}},[m]),t.useEffect(()=>{if(f.current){let e=()=>{h(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var e;((e=document.getSelection())==null?void 0:e.toString())!==``&&(u.hasSelectionRef.current=!0)})};return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),t.useEffect(()=>{f.current&&sp(f.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,n.jsx)(On,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:c,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:G(s,e=>{e.preventDefault()}),onDismiss:u.onDismiss,children:(0,n.jsx)(kc,{...d,...l,onPointerDown:G(l.onPointerDown,e=>{e.currentTarget.contains(e.target)&&h(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:p,style:{...l.style,userSelect:m?`text`:void 0,WebkitUserSelect:m?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})}),ip=`HoverCardArrow`,ap=t.forwardRef((e,t)=>{let{__scopeHoverCard:r,...i}=e,a=Gf(r);return(0,n.jsx)(Ac,{...a,...i,ref:t})});ap.displayName=ip;function op(e){return t=>t.pointerType===`touch`?void 0:e()}function sp(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var cp=Jf,lp=Xf,up=ep,dp=np;let fp=cp,pp=up,mp=lp,hp=(0,t.forwardRef)(({className:e,align:t=`center`,sideOffset:r=4,...i},a)=>(0,n.jsx)(dp,{ref:a,align:t,sideOffset:r,className:H(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-w-64 univer-origin-[--radix-hover-card-content-transform-origin] univer-rounded-md univer-bg-white univer-text-gray-900 univer-shadow-md univer-outline-none dark:!univer-bg-gray-900 dark:!univer-text-white`,W,e),...i}));hp.displayName=dp.displayName;function gp(e){let{children:r,overlay:i,disabled:a,openDelay:o=200,open:s,onOpenChange:c,...l}=e,[u,d]=(0,t.useState)(!1),f=s!==void 0,p=f?s:u;function m(e){a||(f||d(e),c==null||c(e))}return(0,n.jsxs)(fp,{open:p,onOpenChange:m,openDelay:o,children:[(0,n.jsx)(mp,{asChild:!0,children:r}),(0,n.jsx)(pp,{children:(0,n.jsx)(hp,{...l,children:i})})]})}function _p(e){let{keyboard:t,className:r}=e,i=t.split(`+`);return(0,n.jsx)(`span`,{className:H(`univer-inline-block univer-h-6 univer-select-none univer-whitespace-nowrap univer-rounded-md univer-bg-gray-50 univer-px-2 univer-font-mono univer-text-xs/6 univer-font-medium univer-text-gray-700 dark:!univer-bg-gray-700 dark:!univer-text-white`,W,r),children:i.map((e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`kbd`,{className:`univer-inline-block univer-h-full`,children:e}),t<i.length-1&&(0,n.jsx)(`span`,{className:`univer-inline-block univer-h-full univer-px-1`,children:`+`})]},t))})}function vp(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}let yp=e=>{switch(e){case`success`:return Sp;case`info`:return wp;case`warning`:return Cp;case`error`:return Tp;default:return null}},bp=Array(12).fill(0),xp=({visible:e,className:n})=>t.default.createElement(`div`,{className:[`sonner-loading-wrapper`,n].filter(Boolean).join(` `),"data-visible":e},t.default.createElement(`div`,{className:`sonner-spinner`},bp.map((e,n)=>t.default.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${n}`})))),Sp=t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},t.default.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Cp=t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},t.default.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),wp=t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},t.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Tp=t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},t.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Ep=t.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},t.default.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),t.default.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),Dp=()=>{let[e,n]=t.default.useState(document.hidden);return t.default.useEffect(()=>{let e=()=>{n(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},Op=1,Q=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)==`number`||((t=e.id)==null?void 0:t.length)>0?e.id:Op++,a=this.toasts.find(e=>e.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:n}),{...t,...e,id:i,dismissible:o,title:n}):t):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:`loading`,message:n.loading,description:typeof n.description==`function`?void 0:n.description}));let i=Promise.resolve(e instanceof Function?e():e),a=r!==void 0,o,s=i.then(async e=>{if(o=[`resolve`,e],t.default.isValidElement(e))a=!1,this.create({id:r,type:`default`,message:e});else if(Ap(e)&&!e.ok){a=!1;let i=typeof n.error==`function`?await n.error(`HTTP error! status: ${e.status}`):n.error,o=typeof n.description==`function`?await n.description(`HTTP error! status: ${e.status}`):n.description,s=typeof i==`object`&&!t.default.isValidElement(i)?i:{message:i};this.create({id:r,type:`error`,description:o,...s})}else if(e instanceof Error){a=!1;let i=typeof n.error==`function`?await n.error(e):n.error,o=typeof n.description==`function`?await n.description(e):n.description,s=typeof i==`object`&&!t.default.isValidElement(i)?i:{message:i};this.create({id:r,type:`error`,description:o,...s})}else if(n.success!==void 0){a=!1;let i=typeof n.success==`function`?await n.success(e):n.success,o=typeof n.description==`function`?await n.description(e):n.description,s=typeof i==`object`&&!t.default.isValidElement(i)?i:{message:i};this.create({id:r,type:`success`,description:o,...s})}}).catch(async e=>{if(o=[`reject`,e],n.error!==void 0){a=!1;let i=typeof n.error==`function`?await n.error(e):n.error,o=typeof n.description==`function`?await n.description(e):n.description,s=typeof i==`object`&&!t.default.isValidElement(i)?i:{message:i};this.create({id:r,type:`error`,description:o,...s})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((e,t)=>s.then(()=>o[0]===`reject`?t(o[1]):e(o[1])).catch(t));return typeof r!=`string`&&typeof r!=`number`?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Op++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},kp=(e,t)=>{let n=(t==null?void 0:t.id)||Op++;return Q.addToast({title:e,...t,id:n}),n},Ap=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,jp=kp,Mp=Object.assign(jp,{success:Q.success,info:Q.info,warning:Q.warning,error:Q.error,custom:Q.custom,message:Q.message,promise:Q.promise,dismiss:Q.dismiss,loading:Q.loading},{getHistory:()=>Q.toasts,getToasts:()=>Q.getActiveToasts()});vp(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function Np(e){return e.label!==void 0}let Pp=4e3;function Fp(...e){return e.filter(Boolean).join(` `)}function Ip(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}let Lp=e=>{var n,r,i,a,o,s,c,l,u;let{invert:d,toast:f,unstyled:p,interacting:m,setHeights:h,visibleToasts:g,heights:_,index:v,toasts:y,expanded:b,removeToast:x,defaultRichColors:S,closeButton:C,style:w,cancelButtonStyle:T,actionButtonStyle:E,className:D=``,descriptionClassName:O=``,duration:k,position:A,gap:j,expandByDefault:M,classNames:N,icons:P,closeButtonAriaLabel:F=`Close toast`}=e,[I,L]=t.default.useState(null),[R,ee]=t.default.useState(null),[te,ne]=t.default.useState(!1),[re,ie]=t.default.useState(!1),[ae,oe]=t.default.useState(!1),[se,ce]=t.default.useState(!1),[le,ue]=t.default.useState(!1),[de,fe]=t.default.useState(0),[pe,me]=t.default.useState(0),he=t.default.useRef(f.duration||k||Pp),ge=t.default.useRef(null),_e=t.default.useRef(null),ve=v===0,ye=v+1<=g,z=f.type,be=f.dismissible!==!1,xe=f.className||``,Se=f.descriptionClassName||``,Ce=t.default.useMemo(()=>_.findIndex(e=>e.toastId===f.id)||0,[_,f.id]),we=t.default.useMemo(()=>{var e;return(e=f.closeButton)==null?C:e},[f.closeButton,C]),Te=t.default.useMemo(()=>f.duration||k||Pp,[f.duration,k]),Ee=t.default.useRef(0),De=t.default.useRef(0),Oe=t.default.useRef(0),ke=t.default.useRef(null),[Ae,je]=A.split(`-`),Me=t.default.useMemo(()=>_.reduce((e,t,n)=>n>=Ce?e:e+t.height,0),[_,Ce]),Ne=Dp(),Pe=f.invert||d,Fe=z===`loading`;De.current=t.default.useMemo(()=>Ce*j+Me,[Ce,Me]),t.default.useEffect(()=>{he.current=Te},[Te]),t.default.useEffect(()=>{ne(!0)},[]),t.default.useEffect(()=>{let e=_e.current;if(e){let t=e.getBoundingClientRect().height;return me(t),h(e=>[{toastId:f.id,height:t,position:f.position},...e]),()=>h(e=>e.filter(e=>e.toastId!==f.id))}},[h,f.id]),t.default.useLayoutEffect(()=>{if(!te)return;let e=_e.current,t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,me(n),h(e=>e.find(e=>e.toastId===f.id)?e.map(e=>e.toastId===f.id?{...e,height:n}:e):[{toastId:f.id,height:n,position:f.position},...e])},[te,f.title,f.description,h,f.id,f.jsx,f.action,f.cancel]);let Ie=t.default.useCallback(()=>{ie(!0),fe(De.current),h(e=>e.filter(e=>e.toastId!==f.id)),setTimeout(()=>{x(f)},200)},[f,x,h,De]);t.default.useEffect(()=>{if(f.promise&&z===`loading`||f.duration===1/0||f.type===`loading`)return;let e;return b||m||Ne?(()=>{if(Oe.current<Ee.current){let e=new Date().getTime()-Ee.current;he.current-=e}Oe.current=new Date().getTime()})():he.current!==1/0&&(Ee.current=new Date().getTime(),e=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),Ie()},he.current)),()=>clearTimeout(e)},[b,m,f,z,Ne,Ie]),t.default.useEffect(()=>{f.delete&&(Ie(),f.onDismiss==null||f.onDismiss.call(f,f))},[Ie,f.delete]);function B(){var e;if(P!=null&&P.loading){var n;return t.default.createElement(`div`,{className:Fp(N==null?void 0:N.loader,f==null||(n=f.classNames)==null?void 0:n.loader,`sonner-loader`),"data-visible":z===`loading`},P.loading)}return t.default.createElement(xp,{className:Fp(N==null?void 0:N.loader,f==null||(e=f.classNames)==null?void 0:e.loader),visible:z===`loading`})}let Le=f.icon||(P==null?void 0:P[z])||yp(z);var Re,ze;return t.default.createElement(`li`,{tabIndex:0,ref:_e,className:Fp(D,xe,N==null?void 0:N.toast,f==null||(n=f.classNames)==null?void 0:n.toast,N==null?void 0:N.default,N==null?void 0:N[z],f==null||(r=f.classNames)==null?void 0:r[z]),"data-sonner-toast":``,"data-rich-colors":(Re=f.richColors)==null?S:Re,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":te,"data-promise":!!f.promise,"data-swiped":le,"data-removed":re,"data-visible":ye,"data-y-position":Ae,"data-x-position":je,"data-index":v,"data-front":ve,"data-swiping":ae,"data-dismissible":be,"data-type":z,"data-invert":Pe,"data-swipe-out":se,"data-swipe-direction":R,"data-expanded":!!(b||M&&te),"data-testid":f.testId,style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${re?de:De.current}px`,"--initial-height":M?`auto`:`${pe}px`,...w,...f.style},onDragEnd:()=>{oe(!1),L(null),ke.current=null},onPointerDown:e=>{e.button!==2&&(Fe||!be||(ge.current=new Date,fe(De.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(oe(!0),ke.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{var e,t,n;if(se||!be)return;ke.current=null;let r=Number(((e=_e.current)==null?void 0:e.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``))||0),i=Number(((t=_e.current)==null?void 0:t.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``))||0),a=new Date().getTime()-((n=ge.current)==null?void 0:n.getTime()),o=I===`x`?r:i,s=Math.abs(o)/a;if(Math.abs(o)>=45||s>.11){fe(De.current),f.onDismiss==null||f.onDismiss.call(f,f),ee(I===`x`?r>0?`right`:`left`:i>0?`down`:`up`),Ie(),ce(!0);return}else{var c,l;(c=_e.current)==null||c.style.setProperty(`--swipe-amount-x`,`0px`),(l=_e.current)==null||l.style.setProperty(`--swipe-amount-y`,`0px`)}ue(!1),oe(!1),L(null)},onPointerMove:t=>{var n,r,i;if(!ke.current||!be||((n=window.getSelection())==null?void 0:n.toString().length)>0)return;let a=t.clientY-ke.current.y,o=t.clientX-ke.current.x;var s;let c=(s=e.swipeDirections)==null?Ip(A):s;!I&&(Math.abs(o)>1||Math.abs(a)>1)&&L(Math.abs(o)>Math.abs(a)?`x`:`y`);let l={x:0,y:0},u=e=>1/(1.5+Math.abs(e)/20);if(I===`y`){if(c.includes(`top`)||c.includes(`bottom`))if(c.includes(`top`)&&a<0||c.includes(`bottom`)&&a>0)l.y=a;else{let e=a*u(a);l.y=Math.abs(e)<Math.abs(a)?e:a}}else if(I===`x`&&(c.includes(`left`)||c.includes(`right`)))if(c.includes(`left`)&&o<0||c.includes(`right`)&&o>0)l.x=o;else{let e=o*u(o);l.x=Math.abs(e)<Math.abs(o)?e:o}(Math.abs(l.x)>0||Math.abs(l.y)>0)&&ue(!0),(r=_e.current)==null||r.style.setProperty(`--swipe-amount-x`,`${l.x}px`),(i=_e.current)==null||i.style.setProperty(`--swipe-amount-y`,`${l.y}px`)}},we&&!f.jsx&&z!==`loading`?t.default.createElement(`button`,{"aria-label":F,"data-disabled":Fe,"data-close-button":!0,onClick:Fe||!be?()=>{}:()=>{Ie(),f.onDismiss==null||f.onDismiss.call(f,f)},className:Fp(N==null?void 0:N.closeButton,f==null||(i=f.classNames)==null?void 0:i.closeButton)},(ze=P==null?void 0:P.close)==null?Ep:ze):null,(z||f.icon||f.promise)&&f.icon!==null&&((P==null?void 0:P[z])!==null||f.icon)?t.default.createElement(`div`,{"data-icon":``,className:Fp(N==null?void 0:N.icon,f==null||(a=f.classNames)==null?void 0:a.icon)},f.promise||f.type===`loading`&&!f.icon?f.icon||B():null,f.type===`loading`?null:Le):null,t.default.createElement(`div`,{"data-content":``,className:Fp(N==null?void 0:N.content,f==null||(o=f.classNames)==null?void 0:o.content)},t.default.createElement(`div`,{"data-title":``,className:Fp(N==null?void 0:N.title,f==null||(s=f.classNames)==null?void 0:s.title)},f.jsx?f.jsx:typeof f.title==`function`?f.title():f.title),f.description?t.default.createElement(`div`,{"data-description":``,className:Fp(O,Se,N==null?void 0:N.description,f==null||(c=f.classNames)==null?void 0:c.description)},typeof f.description==`function`?f.description():f.description):null),t.default.isValidElement(f.cancel)?f.cancel:f.cancel&&Np(f.cancel)?t.default.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||T,onClick:e=>{Np(f.cancel)&&be&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,e),Ie())},className:Fp(N==null?void 0:N.cancelButton,f==null||(l=f.classNames)==null?void 0:l.cancelButton)},f.cancel.label):null,t.default.isValidElement(f.action)?f.action:f.action&&Np(f.action)?t.default.createElement(`button`,{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||E,onClick:e=>{Np(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,e),!e.defaultPrevented&&Ie())},className:Fp(N==null?void 0:N.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function Rp(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function zp(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?`16px`:`24px`;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}let Bp=t.default.forwardRef(function(e,n){let{id:i,invert:a,position:o=`bottom-right`,hotkey:s=[`altKey`,`KeyT`],expand:c,closeButton:l,className:u,offset:d,mobileOffset:f,theme:p=`light`,richColors:m,duration:h,style:g,visibleToasts:_=3,toastOptions:v,dir:y=Rp(),gap:b=14,icons:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=t.default.useState([]),T=t.default.useMemo(()=>i?C.filter(e=>e.toasterId===i):C.filter(e=>!e.toasterId),[C,i]),E=t.default.useMemo(()=>Array.from(new Set([o].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,o]),[D,O]=t.default.useState([]),[k,A]=t.default.useState(!1),[j,M]=t.default.useState(!1),[N,P]=t.default.useState(p===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:p),F=t.default.useRef(null),I=s.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),L=t.default.useRef(null),R=t.default.useRef(!1),ee=t.default.useCallback(e=>{w(t=>{var n;return(n=t.find(t=>t.id===e.id))!=null&&n.delete||Q.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return t.default.useEffect(()=>Q.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{r.default.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[C]),t.default.useEffect(()=>{if(p!==`system`){P(p);return}if(p===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?P(`dark`):P(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{P(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{P(e?`dark`:`light`)}catch(e){console.error(e)}})}},[p]),t.default.useEffect(()=>{C.length<=1&&A(!1)},[C]),t.default.useEffect(()=>{let e=e=>{var t;if(s.every(t=>e[t]||e.code===t)){var n;A(!0),(n=F.current)==null||n.focus()}e.code===`Escape`&&(document.activeElement===F.current||(t=F.current)!=null&&t.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[s]),t.default.useEffect(()=>{if(F.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,R.current=!1)}},[F.current]),t.default.createElement(`section`,{ref:n,"aria-label":`${S} ${I}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},E.map((n,r)=>{var i;let[o,s]=n.split(`-`);return T.length?t.default.createElement(`ol`,{key:n,dir:y===`auto`?Rp():y,tabIndex:-1,ref:F,className:u,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":o,"data-x-position":s,style:{"--front-toast-height":`${((i=D[0])==null?void 0:i.height)||0}px`,"--width":`356px`,"--gap":`${b}px`,...g,...zp(d,f)},onBlur:e=>{R.current&&!e.currentTarget.contains(e.relatedTarget)&&(R.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||R.current||(R.current=!0,L.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&r===0||e.position===n).map((r,i)=>{var o,s;return t.default.createElement(Lp,{key:r.id,icons:x,index:i,toast:r,defaultRichColors:m,duration:(o=v==null?void 0:v.duration)==null?h:o,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:a,visibleToasts:_,closeButton:(s=v==null?void 0:v.closeButton)==null?l:s,interacting:j,position:n,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:ee,toasts:T.filter(e=>e.position==r.position),heights:D.filter(e=>e.position==r.position),setHeights:O,expandByDefault:c,gap:b,expanded:k,swipeDirections:e.swipeDirections})})):null}))}),$=function(e){return e.Success=`success`,e.Info=`info`,e.Warning=`warning`,e.Error=`error`,e.Loading=`loading`,e}({}),Vp=`univer-message-toaster`,Hp=3e3,Up=new Set,Wp=(0,n.jsx)(_e,{className:`univer-animate-spin univer-text-violet-500`}),Gp=0,Kp={[$.Success]:(0,n.jsx)(le,{className:`univer-text-green-500`}),[$.Info]:(0,n.jsx)(I,{className:`univer-text-sky-500 dark:!univer-text-sky-400`}),[$.Warning]:(0,n.jsx)(de,{className:`univer-text-amber-500`}),[$.Error]:(0,n.jsx)(P,{className:`univer-text-red-500`}),[$.Loading]:Wp},qp={[$.Success]:`[&_[data-icon]]:univer-text-green-500`,[$.Info]:`[&_[data-icon]]:univer-text-sky-500`,[$.Warning]:`[&_[data-icon]]:univer-text-amber-500`,[$.Error]:`[&_[data-icon]]:univer-text-red-500`,[$.Loading]:`[&_[data-icon]]:univer-text-violet-500`},Jp=e=>{switch(e){case $.Success:return Mp.success;case $.Warning:return Mp.warning;case $.Error:return Mp.error;case $.Loading:return Mp.loading;case $.Info:default:return Mp.info}},Yp=()=>{let e=`univer-message-${Gp}`;return Gp+=1,e},Xp=({className:e,...t})=>(0,n.jsx)(Bp,{id:Vp,position:`top-center`,visibleToasts:4,closeButton:!1,expand:!1,icons:{loading:Wp},offset:{top:16},className:H(`[&_[data-sonner-toast]]:univer-bg-white/95 dark:[&_[data-sonner-toast]]:!univer-bg-gray-800/95 [&_[data-sonner-toast]]:univer-rounded-2xl [&_[data-sonner-toast]]:univer-border [&_[data-sonner-toast]]:univer-border-solid [&_[data-sonner-toast]]:univer-border-gray-200 [&_[data-sonner-toast]]:univer-shadow-[0_16px_40px_-20px_rgba(15,23,42,0.55)] [&_[data-sonner-toast]]:univer-backdrop-blur-sm dark:[&_[data-sonner-toast]]:!univer-border-gray-600`,e),toastOptions:{duration:Hp,classNames:{toast:`
501
117
  univer-group univer-min-h-0 univer-min-w-[320px] univer-max-w-[520px] univer-px-3.5 univer-py-3
502
118
  univer-font-sans univer-transition-all univer-duration-300
503
119
  `,title:`
504
120
  univer-m-0 univer-font-sans univer-text-sm univer-font-medium univer-leading-5 univer-text-gray-700
505
121
  dark:!univer-text-gray-100
506
- `,content:`univer-gap-2.5`,icon:`[&>svg]:univer-block [&>svg]:univer-size-4`,success:qp[$.Success],info:qp[$.Info],warning:qp[$.Warning],error:qp[$.Error],loading:qp[$.Loading]}},...t}),Zp=({content:e,duration:t,id:n,onClose:r,type:i=$.Info})=>{let a=n==null?Yp():n,o=Jp(i),s=!1,c=()=>{s||(s=!0,Up.delete(a),r==null||r())};return o(e,{id:a,toasterId:Vp,duration:t==null?Hp:t,icon:i===$.Loading?void 0:Kp[i],onDismiss:c,onAutoClose:c}),Up.add(a),a},Qp=e=>{if(e!==void 0){Mp.dismiss(e),Up.delete(e);return}Up.forEach(e=>{Mp.dismiss(e)}),Up.clear()};function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$p.apply(null,arguments)}function em(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function tm(e,t){return tm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tm(e,t)}function nm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,tm(e,t)}function rm(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function im(e,t){e.classList?e.classList.add(t):rm(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function am(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function om(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=am(e.className,t):e.setAttribute(`class`,am(e.className&&e.className.baseVal||``,t))}var sm={disabled:!1},cm=t.default.createContext(null),lm=function(e){return e.scrollTop},um=`unmounted`,dm=`exited`,fm=`entering`,pm=`entered`,mm=`exiting`,hm=function(e){nm(n,e);function n(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=dm,r.appearStatus=fm):o=pm:o=t.unmountOnExit||t.mountOnEnter?um:dm,r.state={status:o},r.nextCallback=null,r}n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:dm}:null};var i=n.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=fm):(n===`entering`||n===`entered`)&&(t=mm)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},i.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:r.default.findDOMNode(this);n&&lm(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:um})},i.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,a=this.props.nodeRef?[i]:[r.default.findDOMNode(this),i],o=a[0],s=a[1],c=this.getTimeouts(),l=i?c.appear:c.enter;if(!e&&!n||sm.disabled){this.safeSetState({status:pm},function(){t.props.onEntered(o)});return}this.props.onEnter(o,s),this.safeSetState({status:fm},function(){t.props.onEntering(o,s),t.onTransitionEnd(l,function(){t.safeSetState({status:pm},function(){t.props.onEntered(o,s)})})})},i.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:r.default.findDOMNode(this);if(!t||sm.disabled){this.safeSetState({status:dm},function(){e.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:mm},function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:dm},function(){e.props.onExited(i)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:r.default.findDOMNode(this),i=e==null&&!this.props.addEndListener;if(!n||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=a[0],s=a[1];this.props.addEndListener(o,s)}e!=null&&setTimeout(this.nextCallback,e)},i.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var n=this.props,r=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var i=em(n,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return t.default.createElement(cm.Provider,{value:null},typeof r==`function`?r(e,i):t.default.cloneElement(t.default.Children.only(r),i))},n}(t.default.Component);hm.contextType=cm,hm.propTypes={};function gm(){}hm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:gm,onEntering:gm,onEntered:gm,onExit:gm,onExiting:gm,onExited:gm},hm.UNMOUNTED=um,hm.EXITED=dm,hm.ENTERING=fm,hm.ENTERED=pm,hm.EXITING=mm;var _m=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return im(e,t)})},vm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return om(e,t)})},ym=function(e){nm(n,e);function n(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var r=n.prototype;return r.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&lm(e),r&&(this.appliedClasses[t][n]=r,_m(e,r))},r.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&vm(e,r),i&&vm(e,i),a&&vm(e,a)},r.render=function(){var e=this.props;e.classNames;var n=em(e,[`classNames`]);return t.default.createElement(hm,$p({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(t.default.Component);ym.defaultProps={classNames:``},ym.propTypes={};function bm(e){let{children:i,visible:a=!1,offset:o=[0,0],overflowVisible:s=!1,placementY:c=`below`}=e,l=(0,t.useRef)(null),[u,d]=(0,t.useState)(o),{mountContainer:f}=(0,t.useContext)(Ft),p=()=>{let e=l.current;if(!e)return null;let[t,n]=o,{clientWidth:r,clientHeight:i}=e,{innerWidth:a,innerHeight:s}=window,u=Math.max(0,a-r-2),d=Math.max(0,s-i-2),f=Math.min(Math.max(t,0),u),p=c===`above`?n-i:n;return[f,Math.min(Math.max(p,0),d)]};(0,t.useEffect)(()=>{if(!a){d([-9999,-9999]);return}let e=p();e&&d(e)},[o,c,a]),(0,t.useEffect)(()=>{if(!a)return;let e=()=>{let e=p();e&&d(e)};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[o,c,a]);function m(e){e.preventDefault()}return(0,r.createPortal)((0,n.jsx)(ym,{in:a,nodeRef:l,timeout:500,classNames:{enter:`univer-popup-enter`,enterActive:`univer-popup-enter-active`,enterDone:`univer-popup-enter-done`,exitActive:`univer-popup-exit`,exitDone:`univer-popup-exit-active`},children:(0,n.jsx)(`section`,{ref:l,className:`univer-popup`,style:{left:u[0]+2,top:u[1]+2,overflow:s?`visible`:void 0},onContextMenu:m,children:i})}),f)}function xm(e){let{children:r,className:i,style:a,value:o,disabled:s=!1,direction:c=`horizontal`,onChange:l}=e,u=e=>{l(e)};return(0,n.jsx)(`div`,{className:H(`univer-flex univer-gap-2`,{"univer-flex-col":c===`vertical`},i),style:a,children:t.Children.map(r,(e,n)=>(0,t.isValidElement)(e)?(0,t.cloneElement)(e,{key:n,children:e.props.children,value:e.props.value,checked:o===e.props.value,disabled:s==null?e.props.disabled:s,onChange:u}):e)})}function Sm(e){let{children:r,checked:i,value:a,disabled:o=!1,onChange:s}=e,c=(0,t.useRef)(null);function l(e){if(e.stopPropagation(),!(!s||o))if(a!==void 0)s&&s(a);else{let e=c.current.checked;s&&s(e)}}return(0,n.jsxs)(`label`,{"data-u-comp":`radio`,className:H(`univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm`,{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!o,"univer-text-gray-400":o}),children:[(0,n.jsxs)(`span`,{className:`univer-relative univer-block`,children:[(0,n.jsx)(`input`,{ref:c,className:`univer-absolute univer-size-0 univer-opacity-0`,type:`radio`,checked:i,disabled:o,onChange:l}),(0,n.jsx)(`span`,{className:H(`
507
- univer-relative univer-box-border univer-flex univer-size-4 univer-items-center
508
- univer-justify-center univer-overflow-hidden univer-rounded-full univer-border univer-border-solid
509
- univer-transition-colors
510
- `,{"univer-opacity-50":o,"univer-border-primary-600 univer-bg-primary-600 dark:!univer-bg-primary-600":i,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!i}),children:i&&(0,n.jsx)(`span`,{className:`
511
- univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-2
512
- -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded-full univer-bg-white
513
- `})})]}),(0,n.jsx)(`span`,{children:r})]})}function Cm(e){let{value:t,options:r=[],hideCheckMark:i=!1,onChange:a,multiple:o,className:s,optionClassName:c}=e,l=Array.isArray(t)?t:[t];function u(e){let t=l.indexOf(e);a(o?t>-1?l.filter(t=>t===e):[...l,e]:t>-1?void 0:e)}return(0,n.jsx)(`ul`,{className:H(`
514
- univer-m-0 univer-grid univer-max-h-80 univer-list-none univer-gap-1 univer-overflow-y-auto univer-rounded
515
- univer-p-1.5
516
- `,W,Rt,s),children:r.map((e,t)=>{let r=l.indexOf(e.value)>-1;return(0,n.jsx)(`li`,{children:(0,n.jsxs)(`a`,{className:H(`
517
- univer-relative univer-block univer-cursor-pointer univer-select-none univer-rounded
518
- univer-py-1.5 univer-pl-8 univer-pr-2 univer-text-sm univer-text-gray-900
519
- univer-transition-colors
520
- hover:univer-bg-gray-100
521
- dark:!univer-text-white
522
- dark:hover:!univer-bg-gray-600
523
- `,c,{"univer-bg-gray-200 dark:!univer-bg-gray-500":r}),onClick:()=>u(e.value),children:[!i&&r&&(0,n.jsx)(S,{className:`
524
- univer-absolute univer-left-0 univer-top-1/2 -univer-translate-y-1/2
525
- univer-pl-2 univer-text-primary-600
526
- `}),(0,n.jsx)(`span`,{style:{color:e.color},children:e.label})]})},t)})})}let wm=H(`
527
- univer-box-border univer-inline-flex univer-h-8 univer-min-w-36 univer-items-center univer-justify-between
528
- univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200
529
- dark:!univer-bg-gray-700 dark:!univer-text-white
530
- `,W);function Tm(e){let{className:r,value:i,disabled:a=!1,options:o=[],borderless:s=!1,onChange:c}=e,[l,u]=(0,t.useState)(!1);function d(e){u(e)}let f=(0,t.useMemo)(()=>{let e=[];for(let t of o)t.options?(t.options.forEach(t=>{e.push({label:t.label,value:t.value,disabled:t.disabled})}),e.push({type:`separator`})):e.push({label:t.label,value:t.value,disabled:t.disabled});return[{type:`radio`,value:i,hideIndicator:!0,options:e,onSelect:e=>{c(e)}}]},[o]),p=(0,t.useMemo)(()=>{let e=null;for(let t of o)if(t.options){for(let n of t.options)if(n.value===i){e=n.label;break}}else if(t.value===i){e=t.label;break}return e||i},[o,i]);return(0,n.jsx)(Df,{className:`max-h univer-w-[--radix-popper-anchor-width] univer-min-w-36`,align:`start`,open:l,items:f,disabled:a,onOpenChange:d,children:(0,n.jsxs)(`div`,{"data-u-comp":`select`,className:H(wm,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":l&&!s,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":s,"univer-cursor-not-allowed":a,"hover:univer-border-primary-600":!a&&!s,"univer-cursor-pointer":!a&&!l},r),children:[(0,n.jsx)(`div`,{className:`
531
- univer-flex-1 univer-truncate univer-text-sm univer-text-gray-500
532
- dark:!univer-text-white
533
- `,children:p}),(0,n.jsx)(R,{className:`
534
- univer-flex-shrink-0
535
- dark:!univer-text-white
536
- `})]})})}function Em(e){let{className:r,value:i=[],disabled:a=!1,options:o=[],borderless:s=!1,onChange:c}=e,[l,u]=(0,t.useState)(!1);function d(e){u(e)}let f=(0,t.useMemo)(()=>o.map(e=>({type:`checkbox`,value:e.value,label:e.label,disabled:e.disabled,checked:i.includes(e.value),onSelect:e=>{c(i.includes(e)?i.filter(t=>t!==e):[...i,e])}})),[o]);function p(e){c(i.filter(t=>t!==e))}let m=(0,t.useMemo)(()=>o.filter(e=>i.includes(e.value)).map((e,t)=>(0,n.jsx)(_t,{className:`univer-max-w-32`,closable:!0,onClose:()=>p(e.value),children:e.label},t)),[o,i]);return(0,n.jsx)(Df,{className:`univer-w-[--radix-popper-anchor-width] univer-min-w-36`,align:`start`,open:l,items:f,disabled:a,onOpenChange:d,children:(0,n.jsxs)(`div`,{"data-u-comp":`multiple-select`,className:H(wm,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":l&&!s,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":s,"univer-cursor-not-allowed":a,"hover:univer-border-primary-600":!a&&!s,"univer-cursor-pointer":!a&&!l},r),children:[(0,n.jsx)(`div`,{className:`univer-box-border univer-flex univer-w-[calc(100%-16px)] univer-gap-2 univer-pr-2`,children:m}),(0,n.jsx)(R,{className:`
537
- univer-flex-shrink-0
538
- dark:!univer-text-white
539
- `})]})})}var Dm=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,r)=>{let i=wt(`Primitive.${r}`),a=t.forwardRef((e,t)=>{let{asChild:a,...o}=e,s=a?i:r;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,n.jsx)(s,{...o,ref:t})});return a.displayName=`Primitive.${r}`,{...e,[r]:a}},{}),Om=`Separator`,km=`horizontal`,Am=[`horizontal`,`vertical`],jm=t.forwardRef((e,t)=>{let{decorative:r,orientation:i=km,...a}=e,o=Mm(i)?i:km,s=o===`vertical`?o:void 0,c=r?{role:`none`}:{"aria-orientation":s,role:`separator`};return(0,n.jsx)(Dm.div,{"data-orientation":o,...c,...a,ref:t})});jm.displayName=Om;function Mm(e){return Am.includes(e)}var Nm=jm;function Pm({className:e,orientation:t=`horizontal`,decorative:r=!0,...i}){return(0,n.jsx)(Nm,{"data-u-comp":`separator`,"data-slot":`separator-root`,decorative:r,orientation:t,className:H(`
540
- univer-shrink-0 univer-bg-gray-200
541
- data-[orientation=horizontal]:univer-h-px
542
- data-[orientation=vertical]:univer-h-full
543
- data-[orientation=horizontal]:univer-w-full
544
- data-[orientation=vertical]:univer-w-px
545
- dark:!univer-bg-gray-600
546
- `,e),...i})}let Fm=e=>{let{defaultChecked:r=!1,onChange:i}=e,[a,o]=(0,t.useState)(r);return(0,t.useEffect)(()=>{o(r)},[r]),(0,n.jsx)(`div`,{className:`univer-h-4`,children:(0,n.jsxs)(`label`,{className:`univer-relative univer-inline-block univer-h-4 univer-w-7`,children:[(0,n.jsx)(`input`,{className:`univer-size-0 univer-opacity-0`,type:`checkbox`,checked:a,onChange:()=>{o(!a),i==null||i(!a)}}),(0,n.jsx)(`span`,{className:H(`
547
- univer-absolute univer-inset-0 univer-cursor-pointer univer-rounded-2xl univer-transition-colors
548
- univer-duration-200
549
- `,{"univer-bg-primary-600":a,"univer-bg-gray-200 dark:!univer-bg-gray-600":!a}),children:(0,n.jsx)(`span`,{className:H(`
550
- univer-absolute univer-bottom-0.5 univer-left-0.5 univer-size-3 univer-rounded-full
551
- univer-bg-white univer-transition-transform univer-duration-200
552
- `,{"univer-translate-x-3":a})})})]})})},Im=(0,t.forwardRef)((e,r)=>{let i=(0,t.useRef)(null),a=(0,t.useRef)({width:0,height:0}),{className:o,onResize:s,onValueChange:c,...l}=e;(0,t.useImperativeHandle)(r,()=>i.current,[]),(0,t.useLayoutEffect)(()=>{let e=i.current;if(e&&s){let t=new ResizeObserver(e=>{let{width:t,height:n}=e[0].target.getBoundingClientRect();t===0||n===0||(a.current.width!==t||a.current.height!==n)&&(a.current={width:t,height:n},s(t,n))});return t.observe(e),()=>{t.unobserve(e),t.disconnect()}}},[s]);function u(e){let t=e.target.value;c==null||c(t)}return(0,n.jsx)(`textarea`,{ref:i,"data-u-comp":`textarea`,"data-slot":`textarea`,className:H(`
553
- univer-box-border univer-flex univer-w-full univer-resize univer-rounded-md univer-bg-transparent
554
- univer-p-2 univer-text-base univer-text-gray-900 univer-outline-none
555
- univer-transition-[color,box-shadow]
556
- placeholder:univer-text-gray-200
557
- disabled:univer-cursor-not-allowed disabled:univer-opacity-50
558
- dark:!univer-text-white
559
- `,W,Rt,o),onChange:u,...l})});function Lm({visibleToasts:e,...t}){return(0,n.jsx)(Bp,{className:`
560
- dark:![&_[data-description]]:univer-text-gray-200
561
- [&_[data-description]]:univer-text-sm [&_[data-description]]:univer-text-gray-600
562
- [&_[data-icon]>svg]:univer-relative [&_[data-icon]>svg]:univer-top-1
563
- [&_[data-icon]]:univer-self-baseline
564
- [&_[data-sonner-toast]]:univer-shadow-md
565
- [&_[data-title]]:univer-text-sm [&_[data-title]]:univer-text-gray-900
566
- `,toastOptions:{classNames:{content:`univer-leading-normal`,success:`[&_[data-icon]]:univer-text-green-500`,info:`[&_[data-icon]]:univer-text-primary-600`,error:`[&_[data-icon]]:univer-text-red-500`,warning:`[&_[data-icon]]:univer-text-yellow-500`}},visibleToasts:e==null?5:e,...t})}function Rm(e){let{data:r,itemKey:i,children:a,height:o,itemHeight:s,overscan:c=2,className:l,style:u}=e,[d,f]=(0,t.useState)(0);if(!o||!s||s<=0)return(0,n.jsx)(`div`,{className:l,style:u,children:r.map((e,t)=>{let r=typeof i==`function`?i(e):e[i];return(0,n.jsx)(`div`,{children:a(e,t)},r)})});let p=Math.max(0,Math.floor(d/s)-c),m=Math.ceil(o/s)+c*2,h=Math.min(r.length,p+m),g=p*s,_=r.length*s,v=r.slice(p,h);return(0,n.jsx)(`div`,{className:l,style:{...u,height:o,overflowY:`auto`},onScroll:e=>f(e.currentTarget.scrollTop),children:(0,n.jsx)(`div`,{style:{height:_,position:`relative`},children:(0,n.jsx)(`div`,{style:{transform:`translateY(${g}px)`},children:v.map((e,t)=>{let r=typeof i==`function`?i(e):e[i];return(0,n.jsx)(`div`,{children:a(e,p+t)},r)})})})})}let zm=(e,t)=>{let n=[],r=e=>{var i;if(n.push(e.key),t===e.key||(i=e.children)!=null&&i.length&&e.children.some(r))return!0;n.pop()};return e.some(r),n},Bm=(e,t)=>{let n=t==null?new Map:t,r=e;return{findNodePathFromTreeWithCache:e=>{let t=n.get(e);if(t)return t;let i=zm(r,e);return i.map((e,t,n)=>{let r=[];for(let e=0;e<=t;e++)r.push(n[e]);return r}).reverse().forEach(e=>{let t=e[e.length-1];n.set(t,e)}),i},reset:e=>{n.clear(),e&&(r=e)}}},Vm=(e,t)=>t.length?t.reduce((e,t)=>{let n=e.find(e=>e.key===t);return(n==null?void 0:n.children)||[]},e):e,Hm=(e,t)=>{let n=t.slice(0),r=n.pop();return Vm(e,n).find(e=>e.key===r)},Um=(e,t,n)=>{let r=new Set(t),i=n[n.length-1],a=Vm(e,n);if(r.has(i)){if(a.length){let e=t=>{r.delete(t.key),t.children&&t.children.forEach(t=>e(t))};a.forEach(e)}n.map((e,t,n)=>{let r=[];for(let e=0;e<=t;e++)r.push(n[e]);return r}).reverse().some(t=>{let n=Vm(e,t),i=t[t.length-1];if(n.every(e=>!r.has(e.key)))r.delete(i);else return!0;return!1})}else{let e=t=>{r.add(t.key),t.children&&t.children.forEach(t=>e(t))};n.forEach(e=>r.add(e)),a.length&&a.forEach(e)}return[...r]},Wm=(e,t)=>{let n=t.children||[],r=t=>{var n;return(n=t.children)!=null&&n.length?!!t.children.every(r):e.has(t.key)};return n.length?n.some(e=>!r(e)):!1},Gm=(e,t)=>{let n=[],r=Bm(e);return t.forEach(t=>{let i=Hm(e,r.findNodePathFromTreeWithCache(t));if(i){var a;(a=i.children)!=null&&a.length||n.push(i)}}),n},Km=function(e){return e[e.ONLY_LEAF_NODE=0]=`ONLY_LEAF_NODE`,e[e.ALL=1]=`ALL`,e}({});function qm(e,t,n=1){let r=[];return e.forEach(e=>{r.push({...e,level:n}),e.children&&t.has(e.key)&&r.push(...qm(e.children,t,n+1))}),r}function Jm(e){let{data:r=[],defaultCache:i,style:a,defaultExpandAll:o=!1,selectionMode:s=Km.ALL,valueGroup:c=[],onChange:l,onExpend:u,height:d=200,itemHeight:f=32,attachRender:p}=e,[m,h]=(0,t.useState)({}),g=(0,t.useMemo)(()=>new Set,[]),_=(0,t.useMemo)(()=>Bm(r,i),[r,i]),v=(0,t.useMemo)(()=>{let e=new Set;return c.forEach(t=>{_.findNodePathFromTreeWithCache(t).forEach(t=>e.add(t))}),e},[c,_]);(0,t.useEffect)(()=>{function e(t){var n;g.add(t.key),(n=t.children)==null||n.forEach(e)}o&&r.forEach(e),h({})},[o,r]);let y=(0,t.useMemo)(()=>qm(r,g),[r,m,g]);function b(e){var t;(t=e.children)!=null&&t.length&&(g.has(e.key)?g.delete(e.key):g.add(e.key),h({})),!(s===Km.ONLY_LEAF_NODE&&e.children)&&(u==null||u(e.key))}function x(t){let{title:r,key:i,level:a=0}=t,o=e.treeNodeClassName,s=g.has(i),c=v.has(i),u=Wm(v,t);return(0,n.jsx)(`div`,{className:H(`univer-relative univer-text-[13px]`,o),style:{paddingLeft:`${a*20}px`},children:(0,n.jsxs)(`div`,{className:`univer-relative univer-my-1 univer-flex univer-w-full univer-items-center`,children:[t.children&&t.children.length>0&&(0,n.jsx)(`span`,{className:H(`
567
- univer-absolute univer-left-[-16px] univer-top-1/2 univer-flex univer--translate-y-1/2
568
- univer-items-center univer-justify-center univer-text-[8px]
569
- `,{"univer-rotate-[-90deg]":!s}),onClick:e=>{e.stopPropagation(),b(t)},children:(0,n.jsx)(M,{})}),(0,n.jsx)($t,{checked:c&&!u,indeterminate:c&&u,onChange:()=>{l==null||l(t)}}),(0,n.jsx)(`div`,{className:`
122
+ `,content:`univer-gap-2.5`,icon:`[&>svg]:univer-block [&>svg]:univer-size-4`,success:qp[$.Success],info:qp[$.Info],warning:qp[$.Warning],error:qp[$.Error],loading:qp[$.Loading]}},...t}),Zp=({content:e,duration:t,id:n,onClose:r,type:i=$.Info})=>{let a=n==null?Yp():n,o=Jp(i),s=!1,c=()=>{s||(s=!0,Up.delete(a),r==null||r())};return o(e,{id:a,toasterId:Vp,duration:t==null?Hp:t,icon:i===$.Loading?void 0:Kp[i],onDismiss:c,onAutoClose:c}),Up.add(a),a},Qp=e=>{if(e!==void 0){Mp.dismiss(e),Up.delete(e);return}Up.forEach(e=>{Mp.dismiss(e)}),Up.clear()};function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$p.apply(null,arguments)}function em(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function tm(e,t){return tm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tm(e,t)}function nm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,tm(e,t)}function rm(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function im(e,t){e.classList?e.classList.add(t):rm(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function am(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function om(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=am(e.className,t):e.setAttribute(`class`,am(e.className&&e.className.baseVal||``,t))}var sm={disabled:!1},cm=t.default.createContext(null),lm=function(e){return e.scrollTop},um=`unmounted`,dm=`exited`,fm=`entering`,pm=`entered`,mm=`exiting`,hm=function(e){nm(n,e);function n(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=dm,r.appearStatus=fm):o=pm:o=t.unmountOnExit||t.mountOnEnter?um:dm,r.state={status:o},r.nextCallback=null,r}n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:dm}:null};var i=n.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=fm):(n===`entering`||n===`entered`)&&(t=mm)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},i.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:r.default.findDOMNode(this);n&&lm(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:um})},i.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,a=this.props.nodeRef?[i]:[r.default.findDOMNode(this),i],o=a[0],s=a[1],c=this.getTimeouts(),l=i?c.appear:c.enter;if(!e&&!n||sm.disabled){this.safeSetState({status:pm},function(){t.props.onEntered(o)});return}this.props.onEnter(o,s),this.safeSetState({status:fm},function(){t.props.onEntering(o,s),t.onTransitionEnd(l,function(){t.safeSetState({status:pm},function(){t.props.onEntered(o,s)})})})},i.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:r.default.findDOMNode(this);if(!t||sm.disabled){this.safeSetState({status:dm},function(){e.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:mm},function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:dm},function(){e.props.onExited(i)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:r.default.findDOMNode(this),i=e==null&&!this.props.addEndListener;if(!n||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=a[0],s=a[1];this.props.addEndListener(o,s)}e!=null&&setTimeout(this.nextCallback,e)},i.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var n=this.props,r=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var i=em(n,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return t.default.createElement(cm.Provider,{value:null},typeof r==`function`?r(e,i):t.default.cloneElement(t.default.Children.only(r),i))},n}(t.default.Component);hm.contextType=cm,hm.propTypes={};function gm(){}hm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:gm,onEntering:gm,onEntered:gm,onExit:gm,onExiting:gm,onExited:gm},hm.UNMOUNTED=um,hm.EXITED=dm,hm.ENTERING=fm,hm.ENTERED=pm,hm.EXITING=mm;var _m=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return im(e,t)})},vm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return om(e,t)})},ym=function(e){nm(n,e);function n(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var r=n.prototype;return r.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&lm(e),r&&(this.appliedClasses[t][n]=r,_m(e,r))},r.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&vm(e,r),i&&vm(e,i),a&&vm(e,a)},r.render=function(){var e=this.props;e.classNames;var n=em(e,[`classNames`]);return t.default.createElement(hm,$p({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(t.default.Component);ym.defaultProps={classNames:``},ym.propTypes={};let bm=[-9999,-9999];function xm(e){let{children:i,visible:a=!1,offset:o=[0,0],overflowVisible:s=!1,placementY:c=`below`}=e,l=(0,t.useRef)(null),[u,d]=(0,t.useState)(bm),{mountContainer:f}=(0,t.useContext)(Ft),p=()=>{let e=l.current;if(!e)return null;let[t,n]=o,{clientWidth:r,clientHeight:i}=e,{innerWidth:a,innerHeight:s}=window,u=Math.max(0,a-r-2),d=Math.max(0,s-i-2),f=Math.min(Math.max(t,0),u),p=c===`above`?n-i:n;return[f,Math.min(Math.max(p,0),d)]};(0,t.useLayoutEffect)(()=>{if(!a){d(bm);return}let e=p();e&&d(e)},[o,c,a]),(0,t.useEffect)(()=>{if(!a)return;let e=()=>{let e=p();e&&d(e)};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[o,c,a]);function m(e){e.preventDefault()}return(0,r.createPortal)((0,n.jsx)(ym,{in:a,nodeRef:l,timeout:500,classNames:{enter:`univer-popup-enter`,enterActive:`univer-popup-enter-active`,enterDone:`univer-popup-enter-done`,exitActive:`univer-popup-exit`,exitDone:`univer-popup-exit-active`},children:(0,n.jsx)(`section`,{ref:l,className:`univer-popup`,style:{left:u[0]+2,top:u[1]+2,overflow:s?`visible`:void 0},onContextMenu:m,children:i})}),f)}function Sm(e){let{children:r,className:i,style:a,value:o,disabled:s=!1,direction:c=`horizontal`,onChange:l}=e,u=e=>{l(e)};return(0,n.jsx)(`div`,{className:H(`univer-flex univer-gap-2`,{"univer-flex-col":c===`vertical`},i),style:a,children:t.Children.map(r,(e,n)=>(0,t.isValidElement)(e)?(0,t.cloneElement)(e,{key:n,children:e.props.children,value:e.props.value,checked:o===e.props.value,disabled:s==null?e.props.disabled:s,onChange:u}):e)})}function Cm(e){let{children:r,checked:i,value:a,disabled:o=!1,onChange:s}=e,c=(0,t.useRef)(null);function l(e){if(e.stopPropagation(),!(!s||o))if(a!==void 0)s&&s(a);else{let e=c.current.checked;s&&s(e)}}return(0,n.jsxs)(`label`,{"data-u-comp":`radio`,className:H(`univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm`,{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!o,"univer-text-gray-400":o}),children:[(0,n.jsxs)(`span`,{className:`univer-relative univer-block`,children:[(0,n.jsx)(`input`,{ref:c,className:`univer-absolute univer-size-0 univer-opacity-0`,type:`radio`,checked:i,disabled:o,onChange:l}),(0,n.jsx)(`span`,{className:H(`univer-relative univer-box-border univer-flex univer-size-4 univer-items-center univer-justify-center univer-overflow-hidden univer-rounded-full univer-border univer-border-solid univer-transition-colors`,{"univer-opacity-50":o,"univer-border-primary-600 univer-bg-primary-600 dark:!univer-bg-primary-600":i,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!i}),children:i&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-2 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded-full univer-bg-white`})})]}),(0,n.jsx)(`span`,{children:r})]})}function wm(e){let{value:t,options:r=[],hideCheckMark:i=!1,onChange:a,multiple:o,className:s,optionClassName:c}=e,l=Array.isArray(t)?t:[t];function u(e){let t=l.indexOf(e);a(o?t>-1?l.filter(t=>t===e):[...l,e]:t>-1?void 0:e)}return(0,n.jsx)(`ul`,{className:H(`univer-m-0 univer-grid univer-max-h-80 univer-list-none univer-gap-1 univer-overflow-y-auto univer-rounded univer-p-1.5`,W,Rt,s),children:r.map((e,t)=>{let r=l.indexOf(e.value)>-1;return(0,n.jsx)(`li`,{children:(0,n.jsxs)(`a`,{className:H(`univer-relative univer-block univer-cursor-pointer univer-select-none univer-rounded univer-py-1.5 univer-pl-8 univer-pr-2 univer-text-sm univer-text-gray-900 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,c,{"univer-bg-gray-200 dark:!univer-bg-gray-500":r}),onClick:()=>u(e.value),children:[!i&&r&&(0,n.jsx)(S,{className:`univer-absolute univer-left-0 univer-top-1/2 -univer-translate-y-1/2 univer-pl-2 univer-text-primary-600`}),(0,n.jsx)(`span`,{style:{color:e.color},children:e.label})]})},t)})})}let Tm=H(`univer-box-border univer-inline-flex univer-h-8 univer-min-w-36 univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 dark:!univer-bg-gray-700 dark:!univer-text-white`,W);function Em(e){let{className:r,value:i,disabled:a=!1,options:o=[],borderless:s=!1,onChange:c}=e,[l,u]=(0,t.useState)(!1);function d(e){u(e)}let f=(0,t.useMemo)(()=>{let e=[];for(let t of o)t.options?(t.options.forEach(t=>{e.push({label:t.label,value:t.value,disabled:t.disabled})}),e.push({type:`separator`})):e.push({label:t.label,value:t.value,disabled:t.disabled});return[{type:`radio`,value:i,hideIndicator:!0,options:e,onSelect:e=>{c(e)}}]},[o]),p=(0,t.useMemo)(()=>{let e=null;for(let t of o)if(t.options){for(let n of t.options)if(n.value===i){e=n.label;break}}else if(t.value===i){e=t.label;break}return e||i},[o,i]);return(0,n.jsx)(Df,{className:`max-h univer-w-[--radix-popper-anchor-width] univer-min-w-36`,align:`start`,open:l,items:f,disabled:a,onOpenChange:d,children:(0,n.jsxs)(`div`,{"data-u-comp":`select`,className:H(Tm,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":l&&!s,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":s,"univer-cursor-not-allowed":a,"hover:univer-border-primary-600":!a&&!s,"univer-cursor-pointer":!a&&!l},r),children:[(0,n.jsx)(`div`,{className:`univer-flex-1 univer-truncate univer-text-sm univer-text-gray-500 dark:!univer-text-white`,children:p}),(0,n.jsx)(R,{className:`univer-flex-shrink-0 dark:!univer-text-white`})]})})}function Dm(e){let{className:r,value:i=[],disabled:a=!1,options:o=[],borderless:s=!1,onChange:c}=e,[l,u]=(0,t.useState)(!1);function d(e){u(e)}let f=(0,t.useMemo)(()=>o.map(e=>({type:`checkbox`,value:e.value,label:e.label,disabled:e.disabled,checked:i.includes(e.value),onSelect:e=>{c(i.includes(e)?i.filter(t=>t!==e):[...i,e])}})),[o]);function p(e){c(i.filter(t=>t!==e))}let m=(0,t.useMemo)(()=>o.filter(e=>i.includes(e.value)).map((e,t)=>(0,n.jsx)(_t,{className:`univer-max-w-32`,closable:!0,onClose:()=>p(e.value),children:e.label},t)),[o,i]);return(0,n.jsx)(Df,{className:`univer-w-[--radix-popper-anchor-width] univer-min-w-36`,align:`start`,open:l,items:f,disabled:a,onOpenChange:d,children:(0,n.jsxs)(`div`,{"data-u-comp":`multiple-select`,className:H(Tm,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":l&&!s,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":s,"univer-cursor-not-allowed":a,"hover:univer-border-primary-600":!a&&!s,"univer-cursor-pointer":!a&&!l},r),children:[(0,n.jsx)(`div`,{className:`univer-box-border univer-flex univer-w-[calc(100%-16px)] univer-gap-2 univer-pr-2`,children:m}),(0,n.jsx)(R,{className:`univer-flex-shrink-0 dark:!univer-text-white`})]})})}var Om=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,r)=>{let i=wt(`Primitive.${r}`),a=t.forwardRef((e,t)=>{let{asChild:a,...o}=e,s=a?i:r;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,n.jsx)(s,{...o,ref:t})});return a.displayName=`Primitive.${r}`,{...e,[r]:a}},{}),km=`Separator`,Am=`horizontal`,jm=[`horizontal`,`vertical`],Mm=t.forwardRef((e,t)=>{let{decorative:r,orientation:i=Am,...a}=e,o=Nm(i)?i:Am,s=o===`vertical`?o:void 0,c=r?{role:`none`}:{"aria-orientation":s,role:`separator`};return(0,n.jsx)(Om.div,{"data-orientation":o,...c,...a,ref:t})});Mm.displayName=km;function Nm(e){return jm.includes(e)}var Pm=Mm;function Fm({className:e,orientation:t=`horizontal`,decorative:r=!0,...i}){return(0,n.jsx)(Pm,{"data-u-comp":`separator`,"data-slot":`separator-root`,decorative:r,orientation:t,className:H(`univer-shrink-0 univer-bg-gray-200 data-[orientation=horizontal]:univer-h-px data-[orientation=vertical]:univer-h-full data-[orientation=horizontal]:univer-w-full data-[orientation=vertical]:univer-w-px dark:!univer-bg-gray-600`,e),...i})}let Im=e=>{let{defaultChecked:r=!1,onChange:i}=e,[a,o]=(0,t.useState)(r);return(0,t.useEffect)(()=>{o(r)},[r]),(0,n.jsx)(`div`,{className:`univer-h-4`,children:(0,n.jsxs)(`label`,{className:`univer-relative univer-inline-block univer-h-4 univer-w-7`,children:[(0,n.jsx)(`input`,{className:`univer-size-0 univer-opacity-0`,type:`checkbox`,checked:a,onChange:()=>{o(!a),i==null||i(!a)}}),(0,n.jsx)(`span`,{className:H(`univer-absolute univer-inset-0 univer-cursor-pointer univer-rounded-2xl univer-transition-colors univer-duration-200`,{"univer-bg-primary-600":a,"univer-bg-gray-200 dark:!univer-bg-gray-600":!a}),children:(0,n.jsx)(`span`,{className:H(`univer-absolute univer-bottom-0.5 univer-left-0.5 univer-size-3 univer-rounded-full univer-bg-white univer-transition-transform univer-duration-200`,{"univer-translate-x-3":a})})})]})})},Lm=(0,t.forwardRef)((e,r)=>{let i=(0,t.useRef)(null),a=(0,t.useRef)({width:0,height:0}),{className:o,onResize:s,onValueChange:c,...l}=e;(0,t.useImperativeHandle)(r,()=>i.current,[]),(0,t.useLayoutEffect)(()=>{let e=i.current;if(e&&s){let t=new ResizeObserver(e=>{let{width:t,height:n}=e[0].target.getBoundingClientRect();t===0||n===0||(a.current.width!==t||a.current.height!==n)&&(a.current={width:t,height:n},s(t,n))});return t.observe(e),()=>{t.unobserve(e),t.disconnect()}}},[s]);function u(e){let t=e.target.value;c==null||c(t)}return(0,n.jsx)(`textarea`,{ref:i,"data-u-comp":`textarea`,"data-slot":`textarea`,className:H(`univer-box-border univer-flex univer-w-full univer-resize univer-rounded-md univer-bg-transparent univer-p-2 univer-text-base univer-text-gray-900 univer-outline-none univer-transition-[color,box-shadow] placeholder:univer-text-gray-200 disabled:univer-cursor-not-allowed disabled:univer-opacity-50 dark:!univer-text-white`,W,Rt,o),onChange:u,...l})});function Rm({visibleToasts:e,...t}){return(0,n.jsx)(Bp,{className:`dark:![&_[data-description]]:univer-text-gray-200 [&_[data-description]]:univer-text-sm [&_[data-description]]:univer-text-gray-600 [&_[data-icon]>svg]:univer-relative [&_[data-icon]>svg]:univer-top-1 [&_[data-icon]]:univer-self-baseline [&_[data-sonner-toast]]:univer-shadow-md [&_[data-title]]:univer-text-sm [&_[data-title]]:univer-text-gray-900`,toastOptions:{classNames:{content:`univer-leading-normal`,success:`[&_[data-icon]]:univer-text-green-500`,info:`[&_[data-icon]]:univer-text-primary-600`,error:`[&_[data-icon]]:univer-text-red-500`,warning:`[&_[data-icon]]:univer-text-yellow-500`}},visibleToasts:e==null?5:e,...t})}function zm(e){let{data:r,itemKey:i,children:a,height:o,itemHeight:s,overscan:c=2,className:l,style:u}=e,[d,f]=(0,t.useState)(0);if(!o||!s||s<=0)return(0,n.jsx)(`div`,{className:l,style:u,children:r.map((e,t)=>{let r=typeof i==`function`?i(e):e[i];return(0,n.jsx)(`div`,{children:a(e,t)},r)})});let p=Math.max(0,Math.floor(d/s)-c),m=Math.ceil(o/s)+c*2,h=Math.min(r.length,p+m),g=p*s,_=r.length*s,v=r.slice(p,h);return(0,n.jsx)(`div`,{className:l,style:{...u,height:o,overflowY:`auto`},onScroll:e=>f(e.currentTarget.scrollTop),children:(0,n.jsx)(`div`,{style:{height:_,position:`relative`},children:(0,n.jsx)(`div`,{style:{transform:`translateY(${g}px)`},children:v.map((e,t)=>{let r=typeof i==`function`?i(e):e[i];return(0,n.jsx)(`div`,{children:a(e,p+t)},r)})})})})}let Bm=(e,t)=>{let n=[],r=e=>{var i;if(n.push(e.key),t===e.key||(i=e.children)!=null&&i.length&&e.children.some(r))return!0;n.pop()};return e.some(r),n},Vm=(e,t)=>{let n=t==null?new Map:t,r=e;return{findNodePathFromTreeWithCache:e=>{let t=n.get(e);if(t)return t;let i=Bm(r,e);return i.map((e,t,n)=>{let r=[];for(let e=0;e<=t;e++)r.push(n[e]);return r}).reverse().forEach(e=>{let t=e[e.length-1];n.set(t,e)}),i},reset:e=>{n.clear(),e&&(r=e)}}},Hm=(e,t)=>t.length?t.reduce((e,t)=>{let n=e.find(e=>e.key===t);return(n==null?void 0:n.children)||[]},e):e,Um=(e,t)=>{let n=t.slice(0),r=n.pop();return Hm(e,n).find(e=>e.key===r)},Wm=(e,t,n)=>{let r=new Set(t),i=n[n.length-1],a=Hm(e,n);if(r.has(i)){if(a.length){let e=t=>{r.delete(t.key),t.children&&t.children.forEach(t=>e(t))};a.forEach(e)}n.map((e,t,n)=>{let r=[];for(let e=0;e<=t;e++)r.push(n[e]);return r}).reverse().some(t=>{let n=Hm(e,t),i=t[t.length-1];if(n.every(e=>!r.has(e.key)))r.delete(i);else return!0;return!1})}else{let e=t=>{r.add(t.key),t.children&&t.children.forEach(t=>e(t))};n.forEach(e=>r.add(e)),a.length&&a.forEach(e)}return[...r]},Gm=(e,t)=>{let n=t.children||[],r=t=>{var n;return(n=t.children)!=null&&n.length?!!t.children.every(r):e.has(t.key)};return n.length?n.some(e=>!r(e)):!1},Km=(e,t)=>{let n=[],r=Vm(e);return t.forEach(t=>{let i=Um(e,r.findNodePathFromTreeWithCache(t));if(i){var a;(a=i.children)!=null&&a.length||n.push(i)}}),n},qm=function(e){return e[e.ONLY_LEAF_NODE=0]=`ONLY_LEAF_NODE`,e[e.ALL=1]=`ALL`,e}({});function Jm(e,t,n=1){let r=[];return e.forEach(e=>{r.push({...e,level:n}),e.children&&t.has(e.key)&&r.push(...Jm(e.children,t,n+1))}),r}function Ym(e){let{data:r=[],defaultCache:i,style:a,defaultExpandAll:o=!1,selectionMode:s=qm.ALL,valueGroup:c=[],onChange:l,onExpend:u,height:d=200,itemHeight:f=32,attachRender:p}=e,[m,h]=(0,t.useState)({}),g=(0,t.useMemo)(()=>new Set,[]),_=(0,t.useMemo)(()=>Vm(r,i),[r,i]),v=(0,t.useMemo)(()=>{let e=new Set;return c.forEach(t=>{_.findNodePathFromTreeWithCache(t).forEach(t=>e.add(t))}),e},[c,_]);(0,t.useEffect)(()=>{function e(t){var n;g.add(t.key),(n=t.children)==null||n.forEach(e)}o&&r.forEach(e),h({})},[o,r]);let y=(0,t.useMemo)(()=>Jm(r,g),[r,m,g]);function b(e){var t;(t=e.children)!=null&&t.length&&(g.has(e.key)?g.delete(e.key):g.add(e.key),h({})),!(s===qm.ONLY_LEAF_NODE&&e.children)&&(u==null||u(e.key))}function x(t){let{title:r,key:i,level:a=0}=t,o=e.treeNodeClassName,s=g.has(i),c=v.has(i),u=Gm(v,t);return(0,n.jsx)(`div`,{className:H(`univer-relative univer-text-[13px]`,o),style:{paddingLeft:`${a*20}px`},children:(0,n.jsxs)(`div`,{className:`univer-relative univer-my-1 univer-flex univer-w-full univer-items-center`,children:[t.children&&t.children.length>0&&(0,n.jsx)(`span`,{className:H(`univer-absolute univer-left-[-16px] univer-top-1/2 univer-flex univer--translate-y-1/2 univer-items-center univer-justify-center univer-text-[8px]`,{"univer-rotate-[-90deg]":!s}),onClick:e=>{e.stopPropagation(),b(t)},children:(0,n.jsx)(M,{})}),(0,n.jsx)($t,{checked:c&&!u,indeterminate:c&&u,onChange:()=>{l==null||l(t)}}),(0,n.jsx)(`div`,{className:`
570
123
  univer-mx-1 univer-flex univer-h-full univer-shrink univer-items-center univer-overflow-hidden
571
124
  univer-text-ellipsis univer-whitespace-nowrap
572
125
  `,onClick:e=>{e.stopPropagation(),b(t)},children:(0,n.jsx)(Rf,{className:`univer-block`,showIfEllipsis:!0,placement:`top`,title:r,children:(0,n.jsx)(`span`,{className:`univer-block`,children:r})})}),p&&p(t)]})},i)}return(0,n.jsx)(`section`,{className:`
573
126
  univer-relative univer-select-none univer-text-gray-900
574
127
  dark:!univer-text-white
575
- `,children:(0,n.jsx)(`div`,{className:`univer-m-0 univer-h-full univer-list-none univer-p-0`,style:a,children:(0,n.jsx)(Rm,{data:y,itemKey:e=>e.key,height:d,itemHeight:f,children:e=>x(e)})})})}let Ym=new WeakMap;function Xm(e,t){let n=Ym.get(t);n||(n=(0,i.createRoot)(t),Ym.set(t,n)),n.render(e)}function Zm(e){let t=Ym.get(e);t&&(t.unmount(),Ym.delete(e))}let Qm=new Set,$m;function eh(e){return $m||($m=new ResizeObserver((...e)=>{Qm.forEach(t=>t(...e))})),{observe(t,n){Qm.add(e),$m.observe(t,n)},unobserve(t){Qm.delete(e),$m.unobserve(t)}}}e.Accordion=dt,e.Avatar=gt,e.Badge=_t,e.Button=Mt,e.ButtonGroup=Nt,e.Calendar=Yt,e.CascaderList=Zt,e.Checkbox=$t,e.CheckboxGroup=Qt,e.ColorPicker=Va,e.ConfigContext=Ft,e.ConfigProvider=It,e.Confirm=Ua,e.DatePicker=dl,e.DateRangePicker=fl,e.Dialog=ba,e.DraggableList=ml,e.Dropdown=ul,e.DropdownMenu=Df,e.FormDualColumnLayout=Af,e.FormLayout=kf,e.Gallery=Nf,e.GradientColorPicker=Bf,e.HoverCard=gp,e.Input=Ff,e.InputNumber=If,e.KBD=_p,e.MessageType=$,e.Messager=Xp,e.MultipleSelect=Em,e.Pager=jf,e.Popup=bm,e.Radio=Sm,e.RadioGroup=xm,e.Segmented=Lf,e.Select=Tm,e.SelectList=Cm,e.Separator=Pm,e.Switch=Fm,e.Textarea=Im,e.TimeInput=Gt,e.Toaster=Lm,e.Tooltip=Rf,e.Tree=Jm,e.TreeSelectionMode=Km,e.borderBottomClassName=Ut,e.borderClassName=W,e.borderLeftBottomClassName=Bt,e.borderLeftClassName=Vt,e.borderRightClassName=Wt,e.borderTopClassName=Ht,e.clsx=H,e.divideXClassName=`univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-x univer-divide-y-0 univer-divide-solid`,e.divideYClassName=`univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-y univer-divide-x-0 univer-divide-solid`,e.filterLeafNode=Gm,e.findNodePathFromTree=zm,e.findSubTreeFromPath=Vm,e.isBrowser=Pt,e.mergeTreeSelected=Um,e.message=Zp,e.removeMessage=Qp,e.render=Xm,e.resizeObserverCtor=eh,e.scrollbarClassName=Rt,e.toast=Mp,e.unmount=Zm});
128
+ `,children:(0,n.jsx)(`div`,{className:`univer-m-0 univer-h-full univer-list-none univer-p-0`,style:a,children:(0,n.jsx)(zm,{data:y,itemKey:e=>e.key,height:d,itemHeight:f,children:e=>x(e)})})})}let Xm=new WeakMap;function Zm(e,t){let n=Xm.get(t);n||(n=(0,i.createRoot)(t),Xm.set(t,n)),n.render(e)}function Qm(e){let t=Xm.get(e);t&&(t.unmount(),Xm.delete(e))}let $m=new Set,eh;function th(e){return eh||(eh=new ResizeObserver((...e)=>{$m.forEach(t=>t(...e))})),{observe(t,n){$m.add(e),eh.observe(t,n)},unobserve(t){$m.delete(e),eh.unobserve(t)}}}e.Accordion=dt,e.Avatar=gt,e.Badge=_t,e.Button=Mt,e.ButtonGroup=Nt,e.Calendar=Yt,e.CascaderList=Zt,e.Checkbox=$t,e.CheckboxGroup=Qt,e.ColorPicker=Va,e.ConfigContext=Ft,e.ConfigProvider=It,e.Confirm=Ua,e.DatePicker=dl,e.DateRangePicker=fl,e.Dialog=ba,e.DraggableList=ml,e.Dropdown=ul,e.DropdownMenu=Df,e.FormDualColumnLayout=Af,e.FormLayout=kf,e.Gallery=Nf,e.GradientColorPicker=Bf,e.HoverCard=gp,e.Input=Ff,e.InputNumber=If,e.KBD=_p,e.MessageType=$,e.Messager=Xp,e.MultipleSelect=Dm,e.Pager=jf,e.Popup=xm,e.Radio=Cm,e.RadioGroup=Sm,e.Segmented=Lf,e.Select=Em,e.SelectList=wm,e.Separator=Fm,e.Switch=Im,e.Textarea=Lm,e.TimeInput=Gt,e.Toaster=Rm,e.Tooltip=Rf,e.Tree=Ym,e.TreeSelectionMode=qm,e.borderBottomClassName=Ut,e.borderClassName=W,e.borderLeftBottomClassName=Bt,e.borderLeftClassName=Vt,e.borderRightClassName=Wt,e.borderTopClassName=Ht,e.clsx=H,e.divideXClassName=`univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-x univer-divide-y-0 univer-divide-solid`,e.divideYClassName=`univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-y univer-divide-x-0 univer-divide-solid`,e.filterLeafNode=Km,e.findNodePathFromTree=Bm,e.findSubTreeFromPath=Hm,e.isBrowser=Pt,e.mergeTreeSelected=Wm,e.message=Zp,e.removeMessage=Qp,e.render=Zm,e.resizeObserverCtor=th,e.scrollbarClassName=Rt,e.toast=Mp,e.unmount=Qm});